INDICATORS · ULCER INDEX

Ulcer Index in Crypto: Why the Value Changes Before Candle Close

The Ulcer Index measures the depth and duration of drawdowns from recent highs. On the live bar, a new drawdown low raises it; a new high can reset part of it.

Short answer

Ulcer Index = √(mean of squared percentage drawdowns from the highest close over N bars). The live close determines the current drawdown and can set a new N-bar high. A drop deepens the current drawdown term; a rally to a new high sets that term to zero and changes the reference high for the window. So the live Ulcer Index can rise sharply on a drop and fall on a rally within one bar. Use closed values for risk filters.

Which part of Ulcer Index uses the live bar

ComponentUses current bar?Effect intrabar
Highest close (N)Yes, if live is new highResets reference
Current drawdown %YesSquared
Mean over NYes1/N weight

Because drawdowns are squared, deep drawdowns dominate; one live drop to −10% weighs as much as four bars at −5%.

Put Ulcer Index in Crypto next to price, flow and positioning in one workspace.

Open a ChartsPod workspace

How much it moves inside one bar

Ulcer Index during one bar (illustrative)Ulcer Index during one bar (illustrative): OPEN: UI 3.1; MID: Drop: UI 3.6; LATE: New high: drawdown 0; CLOSE: UI 3.0.OPENUI 3.1MIDDrop: UI 3.6LATENew high: drawdown 0CLOSEUI 3.0
Only Ulcer Index's closing value is kept in history. Original ChartsPod editorial graphic.
Illustrative intrabar range of Ulcer Index vs its closed valueIllustrative intrabar range of Ulcer Index vs its closed value: UI intrabar range 1 ; Typical closed change 0 .ILLUSTRATIVE INTRABAR RANGE OF ULCER INDEX VS ITS CLOSED VALUEUI intrabar range1Typical closed change0
How far Ulcer Index travels inside a bar versus between bars. Original ChartsPod editorial graphic.

Rules

Ulcer Index signal hygieneUlcer Index signal hygiene: Signals on closed bars; Bar-close alerts; Backtest uses the same rule; Live value labelled provisional; Settings identical across chart and alerts.ULCER INDEX SIGNAL HYGIENESignals on closed barsBar-close alertsBacktest uses the same ruleLive value labelled provisionalSettings identical across chart and alerts
Closed values are what history shows. Original ChartsPod editorial graphic.

Drawdown review is covered in Maximum-Drawdown Reviews: A Worked Crypto Example With Fees Included.

Review Ulcer Index in Crypto with bar replay before using it live.

Open ChartsPod replay

Questions readers ask

What does the Ulcer Index measure?

Depth and duration of drawdowns.

Why does it fall on a new high?

The current drawdown becomes zero.

Closed bars?

Yes.

Sources and methodology

Indicator formulas are standard definitions; live-versus-closed behaviour follows TradingView's repainting documentation. Values in examples are illustrative.

  1. TradingView Pine Script: Repainting — live vs historical calculation.
  2. ChartsPod indicator reference — indicator calculations.

This article explains research tools and workflows. It is not financial advice, does not recommend buying or selling any asset and does not predict prices. Crypto derivatives carry a risk of rapid and total loss of margin.

CHARTSPOD EDITORIAL EDITION · RESEARCH AND EDUCATION ONLY · NOT FINANCIAL ADVICE.