I used time ago to get Indicator values in Multi Time Frame adding BarsArray[] and it worked.
Now I have a problem but I do not understand why:
I add DataSeries and indi in Data series 2:
else if (State == State.Configure)
{
AddDataSeries(_hist_1, TF1Type, TF1Period);
AddDataSeries(TF2Type, TF2Period);
AddDataSeries(TF3Type, TF3Period);
AddDataSeries(TF4Type, TF4Period);
//Delta1= OrderFlowCumulativeDelta(Close, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Type.BidAsk, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Period.Session, 0);
Delta2= OrderFlowCumulativeDelta(BarsArray[2], NinjaTrader.NinjaScript.Indicators.CumulativeDelta Type.BidAsk, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Period.Session, 0);
}
And then I draw a line in max/min in panel2 (BarsInProgress == 2 is 60 min)
if (BarsInProgress == 2) // 60 min.
{
if(IsFirstTickOfBar)
{
Draw.Line(this, "HLH2_Tf1"+ CurrentBar.ToString(), false, Time[0], Delta2.DeltaHigh[1], Time[1], Delta2.DeltaHigh[1], Brushes.Yellow, DashStyleHelper.Dot,1, false);
Draw.Line(this, "HLL2_Tf1"+ CurrentBar.ToString(), false, Time[0], Delta2.DeltaLow[1], Time[1], Delta2.DeltaLow[1], Brushes.Yellow, DashStyleHelper.Dot,1, false);
}
Finally all work fine but the value High/Low are not of the 60 min candle, they are of the 1 min chart (it seems refers to BarsInProgress == 0), the chart I'm viewing.
Could you help to understand why ...what is wrong please?
Thanks. Caudio

Comment