Get started
This is a ready-made /aoe column: one number per asset, so there is no line to draw.
Price Structure & Levels · Bars since high

Bars Since 252 Bar High

How many bars have passed since the highest high of the last 252 bars. On daily bars that is the number of trading days since the 52 week high.

Draws
In its own pane
Range
0 and up

Formula

w=min⁡(252, N)w = \min(252,\ N)
Barst=arg⁡min⁡0≤i<w{ i:Ht−i=max⁡0≤j<wHt−j}\text{Bars}_t = \arg\min_{0 \le i < w} \left\{\, i : H_{t-i} = \max_{0 \le j < w} H_{t-j} \right\}

If the high was touched more than once, the oldest touch inside the window counts. Bars, not calendar days.

How to read it

  • 0 means the latest bar made the high. Small numbers mean the asset is still making new highs.
  • Large numbers mean the high is far behind and the asset has been unable to reclaim it.
  • Pair it with the range position to tell a fresh breakout from a long recovery.

Where Blockcircle uses it

  • /aoe: add it as a column, then rank or filter thousands of assets by it.

All three run the same code as the chart on this page, so the numbers agree on the same bars.

See all indicators