Some strategies acting quite different on MT4 specifically the strategies that hedge in MT4 engine and do not hedge in SQX engine

Many strategies are impressively similar performance on MT4 but some are not. 

Running on D1, EST + 7 with USDST. These bad ones have 20% more trades in MT4. These strategies seem to have a high amount of "temporary hedges" in MT4. But in the SQX engine with these same strategies hedges rarely occur. So that's what the big difference is....

Further more, I have probably found the issue: In MT4 I have found that the sqGetMarketPosition function NEVER reports -1, it only reports either 0 or 1. Also, sqMarketPositionIsShort function NEVER returns true (but sqMarketPositionIsLong seems to work fine!). I tried to use these functions to manually prevent the  hedging but they are bugged.... 




Attachments
Strategy 015419 bug1.sqx
(140.45 KiB)
  • Votes +1
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

b
#1

bentra

20.08.2019 10:34

Task created

a
#2

Venus

22.08.2019 13:45
Voted for this task.
TB
#3

Tomas Brynda

22.08.2019 14:51

Status changed from New to Fixed

I did some modifications in MQL code, it should be working well in the next release.

Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please