MT5 Stategy Tester Starts with Wrong Balance

 

Tried searching for others with this issue but no luck.

I recently finished converting my MQL4 EA over to MQL5 so that I could use the MT5 Strategy Tester for backtesting. Initially I'm pretty certain it wasn't doing this, but now no matter what I set the 'Deposit' setting to in Strategy Tester settings, when the test actually runs, the balance suddenly jumps to a much higher starting value than set (visual mode or not). For example I set the deposit to 2000 USD, start the test and soon as it begins with the first trade opened the balance jumps to 36995 USD.

Now that'd be great if it happened like that in reality, but I'm pretty sure this is some weird bug with MT5. I've tried closing it, deleting all logs/cache, etc -- but upon re-opening and starting a new test, same thing happens. If I change the deposit value to 10000, the balance then jumps to 44994 as soon as the ticks start coming in.

What gives?!?

 
navieko :

Tried searching for others with this issue but no luck.

I recently finished converting my MQL4 EA over to MQL5 so that I could use the MT5 Strategy Tester for backtesting. Initially I'm pretty certain it wasn't doing this, but now no matter what I set the 'Deposit' setting to in Strategy Tester settings, when the test actually runs, the balance suddenly jumps to a much higher starting value than set (visual mode or not). For example I set the deposit to 2000 USD, start the test and soon as it begins with the first trade opened the balance jumps to 36995 USD.

Now that'd be great if it happened like that in reality, but I'm pretty sure this is some weird bug with MT5. I've tried closing it, deleting all logs/cache, etc -- but upon re-opening and starting a new test, same thing happens. If I change the deposit value to 10000, the balance then jumps to 44994 as soon as the ticks start coming in.

What gives?!?

Show proof.

 

hi guys i have same problem ! when i run my expert on tester mql5 show this

   calculated account state: Assets: 0.00, Liabilities: 0.00, Equity 3000.00, Margin: 10000.00, FreeMargin: -7000.00

because free margin is negetive , there is no trade and give error 10019 means not enough money!

i attach that pic,

please tell me what i missing!!!

tnx


Files:
scrshot.png  18 kb
 
mostafa s #:

hi guys i have same problem ! when i run my expert on tester mql5 show this

   calculated account state: Assets: 0.00, Liabilities: 0.00, Equity 3000.00, Margin: 10000.00, FreeMargin: -7000.00

because free margin is negetive , there is no trade and give error 10019 means not enough money!

i attach that pic,

please tell me what i missing!!!

tnx


No picture attached.

 
see now tnx
 
mostafa s #:
see now tnx
Nothing can be said from such a picture. Post the log file, not a screenshot.
 
Alain Verleyen #:
Nothing can be said from such a picture. Post the log file, not a screenshot.
tnx , but i cant find log file, plz help me find that ; this is my metaetrader5 folder in my pc in attach file
Files:
scr2.png  34 kb
 
Alain Verleyen #:
Nothing can be said from such a picture. Post the log file, not a screenshot.
hi , how r u? i can find that log file, can u help me? tnx
Files:
20220124.log  13109 kb
 
mostafa s #:
hi , how r u? i can find that log file, can u help me? tnx

You are trying to open a 0.1 lot position on an account wit 3,000€ and leverage 1:1 so of course you can't, a 0.1 lot is 10,000€

RG    0    02:14:23.814    Tester    initial deposit 3000.00 EUR, leverage 1:1
...

CL    2    02:14:24.023    Trade    2022.01.04 00:00:33   not enough money [instant buy 0.1 EURUSD at 1.13004 sl: 1.12951 tp: 1.12971]
EN    2    02:14:24.023    Trades    2022.01.04 00:00:33   failed instant buy 0.1 EURUSD at 1.13004 sl: 1.12951 tp: 1.12971 [No money]

 
Alain Verleyen #:

You are trying to open a 0.1 lot position on an account wit 3,000€ and leverage 1:1 so of course you can't, a 0.1 lot is 10,000€

OMG! Such a bad mistake! Thank you sir! 
Reason: