Skip to content
All library documents

Pivot Distance Breakouts with Moving Average and Volatility Filters

Article TradingView scripts

Summary

This script measures the gap between price relative to the latest confirmed pivot high and pivot low. It offers three signal modes: breakout from a squeeze, a moving average crossing zero, or a fast moving average crossing a slow one. Squeeze and breakout thresholds can be fixed percentages or derived from ATR, Bollinger Band width, or Keltner Channel width. Users can choose long, short, or both directions and optionally apply stop, target, trailing stop, and cooldown rules.

A higher timeframe analysis can filter entries or force exits, using pivot distance or moving average conditions. The document provides implementation details and configurable inputs, but no backtest results or performance evidence. Pivot confirmation requires bars after the turning point, and higher timeframe values may update as bars complete; signal timing and execution assumptions therefore matter. The many selectable modes and parameters also require careful out-of-sample testing before drawing conclusions about robustness.

Key ideas

  • Pivot distance is computed from price’s percentage relationships to the most recently confirmed pivot high and low.
  • Signals can come from squeeze breakouts or one of two moving average crossover rules.
  • Thresholds can be based on fixed percentages, ATR, Bollinger Bands, or Keltner Channels.
  • Higher timeframe conditions can filter entries and trigger exits, while optional ATR stops and cooldowns manage trades.
  • The script reports no performance results, so its configurable rules need independent testing.

Tags

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