Lipi Reference
Lipi

Variables

strategy.opentrades

The number of trades open now (entries not yet closed).

Example


          //@lipi=2
strategy("strategy.opentrades 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.opentrades, title="Opentrades", color=color.blue)
        

Type

series int