The largest trough-to-peak rise in equity so far, in the account currency.
strategy.max_runup is a series float: the biggest climb from an equity low to the following high since the first bar, in money. It only grows.
Type
series float
Remarks
- It is the mirror of
strategy.max_drawdownand, like it, is measured on equity including open profit. - It is in money, so the same strategy shows a bigger number on a bigger account. Use
strategy.max_runup_percentto compare runs.
Example
//@version=6
strategy("Run-up and drawdown", initial_capital = 10000, default_qty_type = strategy.percent_of_equity, default_qty_value = 100)
if ta.crossover(ta.sma(close, 10), ta.sma(close, 30))
strategy.entry("Long", strategy.long)
if ta.crossunder(ta.sma(close, 10), ta.sma(close, 30))
strategy.close("Long")
plot(strategy.max_runup, "Max run-up", color.green, style = plot.style_stepline)
plot(strategy.max_drawdown, "Max drawdown", color.red, style = plot.style_stepline)See also
Runs on Sidechair