what is the problem with this EA on backtesting

siscop

Newbie
Messages
3
Likes
0
Hi,
I wrote a little breakout EA what does not do what I expected on the backtest. So to follow up the variables I placed a print command on every loop. On the journal I see the big gaps what I can’t verify. Pressing F2 I see that the History data is complete so the error can’t be there.

Thanks for your help.
sis
 

Attachments

  • P1.JPG
    P1.JPG
    66.9 KB · Views: 386
  • Siscop2DayBreakOut.mq4
    4.3 KB · Views: 460
Can you explain the logic behind it so people can comment on it? I cannot understand the variable names.
 
my problem is that i dont understand the big gaps on the journal.
i placed a print command on each loop for the variables on "long" "short" and "ticket".
the EA should only go into a position if we are not in a long or in a short position.

on baktesting however i see that on certain times the EA goes into more than 1 position. so i printed the long and short variables on each loop. since i see the big gaps i cant localize the error.
so my question here is if someone already dealed with that kind of a problem? what am i not considering.
if mt4 shouldn’t do something like that perhaps someone can look up my code and tell show me my mistakes.

the first part of the code counts the bars of today and of yesterday. It copies the high and lows of both days. If a breakthrough happens and we are not in a long or short position a position is entered.
1min charttime.

thanks,
sis
 
Hi,

Don't trust journal while backtesting! open log file instead ... :eek:

To be more specific, it have something to do with Print/Alarm buffer flushing while backtesting, its look like a bug.

Cheers,
Kriss
 

Attachments

  • 1.jpg
    1.jpg
    76.6 KB · Views: 279
  • 2.jpg
    2.jpg
    50.1 KB · Views: 250
Last edited:
Hi,

Don't trust journal while backtesting! open log file instead ... :eek:

To be more specific, it have something to do with Print/Alarm buffer flushing while backtesting, its look like a bug.

Cheers,
Kriss
THANK YOU.....
didnt know about the log. :clap:
(y)
sis
 
Top