Quote Originally Posted by ;
Thanks for the clarifiion. that I don't have any background in computers but've been teaching myself programming for a while today, so there will be large chapters of my personal computer science understanding overlooking. Sorry if this was a clear mistake. Looking for good habits to select up, eager to find out.
Increasing calculation energy is the very last measure you should take. In optimizing the calculations, the true calculation reduction comes. You can see the impact of algorithm optimization really well if you try to calculate a Fibonacci number iterative vs recursive. One of these takes.The mql4/5 editor has a build in profiling tool which should provide you a basic understanding about which part of the algorithm takes a long time. How frequently does your code execute? Is it really essential for every tick to be mimicked or is it sufficient to test only the pub opening? This will give you a reduction in backtesting time. Is there large portions of the code which do not need to be implemented over and over again? Would you compose a simply if check and disregard a lot of calculations every cycle? Micro optimization (if you really want that last bit mql4 can do) like mapping frequently used values instead of calculating them over and over again. Buffer loop conditional variables. I think local factors are somewhat quicker as well as international range. So you're able to save a fraction of a moment there. Employing little shift instead of branch. Try to steer clear of modulo etc.... However, this is kind of overkill for you I guess.