STEP10 – How to build a real sell order

ARE YOU STILL BROKER FOOD?
EASY AUTOMATED TRADING! 
PRECODED MODULES AND STRATEGIES!
FASTER, BETTER, AUTOMATED RESULTS YOU WILL GET NOWHERE ELSE
CLICK HERE  TO START  NOW

Our sell order is almost identical to the buy order in Step9

The difference is, that we use the BID price this time

 

void OpenSellOrder()
{
MqlTradeRequest myrequest;
MqlTradeResult myresult;
ZeroMemory(myrequest);
myrequest.action = TRADE_ACTION_DEAL;
myrequest.type = ORDER_TYPE_SELL;
myrequest.symbol = _Symbol;
myrequest.volume = LotSize; // use a double value
myrequest.type_filling = ORDER_FILLING_FOK;
myrequest.price = SymbolInfoDouble(_Symbol,SYMBOL_BID);
myrequest.sl = 0 ;
myrequest.tp = 0 ;
myrequest.deviation =60;
OrderSend (myrequest,myresult);
LastEquity=AccountInfoDouble(ACCOUNT_EQUITY);
}

 

Learn how to create your own MQL5 trading robot for $1
Sign Up Now