I used the same exact instruments data to:
There is no mismatch between minDistanceMT and minDistanceSQ reported in the MT4 logs (and in fact the mql file contains the same Distance as the broker's)
Notwithanding this, if UseSQTickSize is not set and MainChartTickSizeSQ is not set = to the Broker tick size, there is a complete mismatch between the MT4 and SQX backtesting.
The reason is that, despite the fact that no mismatch between minDistanceMT and minDistanceSQ, the Minimum Stop Price is wrongly calculated as if the tick size were 1 and not 0.01 (which is the broker one) and the order is not placed.
I believe that, as a default, the EA should take the tick size (as all the other data) from the market.
if one uses the exact same configuration for MT4 and SQX, he should not set any special flag to have the same results!
The flag should only be used if one consciously uses different tick sizes for testing in SQX and EA, to adjust all sensible parameters to the Broker Settings (e.g. Market Distance, Fixed SL, PT, Trailing STops, ...)
See logs below
===================================
With UseSQTickSize = true AND MainChartTickSizeSQ = 0.01 (same as backtest in SQX and export to MT4)
0 17:46:55.834 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Computing Money Management for order - Fixed amount
0 17:46:55.834 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Computing Money Management - Smallest_Lot: 0.20000000, Largest_Lot: 200.00000000, Computed LotSize: 1.00000000
0 17:46:55.834 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Money to risk: 200.00000000, Max Trade drawdown: 183.52000000, Point value: 1.00000000
0 17:46:55.834 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Opening order type BUY STOP with price 12593.60000000. Current market prices: 12527.60000000 / 12526.60000000
2 17:46:55.834 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: open #1 buy stop 1.00 UsaTec at 12593.6 ok
0 17:46:55.843 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Modifying order with ticket: 1, SL: 12410.10000000 and PT: 12742.90000000
2 17:46:55.843 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: modify #1 buy stop 1.00 UsaTec at 12593.6 sl: 12410.1 tp: 12742.9 ok
0 17:46:55.843 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Order modified successfuly
2 17:46:55.853 2021.01.06 09:52:04 Tester: order #1, buy 1.00 UsaTec is opened at 12593.6
2 17:46:55.957 2021.01.06 15:38:59 Tester: take profit #1 at 12742.9 (12745.5 / 12746.5)
With UseSQTickSize = false
0 17:52:10.861 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Computing Money Management for order - Fixed amount
0 17:52:10.861 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Computing Money Management - Smallest_Lot: 0.20000000, Largest_Lot: 200.00000000, Computed LotSize: 1.00000000
0 17:52:10.861 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Money to risk: 200.00000000, Max Trade drawdown: 183.52000000, Point value: 1.00000000
0 17:52:10.861 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Opening order type BUY STOP with price 12593.60000000. Current market prices: 12527.60000000 / 12526.60000000
0 17:52:10.861 2021.01.06 09:00:00 H1 - NASDAQ WF Matrix - Strategy 3.56.169 UsaTec,H1: - SQ LOG 2021.01.06 09:00 Based on its logic, the strategy tried to place stop/limit order at incorrect price. Market price: 12527.60000000, min. price allowed: 12602.60000000, stop/limit order price: 12593.60000000 (this is NOT an error)
Status changed from New to Waiting for information
Attachment image-0.png added
I have tested it on my side, and it works correctly. Can I ask for more information for further analysis?
Please take a look at the attached image. Please provide this. The left side is the information in the SQX itself, and the right is the information you get in MT4 (Strategy Tester -> Symbol Properties).
Thank you.
Status changed from Waiting for information to Fixed
Since I have tested it, and it works correctly. I will mark this as fixed at the moment. Please let me know when the issue happens again.
Thank you.