For me there are big differences in the calculation between SQX, AlogWizard and Live/Demo Trading. I'll make that clear using the example of the S&P500 CFD.
SQX and AlgoWizard calculate the same. My entries are:
Data source Dukascopy
Symbols: USAIDXUSD - M1
Spread = 0.5
lots = 0.1
stop loss = 1
Profit Target = 1
Result in SQX and AlgoWizard:
Stop Loss = -5 USD
Profit Target = $5
Demo trading results (ICMarkets, MT5):
Error message: Alert: The order request could not be completed. Error no.: 4796.
It follows that the stop loss and profit target are set too tightly - see attachment S&P500 1 and S&P500 2.
So in MT5 1 tick does not equal USD 5 as in SQX and AlgoWizard, but USD 0.1
100 tick in MT5 as a ProfitTarget and StopLoss entry in the Expert Advisor correspond to a distance on the MT5 price scale in the amount of USD 1 - see Appendix S&P500 3 and S&P500 4. At 0.1 lot in MT5 -/+ 12 cents and not as in SQX and AlogoWizard +/- USD 5 shown as stop loss and take profit in the result.
As a result, there is a difference between the calculation of SQX and AlgoWizard and S&P500 CFD Trading in MT5. As an attachment of the EA.
What do you suggest to get the right result in all systems?
I ask in the cleaning of the bugs.
Attachment Broker dependet data.jpg added
Hello Improver,
Addendum to the above problem: In the futures area, the above conversion problem does not exist. In the CFD area, different brokers have different tick sizes for the stock indices. In the problem described above, the minimum tick size at this broker is USD 0.10. The minimum volume step is 0.1 lots. The next minimum price change possible is equal to USD 0.1 (10 ticks per USD1) with two decimal places.
Other brokers only have one decimal place after the comma, this is to be considered in a solution!
It would be nice to be able to enter a conversion factor into the MT4, MT5 and Tradestation engine so that the result (for example: stop-loss ticks or USD would be displayed in SQX Builder and SQX AlgoWizard) can be corrected manually if the SQX calculation is incorrect can. An ideal place to do this would be Builder/Full setting/Data. For example, the user could enter Heri: 1 tick corresponds to USD 1.2 to the base unit 1 lot.
The problem is as old as SQX.
Status changed from New to Waiting for information
First of all, I hoped I interpreted the message correctly.
First, the MT5 has different results compared to SQX. It was because the symbol has different attributes.
You also can look at this script on our Discord server.
https://discord.com/channels/426766614734831616/787036463861727293
Unfortunately, it doesn't support CFD at the moment. However, it will work for other instruments if needed.
Second, different brokers will have a different minimum distance for pending orders, SL or TP. If we set it too close to the current price, we will get an error from the broker. You can set this when you run the backtest in SQX.
I hope I explained the issues correctly.
Thanks.