I added the option to choose the timeframe, moving average type and length.
Note from the original script:
"This is the NYSE Advancers - decliners which the SPX pretty much follows. You can chart it like any index (ADD -NYSE AADV MINUS DDECL) but I find it more useful in a separate panel with colors for direction.
The level gives an idea of days move (example: plus or minus 500 is not much movement through the session) but I follow the direction as when more stocks advance (green) or decline (red) the index tends to track it pretty closely.
On SPX , SPY and correlates - very useful for intra-day trading (Scalping or 0DTE option trades) but not for higher time frames at all. If you chart the ADD in a chart and compare 5 minute to daily you will see what I mean."