This script allows you to define various trading sessions with alerts for when the session starts and ends. This allows you to do things like switch your trading bots off while you are sleeping.
It starts with default settings for weekday daytime, evening, nighttime, and weekends
Setup recommendations:
Use the Timezone setting in the indicator to match your trading view timezone setting to have alerts triggered when you expect
Add alerts from a lower TF e.g 1min chart
Use once per bar for the alerts
Notes on alerts: If you have a session stop then immediately have another starting with no time break in between the start/stop alerts may overlap/trigger at the same time so it's probably best just to use the stop or start alerts for each session.