MAE is larger then the stoploss in pips

Noticed when re testing with MAE/MFE that it is not correct. Strategies with a fixed stop loss always close with the correct stop loss but MAE can be totally of.  Example Fixed stop is -34 pip but MAE -210pip
Attachments
No attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Refused
  • Priority Normal

History

m
#1

mabi

20.12.2018 14:53

Task created

TB
#2

Tomas Brynda

21.12.2018 07:32

Status changed from New to Refused

MAE/MFE values may differ from SL/PT prices. It depends on your backtest settings. For example - If you set up commissions, MAE will be higher than PL of an order closed on SL. It is due to the additional cost.


It also depends on the backtesting engine used. MetaTrader4 engine uses preset SL/PT prices when computing PL of orders. In this case MAE is sometimes lower than the actual SL price. MetaTrader5 behaves the same way, but if running with tick precision, real prices reached are used in PL computation.  


You can try to run backtest using MetaTrader5 engine with tick precision and without commissions. Then the values should correspond. There may be only a small differences due to rounding.


If you still get diverse values, attach the problematic strategy. 

TB
#3

Tomas Brynda

21.12.2018 07:40
I forgot to mention that I made a little fix in MAE/MFE computation. I may have caused bigger differences for short orders. Please try it after new release and it should be fine
m
#4

mabi

25.12.2018 00:14
yup . now it works

Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please