Skip to content
All library documents

Hammer and Shooting Star Entries with ATR Filters and Risk Controls

Article TradingView scripts

Summary

This strategy turns candle-shape rules into long and short signals. A bullish setup qualifies when the candle body closes in the upper portion of its range; a bearish setup qualifies when the body lies in the lower portion. The threshold is adjustable through a Fibonacci-style fraction. Users can also filter by candle range relative to ATR, an optional EMA direction, a date window, and an optional external indicator value. Signals are confirmed at bar close and only taken while flat.

Stops are placed beyond the signal or previous candle extreme by an ATR-based offset, and targets are set using a configurable risk-to-reward multiple. An optional fixed-fraction position-sizing method uses a library function, while on-chart statistics report trade counts, win rates, returns, and drawdown. These are script-generated backtest measures, not evidence of forward performance. The document gives no market, timeframe, cost, or robustness analysis, and the external library dependency and configurable filters affect results.

Key ideas

  • Bullish and bearish entries use the candle body's position within its full range.
  • ATR range limits, an optional EMA, date bounds, and an external source can filter setups.
  • Signals require a confirmed bar and a flat position.
  • Stops combine an ATR offset with nearby candle extremes, while targets follow a configurable reward multiple.
  • The script reports backtest statistics, but the document provides no independent or forward validation.

Tags

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