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
Please, start to read from the beginning and the quoted fragments will appear among first 10 paragraphs.
there's a button you can drag left and right to speedup the backtest process mate, rather thn that generally nothing else can help you speedup the time.
For the sake of efficiency, correctly coded indicators do normaly recalculate themselves on several most recent bars only (2 bars is sufficient for most of algorithms), so the bar limit in indicator (if such input variable exists) is used only for the very 1-st calculation on history, and does not affect testing speed.
There is a problem with formatting of inline link in that post (I don't know why) - unfortunately I can't edit posts - ask moderators.
But the same link with proper formatting is provided in a dedicated box at the bottom of that same post, like this - https://www.mql5.com/en/book/applications/indicators_make/indicators_test
|
|
V
" and run again backtest in visual and unvisual and they are the same (the results) :))
For the sake of efficiency, correctly coded indicators do normaly recalculate themselves on several most recent bars only (2 bars is sufficient for most of algorithms), so the bar limit in indicator (if such input variable exists) is used only for the very 1-st calculation on history, and does not affect testing speed.
Got it, but when you say "correctly coded", do you partly mean by this that the main calculation loop is iterating with "prev_calculated"?
I built an indicator which is not iterating with prev_calculated in the calculation loop and is quite slow when testing with all bars available, an old project, and arguably I should go back and change it
Got it, but when you say "correctly coded", do you partly mean by this that the main calculation loop is iterating with "prev_calculated"?
I built an indicator which is not iterating with prev_calculated in the calculation loop and is quite slow when testing with all bars available, an old project, and arguably I should go back and change it
Exactly. Only new bars starting from prev_calculated needs to be updated normally. You can find examples in the docs and in the algotrading book.