DrawdownTracker
How far price sits below its highest close so far: 0 at a new high, negative while it is pulled back.
DrawdownTracker keeps the highest close seen since the first bar on the chart and reports two lines: the drawdown, which is the close's fractional distance below that high (0 at a new high, negative otherwise), and the high itself. The high never resets, so a pullback is measured from the best close of the whole loaded range, not from a recent swing. Only closes count; intrabar highs and lows are ignored.
How to read it
- The drawdown line lives in its own pane below the price and is never above zero.
- Zero means the close is at a new high. The line falls back toward zero as price climbs to new highs.
- The high line sits on the price scale and only rises. A flat stretch means price has not made a new closing high.
- On SPY one-minute bars for September 2026 the drawdown was within 0.1% of zero on only about 5% of bars, and its median was about -1.1%.
What it outputs
- Drawdown
- The close's distance below its highest close so far, as a fraction: 0 at a new high, -0.03 for 3% below.
- Highest close so far
- The highest close since the first bar. It only rises and is drawn on the price scale, so it shows the level a pullback is measured from.
Pitfalls
- The high never resets, so after a long run the drawdown can stay negative for hours until price makes a new closing high. A deep reading may reflect a high from earlier in the loaded data, not a recent swing.
- Only closes count. An intrabar spike above the high that closes lower does not move the high, so the drawdown can look shallower than the bar's range suggests.
- The catalog description is copied from an unrelated helper class, so the behavior described here comes from the code, not that text.