Thank you for your note.
To understand why the script is behaving as it is, it is necessary to add prints to the script that print the values of the conditions so you may see why the condition is/is not becoming true and allowing BarBrush to bet set.
In the script add prints (outside of any conditions) that print the values of every variable used in every condition along with the time of that bar. Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).
Below is a link to a forum post that demonstrates using prints to understand behavior and including a link to a video recorded using the Strategy Builder.
https://ninjatrader.com/support/foru...121#post791121
Also, see the attached example script that demonstrates using BarBrush to change the color of a bar when Close[0] > Resistance[0] or when Close[0] < Support[0].
Please let me know if I may further assist
Comment