Thank you for your reply.
First, I see you have created this as a strategy script. As previously mentioned, this would need to be done with an indicator that calls AddPlot():
The indicator would then be available to add to the Market Analyzer as an indicator column:
I also see you are trying to access high and low prices in OnStateChange during State.DataLoaded:
else if (State == State.DataLoaded)
{
// Calculate IB range from 09:15 am to 10:15 am
ibHigh = Highs[1][1];
ibLow = Lows[1][1];
}
This is not possible and I would expect it to cause errors. Although data has been loaded at that point, it is not being processed yet so having a barsAgo reference does not make any sense until STate.Historical and State.Realtime. For more information, please see the OnStateChange() page here:
Thank you for your time and patience.

Comment