Variables
strategy.losstrades
The number of closed trades that made a loss.
Example
//@lipi=2
strategy("strategy.losstrades 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.losstrades, title="Losstrades", color=color.blue)
Type
series int