Programación Forex Mt4, escriba su propio EA, ¿cómo realizar pedidos de vez en cuando?
{
ticket_buy=OrderSend(Symbol(), OP_BUY, Lotes, Ask, 3, 0, 0, "",MAGIC_MA,0,Azul);
if(ticket_buy gt;0)
{
billbuy_ok = true
si (OrderSelect(ticket_buy, SELECT_BY_TICKET, MODE_TRADES))
{
Print("Se ha abierto la orden de compra: ", precio de apertura de la orden());
/* 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 , verde);
*/
}
}
Otros
{
billbuy _ ok = false
Print("Error al abrir la orden de compra: ", GetLastError());
}
Probablemente ese sea el principio.