The average percentage gain of the winning closed trades.
strategy.avg_winning_trade_percent is a series float: the mean percentage result of the trades that closed with a profit. It is na while there is no winner.
Type
series float
Remarks
- Each trade's percentage uses its own entry value.
- Each winner counts once, with its own percentage, so this is not
strategy.grossprofit_percentdivided bystrategy.wintrades; that figure uses the initial capital as its base.
Example
//@version=6
strategy("Winner and loser size", 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.avg_winning_trade_percent, "Average winner %", color.green)
plot(-strategy.avg_losing_trade_percent, "Average loser % (negative)", color.red)See also
strategy.avg_winning_tradestrategy.avg_losing_trade_percentstrategy.avg_trade_percentstrategy.wintradesstrategy.grossprofit_percent
Runs on Sidechair