Question on Spread

 

I am testing an EA in MT4, and am having good results when I choose a spread of '2' in the Strategy Tester.

When I switch over to 'Current' in the Strategy Tester for the spread, the results are horrible.

 Is there a way to determine or control the spread, or is it something that fluctuates and isn't controllable? 

 
traydmark:

I am testing an EA in MT4, and am having good results when I choose a spread of '2' in the Strategy Tester.

When I switch over to 'Current' in the Strategy Tester for the spread, the results are horrible.

 Is there a way to determine or control the spread, or is it something that fluctuates and isn't controllable? 

 Yes, you can control your EA to trade only when the spread is equal or lower than a predefined value

Do you have the code?
 
Mohammad Soubra:
 Yes, you can control your EA to trade only when the spread is equal or lower than a predefined value

Do you have the code?

Yes... It's built into by EA... I will have to set it and see if the results improve.

Thanks for the response... I will update. 

 
traydmark:

Yes... It's built into by EA... I will have to set it and see if the results improve.

Thanks for the response... I will update. 

MarketInfo(Null,MODE_SPREAD)
 
Mohammad Soubra:
 Yes, you can control your EA to trade only when the spread is equal or lower than a predefined value

Do you have the code?

Do you have an EA coded already to control the spread, if so can you pls share it thanks.

 

Just be like, holdYourHorses.

input int maxHeightOfJumpableRamp = 2; //max spread
bool holdYourHorses = false;
if(MarketInfo(NULL,MODE_SPREAD)>maxHeightOfJumpableRamp)
holdYourHorses = true;
// Make !holdYourHorses a requirement before you open a trade
Reason: