The tester doesn't test correctly, why ?

 

Hello,

I wrote an EA.
The report gives my the number of trades (n) and the total net profit (p).
Fine.

Now just for test reasons,
I replaced 1 OrderSend command and 1 OrderClose command
by 10 OrderSend commands and 10 OrderClose commands.
The n should go to 10*n and the p to 10*p, right ?
The n does, but the p doesn't !
Why ?

I found out,
that my replacement implicates different open fill prices !
To show this, I attached the two journals.
Why is the open price depending on the number of OrderSend commands ?
Any ideas ?

Thanks a lot
Ulawun



 

Are you testing with terminal connected to the broker? Diiferent spreads will be used between tests if you are connected. Always test off line if you want consistancy of results

V

 

Hello Viffer,

Yes, I tested with terminal connection !
I disconnected and now p went to 10*p :-)
You found the problem, thanks a lot :-)

Can I set the spread to any value of my desire ?

Thanks again
U

 
Ulawun:

Hello Viffer,

Yes, I tested with terminal connection !
I disconnected and now p went to 10*p :-)
You found the problem, thanks a lot :-)

Can I set the spread to any value of my desire ?

Thanks again
U

There was some code somewhere... and it involved making amendments to the symbol.sel file... you will have to search for it... I disconnected my testing terminal at a spread that was acceptable and haven't changed it. Of course in the real world spread changes throughout the day so be aware of your test results.

V

 

Hello Viffer,

Thanks for the hint: 'symbol.sel'.
There are lots of ways to change the spread in the internet, e.g:

http://stashbox.org/795372/SpreadGenerator_v1.1.mq4

Thanks again and a lot of success in trading

U

 
Maybe it is better to change lot by 10, then to open 10 same positions? On real server and even on demo 10 requests in a row will be a headache for sure...
Reason: