Connors-Hayward Advance-Decline Trading Patterns
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TechnicusCapital

//@version=5
indicator("CHADTP", overlay= false)

adv = request.security("USI:ADV", "D", close)
decl = request.security("USI:DECL", "D", close)
advsum = math.sum(adv, 5)
declsum = math.sum(decl, 5)

AD = (advsum - declsum)/ 5

plot(AD, color=color.white)
