Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.strategy.risk.max_drawdown
On this pageSignatureParametersReturnsExample

Strategy / Reference

alerta.strategy.risk.max_drawdown

TradingView-compatible spelling: strategy.risk.max_drawdown, runs without warnings

Sets the maximum drawdown limit for the strategy. If reached, the strategy stops opening new positions.

alerta.strategy.risk.max_drawdown(value, type) → void

Parameters

NameTypeRequiredDefaultDescription
valuefloatYes—The maximum drawdown threshold.
typestringNot specified—"cash" or "percent". Default is "cash".

Returns

void

Example

alerta.strategy.risk.max_drawdown
strategy("Risk: Max DD", overlay=true)strategy.risk.max_drawdown(15, "percent")

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.