According to my understanding, "IndicatorCounted()" will return "-1" when it was loaded at the first time and will return the mount of "effective bars" from the second loaded or executed.
But when I run below codes, I see that the parameter, "counted_bars", always is -1 and constant repeatly.
I don't know why and how shall get the effective bars by "IndicatorCounted() "?
You're running it like an expert_advisor. Identify it as indicator, place it within the correct folders, do-some reading about indicators instead of trial and error.
#property indicator_buffers 1
yes, it is.
vx0532: According to my understanding, "IndicatorCounted()" will return "-1" when it was loaded at the first time a
int lookback = ADXbars +1;
if(counted_bars < lookback) counted_bars = lookback;
for (shift = Bars - 1 - CountBars; shift>=0; shift--)