Breadth Ratio v1.1


-Head on over to my blog a to read more about the Breadth Ratio; or head to my snapchat to watch me apply this principle in the morning trading.
-Twitter: @TraderR0BERT
-Instagram: @ProfessorLapp

- The Breadth Ratio v1.1 Indicator is a Market Internals tool based upon the shares traded in stocks that are advancing over the shares traded in stocks that are declining

- if you do not know much or anything about what market internals are, I highly suggest that you go to and go through all of the Tim (author's) articles on Market Internals.
- Another great resource to learn more about market internals is the podcast by and listen to the podcast on "Market internals".

-Market Internals are similar to the instrument cluster on your car dashboard, without them you really do not know the condition of the market or how fast you are moving.
The FOUR CORE Market Internals are as follows:
-Breadth Ratio (this indicator)
-Advance/Decline Line


The Breadth Ratio is a volume ratio composed of volume flowing into up stocks versus volume flowing into down stocks. This gives me a ratio that helps me gauge how strong the market will move in a particular direction for that particular day.
- For a STRONG POSITIVE trending day, I would want to see this ratio at a value of at least 2:1 positive; This means that we have 2x the amount of volume flowing into names moving higher on the session when compared to volume going into names moving lower.
-The opposite is true for a weak session moving lower; In that case, I would want to see at least 2:1 negative,This means that 2x the amount of volume is flowing into names moving lower on the session when compared to volume going into names moving higher.

**If we observe a volume ratio of +2:1 that means we are in a strong trending day where it's going to be difficult to get a large reversal**
從常用腳本中移除 新增至常用腳本
//Twitter: @TraderR0BERT; Instagram: @ProfessorLapp;
//Created by TraderR0BERT; last updated 2016/07/14
//feel free to give me a follow for more free indicators, or follow me and give a shout out on one of my social accounts listed above
//also feel free to reach out with suggestions on how to improve/clean up any of the code below; happy trading

study(title="UVOL-DVOL Breadth Ratio v1.1", shorttitle="Breadth Ratio", overlay=false)
upvol = input(defval="NYSE:UVOL", title="Up Volume", type=symbol)
dowvol = input(defval="NYSE:DVOL", title="Down Volume", type=symbol)
timeframe=input(title="timeframe", type=resolution, defval="5")
ratiothold = input(2, minval=1, title="Ratio Threshold")

up=security(upvol, timeframe, close)
down=security(dowvol, timeframe, close)
upratio = up/down
downratio = down/up

updominant = up > down ? upratio : na
downdominant = down > up ? downratio : na

plot(updominant ? updominant : na, title="Up Volume Ratio", style=linebr, linewidth=2, color=green)
plot(downdominant ? downdominant : na, title="Down Volume Ratio", style=linebr, linewidth=2, color=red)
hline(ratiothold, title="Ratio Threshold", linewidth=2, color=black)