Skip to content
All library documents

New-High and New-Low Windows for Momentum Entry and Exit

Article Strategy library · Author: ChaoZhang

Summary

This strategy tracks rolling closing-price highs and rolling lows to define active periods after breakouts. A new high starts a high-period counter, while a new low starts a low-period counter; each period remains active for a configurable decay interval. In the provided source, the start of a high period enters a long position and its end closes that position. Low-period entries and exits are enabled only when shorting is allowed. The stated defaults use a 20-bar window and a five-bar decay.

The document frames the method as a way to trade around potential reversals, but the code is principally a breakout and momentum rule: it enters on fresh extremes and exits after the monitoring counter expires. It includes a BTC/USDT futures backtest configuration but reports no performance statistics. The shown implementation sets the trading-window flag permanently true, so its start-date input does not constrain trades. It also uses full equity sizing and gives no explicit stop-loss rule. Persistent directional moves, drawdowns, and parameter sensitivity are cited as risks.

Key ideas

  • A fresh rolling high or low starts a monitoring period controlled by a decay counter.
  • The code enters long at the start of a high period and closes the position when that period expires.
  • Short trades during low periods are conditional on a setting that is disabled by default.
  • Despite the reversal framing, entries follow new price extremes and therefore have breakout or momentum characteristics.
  • The backtest settings are given without performance results, and the start-date input is not applied in the shown logic.

Tags

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