For five days now I have been trying to download an expert to sell it in the MetaTrader 5 market, and yet it fails the test. I am trying to fix it and follow the instructions, but to no avail. I hope someone can help me.
test on EURUSD,H1 (netting) 2022.02.10 19:52:20 failed cancel order #101 buy stop 0.2 EURUSD at 1.14574 [Invalid stops] 2022.02.10 19:52:20 failed cancel order #100 buy stop 0.2 EURUSD at 1.14576 [Invalid stops] 2022.02.24 18:04:20 failed cancel order #235 buy stop 0.2 EURUSD at 1.11181 [Invalid stops] 2022.03.10 15:36:20 failed cancel order #652 buy stop 0.2 EURUSD at 1.11004 [Invalid stops] 2022.03.14 23:10:20 failed cancel order #718 buy stop 0.2 EURUSD at 1.09502 [Invalid stops] 2022.03.15 17:55:20 failed cancel order #735 buy stop 0.2 EURUSD at 1.09764 [Invalid stops] 2022.03.15 17:55:20 failed cancel order #734 buy stop 0.2 EURUSD at 1.09774 [Invalid stops] 2022.03.21 18:31:20 failed cancel order #819 buy stop 0.2 EURUSD at 1.10392 [Invalid stops] 2022.03.29 17:43:20 failed cancel order #902 buy stop 0.2 EURUSD at 1.11031 [Invalid stops] 2022.04.25 00:05:20 failed cancel order #1107 buy stop 0.2 EURUSD at 1.08140 [Invalid stops] 2022.04.29 17:58:20 failed cancel order #1231 buy stop 0.2 EURUSD at 1.05528 [Invalid stops] 2022.05.04 21:33:20 failed cancel order #1280 buy stop 0.2 EURUSD at 1.05281 [Invalid stops] 2022.05.04 21:33:20 failed cancel order #1279 buy stop 0.2 EURUSD at 1.05288 [Invalid stops] 2022.05.16 00:14:20 failed cancel order #1526 buy stop 0.2 EURUSD at 1.04101 [Invalid stops] 2022.06.16 00:04:59 failed cancel order #1925 buy stop 0.2 EURUSD at 1.04519 [Invalid stops] 2022.06.24 17:07:20 failed cancel order #2078 buy stop 0.2 EURUSD at 1.05587 [Invalid stops] 2022.07.07 12:05:20 failed cancel order #2207 buy stop 0.2 EURUSD at 1.01840 [Invalid stops] strategy tester report 14 total trades
The checks a trading robot must pass before publication in the Market
MetaQuotes, 2016.08.01 09:30
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.Forum on trading, automated trading systems and testing trading strategies
Unable to place order because of invalid stops
Automated-Trading, 2013.10.23 17:13
1. Use ZeroMemory before preparing MqlTradeRequest structure.
2. Calculate TP/SL levels relative to Bid/Ask levels.
void OnStart() { //--- MqlTradeRequest request; MqlTradeResult result; ZeroMemory(request); request.symbol =Symbol(); request.volume =0.1; request.deviation =1; request.type_filling=ORDER_FILLING_FOK; request.action=TRADE_ACTION_DEAL; double askPrice = SymbolInfoDouble(Symbol(),SYMBOL_ASK); double bidPrice = SymbolInfoDouble(Symbol(),SYMBOL_BID); long stopLevels=SymbolInfoInteger(Symbol(),SYMBOL_TRADE_STOPS_LEVEL); request.type = ORDER_TYPE_BUY; request.sl = NormalizeDouble(bidPrice - stopLevels * Point(),_Digits); request.tp = NormalizeDouble(askPrice + stopLevels * Point(),_Digits); request.price= askPrice; if (!OrderSend(request,result)) {Print("Error=", GetLastError());} }
Forum on trading, automated trading systems and testing trading strategies
How to fix invalid stops error
Fernando Carreiro, 2023.10.12 17:04
It seems you are not properly checking the Freeze Level when deleting/cancelling a pending order.
Pending orders can not be deleted or modified if the declared open price violates the Freeze Level parameter requirements.Attempt to modify order or position within the SYMBOL_TRADE_FREEZE_LEVEL freeze level
Also pay attention to the following ... courtesy of Vladimir Karputov

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
For five days now I have been trying to download an expert to sell it in the MetaTrader 5 market, and yet it fails the test. I am trying to fix it and follow the instructions, but to no avail. I hope someone can help me.
test on EURUSD,H1 (netting) 2022.02.10 19:52:20 failed cancel order #101 buy stop 0.2 EURUSD at 1.14574 [Invalid stops] 2022.02.10 19:52:20 failed cancel order #100 buy stop 0.2 EURUSD at 1.14576 [Invalid stops] 2022.02.24 18:04:20 failed cancel order #235 buy stop 0.2 EURUSD at 1.11181 [Invalid stops] 2022.03.10 15:36:20 failed cancel order #652 buy stop 0.2 EURUSD at 1.11004 [Invalid stops] 2022.03.14 23:10:20 failed cancel order #718 buy stop 0.2 EURUSD at 1.09502 [Invalid stops] 2022.03.15 17:55:20 failed cancel order #735 buy stop 0.2 EURUSD at 1.09764 [Invalid stops] 2022.03.15 17:55:20 failed cancel order #734 buy stop 0.2 EURUSD at 1.09774 [Invalid stops] 2022.03.21 18:31:20 failed cancel order #819 buy stop 0.2 EURUSD at 1.10392 [Invalid stops] 2022.03.29 17:43:20 failed cancel order #902 buy stop 0.2 EURUSD at 1.11031 [Invalid stops] 2022.04.25 00:05:20 failed cancel order #1107 buy stop 0.2 EURUSD at 1.08140 [Invalid stops] 2022.04.29 17:58:20 failed cancel order #1231 buy stop 0.2 EURUSD at 1.05528 [Invalid stops] 2022.05.04 21:33:20 failed cancel order #1280 buy stop 0.2 EURUSD at 1.05281 [Invalid stops] 2022.05.04 21:33:20 failed cancel order #1279 buy stop 0.2 EURUSD at 1.05288 [Invalid stops] 2022.05.16 00:14:20 failed cancel order #1526 buy stop 0.2 EURUSD at 1.04101 [Invalid stops] 2022.06.16 00:04:59 failed cancel order #1925 buy stop 0.2 EURUSD at 1.04519 [Invalid stops] 2022.06.24 17:07:20 failed cancel order #2078 buy stop 0.2 EURUSD at 1.05587 [Invalid stops] 2022.07.07 12:05:20 failed cancel order #2207 buy stop 0.2 EURUSD at 1.01840 [Invalid stops] strategy tester report 14 total trades