Drawdown Statistics
By LuxAlgoMay 9, 2026
Drawdown Statistics measures every decline of an equity series from its running peak and turns the record into risk telemetry. Built as the Library's first dedicated drawdown statistics tool, it plots the drawdown curve below zero, tracks each episode from peak to recovery, and reports depth, duration, episode count, net profit and the recovery factor in a dashboard. By default it profiles the chart symbol as buy-and-hold; point it at another indicator's plot to profile that curve.
How to Trade the Drawdown Statistics?
- Threshold breach: fires when depth sinks below the set percent threshold — the shape of funded-account loss limits.
- Record depth / duration: alerts when the open drawdown beats the historical maximum or outlasts every completed episode.
- Recovery: equity exceeding its prior peak completes the episode, with its own alert.
- Reference levels: dashed and dotted lines mark the maximum depth, average episode depth and threshold.
Instrumentation from the risk and exits family, it grades durability rather than generating entries.
Drawdown Statistics Settings
- Equity Source (default close): the series treated as the equity curve.
- Equity Marking (default Source (End of Bar)): High/Low (Intrabar) marks peaks at highs and troughs at lows, producing deeper figures.
- Drawdown Units (default Percent) and Duration Units (default Bars): percent or currency depths; bar or calendar-day durations.
- Measure From Date (default disabled) with Start Date: anchor the window to a chosen date.
- Drawdown Threshold (%) (default 10) with Show Threshold Level (default enabled): the alert depth, always evaluated in percent.
- Dashboard and style toggles: panel position and size, max/average level switches, and colors.
Frequently Asked Questions
How does this relate to the Calmar ratio?
The Calmar ratio condenses return against maximum drawdown into one number; this build exposes the anatomy behind it — each episode's depth, duration and recovery. The Recovery Factor row is the closest single-number cousin, computed over the window rather than annualized.
What changes between end-of-bar and intrabar marking?
End-of-bar marks equity once per bar with the source value; High/Low (Intrabar) credits peaks to highs and troughs to lows, so the same history shows deeper, longer drawdowns. Do not mix figures from the two modes.
Why does the maximum drawdown change with more history?
Every figure is window sensitive: the sample starts at the first chart bar or the anchored date, so extra history can only reveal deeper or longer episodes. Measure From Date pins the window.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
