I have:
if (CurrentBar < 22) return;
at the top of OnBarUpdate
I have tried:
double ADXvariable = 0; (in variables)
and:
ADXvariable = ADX(14)[0]; (in OnBarUpdate)
I also tried creating a DataSeries to hold the values:
private DataSeries ADXvalue; (variable)
ADXvalue.Set(ADX(14)[0]); (OnBarUpdate)
both of calculations return a value of 24.30 for IWM for today with CalculateOnBarClose = false (daily)
But, when I add the packaged ADX indicator onto my chart, period 14, with CalculateOnBarClose = false, the indicator says the value is 31.14.
Thoughts?
Comment