Relative-Strength Rotation with a Buffered Z-Score and Confirmation Gates
Summary
This strategy compares two selected price series by taking the logarithm of their ratio, then measuring that ratio against a rolling mean and standard deviation. A configurable moving average can smooth the resulting Z-score. A buffered upward cross can trigger a long position in the charted instrument as the first series strengthens relative to the second; a downward cross can close the long. An optional short mode uses a separate extreme-level cross. Entry and exit filters include ADX thresholds and a price-to-pivot bias, with a configurable window allowing pivot confirmation near a Z-score cross.
The script also supports date-range limits, fallback values for invalid or frozen comparison series, percentage-based profit and loss orders, and alert messages. These controls add implementation complexity and require careful validation, especially because substituting a constant for a failed data series can affect the ratio and its Z-score. The document provides code but no performance results, asset-pair rationale, or evidence that the thresholds generalize. The signals therefore describe a testable relative-strength approach, not demonstrated profitability.
Key ideas
- The core signal standardizes the log ratio of two selected price series over a rolling lookback.
- A buffered Z-score cross governs long entries and exits, with an optional rule for short entries.
- ADX and pivot-based price bias can filter entries or contribute to exits.
- The code includes date filters, alerts, and optional percentage-based profit and loss orders.
- Fallback values for invalid or frozen data can affect the relative-strength calculation and merit validation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.