Relative Content

Tag Archive for thinkscript

ThinkorSwim: Detect changes in Daily EMA on an Intraday chart

In Thinkorswim, I use the following strategy code to detect the shift in the daily EMA on a 1-minute chart. The daily EMA looks like a staircase pattern that reset every day. I use Y to track changes in the daily EMA, and I expect a spike at the start of each trading day when the daily EMA changes its value, but my code only shows a straight line. Does anyone know a fix to this?

referencing lower time frame data series from higher time frames in thinkscript

I would like to reference data of the 1 minute time frame while the 3 minute timeframe (or any other aggregation) is selected. The indicator should paint an arrow on any higher time frame whenever there is an outside up or outside down candle on the 1 minute (outside up candle = low below previous low and close above previous high). If a 1 minute outside up candle forms in the first minute of a 3 minute period, The indicator should paint an arrow beneath the 3 minute candle after the first minute.