Hi
I seem to be running into this backtesting issue time and time again, and was wondering if there is anything I can do, or perhaps is there anything I am doing wrong.
Basicall when calling this code on the tester its returns I value of over 1000:
Have I done something wrong there because the returned value is completely wrong, I dont seem to get this on a live running chart.
Hi
Thanks for the reply.
I have just tried deleting importing the history covering all timeframes including M1 but the issue is still there. I tired using:
But that also returns the wrong value.
I just tried your original code on my GBPUSD data from April 2012 and I get the correct result to within 1 bar, perhaps you should show your code or at least code something else that you can share that reproduces the problem.
I used this line of code in my test EA . . .
Comment("Week start bar number on timeframe ", Period(), " is # ", iBarShift(Symbol(),Period(),iTime(Symbol(),PERIOD_W1,0),false) );
and get this . . .
Hi again, I tried an EA with just this:
//+------------------------------------------------------------------+ //| Start | //+------------------------------------------------------------------+ void start(){Print("Week start bar = ",iBarShift(Symbol(),Period(),iTime(Symbol(),PERIOD_W1,0),false)); return; } //+------------------------------------------------------------------+ //END
It still returns this error, I have tried, reinstalling the terminal, trying a different terminal, repopulating the history data with new data.
Any idea?
Thanks
Antony
Also forgot to add, I tried this also:
Print("itime = " ,iTime(Symbol(),PERIOD_W1,0));
and it returns 0
Hi again, I tried an EA with just this:
It still returns this error, I have tried, reinstalling the terminal, trying a different terminal, repopulating the history data with new data.
Any idea?
How are you repopulating the data ? all my data is derived from tick data, the tick data is used to create the M1, M5, M30, etc data so I know I have no mismatches in my data.
You might also try letting the Strategy Tester run for a full week beyond the start point and then see what result it gives, that might tell you something.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
I seem to be running into this backtesting issue time and time again, and was wondering if there is anything I can do, or perhaps is there anything I am doing wrong.
Basicall when calling this code on the tester its returns I value of over 1000:
Have I done something wrong there because the returned value is completely wrong, I dont seem to get this on a live running chart.
Please see the attached image to see what I mean:
Thank you in advance
Antony