[No prices] and [off quotes] at market order
I noticed that CTrade::Sell() does not send zeroed price to OrderSend(). So it seems that it won't be an order at market price:
//+------------------------------------------------------------------+ //| Sell operation | //+------------------------------------------------------------------+ bool CTrade::Sell(const double volume,const string symbol=NULL,double price=0.0,const double sl=0.0,const double tp=0.0,const string comment="") { //--- check volume if(volume<=0.0) { m_result.retcode=TRADE_RETCODE_INVALID_VOLUME; return(false); } //--- check symbol string symbol_name=(symbol==NULL) ? _Symbol : symbol; //--- check price if(price==0.0) price=SymbolInfoDouble(symbol_name,SYMBOL_BID); //--- return(PositionOpen(symbol_name,ORDER_TYPE_SELL,volume,price,sl,tp,comment)); }
Thank you.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I need help to understand why do I get [No prices] and [off quotes] returns when opening a position at market price, and the symbol ENUM_SYMBOL_TRADE_EXECUTION is SYMBOL_TRADE_EXECUTION_EXCHANGE.
I'm using:
and setting price to 0.0
Thank you.