I´m plotting an easy condition from an indicator because I experienced unexpected behavior. In the attached screenshot one can see how it is plotting from this little code...it is plotting ok for delta-down-bar, but it is not plotting for delta-up-bar (close above prior high). The code to debug is simply:
else if (State == State.DataLoaded)
{
OrderFlowCumulativeDelta1 = OrderFlowCumulativeDelta(Closes[0], NinjaTrader.NinjaScript.Indicators.CumulativeDelta Type.BidAsk, NinjaTrader.NinjaScript.Indicators.CumulativeDelta Period.Session, 0);
....
if(Closes[0][0]<Highs[0][0])
{if(OrderFlowCumulativeDelta1.DeltaClose[0] < OrderFlowCumulativeDelta1.DeltaLow[1])
BackBrushes[0]=Brushes.Red;
}
else if(Closes[0][0]>Lows[0][0])
{if(OrderFlowCumulativeDelta1.DeltaClose[0] > OrderFlowCumulativeDelta1.DeltaHigh[1])
BackBrushes[0]=Brushes.ForestGreen;
}
if (BarsInProgress == 1)
{OrderFlowCumulativeDelta1.Update(OrderFlowCumulat i veDelta1.BarsArray[1].Count - 1, 1);}
What might be the reason why it is not plottinig green if the close of OFCD is above the prior CD-bar-high?
Thank you!
Tony

Comment