Errors when using strategy tester

 

Hi All!

I'm a newbie of metatrader but I love this tool! And this is a great forum, here is my first post:

I have installed the metatrader4. Downloaded 1 min data in the History Center for EURUSD. I run the strategy tester on the EA "MACD Sample" that is included in the installation of metatrader4, on EURUSD daily, model "every tick", from 20090101 to 20100101, no visual mode. In the journal I get a lot of these errors :

OrderModyfy error 1 (= If unchanged values are passed as the function parameters, the error 1 (ERR_NO_RESULT) will be generated.)

OrderModyfy error 145 (=Modification denied because order too close to market.)

I'm surprised to see so many errors with an EA that is included in the installation of metatrader4. Where do the errors origin from? Is it a badly written EA that does not calculate the new prices correctly? Or is this something in the execution of the Strategy Tester?

I'm quite new to using metatrader and its strategy tester and have little experience. Do you have similar experiences and maybe an explanation? Are these errors common? Are there other errors that are common?

Best Regards,

Wolfgang Mrazek,

Sweden

 
The broker probably doesn't hold the minute data for a year. Try using 1 hour data or only the previous week for 1 minute scale. I ran MACD on Interbank demo and it runs fine. Also make sure you have valid settings for the inputs like trailing stop (30). If it is too small errors might occur. The standard settings may have been corrupted.
 

Thanks Ruptor for you help.

I checked that, the 1 minute data is from 1999-10-01. Also changed stoploss from 30 to 60. But it's the same result. I tried with timeframes daily and 4H that now gave me even more errors, see attached logfile.

The EA "Moving Average", also included in the installation, gives also a lot of error messages.

 
If I run the sample code over the last 3 days it does give a couple of order modify errors so clearly the sample code shows you how not to code trailing stop order modify commands. The samples are just a pointer to show what is possible they are not perfect. It could be the data from your broker makes the sample MACD give more errors so try an Interbank demo, that is what I was looking at, and see if it is the same. The hardest part about coding is handling all the things that can go wrong as opposed to the simple task of doing what you want.
 

How do I open an Interbank demo account? The only demo account I can open in the mt is with United World Capital.

Yes, I know the hard work of programming, it's the unexpected events that are tricky. So it is also in mql4. I just have to find out all the things that can happend during the order send, modify etc. I guess that also the communication errors, delays has to be treated in some way. I haven't read the sample codes line by line and there might be some weakness there.

 

Go here and click free demo

http://www.ibfx.com/newvisitor/


Sample code doesn't hadle errors on OrderModify or OrderClose commands hence errors.