Skip to content
All library documents

Closing-Price Breakouts with a 25-Bar Long Exit

Article Strategy library · Author: ChaoZhang

Summary

The strategy looks for an upside breakout using closing prices. Its source compares the current close with the highest close from the prior breakout window and also requires the current close to exceed the preceding bar's close. When both conditions hold, it opens a long position. Although the description discusses a long-short breakout idea, the supplied code implements long entries only and includes no short entry rule.

The exit condition closes the long position once at least 25 bars have elapsed since the latest qualifying entry. This is a time-based exit rather than a price-level stop, despite the document's stop-loss framing. The breakout window is configurable and defaults to 100 bars. Published backtest settings identify BTC/USDT futures and a date span, but provide no return, drawdown, or trade statistics. The accompanying discussion notes false breakouts and weak fit in range-bound markets, and proposes trailing exits, trend filters, and tests across instruments; none of these enhancements is demonstrated in the source.

Key ideas

  • A long entry requires the current close to exceed the prior window's highest close and the previous close.
  • The supplied source implements long trades only, despite broader long-short wording in the description.
  • The exit closes a position after 25 bars, making it a time-based exit rather than a price stop.
  • The breakout lookback is configurable, with a default window of 100 bars.
  • The document reports backtest settings but no performance evidence and flags false-breakout and range-market risks.

Tags

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