Current location - Loan Platform Complete Network - Foreign exchange account opening - Foreign exchange Mt4 programming, write EA by yourself, how to open bills regularly?
Foreign exchange Mt4 programming, write EA by yourself, how to open bills regularly?
If (iTime(NULL, 0,0) = customer defined);

{

ticket_buy=OrderSend(Symbol(),OP_BUY,Lots,Ask,3,0,0,“”,MAGIC_MA,0,Blue);

if(ticket _ buy & gt; 0)

{

billbuy _ ok = true

if(OrderSelect(ticket_buy,SELECT_BY_TICKET,MODE_TRADES))

{

Print ("buy order has been opened:", order open price()););

/* if(SL & gt; 0 & amp& ampOrderStopLoss()==0)

OrderModify(OrderTicket()、OrderOpenPrice()、OrderOpenPrice()-SL*Point、OrderTakeProfit()、0、Green);

if(TP & gt; 0 & amp& ampOrderTakeProfit()==0)

OrderModify(OrderTicket (), OrderOpenPrice (), OrderStopLoss (), OrderOpenPrice()+TP*Point, 0, green);

*/

}

}

other

{

billbuy _ ok = false

Print ("Error in opening purchase order:", GetLastError()););

}

This is probably the principle.