Code: Select all
if LastBarOnChart then
FileAppend( filepath , NumToStr(currentbar,0) + "," + NumToStr(Date,0) + "," + NumToStr(time_s,0) );
So, when I check the currentbar from the file then it is about 20 bars behind the series bar when I mouse over it on the chart. Why are these values different and how do I get the currentbar from the series when coding an indicator.