how to set spread to 2 points during strategy test?

 

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! 

 
Check your leverage level
 
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? 
 
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.
 


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 

 
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? 

 

 

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?

 


Reason: