Indicators don't work properly in the strategy tester when the loop starts at prev_calculated-1
Redefine your "first" variable
int first; int bars_back = 1000; if(prev_calculated>rates_total || prev_calculated<=0) // checking for the first start of calculation of an indicator { first=Periods; // starting index for calculation of all bars } else { first= rates_total - bars_back; // starting number for calculation of new bars }
Conor Mcnamara #:
Indicators don't work properly in the strategy tester when the loop starts at prev_calculated-1
Redefine your "first" variable
Thank you so much, that was just the issue that i was running into. Appreciate your time, your solution solved it for me

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
so i made some modifications to supertrend and added a way to track fair value gap, but for some reason, while the indicator does work in live charts, it doesnt in the strategy tester, and that makes it so that i can not backtest an EA that i made based on it. I checked and there are none of the usual suspects when it comes to this issue.
as for the values for the fair value gap being 0,i tried making them EMPTY_VALUE and -1 and nothing worked
any insight would be great