Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.strategy.opentrades.max_drawdown_percent
On this pageSignatureParametersReturnsExample

Strategy / Reference

alerta.strategy.opentrades.max_drawdown_percent

TradingView-compatible spelling: strategy.opentrades.max_drawdown_percent, runs without warnings

Returns max drawdown percent for an open trade.

alerta.strategy.opentrades.max_drawdown_percent(trade_index) → float

Parameters

NameTypeRequiredDefaultDescription
trade_indexintYes—Open trade index.

Returns

float

Example

alerta.strategy.opentrades.max_drawdown_percent
strategy("Open Drawdown %", overlay=true)v = strategy.opentrades > 0 ? strategy.opentrades.max_drawdown_percent(0) : 0plot(v, { pane: "oscillator" })

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.