Skip to content
All library documents

Pin-Bar Reversals Filtered by EMA Trend and Round Levels

Article TradingView scripts

Summary

This strategy turns pin-bar candlesticks into long and short trades using wick and body proportions, the candle’s position relative to two exponential moving averages, and an optional EMA ordering condition. It also measures distance from a nearby round-number price level, with a user-set minimum distance, and can optionally exclude inside bars. A tail-percentage input changes how much of the candle must satisfy the pin-bar shape tests.

Long and short signals are assigned according to which wick dominates, and the strategy enters only when flat. The stop distance is based on the signal candle’s close-to-low range for longs or high-to-close range for shorts; a configurable profit multiple sets the target. The script includes adjustable EMA periods, decimal precision for round-level calculations, and optional bar highlighting. The document provides the rules and a TradingView backtesting context, but no performance statistics, tested markets, or timeframes. The conditions are specific to candle construction and the chosen price precision, so results may vary across instruments and chart settings.

Key ideas

  • Pin bars are identified through wick-to-body proportions and configurable tail placement thresholds.
  • Two EMAs provide price-location filters and can optionally require a bullish or bearish ordering.
  • An optional round-level distance threshold and inside-bar exclusion further restrict signals.
  • Dominant wick direction determines whether a qualifying setup is treated as a long or short entry.
  • Stops use the signal candle’s relevant wick range, while the target distance is set as a multiple of that risk.

Tags

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