Intraday Times Indicator for ThinkorSwim

S

skynetgen

Well-known member
ISignificant intraday times. Also self adjusting for 1m (so you can just have it on every active trading upper chart :) )

Code:
declare upper;
declare hide_on_daily;
declare once_per_bar;

input today_only= Yes;
def day = GetDay();
def lastDay = GetLastDay();
def isToday = If(day == lastDay, 1, 0);
def showReminders = isToday or !today_only;
def showScalp = GetAggregationPeriod() < AggregationPeriod.FIVE_MIN and showReminders;
# Time Reminders
AddVerticalLine(showScalp and SecondsTillTime(0935) == 0, "FirstBar", Color.Black, Curve.LONG_DASH);
AddVerticalLine(showReminders and SecondsTillTime(0930) == 0, "Bell", Color.PLUM, Curve.LONG_DASH);
AddVerticalLine(showReminders and SecondsTillTime(0945) == 0, "945", Color.GRAY, Curve.SHORT_DASH);
AddVerticalLine(showReminders and SecondsTillTime(1000) == 0, "Ten", Color.BLACK, Curve.SHORT_DASH);
AddVerticalLine(showReminders and SecondsTillTime(1030) == 0, "Ten30", Color.GRAY, Curve.SHORT_DASH);
AddVerticalLine(showReminders and SecondsTillTime(1100) == 0, "1115", Color.GRAY, Curve.SHORT_DASH);
AddVerticalLine(showReminders and SecondsTillTime(1200) == 0, "Lunch", Color.BLACK, Curve.FIRM);
AddVerticalLine(showReminders and SecondsTillTime(1315) == 0, "PMSet", Color.GRAY, Curve.SHORT_DASH);
AddVerticalLine(showReminders and SecondsTillTime(1430) == 0, "Pwr Hr", Color.DARK_GRAY, Curve.SHORT_DASH);
AddVerticalLine(showReminders and SecondsTillTime(1530) == 0, "BondClose", Color.DARK_GRAY, Curve.SHORT_DASH);

https://tos.mx/j0tIIWA
 

Similar threads

Top