Download Best EA Ever - Coding Help for modification

Discussion in 'Other' started by Jove H, 11 December 2023.

  1. Jove H

    Jove H Active Member

    Joined:
    25 January 2023
    Messages:
    229
    Likes Received:
    33
    Trophy Points:
    28
    Gender:
    Male
    Hi, about to publish an ea but it wont work in mq4 store. It has has error below. Please your help would be greatly appreciated.

    It says not enough money and the solution is as below but i do not know where to add this file in ea as i already did but it has same errror.

    bool CheckMoneyForTrade(string symb, double lots,int type)
    {
    double free_margin=AccountFreeMarginCheck(symb,type, lots);
    //-- if there is not enough money
    if(free_margin<0)
    {
    string oper=(type==OP_BUY)? "Buy":"Sell";
    Print("Not enough money for ", oper," ",lots, " ", symb, " Error code=",GetLastError());
    return(false);
    }
    //--- checking successful
    return(true);
    }