Hi
anyone can help me on this 'no price" error(err code = 10021) when i send my order using Ordersend().
when this "no price" error occur, do i need to delete the old order and resend a new ordersend() or i just wait for it to fill up by the system ?
thanks
my code is like below:
MqlTradeResult result1;
MqlTradeRequest request1;
request1.action=TRADE_ACTION_DEAL;
request1.magic=Magic;
request1.symbol=Pair; // symbol
request1.volume=NormalizeDouble(lot,2);
request1.sl=0; // Stop Loss is not specified
request1.tp=0; // Take Profit is not specified
request1.type=ORDER_TYPE_BUY; // order type
request1.type_filling = ORDER_FILLING_RETURN;
request1.comment = "test";
request1.deviation = Point()*20;
OrderSend(request1,result1);
Print("RetCode 1:",result1.retcode," /err:",GetLastError()," /id:",result1.order);
![Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties](/i/community/logo_mql5_small.png)
- www.mql5.com
my code is like below:
...Where is the price ? Is your broker use Market Execution for this symbol ?
Please use SRC button when you post code.
Where is the price ? Is your broker use Market Execution for this symbol ?
Please use SRC button when you post code.
my code is like below:
MqlTradeResult result1;
MqlTradeRequest request1;
request1.action=TRADE_ACTION_DEAL;
request1.magic=Magic;
request1.symbol=Pair; // symbol
request1.volume=NormalizeDouble(lot,2);
request1.sl=0; // Stop Loss is not specified
request1.tp=0; // Take Profit is not specified
request1.type=ORDER_TYPE_BUY; // order type
request1.type_filling = ORDER_FILLING_RETURN;
request1.comment = "test";
request1.deviation = Point()*20;
OrderSend(request1,result1);
Print("RetCode 1:",result1.retcode," /err:",GetLastError()," /id:",result1.order);
Yes, My broker is Alpari and the order was set as Market Execution. the error description in the journal was : "failed exchange sell 0.20 EURUSD at market[No prices] my code is like below: MqlTradeResult result1; MqlTradeRequest request1; request1.action=TRADE_ACTION_DEAL; request1.magic=Magic; request1.symbol=Pair; // symbol request1.volume=NormalizeDouble(lot,2); request1.sl=0; // Stop Loss is not specified request1.tp=0; // Take Profit is not specified request1.type=ORDER_TYPE_BUY; // order type request1.type_filling = ORDER_FILLING_RETURN; request1.comment = "test"; request1.deviation = Point()*20; OrderSend(request1,result1); Print("RetCode 1:",result1.retcode," /err:",GetLastError()," /id:",result1.order);
Try to modify this line :
MqlTradeRequest request1 = {0};
![How open order in mql5 ? How open order in mql5 ?](/i/community/logo_mql5_small.png)
- www.mql5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
anyone can help me on this 'no price" error(err code = 10021) when i send my order using Ordersend().
when this "no price" error occur, do i need to delete the old order and resend a new ordersend() or i just wait for it to fill up by the system ?
thanks