Red de conocimiento informático - Material del sitio web - Programación Forex Mt4, ¿cómo escribir un EA usted mismo para abrir una orden cada dos veces?

Programación Forex Mt4, ¿cómo escribir un EA usted mismo para abrir una orden cada dos veces?

if (iTime(NULL, 0, 0) = definido por el cliente

{

ticket_buy=OrderSend(Symbol(), OP_BUY, Lotes, Ask, 3, 0, 0, "", MAGIC_MA, 0, Azul);

if (ticket_buygt; 0)

{

billbuy_ok=true;

if(OrderSelect(ticket_buy, SELECT_BY_TICKET, MODE_TRADES))

{

Print("Orden de COMPRA abierta: ", OrderOpenPrice());

/* if(SLgt;0&OrderStopLoss()==0)

OrderModify(OrderTicket(), OrderOpenPrice(), OrderOpenPrice()-SL*Point, OrderTakeProfit() , 0, Verde);

if (TPgt; 0 & OrderTakeProfit()==0)

OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), OrderOpenPrice() TP* Punto, 0, Verde);

*/

}

}

más

{

billbuy_ok=false;

Print("Error al abrir la orden de COMPRA: ", GetLastError());

}

El principio es probablemente así