1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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

EA open two opposite orders in the same time

Discussion in 'Belajar MQL dari Nol' started by Ahmed Zabady, 10 Mar 2019.

  1. Ahmed Zabady

    Ahmed Zabady New Member

    Equity
    Credit
    Ref Point
    Hello i want to get the code of open two opposite orders in the same time can any one help me, thanks
     
  2. Azzam971

    Azzam971 New Member

    Equity
    Credit
    Ref Point
    Just type Order Buy and Sell in one Logic to make it happen
     
  3. amtwoxtwo

    amtwoxtwo Member Credit Hunter

    Equity
    Credit
    Ref Point
    Code:
    input double lots=0.1;
    input int slippage =2;
    int tiketbuy=-1, tiketsell=-1;
    if(OrdersTotal()<2){
    tiketbuy = OrderSend(Symbol(),OP_BUY,lots,Ask,slippage,0,0,NULL,0,0,clrNONE);
    if(tiketbuy>0) tiketsell = OrderSend(Symbol(),OP_SELL,lots,Bid,slippage,0,0,NULL,0,0,clrNONE);
    }
    
     

Share This Page