OPEN-SOURCE SCRIPT

How to detect last bar of day

4 762
Simple way how to detect last bar of day and close all positions

UPD: day end can be different for yours because stocks market use another timezone

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.