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 → intReturns
intExample
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.