show bar shift
You are running through the loop and then applying a value only to index[Bars-1]
for(int i=0; i<Bars;i++) { barTime=iTime(NULL,0,i); shift_Buffer[i]=iBarShift(NULL,0,barTime); }
Use curly braces to define the loop
Maybe just an exercise. but you achieve the same with the simpler
for(int i=0; i<Bars;i++) { shift_Buffer[i]=i; }
try it
You may also want to set indicator digits to 0
your suggestion works thank you very much
For manual back testing I need the " Data Window " to show candle shift . The above code doesn't work . Any idea ?
thank you