VOLATILITY, DISPERSION & CANDLES
Ulcer index
A volatility measure that only counts the PAIN — how deep drawdowns went and how long they lasted.
spec id: ulcerlength (default 14)
What does Ulcer index measure?
A volatility measure that only counts the PAIN — how deep drawdowns went and how long they lasted. Upside volatility does not register.
How is Ulcer index calculated?
For each of the last 14 candles, work out how far below the window's running peak the close was, as a percentage. Square those, average them, and take the square root — so a long, deep slump scores far worse than a brief dip.
Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.
How do I use Ulcer index in a bot?
In the builder, add an indicator of type ulcer (parameters: length, default 14). Its value becomes an operand you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.
Related indicators
- Upper shadowThe wick sticking up above the candle's body — how far buyers pushed before sellers took it back.
- VarianceThe spread of recent prices before the square root is taken — standard deviation's rawer twin, used where the squared scale is wanted.
- Z-scoreHow unusual today's price is, in standard deviations from its own recent average.
- Acceleration bandsA price envelope that breathes with the market.
Or browse all 158 indicators in the full library.