Skip to content
All library documents

Configurable Candlestick Pattern Backtesting with Stops and Risk Targets

Article TradingView scripts

Summary

This indicator scans a broad set of bullish and bearish candlestick formations and summarizes their backtested returns in a table. Users can choose which patterns and directions to include, optionally filter trend with a simple moving average, set a starting date, and select entries at the close or at a breakout of the pattern high or low. Breakout orders can be canceled after a chosen number of bars if unfilled.

Risk controls include stops based on either the pattern’s price range or average true range, with selectable distance, plus several configurable risk-to-reward targets. The interface reports pattern returns across the selected targets and can label detected formations. The document describes configurable mechanics, but provides no actual results, sample details, transaction costs, or validation procedure. Consequently, its table alone cannot establish that a pattern or parameter set has predictive value, and backtest assumptions should be checked before drawing conclusions.

Key ideas

  • The tool detects many named bullish and bearish candlestick patterns and compares their backtested returns.
  • Entry timing can use the signal close or a breakout of the pattern boundary, with optional order cancellation.
  • Stops can be scaled from pattern range or ATR, while multiple risk-to-reward targets are configurable.
  • A moving-average trend filter, test start date, and selected pattern set affect the reported results.
  • No empirical results or validation details are provided, so displayed returns do not establish predictive edge.

Tags

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