Skip to content
All library documents

ATR Trailing Stops with Williams Percent Range Trend Detection

Article ProRealCode

Summary

This indicator combines Williams Percent Range with Average True Range to define a directional trend and plot trailing stop lines. Williams Percent Range crossing configurable thresholds switches the trend state. The indicator then places a stop line below price during an upward state or above price during a downward state, using a fraction of ATR as the distance. A change in trend state produces a corresponding buy or sell marker. The code is a ProBuilder conversion of an MT5 indicator and exposes settings for the Williams lookback, ATR period, risk threshold, and ATR multiplier.

The document describes the calculation and provides implementation code, but it reports no backtest, market, timeframe, or performance evidence. The output is an indicator rather than a complete trading system; it does not specify position sizing, execution rules, or a broader method for evaluating signals. As with other threshold-based trend indicators, results depend on chosen parameters and price history, and the document does not establish that its markers predict profitable trades.

Key ideas

  • Williams Percent Range thresholds determine whether the indicator is in an upward or downward trend state.
  • The trailing stop distance is calculated as a configurable fraction of Average True Range.
  • The stop line trails below price in an upward state and above price in a downward state.
  • A trend-state change generates a buy or sell marker.
  • The document gives indicator code but no backtest or performance evidence.

Tags

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