Variables
strategy.netprofit
The total profit of all closed trades, net of commission; a loss is negative.
Example
//@lipi=2
strategy("strategy.netprofit Example", overlay=false, initial_capital=10000)
if talib.crossover(close, talib.sma(close, 20)) {
strategy.entry("Long", strategy.long)
}
if talib.crossunder(close, talib.sma(close, 20)) {
strategy.close("Long")
}
plot(strategy.netprofit, title="Netprofit", color=color.blue)
Type
series float