Hi I have managed to solve the problem by combining some codes into void xxx() functions. Also I create my own data structure to contain the messy loop counting parameters, the code is now running smoothly/

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I just started learning MQL5 language, after studying some of the samples in the Codebase, I decided to write a Turtle trading strategy to practice the newly learnt knowledges. I successfully completed the EA and confirmed the results through backtesting, however I found the process of backtesting took long, as the code is nowhere near polished for smooth and fast execution.
Would anyone like to give some general suggestions on how to speed up the code? Thank you very much.
The code logic is to: