additional info you can find here [GRG-CMPWL-091]
I'll describe the problem briefly here...
strategies have exits mismatch on mt4 and sqx
1) Generated tons of strategies on 129 dev 2 (was the most stable version of sqx for me)
had the following situation there:
entry and exit are the same and correct on mt4 and sqx (green)
Attachment EJ_30_203012980_S_HH_CF_SQX_EQ___BTvsREAL.png added
Attachment EJ_30_203032101_S_BB_CF_SQ4_EQ___BTvsREAL.png added
Thank you for your comment.
I agree with you in some way. We always need to have some reserve in pips and slippage.
However, here is the problem that strategies were closed regardless of stop-loss or take-profit level. Probably other exit algorithm triggered there.
Please have a look at my excel file. How accurate were other strategies. I am not talking about taking exactly the same amount of pips. SQX has slippage settings which I use quite conservatively.
But here I think something wrong with exit logic.
Or if it used other exit logic rather then stop loss/ take profit is it better to use only those block for exits as they are quite accurate according to my previous week?
Status changed from New to Refused
from the xlsx file I am unable to tell you why the differences occured.
In the gbpjpy case, there was probably a difference in PT calculation, because the opening prices don't match and so the ATR won't match too.
If you will find more examples, please attach the exact data exported from your trading platform and we can try to investigate it. But it will be problematic.
As Hankeys said, there are always some discrepancies between backtest and real trading. A lot of things can happen in real time.
Best regards,
Tomas
For me, it is not clear why any difference should be if we use tick precise on SQX and on mt4 during real trading?
Also, it is not a backtest-it is a forward test on a particular the same dukascopy ticks.
On nzdchf trade the entry is similar on both trades but exits are different. Why?
Also, it is the question why difference entrance points in gbpjpy pair.
And if we have discrepancies why other 29 trades ok here?
But you can try one thing that will reveal where the problem lies:
Don't forget to set the right spread and min distance in SQ's data settings
Attachment 7-1112.xlsx added
Attachment list of errors .xlsx added
Attachment image-0.png added
Attachment image-1.png added
Attachment Strategy 0137338 - Optimization 07947.sqx added
Attachment Strategy 0441550.sqx added
Attachment Strategy 04556989 - Optimization 026596.sqx added
Attachment Strategy 01401.sqx added
I am using Dukascopy Data for SQX and trading.
I am comparing entries and exits every week on Saturday and evaluating how accurate they were.
I take trades from mt 4 and trades from SQX and merge them in QA, after that I exporting trade lists and combining them in xls file so I can see dates, entries, exits and length of the trades.
As you can see from my previous excel file (3011-512.xls) it has almost perfect matches.
I've added other strategies for AUDCAD,AUDNZD,CADJPY for the current week (7.12-12.12) and left strategies from previous week for other pairs.
As you can see in the latest xls files (7-11.12 attached) there are a lot of inaccuracies in exits. Was last week to volatile so I have so mismatches?
Also, I found some errors in journal (list of errors attached)
Don't like these things
11.12.2020 22:59 | '1723776143': order #3816596 sell 0.04 AUDNZD closing at 0.00000 failed [Invalid parameters] | ||||||||
11.12.2020 22:59 | '1723776143': order #3820811 buy 0.09 NZDCHF closing at 0.00000 failed [Invalid parameters] |
and
2020.12.07 21:43:38.044 | '1723776143': modification of pending order #3806323 sell stop 0.03 EURGBP at 0.90653 sl: 0.92223 tp: 0.90233 -> price: 0.90654 sl: 0.00000 tp: 0.00000 failed [Common error] | ||||||||||||||||
07.12.2020 21:43 | '1723776143': modification of pending order #3806323 sell stop 0.03 EURGBP at 0.90653 sl: 0.92223 tp: 0.90233 -> price: 0.90654 sl: 0.00000 tp: 0.00000 failed [Common error] | ||||||||||||||||
07.12.2020 21:43 | '1723776143': modification of pending order #3806323 sell stop 0.03 EURGBP at 0.90653 sl: 0.92223 tp: 0.90233 -> price: 0.90654 sl: 0.00000 tp: 0.00000 failed [Common error] | ||||||||||||||||
2020.12.07 21:43:41.097 | '1723776143': modification of pending order #3806323 sell stop 0.03 EURGBP at 0.90653 sl: 0.92223 tp: 0.90233 -> price: 0.90654 sl: 0.00000 tp: 0.00000 failed [Common error] | ||||||||||||||||
07.12.2020 21:43 | '1723776143': modification of pending order #3806323 sell stop 0.03 EURGBP at 0.90653 sl: 0.92223 tp: 0.90233 -> price: 0.90654 sl: 0.00000 tp: 0.00000 failed [Common error] | ||||||||||||||||
07.12.2020 21:43 | '1723776143': modification of pending order #3806323 sell stop 0.03 EURGBP at 0.90653 sl: 0.92223 tp: 0.90233 -> price: 0.90654 sl: 0.00000 tp: 0.00000 failed [Common error] |
Also I did backtest as you said. I've exported data from MT4 (which is not reliable as Meaquotes combines and merges data with Dukascopy data but for research purposes it is ok) and SQX and MT4 shows almost the same results, however, there are small number unmatched trades on both platforms. It leads that it is ok to have some unmatches but I have them quite a lot in 7-1112 xls file. So there are two finding here.
1) I am cursed and unlucky that I have all these "normal" unmatched trades happened at the same time from dozens of strategies I have. What is theoretically and statistically possible OR
2) Something is wrong
Moreover
When you asked me to backtest strategies on tick on MT4 I found that some strategies have errors when backtested on ticks.
e.g
2020.12.12 21:52:37.120 2019.04.09 04:00:00 Strategy 0.1401 EURJPY,M30: OrderSend error 131
2020.12.12 21:52:34.306 2020.11.06 21:00:00 Strategy 0.137338 - Optimization 0.7.947 EURUSD,M30: OrderSend error 131
2020.12.12 21:51:27.010 2020.11.05 12:00:00 Strategy 0.4556989 - Optimization 0.26.596 NZDCHF,M30: OrderSend error 131
2020.12.12 22:18:08.570 2019.01.07 05:00:00 Strategy 0.441550 USDCHF,M30: OrderModify error 130
(strategies attached )
But they are ok when I backtest them with control point model on MT4
________________________
I am not confident in other exits then stop loss/ take profit.
I've generated a lot of strategies but I can not separate which blocks are used for exit in 10000 of strategies/
Probably it will be great to have some sort of filter or thing which can help you sort your existing strategies by entry or exit blocks.
I had so precise past week and so unmatched this week.
Don't know what to do actually.
As usual, I hope you can help.
Thanks
Attachment 14-1912.xlsx added
added close types for you to help
btw data format is different when export it to csv from QA and SQX
Attachment 0401-8012021.xlsx added
it was long 3 weeks and here is my new update regarding exits.
With help of the clonex exit snippets and improver feature I have changed all exits to stop-loss/take-profit/friday at 10 pm only.
And I have much more reliable exits then I have before. Moreover, the accuracy is quite good. So my theory is correct that we need rely only on the simplest way of exits.
This shows that probably no problem from my side and we need to find what was wrong with those strategies and their exits.
thank you in advance
thank you for the statistics. I am comparing the results between SQ and trading platforms quite often and I can't find anything wrong with the exits.
I am performing the tests on the exact same data and it is not a live trading. But the exits should work well.
You said earlier that when you performed a tick backtest using data exported from your MT4, that it almost matched.
I will try to make more backtests using your strategies. But it looks like there is some difference in data between SQ and your terminal.
During live trading, there are more factors involved - slippage, varying spread, internet connection etc.
A price difference of just 1 tick may cause the exit not to trigger, I think that is the cause of the differences.
Attachment 11-150121.xlsx added
As you can see here my theory is working and exits with stop-loss and take profit works fine.
But I found another issue with Friday exits. EA can't close open position without my presence on trading computer ( I agree it sounds weird).
I've made screenshots and tried to describe the problem here https://roadmap.strategyquant.com/tasks/sq4_7599
excel stat for last week here as well
Attachment 11-2201.xlsx added
I can see that it is normal behaviour but will not try another type of exits as there is no trust in them. Finally, I have quite close results
I have sent a new update of my trading result to the support email. As you can see there it's matching well.
However my previous trades stated here didn't have such accuracy.
Please have a look.
Attachment exitstoTomas.xlsm added
Status changed from In progress to Fixed
A few improvements of both MQL code and SQX code were done since that time and it may be the reason why the results are matching now.
Thank you for your feedback. If you experience any problems with backtests in the future, let me know and I'll check that.
Best regards,
Tomas
in backtest we will never simulate everything what could happen on our trading platforms - 1 pip difference could lead to a trade or not trade, 1pip difference could be profit on backtest and loss on real account and vice versa
so some comparation will look very good, some of them will be more distorted
so i think its only a coincidence of what we are doing - our backtest is only some sort of simulation