NYSE Advance/Decline - OM
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © OkoMoye

//@version=5

//ADL Plotting
indicator("NYSE Advance/Decline - OM", 'NYSE Advance/Decline')
snp = request.security("SPX", timeframe = timeframe.period, expression = close)
ad = request.security('NSHF', timeframe = timeframe.period, expression = close)
adcum = ta.cum(ad)
adline = plot(adcum, "A/D Line", color.rgb(149, 207, 255), linewidth = 2)

//Moving Averages
ma20 = ta.sma(adcum, 21)
plot(ma20, 'A/D 89MA', color.blue)
ma50 = ta.sma(adcum, 55)
plot(ma50, '50 Day MA', color.blue)
ma200 = ta.sma(adcum, 244)
plot(ma200, '200 Day MA', color.rgb(149, 207, 255), linewidth = 2)

//Thank you!
//Thank You!
var table thankyou = table.new(position.bottom_left, 1, 1, color.rgb(255, 255, 255, 88))
table.cell(thankyou, 0,0, 'Oko Moye', text_color = color.rgb(255, 255, 255, 66))























