Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.strategy.wintrades
On this pageSignatureReturnsExample

Strategy / Reference

alerta.strategy.wintrades

TradingView-compatible spelling: strategy.wintrades, runs without warnings

Returns the number of closed trades that ended with a profit.

alerta.strategy.wintrades → int

Returns

int

Example

alerta.strategy.wintrades
strategy("Win Rate", overlay=true)const wr = strategy.closedtrades > 0 ? strategy.wintrades / strategy.closedtrades * 100 : 0plot(wr, { title: "Win Rate %", 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.