Not that I have seen. You can do something like this:
// Get user input
session_overnight = input.session(title="Overnight. Session", defval="1800-0800")
// Check if the current bar falls within the given time session
isInSession(_sess) => not na(time(timeframe.period, _sess))
// You can check when it has started the overnight session
startedOvernight = isInSession(session_overnight ) and not isInSession(session_overnight )[1]
// You can check when it exits the overnight session
exitedOvernight = isInSession(session_overnight )[1] and not isInSession(session_overnight )
So you could stop trading if startedOvernight = true and start trading again if exitedOvernight is true or use different logic to do similar