You’re trying to buy 1 lot with 1:1 leverage and $1000 input. However, the calculated margin seems unusually high.
The formula for margin calculation is: Margin = Lot Size / Leverage .
In your example, with 1:1 leverage, the margin required for 1 lot would be $1000.
You may want to try this:
Set the tester to 1:1 leverage or test with a fixed lot size.
Ensure that your lot size remains constant during the backtest.
For more detailed guidance you can explore https://www.mql5.com/en/blogs/post/704853
Good luck with your strategy!
- 2018.01.28
- www.mql5.com
You’re trying to buy 1 lot with 1:1 leverage and $1000 input. However, the calculated margin seems unusually high.
The formula for margin calculation is: Margin = Lot Size / Leverage .
In your example, with 1:1 leverage, the margin required for 1 lot would be $1000.
You may want to try this:
Set the tester to 1:1 leverage or test with a fixed lot size.
Ensure that your lot size remains constant during the backtest.
For more detailed guidance you can explore https://www.mql5.com/en/blogs/post/704853
Good luck with your strategy!
Hello, thanks for the reply!
Unfortunately I'm not changing the lot size at all during the backtest, it's supposed to buy only 1 lot. It works better if I add leverage 1:500 instead 1:1.
Could you maybe try to backtest this EA (Introduction-to-MetaTrader5-and-MQL5---book/MA_CROS_RSI.mq5 at master · rafaelfvcs/Introduction-to-MetaTrader5-and-MQL5---book) with just 1 lot size and $1000 and see if you get the no money error / extremely high margin?
Thanks!
It appears that the issue you’re facing requires more in-depth assistance and possibly personalised solution.
https://www.mql5.com/en/job might be better suited for this purpose.
In this freelance section, you can find experienced MQL5 developers who can provide tailored solutions, debug your code, and address any issues you encounter during backtesting or live trading. They will also help optimize your EA for better performance.
Remember to provide clear details about your requirements, expectations and any specific constraints when posting your TASK to meet this criteria https://www.mql5.com/en/articles/235
Good luck with your strategy!
- 2024.03.20
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello there,
I just started learning mql and wanted to backtest a strategy from a ebook: https://github.com/rafaelfvcs/Introduction-to-MetaTrader5-and-MQL5---book/blob/master/MA_CROS_RSI.mq5
But unfortunately in my backtest I have extremely high margin / low free margin:
I'm trying to buy 1 lot with 1:1 leverage and 1000USD input. If I set the backtest to 100000000USD Input it kinda works.
I don't know why this happens, so I'm asking you for help.
I attached a log, thanks in advance!