Error 10015 ?

 
//+------------------------------------------------------------------+
//|                                                          New.mq5 |
//|                        Copyright 2017, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#include <trade/trade.mqh>
 

double Bid;
string  sym="اخابر";
double vol=1000;

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
int OnInit()
  {
   gobuy();
   return(INIT_SUCCEEDED);
  }

void OnDeinit(const int reason)
  {  
  }
  
void OnTick()
  {
  }


void gobuy()
{
   Bid= SymbolInfoDouble(sym,SYMBOL_BID);
   MqlTradeRequest request;
   MqlTradeResult  result;
   MqlTradeCheckResult check;
   ZeroMemory(request);
   ZeroMemory(result);
   ZeroMemory(check);
   request.action=TRADE_ACTION_PENDING;
   request.symbol=sym;
   request.volume=vol;
   request.price=Bid+1;
   //request.stoplimit=1800.000;
   request.sl=0;
   request.tp=0;
   request.type=ORDER_TYPE_BUY_STOP_LIMIT;
   request.type_filling=ORDER_FILLING_RETURN; 
   request.type_time=0;
   request.expiration=0;
   request.magic=0;
   request.comment="";
   if(!OrderSend(request,result))
     {
      Print(__FUNCTION__,": error ",GetLastError(),", retcode = ",result.retcode);
     }
      
}




Hi please someone help me i receive 4756 error and 10015 retcode

I use real account 

Files:
error.jpg  348 kb
 
With BUY_STOP_LIMIT order you need to specify a stoplimit price. Also you stop price must be greater or equal to ask price.
 
Alain Verleyen:
With BUY_STOP_LIMIT order you need to specify a stoplimit price. Also you stop price must be greater or equal to ask price.

//+------------------------------------------------------------------+
//|                                                          New.mq5 |
//|                        Copyright 2017, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2017, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#include <trade/trade.mqh>
 

double Bid;
string  sym="اخابر";
double vol=1000;

//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
int OnInit()
  {
   gobuy();
   return(INIT_SUCCEEDED);
  }

void OnDeinit(const int reason)
  {  
  }
  
void OnTick()
  {
  }


void gobuy()
{
   Bid= SymbolInfoDouble(sym,SYMBOL_BID);
   MqlTradeRequest request;
   MqlTradeResult  result;
   MqlTradeCheckResult check;
   ZeroMemory(request);
   ZeroMemory(result);
   ZeroMemory(check);
   request.action=TRADE_ACTION_PENDING;
   request.symbol=sym;
   request.volume=vol;
   request.price=Bid+1;
   request.stoplimit=1903;
   request.sl=0;
   request.tp=0;
   request.type=ORDER_TYPE_BUY_STOP_LIMIT;
   request.type_filling=ORDER_FILLING_RETURN; 
   request.type_time=0;
   request.expiration=0;
   request.magic=0;
   request.comment="";
   if(!OrderSend(request,result))
     {
      Print(__FUNCTION__,": error ",GetLastError(),", retcode = ",result.retcode);
     }
      
}
I Still receive 4756 error and 10015 retcode
 
amirsis:

I Still receive 4756 error and 10015 retcode

Did you read my previous message ?

This price must be greater or equal to Ask price. Is it ?