Skip to content
All library documents

Relative Z-Score Rotation Strategy with Optional Entry and Exit Gates

Article Strategy library · Author: ky_yule1010

Summary

The available script excerpt introduces a relative-value rotation strategy based on two configurable price series. It provides a lookback setting for calculating a z-score and an optional moving average to smooth that signal. The stated inputs suggest the strategy uses the relative movement between the two legs to define rotation, with buffer zones around signal thresholds and an optional short side. The excerpt also includes configurable percentage exits and ADX and pivot-based price-position gates for entries or exits.

The document is incomplete: it ends just as the z-score logic begins, so the calculation, trade rules, and exit interactions cannot be confirmed. It provides no backtest settings, performance results, or discussion of transaction costs and instrument alignment. The fallback that substitutes a constant value when a price series is missing or frozen may affect the relative signal; the excerpt does not establish when this behavior is appropriate. Treat the listed controls as implementation clues rather than evidence of a validated rotation method.

Key ideas

  • The script sets up a z-score signal using two configurable price series and a selectable lookback.
  • An optional moving average can smooth the z-score used by the strategy.
  • Buffer zones, percentage exits, and an optional short side are configurable.
  • ADX and pivot-based price-position conditions can gate entries or exits.
  • The excerpt omits the actual signal calculation and trade logic, and gives no performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.