NRAA_CRUDE Trading Indicator
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © neerajupadhyaya

//@version=5


indicator(title='NRAA_CRUDE', shorttitle=' NRAA_Crude ', overlay=true)

t1 = time(timeframe.period,"1800-1815")
bgcolor(t1?color.rgb(49, 27, 146, 86):na)

inputema1 = input.int(5,"ema1")
inputema2 = input.int(10,"ema2")

ema1 = ta.ema(close,inputema1)
ema2 = ta.ema(close,inputema2)
plot1 = plot(ema1,color=color.rgb(214, 99, 22),linewidth=1)
plot2 = plot(ema2,color=color.rgb(37, 6, 100),linewidth=1)

UTCTimeInput = input('1800-1815', title="Get Open Value at Time?") 
OpenValueTime = time("1", UTCTimeInput)
var OpenPA = 0.0
if OpenValueTime
    if not OpenValueTime[1]
        OpenPA := high

plot(not OpenValueTime ? OpenPA : na, title="Open at time", color=color.rgb(10, 121, 20), linewidth=2, style=plot.style_linebr)

UTCTimeInput1 = input('1815-1800', title="Get close Value at Time?") 

OpenValueTime1 = time("1", UTCTimeInput)

var OpenPA1 = 0.0
if OpenValueTime1
    if not OpenValueTime1[1]
        OpenPA1 := low

plot(not OpenValueTime1 ? OpenPA1 : na, title="close at time", color=color.rgb(158, 7, 7, 10), linewidth=2, style=plot.style_linebr)