Skip to content
All library documents

Testing Candlestick Reversal Patterns with Session and Risk Exits

Article TradingView scripts

Summary

This strategy turns a collection of candlestick formations into long and short signals for historical testing. Configurable patterns include engulfing, harami, piercing line and dark cloud cover, morning and evening stars, belt holds, soldiers and crows, and several less common formations. A signal in either direction can open a position while the selected trading session is active; positions are closed when that session ends.

Users can enable or disable individual pattern families and configure stop loss, take profit, and trailing stop values, with zero disabling the corresponding exit setting. The script plots detected patterns and combines bullish patterns into long entries and bearish patterns into short entries. The author describes the strategy as a way to test pattern effectiveness across instruments and timeframes, but provides no results or evidence that the patterns are profitable. The exact pattern definitions are rule-based, and the document does not specify instrument-specific sizing or a broader trend filter.

Key ideas

  • The script encodes multiple bullish and bearish candlestick patterns as entry signals.
  • Each pattern family can be enabled or disabled for comparative historical testing.
  • Entries are limited to a configurable session, with positions closed when the session ends.
  • Stop loss, take profit, and trailing exit settings can be disabled individually by setting them to zero.
  • The document gives no performance results, so it does not demonstrate that the patterns predict profitable trades.

Tags

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