- MT5 Back Testing - LEVERAGE
- Strategy Tester
- Backtesting/Optimization
Hello, when using the Strategy Tester my EA stops placing new orders once the balance has reached about 20 mio. The tester is still running and the progress bar expanding. I don't have any conditions in my EA which would cause it to stop trading so I think the strategy tester stops itself for some reason. Is there any upper limit in terms of account balance or tradable lot size or something else that could prevent the tester from trading. And is there a way to avoid that?
I think the profit on my scambot is higher than your value, so that is not the limit.
Thank you, I found the error now. I'm getting error 131 due to exceeding the maximum Lot size. Is there a way to increase it for testing?
Firstly you need to modify your code so you check for MODE_MAXLOT and do not exceed it.
Then, as far as I can see, you have 2 options:
- find a different Broker that allows a larger position size
- edit the file that holds MODE_MAXLOT and increase it
Thank you, I found the error now. I'm getting error 131 due to exceeding the maximum Lot size. Is there a way to increase it for testing?
On my small micro-account the MAXLOT is 2 whereas my standard account is 99999 lots, which should be enough!
Note that my demo account also has 99999 lots max but suffers from the liability that the spread is unrealistically low.
You could spend a lot of time hacking the binary files to change MAXLOT when you are offline from the broker, but you are better to spend that time on other matters. I would just scale your trades down or used fixed lot sizes for testing. A profitable system will still be profitable.
Thank you, I found the error now. I'm getting error 131 due to exceeding the maximum Lot size. Is there a way to increase it for testing?
// If a trade size is bigger than maxlot, it must be split. double lotStep = MarketInfo(chart.symbol, MODE_LOTSTEP), //IBFX= 0.1 maxLot = MarketInfo(chart.symbol, MODE_MAXLOT ); //IBFX=50.0 for(int nSplit=MathCeil(lotsNew/maxLot); nSplit>0; nSplit--){ double size = MathRound(lotsNew/lotStep/nSplit)*lotStep; lotsNew -= size; // 100.1 =33.34+33.34+33.33 refreshRates(); // 99.99=50.00+49.99 orderSend...
Or you could modify your code to open multiple orders when max lot is exceeded. From my code
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use