Help with Backtesting

To add comments, please log in or register
Fred7777
290
Fred7777  

Hi Im an advanced trader but just starting to get into Metatrader4.

I followed several youtube videos on how to do a basic backtest on Metatrader and I can do all the steps required but then when I press Start my platform never seems to finish the test. 

It will run for forever for over half an hour on only a small test section of 1 month on daily bars for the built in MACD

I tried several different paramaters all with the same result.

Is there something I am not doing correctly ?

Thanks in advance.


ts

iRick
186
iRick  

Hi


Have a look on the Results and Journal tabs to see if the EA is actually setting up trades

Fred7777
290
Fred7777  
iRick:

Hi


Have a look on the Results and Journal tabs to see if the EA is actually setting up trades

Hi Rick thanks for replying didnt know how this forum was going to work : )

The Results tab is empty. But this is the Journal Tab

Tks Cheers


iRick
186
iRick  
Fred7777:

Hi Rick thanks for replying didnt know how this forum was going to work : )

The Results tab is empty. But this is the Journal Tab

Tks Cheers


So it not putting on any trades, potential it's stuck in an infinite loop

You can use the Print function (https://docs.mql4.com/common/print) within the EA code to see what's happening with various variables

Or try altering the SL/TP to a range you know should trade to see if it's working as expected

Print - Common Functions - MQL4 Reference
Print - Common Functions - MQL4 Reference
  • docs.mql4.com
Data of double type are shown with the accuracy of up to  16 digits after a decimal point, and can be output either in traditional or in scientific format, depending on what entry will be more compact. Data of float type are output with 5 digits after a decimal point. To output real numbers with another accuracy or in a predefined format, use...
Fred7777
290
Fred7777  
iRick:

So it not putting on any trades, potential it's stuck in an infinite loop

You can use the Print function (https://docs.mql4.com/common/print) within the EA code to see what's happening with various variables

Or try altering the SL/TP to a range you know should trade to see if it's working as expected

I will try that. What If I just redownloaded it from scratch will that work do you think also ?

iRick
186
iRick  

It's hard to say, although I wouldn't have thought that would make a difference

Sound like the issue is with the EA itself

Fred7777
290
Fred7777  
iRick:

It's hard to say, although I wouldn't have thought that would make a difference

Sound like the issue is with the EA itself

Ok Ill try the print function tommorow. Where abouts in the world are you btw ?

iRick
186
iRick  
Fred7777:

Ok Ill try the print function tommorow. Where abouts in the world are you btw ?

I'm in London

Something like this:

   Print("Variable1:" + IntegerToString(variable1)
         + ":Variable2:" + DoubleToString(variable2)
         ); 

Set up with various variables in the right place should hopefully point you in the right direction

iRick
186
iRick  

Where did the EA come from?

I'm assuming you have access to the source code? and at least some basic programming (or even capable with something like Excel would be enough)

Fred7777
290
Fred7777  
Im in Sydney Australia. I got it from IG Markets. I have seen the source code. I have basic programming skills. Let me have a look tommorow as its late at night now. Thanks cheers
Bartlomiej Gorski
11388
Bartlomiej Gorski  

Hi Fred,

In order to check what is going on you should do some basic tests to discover where is the issue:

1) try to run ANY other ea on the same dates

if it works - then you have an answer that the issue is strictly related with ea you are testing (probably infinite loop as iRick said)

2) next - check ea - check it in visual mode, there might be a point where something unexpected happens with data (eg. back tick/gap etc) that prevents ea to go futher

(generates error, infinite loop or other)

3) Check the EA with other broker or using other data feed

4) Do some basic tests like "if you have enough space on hard drive" to run test - sometimes ea generates very large log file (especialy when error happens) which put a lot of information in journal - that gets overloaded too.

In that moment log file is still generated in txt file but you dont see anything in journal /experts tab.


So in this way more or less you will know if the issue is related with ea, mt4 platform or data.


Then you can check the ea what part of code is generating problems.

12
To add comments, please log in or register