Error code not enough money

 
Please help me understand how l could solve the error code "Not enough money" while uploading my mt4 ea to market... what exactly w=should l do... l tried all think l understand but its not working... Not too good in coding yet so l need help. Please.   below was the recommendation.. 
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);
  }
 
Peter OsuerePlease help me understand how l could solve the error code "Not enough money" while uploading my mt4 ea to market... what exactly w=should l do... l tried all think l understand but its not working... Not too good in coding yet so l need help. Please.   below was the recommendation.. 
https://www.mql5.com/en/articles/2555#not_enough_money
The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 
Oh dear please l have gone through the article before l sent my message... but l couldnt figure it out... So please l need your help to resolve this challenge. l really dont mind being trained how to handle it hand-on. please
 
Peter Osuere #Oh dear please l have gone through the article before l sent my message... but l couldnt figure it out... So please l need your help to resolve this challenge. l really dont mind being trained how to handle it hand-on. please

There is something important you need to consider: when you publish on the Market, you are not just sharing an EA, you are offering a commercial product that other users may buy. This carries a responsibility, and it also requires at least a basic level of technical and practical knowledge.

The error you mentioned is a basic one and is well documented. If, after reading the explanation, you are still unable to apply it, then most likely you are not yet ready to publish products on the Market. I am not saying this as a criticism, but as a reality. If you need others to fix your code for you, then in practice, you are not the one developing the product.

We are here to help people learn, not to do the work for them. I encourage you to keep studying and practicing, and once you reach a point where you can solve this kind of issue on your own, you will be in a much better position to offer a quality product.