I want to draw some shapes *after* the last bar paints, as below. Because it paints at the end, I do a bunch of calculations during previous bars but I don't actually need to paint anything. currently I've got something like this:
if(State == State.Realtime) Paint();
Is there a way to trigger a draw immediately after going realtime, to a value i can check to see if the current bar is the last available one?
So something like this:
if(isLastHistoricalBar || State == State.Realtime) Draw();
Calling OnBarUpdate manually on state change to realtime.
Detecting if the bar time is < 10 minutes from DateTime.now. This works except when I'm viewing historical data during market replay then nothing paints.
Comment