bchip: Why does this produce no backtesting results?
void OnTimer()
- Because the timer doesn't work on the tester.
In backtest OnTimer() not performs (M. Ali) - MQL4 forum
Chart Event For MT4 Backtester (Migel) - MQL4 forum - Why are you using a repeating timer, instead of OnTick?
Hi
Thanks for the quick response.
I changed to OnTick and it made no difference to the results.
Do note that if I change the code to
//if (Hour() == StartHour) {
if (true) {
So it does run, I do get a result of 1 trade.
if (Hour() == StartHour) { /////// } else { isFirstTick = false; }//if Hour
isFirstTick is set to false if Hour()!=StartHour
GumRai:
isFirstTick is set to false if Hour()!=StartHour
Oh! I think I understand what your saying,
the first run is at hour = 0, sets it as false and then it stays false continuously.
Will have to rethink the code a bit when I get a chance.
Thank you!
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
Hi everyone
First post here, however reading a lot.
Hoping someone here can help with this. Im struggling quite a bit with the strategy tester.
Im not really sure what Im doing wrong as I watched a video code this EA and it showed results.
Are there any limitations to the strategy tester that I should be aware of? Like you cant use the Hour() function or something.
Ive google around but cant find anything on it.
The system is simply, @ 9am Open a new long position, 40 pips target, 40 pips stop & only take the first order. (if theres anything in the code thats wrong)
Why does this produce no backtesting results?
Any help on this would be appreciated.