else if (State == State.DataLoaded)
{
EMA1 = EMA(BarsArray[1], 100);
....
Is there any way to access the EMA value from the last historical bar prior to the first call of OnBarUpdate? The reason I ask is I am trying to set the initial state of my indicator visuals based on the last value of the EMA before OnBarUpdate is called. This is a problem because after hours with no data updates the indicator remains in this state of initialization since there are no OnBarUpdate calls. I would like to be able to look through charts and have them be correct based on the last bar of data regardless of incoming data to trigger the OBU.
Thanks.
Comment