The profit of sqx and MT5 test is inconsistent

Please refer to the attachment for details. I use 131 version, 131 version of indicator and the latest version of MT5. The service charge sliding point is set to 0,Exactly the same historical data.There is a chart in the attachment, which is a performance comparison chart generated by importing sq's transaction list and MT5's transaction list into QA respectively.It can be seen that the consistency is relatively high at the beginning, but the performance is obviously inconsistent at the beginning of the next stage.I use 1 minute data, but in MT5, the transaction time will appear seconds. I don't know why seconds appear.
Attachments
AAB - 2.zip
(2.89 MiB)
MT5 profit.jpg
(73.58 KiB)
Strategy 0480.mq5
(233.81 KiB)
MT5SQX-QA.jpg
(27.83 KiB)
SQX profit.jpg
(11.49 KiB)
Strategy 0480.sqx
(637.79 KiB)
AAB - 1.zip
(3.39 MiB)
instrument config.jpg
(21.90 KiB)
  • Votes +3
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

4
#1

Jordan

04.05.2021 10:48

Task created

o
#2

Enric

07.05.2021 20:43
Voted for this task.
j
#3

Jwabe

15.05.2021 16:33
Voted for this task.
TB
#4

Tomas Brynda

26.05.2021 09:13

Status changed from New to Fixed

Attachment results.zip added

results.zip
(358.77 KiB)
Hi Jordan,

it was a matter of settings. If set right, I get 100% matching results - check the attachment.


First I imported your data into SQ. Then exported M1 csv file from DataManager and imported into MT (straight import from your files caused bad data in MT).

I got some differences in backtest just like you. The equity curves had the same shape, but there was a growing offset.

I then realized MT creates a spread of 1 tick even though the spread was set to 0 during creation of custom symbol.

Then after setting 1 pip spread in SQ, the results matched.


Best regards,

Tomas

4
#5

Jordan

28.05.2021 08:43

Attachment sq net profit.jpg added

Attachment mt5 net profit.jpg added

Attachment different 00.jpg added

Attachment different01.jpg added

Attachment different02.jpg added

Attachment different03.jpg added

Attachment different04.jpg added

Attachment different05.jpg added

mt5 net profit.jpg
(64.98 KiB)
different 00.jpg
(239.41 KiB)
different01.jpg
(33.47 KiB)
different02.jpg
(32.46 KiB)
different05.jpg
(44.59 KiB)
different04.jpg
(74.92 KiB)
sq net profit.jpg
(23.88 KiB)
different03.jpg
(32.23 KiB)
Thank you very much,Tomas. According to the way you said, I guarantee that the data of SQX and MT5 are completely consistent. Set spread to 1 in sqx. It is true that most of the trades in the trade list are consistent, but there are also many inconsistent trades, resulting in the profit of SQX being about 100,000 less than that in MT5. I don't know whether these inconsistencies can be repaired. Please see the attached figure for details.
TB
#6

Tomas Brynda

01.06.2021 07:15
Hi Jordan,

try to check one more thing - open up a symbol properties in MT and check Stops level of the symbol. 

It must be set accordingly in SQ data settings. 

In MT, the value is in ticks, but in SQ it is in pips, so you have to set 10x lower value in SQ.


Best regards,

Tomas

4
#7

Jordan

01.06.2021 09:32

Attachment SQ test parameter .jpg added

SQ test parameter .jpg
(9.92 KiB)
Hi Brynda,

      Thank you very much. In MT, the default value of stops level is 5. but I haven't found out how to set the value of stop level in sq. 

      In the data tab, there is a test parameters area where you can set spread, slippage and min.distance, but I don't see stop level.

TB
#8

Tomas Brynda

01.06.2021 11:23
Forgot to mention we call it min. distance in SQ. 

Try to set 0.5 there. 


Hope it helps

4
#9

Jordan

01.06.2021 15:29
I am using the latest version 131 of sqx. The result of my test is that no matter the Min distance is set to 0.5 or 5 or 50, it has no effect on the final net profit.
m
#10

Matze

02.06.2021 17:48
Voted for this task.

Votes: +3

Drop files to upload

or

choose files

Max size: 5MB

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

...
Wait please