Relative Content

Tag Archive for pine-script-v5

How to close all open trades on current candle when backtesting?

When working with Pinescript v5 in TradingView, how can I close all open trades on the current candle when backtesting? I would like to have a checkbox to activate such a “close all open trades for backtesting purposes” feature and tried several different approaches, but none worked.