In an indicator I'm developing, I'd like for the code to be able to react if the current bar is part of a draw object or not.
In this particular case, the indicator successfully draws rectangles on the chart given certain conditions. I've been trying - but not succeeding - in finding a way to change the bar color (using the BarColor feature) whenever a bar occurs which is the very first bar in a sequence not to be part of a rectangle.
I'd really appreciate any advice on how to achieve this. Thanks.
Comment