OPEN-SOURCE SCRIPT

BUG - strategy.direction.all

2 607
if
strategy.risk.allow_entry_in(strategy.direction.all)
strategy.exit() and strategy.close_all() doesnt work
but if
strategy.risk.allow_entry_in(strategy.direction.long)
or
strategy.risk.allow_entry_in(strategy.direction.short)
it works

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.