Adding Realistic gaps handling option for MT5 engine

Dear Mark Fric,



I show you a bizarre execution: here attached there is a strategy with a trailing stop executed in the middle of a gap. It's impossible in reality. The Dax30 cfd, on june 24 2016, opened with a bid gap: by 10318 (close of june 23) to 9284  (open of june 24). As you can see in the list of trades, the strategy closed the trade at 10016, but the price had jumped this price, so it's impossibile: in reality it would have closed at 10318 or 9284.


Maybe it's a bug. Could you control it? Maybe it's a general issue with the gaps.
thak you very much, best regard.
Giuseppe Piloni

Attachments
Build 103279.cfx
(24.85 KiB)
Strategy 103279.sqx
(831.20 KiB)
Retest 103279.cfx
(3.70 KiB)
BUG SQX.jpg
(323.77 KiB)
  • Votes +2
  • Project StrategyQuant X
  • Type Feature
  • Status Fixed
  • Priority Normal

History

b
#1

beppil

26.11.2019 16:28

Task created

b
#2

bentra

27.11.2019 13:18
Voted for this task.
m
#3

Mariano

05.05.2020 21:12
Voted for this task.
TB
#4

Tomas Brynda

11.05.2020 13:32

Status changed from New to Fixed

Hi Beppil,

we have already handled this kind of issue. 

If you go to Trading Options settings, you can find there a new option Realistic Gaps Handling. 

If you select this option, the stops won't be filled into gaps.


Best regards,

Tomas

h
#5

hankeys

11.05.2020 15:56
gap handling is possible only for MT4 engine


we are missing it for MT5 engines, where the gap filling occurs too

TB
#6

Tomas Brynda

25.05.2020 16:46

Status changed from In progress to Fixed

For MT5 engine you can make a Real tick - real spread backtest in SQ. Then the orders will be closed at real prices.

The same applies on backtesting in MetaTrader5, for Every tick based on real ticks precision, you will get real closing prices.

Other precisions fill at the exact price that was set. We've made the computation in SQ's MetaTrader5 engine behave the same way as in MT5 itself.

h
#7

hankeys

25.05.2020 20:50
i dont have time to use realtick data...i dont understand that for MT4 it was added and we need to explain it twice...
TB
#8

Tomas Brynda

26.05.2020 09:19

Subject changed from Trailing stop executed in the middle of a gap to Adding Realistic gaps handling option for MT5 engine

Type changed from Bug to Feature

Status changed from Fixed to New

TB
#9

Tomas Brynda

21.07.2020 15:52

Status changed from New to Fixed


Votes: +2

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please