HPotter

Advance-Decline Indicator

The Advance-Decline Indicator is a market breadth indicator
based on the smoothed difference between advancing and declining issues.
The indicator shows when the stock market is overbought (and a correction
is due) and when it is oversold (and a rally is due).
The Advance-Decline Indicator is a 10-period exponential moving average of
the difference between the number of advancing and declining issues.
Remove from Favorite Scripts Add to Favorite Scripts
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 08/09/2014
// The Advance-Decline Indicator is a market breadth indicator 
// based on the smoothed difference between advancing and declining issues.
// The indicator shows when the stock market is overbought (and a correction 
// is due) and when it is oversold (and a rally is due).
// The Advance-Decline Indicator is a 10-period exponential moving average of 
// the difference between the number of advancing and declining issues.
////////////////////////////////////////////////////////////
study(title="Advance-Decline Indicator")
Length = input(10, minval=1)
BuyBand = input(-1500)
SellBand = input(1500, minval=1)
hline(SellBand, color=red, linestyle=line)
hline(BuyBand, color=green, linestyle=line)
xOvbOvs = ema(close, Length)
clr = iff(high > SellBand, red, iff(low < BuyBand, green, blue))
plot(xOvbOvs, color = clr, style  = histogram, linewidth = 2, title="Advance-Decline Indicator")
DONATE/TIP

BTC: 1Lo1GoTNsPbrjGAgPgF4MYZPhBFdoVHaTm
Hi, when I apply this to SPY I do not see any negative values. Would you have a minute to help me troubleshoot why this is happening?
Reply
HPotter PRO cogitation
@cogitation, I think it is that SPY have not a negative values.
Reply
@HPotter, I really appreciate your quick feedback.
I did not consider that maybe SPY wouldn't have a negative AD line.
But on looking at SPX there are again no negative values, but during the 2007-2008 period the values are outputted in Red, and they are shown as read now again (red since 2012). Are red bars indicative of negative values?
Also, in looking at the script I don't understand where is the information (values of advances and declines) called from. Where is the source?

Thanks again.
Reply
HPotter PRO cogitation
@cogitation, This is published of NYSE Advance-Decline. I think this indicator only for this.
Reply
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体
台灣
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out