3GBH - ICT NY Session
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Clancy3gbh

//@version=5
indicator("NY Session", overlay = true)


// New York Morning Session

showNY         = input.bool(true, 'Show     →', group = 'NY Session', inline = '0', tooltip = 'Morning Session.')

timeframe           = input.session('0630-1000', ' ', group = 'NY Session', inline ='0')

nyColor         = input.color(color.new(color.green, 85), "", group = 'NY Session', inline = '0')

sessionNY             = time(timeframe.period, timeframe, 'UTC-6')

bgcolor(showNY and sessionNY ? nyColor : na)

// New York Lunch Session

showNYlunch     = input.bool(true, 'Show     →', group = 'NY Session', inline = '1', tooltip = 'Lunch/No trade session.')

lunchtimeframe  = input.session('1000-1100', '', group = 'NY Session', inline = '1')

lunchColor      = input.color(color.new(color.red, 85), '', group = 'NY Session', inline = '1')

lunchNY         = time(timeframe.period, lunchtimeframe, 'UTC-6')

bgcolor(showNYlunch and lunchNY ? lunchColor : na)

// New York Afternoon Session

showNYpm        = input.bool(true, 'Show     →', group = 'NY Session', inline = '2', tooltip = 'Afternoon Session.')

pmtimeframe     = input.session('1100-1430', '', group = 'NY Session', inline = '2')

pmColor         = input.color(color.new(color.green, 85), '', group = 'NY Session', inline = '2')

pmNY            = time(timeframe.period, pmtimeframe, 'UTC-6')

bgcolor(showNYpm and pmNY ? pmColor : na)
