I'm a little bit stuck with the function TesterStatistics(STAT_MIN_MARGINLEVEL). The documentation says the function returns "Minimum value of the margin level". What this exactly mean?
I thought that the value is the minimum margin level but it seems to me it's not true.
If I run a backtest where just one trade (0.01 lots) is opened (required margin is for example 200) and the initial deposit is set to 1000, then the function returns the expected 500 (not exactly 500).
But if I run a backtest where two trades (0.01 and 0.01 lots) are simultaneously opened (then the required margin should be 400). The initial deposit is the same (1000). I would expect the function to returns something about 250 but it returns something about 500 again.
I'll appreciate it when someone explains it to me.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I'm a little bit stuck with the function TesterStatistics(STAT_MIN_MARGINLEVEL). The documentation says the function returns "Minimum value of the margin level". What this exactly mean?
I thought that the value is the minimum margin level but it seems to me it's not true.
If I run a backtest where just one trade (0.01 lots) is opened (required margin is for example 200) and the initial deposit is set to 1000, then the function returns the expected 500 (not exactly 500).
But if I run a backtest where two trades (0.01 and 0.01 lots) are simultaneously opened (then the required margin should be 400). The initial deposit is the same (1000). I would expect the function to returns something about 250 but it returns something about 500 again.
I'll appreciate it when someone explains it to me.
Thank in advance