What i see During the simulation is, my profit does not change over time, even if the deposit is going up, and the minlot does not increase. So after 1month of sim, if i have $ 2,000 with the same 0.2lots percentual, with this new deposit level, the new profits it should be more high, right? But in my sim i have not this result, i have the same profit every operation.
How you can see on the attached First.gif image, in this First simulation, the MM work very well, but after i have reinstalled MT4, the new results with the new simulations are totaly different (how you can see on attached image After.gif) using the identic same config.
I have checked the code and for what i can see, seems the MM not turned on from other condition, but i can't fin why in the code.
You can also take the code of my EA on attached files.
Do you run the simulation with the default settings shown in the file or do you change some of them?
It would be more helpful to attach the .htm file generated from the test so we can see all inputs and the actual trades occurring. It is hard to guess at what is occurring in your code without stepping through it, so at least the .htm file would help indicate a little more of what is going on.
I think one possibility of what may be happening is that you are always taking the multiplier value of 2 with lastlot of 0.1 due to lots originally being 0.1 to get the 0.2 value that you are seeing from this line of code if you are setting martingale to true.
It also seems like you need to improve the lotsoptimized function as I believe it is always returning a value less than 0.01 (minlots value) because your account balance is so small. If you have the following values AccountBalance = 1000 lotsize = 10000 (based on your code) minlot = 0.01 risk = 1
Then lot = 0.001 which is below your minlots value. You need to make a change to have this return a more realistic value.
Have you seen how much error/warnings you have ??? ... like this : -> check operator precedence for possible error; use parentheses to clarify precedence -> return value of 'OrderSelect' should be checked -> declaration of 'lots' hides global declaration at line 6 -> not all control paths return a value -> 'void' function returns a value ...0 error(s), 53 warning(s)
HIGH RISK WARNING: Foreign exchange trading carries a high level of risk that may not be suitable for all investors.
Leverage creates additional risk and loss exposure. Before you decide to trade foreign exchange, carefully consider your investment objectives, experience level, and risk tolerance.
You could lose some or all of your initial investment. Do not invest money that you cannot afford to lose. Educate yourself on the risks associated with foreign exchange trading, and seek advice from an independent financial or tax advisor if you have any questions.
Any data and information is provided 'as is' solely for informational purposes, and is not intended for trading purposes or advice.
Past performance is not indicative of future results.