1) when Swing() is showing me higher highs and higher lows. I would also like to highlight the region where the condition is true, and
2) when an EMA(20) crosses an EMA(50), and stays crossed for 5 bars. After the 5th bar, I would like to add a marker on the chart, let's say it's a ^. .
This isn't limited to these two cases. I plan to incorporate it for various signals.
I have tried Draw.RegionHighlightX(). It works for the most recent instance, however, it does not work for anything in the past. For instance, if my intention is to highlight higher highs, then it will do so, but only if they're occurring right now. As I scroll back through my chart, they are not highlighted. I want these signals to jump out at me visually as I scroll back through charts so ensure my code is behaving as intended.
Please help me understand what is the best path forward to plot these markers on my charts. Thank you.

Comment