mix1911:
Hello,
The issue exists both when the indicator is tested by itself and when it's tested as a part of an EA.
Any help will be appreciated
/*int counted_bars=IndicatorCounted(); if(counted_bars < 0) return(-1); if(counted_bars > 0) counted_bars--; int limit = Bars - counted_bars;*/ int limit; if (prev_calculated < 0) return(-1); if (prev_calculated == 0) limit = rates_total - 1; else limit = rates_total - prev_calculated + 1; //for(int i = limit -1 ; i >=0; i--) { for(int i = limit; i >= 0; i--) {
Naguisa Unada:
mix1911:
Thank you for the prompt reply but unfortunately the change made no difference. The indicator still works well on chart but not on the tester.
Thank you for the prompt reply but unfortunately the change made no difference. The indicator still works well on chart but not on the tester.
It's my mistake.
//limit = rates_total - prev_calculated + 1;
limit = rates_total - prev_calculated;
Naguisa Unada:
It's my mistake.
That did it! Thank you very much for the assist!
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
Hello,
I wrote a simple indicator that draws the day's High and Low (useful on timeframes smaller than D1). When I attach the indicator to a chart, it correctly identifies the change of the day at 00:00. The issue is that the indicator, when used in the tester, seems to reset itself twice daily, at 23:00 and at 00:00.
This is the indicator displaying correctly on a live chart.
This is the indicator on the tester.
The issue exists both when the indicator is tested by itself and when it's tested as a part of an EA.
Any help will be appreciated