Skip to content
All library documents

Short-Term Trend Following from Consecutive Candle Colors

Article Strategy library · Author: ChaoZhang

Summary

This strategy uses consecutive candles with the same direction as a simple short-term trend signal. Candle direction is determined by comparing close with open; after a configurable run of upward candles it enters long, and after a run of downward candles it enters short. The settings allow long-only or short-only operation and specify the required run length.

Positions are closed when candle direction changes, so reversals in color can produce frequent exits and re-entries. The accompanying code also includes date inputs, though the shown closing condition applies an end date and does not clearly enforce a start date. A BTC/USDT spot backtest interval is listed, but no returns or other test outcomes are provided. The document identifies whipsaws, mistimed entries, commissions, and parameter choice as limitations, and suggests trend filters, trailing stops, and volume or breakout confirmation as possible refinements.

Key ideas

  • The entry signal requires a configurable sequence of candles moving in the same direction.
  • Upward candle sequences open long positions, while downward sequences open short positions if enabled.
  • The strategy exits when candle direction changes, which can create frequent trading in choppy markets.
  • The supplied backtest configuration gives no performance results, and the code's date handling should be checked.

Tags

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