Skip to content
All library documents

Ranking Breakout Pullbacks and Run-Ups Against an Instrument’s History

Article ProRealCode

Summary

This indicator records a breakout structure when price exceeds its running high after a configurable minimum gap. For each structure it stores the prior high, the lowest price before the break, the break point, and the subsequent high. It measures pullback depth and duration, then tracks the post-break advance from both the broken level and the pullback low. Current readings are compared with the stored history using medians, maxima, and percentile ranks, so an unusually deep retreat or unusually extended run can be judged relative to that instrument’s own past.

The document explains how to read the chart and panel, and discusses the threshold trade-off: a shorter gap includes more ordinary consolidations, while a longer gap can leave too few examples. Its code limits stored and drawn structures separately, with drawing count affecting clutter rather than the statistics. This is a descriptive indicator, not a demonstrated trading system: the text provides no performance test, and its rankings depend on the selected gap, available history, and the way structures are defined. Percentiles contextualize price action but do not establish that a trade will succeed.

Key ideas

  • A breakout is recorded only when price exceeds its running high after a minimum number of bars.
  • Each structure captures the prior high, intervening low, break, and later high to measure pullbacks and run-ups.
  • Percentile ranks compare live readings with the instrument’s stored history rather than fixed thresholds.
  • A shorter gap increases sample size but admits routine consolidations, while a longer gap may produce few observations.
  • The indicator describes historical context and does not establish profitable entry or exit rules.

Tags

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