The gross loss of all losing closed trades as a percent of the initial capital.
strategy.grossloss_percent is a series float equal to strategy.grossloss divided by strategy.initial_capital, times 100, as a positive number.
Type
series float
Remarks
- It never decreases.
- It is reported without a minus sign. Subtract it from
strategy.grossprofit_percentto getstrategy.netprofit_percent, or negate it before plotting it beside profit.
Example
//@version=6
strategy("Loss and gain share", 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.grossprofit_percent, "Gross profit %", color.green)
plot(-strategy.grossloss_percent, "Gross loss % (negative)", color.red)See also
strategy.grosslossstrategy.grossprofit_percentstrategy.netprofit_percentstrategy.initial_capitalstrategy.losstrades
Runs on Sidechair