1. Welcome back! Thank you for being a part of this Traders Community. Let's discuss and share :)
    Selamat datang kembali! Trimakasih telah menjadi bagian dari Komunitas Trader ini. Mari berdiskusi dan berbagi :)
    Dismiss Notice

Question News EA

Discussion in 'Belajar MQL dari Nol' started by Ludovic, 30 Jan 2024.

  1. Ludovic

    Ludovic Member Credit Hunter

    Equity
    Credit
    Ref Point
    Please can you help me to make EA using news to send pending orders X mn before the new is given for duration = y mn after the new is given.

    pending orders are buy and sell only stop and must be placed are W pips up and down from actual level and each Z pips

    nomber of orders = nombreOrders

    sample:

    int ticket, i;
    if ( NewsTime == ( ActualTime + X)
    {
    for (i = 1; i < nombreOrders; i++)
    {
    double prixBuyStop = AskActuel + (i + 1) * distanceInitiale;
    ticket= OrderSend(Symbol(), OP_BUYSTOP, 0.1, Bid + (i*W*point) , 3, SL, TP, "BuyStop", MagicId, Duration, Blue);
    ticket= OrderSend(Symbol(), OP_SELLSTOP, 0.1, Ask - (i*W*point) , 3, SL, TP, "SellStop", MagicId, Duration, Blue);
    }
    }


    how to have newsTime?
     

Share This Page