My code seems to work for all previous bars - HOWEVER, I cannot seem to be able to call the draw function WHEN the bard is OPENED. It seems to draw after the bar is closed - which is too late for me.
protected override void Initialize() { Overlay = true; CalculateOnBarClose = false; } protected override void OnBarUpdate() { if (CurrentBar < 1) return; if (Open[0] != Close[1]) { DrawRectangle("Region"+ CurrentBar.ToString(), ......); //This section does the right thing. } }
What can I do to fix it?
Thank you.
Comment