Disliked{quote} The GetIndexFirstTfBarOfDay() function returns the bar shift of the candle which you are looking for. You did not call the function in the main start() function. You need to call that function, and then feed the result into your FileWrite() function. It looks like you have no clue what you are doing, sorry... {file} And, why are you calling it strSf() when it does not return a string??? If you need to convert the result to a string, you can do that with the index variable - convert that to a string.Ignored
However, the only problem : the index shift is standardised throughout whole loop, only one figure, no change at all (your GetIndexFirstTfBarOfDay block is targeting at the longest index shift number only), but what I would like to get is the index that varying on each day like these two pictures :-
1) https://www.forexfactory.com/attachm...0?d=1669515505
2) https://www.forexfactory.com/attachm...1?d=1669515518
Hope you can consider to help the final stage of this Export script, thanks.
Attached File(s)