Error code 4051 Not enough money
4 replies
Peter Lane
2 years ago #279884
I successfully d/l EURUSD (2012-2020) to my MT4 platform and running MT4 strategy tester the above error happens everytime the EA tries to open a trade
Not enough money for Sell(or Buy) 0.0 EURUSD Error code=4051
invalid lots amount for FreeMarginCheck function
The EA uses a “risk factor” to determine the lot size on the equity/balance available but even reverting to 0.01 lot size, the error still occurs.
I have tried a few different EA’s and the same error occurs. Using other pairs that were not d/l from quantdatamanager complete the strategy tester ok.
Peter Lane
2 years ago #279895
Update: for some reason the error appears when starting balance is below $35000 which appears to coincide with a lot size of 0.1 within the EA’s.
I confirmed this by adjusting the start lot size within the EA’s to 0.1 with smaller balances
So, how can I use this data for lot sizes under 0.1?

tomas262
2 years ago #279908
Hi,
do you have SQ custom indicators correctly installed?
The other reason might be you are using an indicator based SL which is not correctly calculated. I would have to see the strategy to correctly evaluate. You can send to our [email protected] email and I will check
Peter Lane
2 years ago #279916
I dont recall d/l any SQ custom indicators with the data. Should I have?
Basically I cannot test any EA’s (that I have tried) with a lot size less than 0.1 so what could be a solution?
Peter Lane
2 years ago #279919
The EA’s I have tested either dont have a S/L or its a % of equity/balance S/L
Viewing 4 replies - 1 through 4 (of 4 total)