I guess you are talking about this error during the backtesting.
Check the initial deposit in the backtester.
You will not be able to open a position if your free margin is lower than the required margin for min allowed lot.
To check this, if you are coding on mql4, you could check if: lot * MarketInfo(_Symbol, MODE_MARGINREQUIRED) < AccountInfoDouble(ACCOUNT_MARGIN_FREE)
Or you could use:
AccountFreeMarginCheck(
string symbol, // symbol
int cmd, // trade operation
double volume // volume
);
https://docs.mql4.com/account/accountfreemargincheck
Regards
AccountFreeMarginCheck - Account Information - MQL4 Reference
- docs.mql4.com
AccountFreeMarginCheck - Account Information - MQL4 Reference
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello
when i want test my EA with minimum deposit $1 , i see error 134 (not enough money) , i haven't any inputs on my EA for initial deposit , guide me please .
double Lot_Cal()
{
double l=(NormalizeDouble(((AccountBalance()* Percent_risk/100) )*0.01,Max_Digit));
if (l<Min_Lot) l=Min_Lot;
if (l>MarketInfo(Symbol(),MODE_MAXLOT)) l = MarketInfo(Symbol(),MODE_MAXLOT);
if (Money_management) return(l);
return(lotsize);