@trdjb3
Friend, let's go to some points that helped me a lot to improve the speed of the EA (Backtesting).
- Know exactly where to place each block.
Block (once per bar) - Place them exactly above conditions/rules that need to wait for candles to close, if your strategy is scalp/short trade - fast and you don't aim to make long gains then this block might not be ideal . This block speeds up the backtest speed when it is not necessary for the EA to watch (every tick) and thus saves a lot of time.
Block ( For each position) or ( For each closed position) - When you are carrying out an order count (profits and losses), performing sums etc... then you do not need this count to be executed every tick, but you need the After each trade or each closed trade this is executed, for this always use these blocks, I noticed that both in ONTICK and ONTRADE they save backtesting time.
Block ( Check Flag (true-false) When using these blocks, check the need to have a block before them or not so that when this previous block is really needed, then it checks this final block true-false. I noticed that this ends improving the performance of not having to check every tick if the condition is true or false.
I have cited just a few of the many examples that I could cite here, but in general I would like to inform you that the ideal thing is that you plan your project thoroughly knowing that when all the blocks are IN ORDER, and each one in its DUE place the chances of your backtest not getting slow will be higher, I see that many projects made in FXDREEMA sometimes need a review in this regard.
The more you use the more you learn, practice makes perfect.