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

Help with MQL4 Code

Discussion in 'Metatrader' started by TradingG, 22 May 2020 at 21:23.

Tags:
  1. TradingG

    TradingG Member

    Equity
    Credit
    Ref Point
    Hi,

    I need a coder to help me correct errors 130, 148, etc.

    It must be simple but I am new to MQL4 coding and I have just overloaded after the 1st corrections.

    If someone has ease with coding, it should be a piece of cake.
     
  2. Farah Quinn

    Farah Quinn New Member

    Equity
    Credit
    Ref Point
    Wating for support
     
  3. stadevata

    stadevata Member Credit Hunter

    Equity
    Credit
    Ref Point
  4. arby1108

    arby1108 Member Credit Hunter

    Equity
    Credit
    Ref Point
    ERR_INVALID_STOPS 130 Invalid stops.
    ERR_TRADE_TOO_MANY_ORDERS 148 The amount of opened and pending orders has reached the limit set by a broker.

    Error 130: your SL or TP is less than minimum Stop Level allowed by the broker, or was calculated on a wrong way.
    OP_SELL OP_BUY
    SLpoints = Bid+(StopLoss*Point) SLpoints = Ask-(StopLoss*Point)
    TPpoints = Bid-(TakeProfit*Point) TPpoints = Ask+(TakeProfit*Point)

    StopLevel = MarketInfo(Symbol(), MODE_STOPLEVEL) * Point

    upload_2020-5-22_20-14-43.png

    --------------------------------------------------------------------------------------
    Error 148: your EA it is opening orders without any limit.

    MaximunOrders = 10;
    int Total = 0;

    for(int i=0; i<OrdersTotal(); i++)
    {
    if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==true)
    {
    if(OrderSymbol() == Sym && OrderMagicNumber() == Magic /*&& (OrderType() == OP_BUY || OrderType() == OP_SELL)*/)
    Total++;
    }
    }

    if(Total < MaximunOrders)
    {
    OrderSend(...............................................................
    }
     
  5. TradingG

    TradingG Member

    Equity
    Credit
    Ref Point
    Thanks a lot :ok: I am going to try to modify them.
     
  6. TradingG

    TradingG Member

    Equity
    Credit
    Ref Point

Share This Page