MT5 errors in XAUUSD strategys
2 replies
Vade
2 years ago #287730
Good afternoon, gentlemen,
I am here because of some problems that we are finding in our robots dedicated to XAUUSD.
To put you more in context, we have a 10 EA system.
– 6 dedicated to the XAUUSD in its different temporalities (LONGS).
– 4 dedicated to different FOREX assets ( NZDUSD, USDJPY… )
We have backtested these EAs in 3 environments: StrategyQuant Tester – MT5 demo – MT5 Production.
Our forex EAs have no discrepancy between the 3 environments, and also no errors, so their operation and performance is perfect.
Our XAUUSD EAs are where we are having the biggest problems.
They perform with little discrepancy between StrategyQuant Tester vs MT5 demo, but vs MT5 production the results are totally different and spoil all the benefits of the system.
After researching, the only pattern we have found between these large discrepancies between XAUUSD, is the appearance of many warning messages in these EAs, which do not appear in FOREX.
These messages are :
– Order with these parameters already exists, cannot open another one!
– Based on its logic, the strategy tried to place stop/limit order at incorrect price. Min Distance: 0.00000000 Market price: 2576.62000000, max. price allowed: 2576.62000000
– Based on its logic, the strategy tried to place SL at incorrect price. Open price: 2586.05000000, max. price allowed: 2586.05000000, price used: 2586.27000000 (this is NOT an error)
These errors are common in all 6 XAUUSD EAs.
I don’t understand why this is happening, as this system has been analyzed, reviewed and created by QuantAnalyzer so that there is cohesion between them and they don’t “step on each other’s toes”.
Could you give me some advice, idea or thread where to start working to fix it? I am lost right now.
Best regards
Translated with DeepL.com (free version)
0
Vade
2 years ago #287758
I think I have figured out why these errors happen:
– Based on your logic, the strategy attempted to place a stop/limit order at the wrong price. Minimum distance: 0.00000000 Market price: 2576.62000000, maximum price allowed: 2576.62000000
– Based on your logic, the strategy attempted to place SL at an incorrect price. Opening price: 2586.05000000, max. allowed price: 2586.05000000, used price: 2586.27000000 (this is NOT an error).
It seems that some XAUUSD robots which operate in a BUY LIMIT or BUY STOP way (only one way configured in code), are performing trades in both, i.e. some try to place them below the market price (BUY LIMIT) and others above the market price (BUY STOP) but they are launched with only one buy identifier (in this case BUY LIMIT) so, when they are above the market price, it will not work.
But I have not yet found the solution for the errors where “such an order already exists” when nothing exists, can you think of anything ?
0
Petr Nadenicek
2 years ago #287755
Hello Vade,
Thank you for your inquiry. The “error” you mentioned is not actually an error, as indicated by the log (“this is NOT an error”). It indicates that the strategy’s entry conditions were met, and under normal circumstances, the strategy would open a new order. However, in this case, the calculated order price was outside the market, and as a result, the order was skipped.
Even if you encounter this “warning,” the EA should continue to trade usually.
If there are no trades or if you encounter any issues, please send us an email with the strategy to [email protected] so that we can investigate. When reaching out, please remember to include not only the EA code but also the Strategyquant file (.sqx extension).
Thank you for your cooperation.
Petr,
StrategyQuant Support
0
Viewing 2 replies - 1 through 2 (of 2 total)