MY SLOW BACKTEST PROBLEM SOLVED.
-
I wasn't sure where to put this. It's more of an observation than a tutorial. I'm sure that other people are having problems with the speed of their backtesting or lack of. I've been working on a handful of projects for quite some time, and the backtester always become an issue. Once I made a couple of tweaks, there was a substantial difference and I thought that I should share it so that others don't make the same mistake. I'm uploading the project with both the slow version and the fast one. I use the 1 minute OHLC but it still holds up on real ticks. 15 minute timeframe.To test it out, download it twice with the opposite version deactivated. You will see the difference. If you're a guru who reads this and see something wrong or something that I should have known, bear with me. I'm only working with 10 percent knowledge of this program with no coding experience and there isn't much information out there on it other than bs hedging strategies on youtube.With that being said, I love the program and think it's superior than any other I've come across. There are a million ways to skin a cat with it and it satisfies my need to problem solve. I've seen a few concerns about the backtesting speed. Some reasons state that it's too many objects, some say it's blocks, some say it's mt5, some say it could be computer hardware related. While all of them can be true, in this situation provided, it's blocks. I thought it was all the other things but once I changed the blocks, it sped up a lot. The project provided isn't a specific strategy. It's just a random line drawn out at a specified time. The goal is to show that the weekday filter and misuse of chart blocks really bogged the tester down.
-
Normalize your block ID's, may make it faster but that higher number will almost certainly cause adverse affects, your modify colours and properties should be on the on init tab, this means they will only work when EA is started (initiated).
-
@jstap I'll look into that. I always make sure they are numbered correctly. I missed them in the example. I remember using the normalize function and the numbers were still off. Unless I'm missing something, the modify color does work the way it is. It changed from red to light coral so it's barely noticeable. I'll take your advice and give it a shot. Thanks.
-
@jstap
Thank you for your sharing. Sure the Block IDs affect the order of execution on those blocks of the same level. But how come the speed would be affected by the IDs and normalizing it can help? I must miss something. -
I don't know, maybe the EA having to count from 0 to x every time, I may be wrong though. Personally I make the setup as simple and logical as I can.
-
@jstap
Good idea. Thanks for your sharing