Strategy Tester Results - Spread

 

All;

I am testing a robot in Strategy Tester. I set the Max Spread on the robot to 2 pips, and the max slippage to 3 pips. I also have the spread on the tester set to 'Current'. When I run Strategy Tester on the 5 minute EURUSD, I have poor results. When I change the spread on Strategy Tester to '2', and also to '5', I have great results with the Robot.

If I have a Max Spread on the robot set to 2 pips, why do I get such poor results with the robot when the spread in Strategy Tester is set to 'Current' versus the better results when the spread is set to '2' or '5'???

Really confusing...

TRayDMark 

 
traydmark: I am testing a robot in Strategy Tester. I set the Max Spread on the robot to 2 pips, and the max slippage to 3 pips. I also have the spread on the tester set to 'Current'. When I run Strategy Tester on the 5 minute EURUSD, I have poor results. When I change the spread on Strategy Tester to '2', and also to '5', I have great results with the Robot.

If I have a Max Spread on the robot set to 2 pips, why do I get such poor results with the robot when the spread in Strategy Tester is set to 'Current' versus the better results when the spread is set to '2' or '5'???

The "Spread" that you set on the Strategy Tester, is not in pips, but in points. For a 5 digit broker, 2 pips = 20 points and 5 pips = 50 points. So if you set the spread in the tester to 2, then you are actually using a Spread of 0.2 pips

Also, the slippage used in the OrderSend() function, is also in points and not pips.

So you have two problems here:

  1. You are not assigning the correct Spread in the Tester
  2. And if you did not know that, it is probably the case that your coded conversions between pips and points is also not correct.

EDIT: Also, read this most recent thread: https://www.mql5.com/en/forum/167339

Consider The Spread Before Buying An EA!!!
Consider The Spread Before Buying An EA!!!
  • www.mql5.com
So, I read a lot about the actual performance of an EA being sub-par as compared to the strategy tester results...
 

Fernando Carreiro:

  1. You are not assigning the correct Spread in the Tester
  2. And if you did not know that, it is probably the case that your coded conversions between pips and points is also not correct.
  1. I agree.
  2. There is Tick, PIP, and Point. They are all different in general. A tick is the smallest change of price. A Point is the least significant digit quoted. In currencies a pip is defined as 0.0001 (or for JPY 0.01)

    On a 4 digit broker a point (0.0001) = pip (0.0001). [JPY 0.01 == 0.01] On a 5 digit broker a point (0.00001) = 1/10 pip (0.00010/10). Just because you quote an extra digit doesn't change the value of a pip. (0.0001 == 0.00010) EA's must adjust pips to points (for mq4.) In currencies a tick is a point. Price can change by least significant digit (1.23456 -> 1.23457)

    In metals a Tick is still the smallest change but is larger than a point. If price can change from 123.25 to 123.50, you have a TickSize of 0.25 and a point of 0.01. Pip has no meaning.

    This is why you don't use TickValue by itself. Only as a ratio with TickSize. See DeltaValuePerLot()

  3. adjusting SL, TP, and slippage for 4/5 digit brokers/JPY pairs.
    double   pip        = (_Symbol,"JPY") < 0 ? 0.01 : 0.0001;
    int      pip_digits = (int)MathLog10(pip/_Point);
    int      slippage   = 3 * int(pip / _Point);
 
Fernando Carreiro:

The "Spread" that you set on the Strategy Tester, is not in pips, but in points. For a 5 digit broker, 2 pips = 20 points and 5 pips = 50 points. So if you set the spread in the tester to 2, then you are actually using a Spread of 0.2 pips

Also, the slippage used in the OrderSend() function, is also in points and not pips.

So you have two problems here:

  1. You are not assigning the correct Spread in the Tester
  2. And if you did not know that, it is probably the case that your coded conversions between pips and points is also not correct.

EDIT: Also, read this most recent thread: https://www.mql5.com/en/forum/167339

Well, that explains a lot... I will definitely have to run Strategy Tester with 30 points (3 pips)... Really appreciate the response... so helpful...

 Does slippage work the same way?... Is it in Pips or Points? 

 
traydmark: Does slippage work the same way?... Is it in Pips or Points? 

I have already answered that, and I quote:

Also, the slippage used in the OrderSend() function, is also in points and not pips.

Also, pay careful attention to WHRoeder's post. He has given you much more detail to work with in improving your EA!
 
Fernando Carreiro: Also, pay careful attention to WHRoeder's post. He has given you much more detail to work with in improving your EA!
Including your slippage question traydmark.
 
You all are the BEST!!!... Many thanks!!!