I am trying to insert the ichimokucloud indicator (here: https://ninjatraderecosystem.com/use...indicator-nt8/) into my indicator.
I can retrieve the different values for the current bar without any problem, but as soon as I try to use the past bars I get an error even though I have 365 bars displayed and I make sure there are enough bars with if (CurrentBar < 27) return; to be sure that the indicator has been calculated at least once when I try to retrieve index 1
I don't understand. Can you help me?
Thank you
protected override void OnBarUpdate() { if (CurrentBar < 27) return; // S'assurer qu'il y a suffisamment de bars int Trend = -1; if (IchimokuCloud1.SenkouSpanA[0] > IchimokuCloud1.SenkouSpanB[0]) { Trend = 1; } Values[2][0] = Trend; if (IchimokuCloud1.SenkouSpanA[0] > IchimokuCloud1.SenkouSpanB[0] && IchimokuCloud1.SenkouSpanA[1] < IchimokuCloud1.SenkouSpanB[1] ) { Values[3][0] = 0; } }
Comment