Optimizing Zigzag Indicator Recalculation for Faster Testing
Summary
This document describes an optimized version of the Zigzag indicator for MetaTrader. Its purpose is to make it less time-consuming to test expert advisors that use Zigzag values. On its first run, it calculates the full price history; on later calls, it begins recalculation from an earlier extremum in the history rather than recomputing everything.
A configurable depth setting controls how far back recalculation starts: the documented default uses the third extremum, while changing the setting can make recalculation begin at the second. The author also says the revision preserves external variable names and removes isolated extrema produced on minute time frames. The document explains the indicator’s update behavior but offers no performance measurements or evidence about trading results. As with other Zigzag indicators, its changing extrema and recalculation behavior should be understood before using its values in a strategy or test.
Key ideas
- The optimized indicator recalculates from a recent historical extremum after its initial full-history calculation.
- A depth setting determines how far back the recalculation begins.
- The revision preserves external variable names and removes isolated extrema formed on minute time frames.
- The document gives no measured speedup or evidence of strategy performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.