I'm new using MQL4,
for instance, current gold price is 1200, I would like to place an sell order,(maybe called pend order), when the price going down to 1190, should I use ordersend, OP_SELLLIMIT or OP_BUYLIMIT or OP_BUYSTOP or OP_SELLSTOP
thanks in advance.
I've got OrderSend Error: 3 with following code when doing the backtesting,
could you please help me again.
ticketSell = OrderSend(NULL,OP_SELLSTOP, lots, SellPrice,100, SellPrice+stoploss*Point, SellPrice-takeprofit*Point,"Sell Trade",magic, clrRed);
if(ticketSell < 0)
Alert("OrderSend Error: ", GetLastError());
Alert("Order Sent Successfully, Ticket # is: " + string(ticketSell));
You have no expiration parameter, set it to 0.
NULL is not a valid symbol, use _Symbol
Make sure that the entry is below the current price.