Tos code indicators thinkorswim

broken image
broken image

If Hplot is false, it plots double.nan (a placeholder for “ not a number”). It checks if Hplot is set to true, and if so, it retrieves the high price of the previous day using (which represents the previous day) and plots it.

broken image

plot prevHigh = if Hplot then high(period = aggregationPeriod) else double.nan : This line defines the plot for the previous day’s high.The default is set to ‘yes’ for all three. input Hplot = yes, input Lplot = yes, input Cplot = yes : These inputs allow the user to choose whether to plot the previous day’s high, low, and close respectively.The default is set to display data for the entire day. input aggregationPeriod = AggregationPeriod.DAY : This allows the user to select the aggregation period for the indicator.This means it will only be displayed on intraday charts with a different aggregation period. declare hide_on_daily : This line indicates that the indicator should be hidden on daily charts.The indicator is designed to plot the high, low, and close prices of the previous trading day on the chart. This is a thinkScript code used in the thinkorswim trading platform to create a custom indicator.

broken image