I wrote a simple strategy that colors the background of a bar red, if the price of this bar crosses below the last SwingLow marker of the built-in indicator Swing, and green, if above. It works fine. Please see attached screenshot.
I then added a logic that I found on the forum (e.g., here: https://forum.ninjatrader.com/forum/...nter-only-once) that should disable the coloring after the background has been brushed red or green for the first time. However, this seems to disable the entire strategy, as all the colored backgrounds disappear and not a single new one is brushed. Please see second screenshot.
Please advise on why this is the case.
Thank you very much in advance and best regards
HHW
Comment