Download MetaTrader 5

how to set spread to 2 points during strategy test?

To add comments, please log in or register
nicolasxu
296
nicolasxu 2015.04.06 10:08 

When I issue a market by order for 1 lot of EURUSD, there will be immediate 17.00 dollars loss. I believe this is due to the markup that brokers put on top of market price. 

I'd like to set the markup(Is this also called spread?) to minimum value during the EA test, e.g.: 2 points. 0.2 pips

 

How to set spread(The markup by forex brokers) in MQL5 during EA test? 

 

Thanks! 

Francis Dogbe
9502
Francis Dogbe 2015.04.06 10:53  
Check your leverage level
nicolasxu
296
nicolasxu 2015.04.06 10:55  
Roszey:
Check your leverage level
my leverage is 1:100. Why should I check the leverage? Is it possible to set the spread for history data during EA test? Either in MQL5 code or MT5 trader? 
Francis Dogbe
9502
Francis Dogbe 2015.04.06 12:44  
nicolasxu:
my leverage is 1:100. Why should I check the leverage? Is it possible to set the spread for history data during EA test? Either in MQL5 code or MT5 trader? 
if your leverage is not high enough to accommodate huge lot sizes you will be closed out of your trade.
Deevog
2085
Deevog 2015.04.06 13:51  


Simply you can enter or fix spread in your tester like in image

If you faced 17 Loss during 1.0 Lot  then there many factors, If you opened lot during news session then broker floating spread goes high, second at closing with high fluctuation there must be slippage. you didn't clearly mentioned which you lot used   1.0  or 0.1 or send screen shot of you trade 

nicolasxu
296
nicolasxu 2015.04.06 16:28  
Deevog:


Simply you can enter or fix spread in your tester like in image

If you faced 17 Loss during 1.0 Lot  then there many factors, If you opened lot during news session then broker floating spread goes high, second at closing with high fluctuation there must be slippage. you didn't clearly mentioned which you lot used   1.0  or 0.1 or send screen shot of you trade 

Thanks a lot for the screenshot. I am using 1.0 lot, not the 0.1 mini lot. But my MT5 doesn't have the spread setting that showed in your screenshot. 

Here is my EA test setting:

 

EA test setting without spread setting 

 

I am using MT5 build 1100, 20 March 2015.

Why my EA test setting panel does not have spread setting? 

nicolasxu
296
nicolasxu 2015.04.07 02:54  

 

Simulation of spread

The price difference between the Bid and the Ask prices is called the spread. During testing, the spread is not modeled but is taken from historical data. If the spread is less than or equal to zero in the historical data, then the last known (at the moment of generation) spread  of is used by testing agent.

In the Strategy Tester, the spread is always considered floating.

 

 

This is what I found from MT5 help. Does mean that user cannot set spread manually for EA test?

 


To add comments, please log in or register