[122]result is diff between mt4 and SQ in cross forex pair

How does sq calculate $ of each trade ?

pips * tick value?

I test EURJPY, i found each trade is different from MT4, Why?



please refer the screen shot


you can test last 5 year data in EURJPY


I have exported data from MT4 and import to SQX to make sure data is the same.


the tick value is 0.9 in both test engine


so why the result is different..









Attachments
Capture2.png
(84.43 KiB)
Capture1.png
(54.85 KiB)
debug_EURJPY_Strategy 4121008.sqx
(46.46 KiB)
  • Votes +3
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

sm
#1

samuel

25.06.2019 03:36

Task created

sm
#2

samuel

31.07.2019 08:45

Subject changed from result is diff between mt4 and SQ in cross forex pair to [122]result is diff between mt4 and SQ in cross forex pair

why this issue is ignored
sm
#3

samuel

31.07.2019 08:45
Voted for this task.
TB
#4

Tomas Brynda

06.08.2019 12:04

Status changed from New to Waiting for information

Hi Samuel,

PL of each order is calculated this way: 


PL = DeltaPrice * Size * PointValue - CommissionCost


What currency do you use in your MT account? In SQX we calculate everything in dollars. 


And in MetaTrader there is probably some swap cost taken into account when computing PL of an order.




rr
#5

Ronen

08.08.2019 14:01
Voted for this task.
rr
#6

Ronen

08.08.2019 16:00
At Major forex  MT4 with SQ results the same

but at Cross forex pair MT4 with SQ result are different 

How to let cross forex pair in  MT4 and SQ back testing be the same results?

Thanks

h
#7

hankeys

08.08.2019 17:28
i am not facing any problems you describe...backtests are OK, and i am trading 6 currencies, gold and indeces
sm
#8

samuel

08.08.2019 17:39
for hankeys


you should do backtest using cross forex (like GBPJPY)

sm
#9

samuel

08.08.2019 17:54
Hi tomas,


I had loaded a MT4 property of which swap cost set to zero when export history data to MT4.


MT4 currency is USD. 


please check it!








KL
#10

kainc301

08.08.2019 18:44
Are your tick values set up correctly for cross pairs in SQX?
sm
#11

samuel

08.08.2019 18:53

Attachment 1.jpg added

Attachment 2.jpg added

yes, Data of sqx and MT4 is the same
h
#12

hankeys

08.08.2019 19:47

Attachment EURJPY___BTvsREAL.png added

trust me, i am hard for my strategies and doing weekly the compration...


this is comparation of 71 EURUSD strategies, TF M5-H4, backtests are OK and trading looks the same

h
#13

hankeys

08.08.2019 19:49
if you think, that BT will be 100% the same as demo or real trading, the truth is NOT
b
#14

bentra

09.08.2019 01:50
Both engines are showing trades at the exact same prices for enter and exit in the first screenshot so it seems odd that the profit should show different. What about slippage settings? 
sm
#15

samuel

09.08.2019 11:04
For bentra


that why i post the issue here


the slippage setting is 0 in SQX


I think that real tick precise include slippage situation

b
#16

bentra

09.08.2019 18:14
Any slippage settings in MT4? Are you using TDS?

Commission settings?


sm
#17

samuel

12.08.2019 09:55

For bentra,

MT4 has no slippage & commission setting to config. TDS? what's this ? XD

Cost is decided by difference of Ask and Bid


For tomas, 

I think that you can just duplicate it again because build 121 is normal .

121 has only some difference trades and you said the issue had fixed in 122.

So i check the issue reported using build 122, i still found another issue...

I'm sure that setting in both SQX and MT4 is the same.


b
#18

bentra

12.08.2019 10:47

Attachment Annotation 2019-08-12 042446.png added

TDS=Tick Data Suit gives real ticks, commission and slippage settings in to your mt4 terminal if you used it but you don't so doesn't matter. You haven't shown the actual commission settings for SQX, you only showed the pairs default commission in data manager but that could be overridden, also there is a bug in case you are doing cross checks with individual commission settings for each cross check then commissions aren't calculated correctly for the main data. You could add a commission column in to the trades list on SQX for additional confirmation of commission calculations like I did in the screenshot. I think to get commission for mt4, it depends on your broker and account so you might need to use https://docs.mql4.com/trading/ordercommission  to double check it or just check with your broker.



sm
#19

samuel

12.08.2019 11:52

Attachment Screen Shot 2019-08-12 at 173222.png added

Attachment Screen Shot 2019-08-12 at 175128.png added

Attachment Screen Shot 2019-08-12 at 175128.png deleted

Attachment Screen Shot 2019-08-12 at 175128.png added

Thanks for your suggestions


attached files show the commission of two engine


Both swap & commission is 0.

b
#20

bentra

12.08.2019 12:03
Voted for this task.
TB
#21

Tomas Brynda

19.08.2019 10:24

Attachment screen.png added

Attachment Strategy Tester_ SQTest.html added

I just made some tests on EURJPY and everything's fine for me. Take a look at the attachments.


The only thing that I can think of which can cause the problems on your side is a bad symbol instrument setting.

From your screenshots I can see your EURJPY instrument settings, which seem to be fine. 

Maybe it's a stupid question, but does your symbol you use for retesting use the EURJPY instrument?


sm
#22

samuel

20.08.2019 09:37
what point value in MT4? Is it 891?
That what i say, all trades have slightly difference even if point value is the same in both side.
TB
#23

Tomas Brynda

22.08.2019 08:32

Status changed from Waiting for information to Fixed

The thing is that if you trade on a chart with different currency than your account uses, point value in MT is changing with every order. It depends on the actual quotation.

If you have your account in USD and trade on EURJPY, then after closing an order the PL is calculated using the current quotation for USDJPY.

So the point value in MT terminal on non XXXUSD pairs is not constant and there will be little differences in PL.


SQ uses constant point value and it's the only way how to do this when backtesting. 


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