Breadth Study for Think or Swim

Okay, this is a bit different from my normal posts, but what the heck. If you want to know more about Think or Swim give me a buzz.

$UVOL-$DVOL for 7/20/10 - 7/22/10

The following study plots breadth ($UVOL/$DVOL) for the Think or Swim trading platform. Basically, if the indicator is greater than two then the market is bullish. If it is less than two the market is bearish. On choppy days, you will see it flick back and forth. So you can see on Tuesday we started off choppy and then took off in the afternoon. On Wednesday nothing happened until Ben Bernanke gave his little speach. And today, the market just kept on going and going. Interestingly, this afternoon's sell off didn't really show up on this chart.

I'm publishing this under a Creative Commons license, so you can use it freely based on the agreement below.

Creative Commons License
Breadth Indicator by Delta Latitude is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at

#hint:atbBreath\nPlots breadth on lower axis\n(c) 2010 Deltalatitude, LLC
#hint exchange:Select NYSE or NASDAQ

# This work is licensed under the Creative Commons Attribution
# 3.0 Unported License. To view a copy of this license, visit
# or send a letter to Creative Commons, 171 Second Street,
# Suite 300, San Francisco, California, 94105, USA.
declare lower;

input exchange = {default NYSE, NASDAQ};

def up;
def down;

switch (exchange) {
   case NYSE:
      up = close("$UVOL");
      down =close("$DVOL");
   case NASDAQ:
      up = close("$UVOL/Q");
      down = close("$DVOL/Q");

def positive = up > down;

plot breadth = if positive then

breadth.SetPaintingStrategy(PaintingStrategy.LINE, yes);
breadth.DefineColor("Positive", Color.LIGHT_GREEN);
breadth.DefineColor("Negative", Color.LIGHT_RED);
breadth.AssignValueColor(if positive
then breadth.color("Positive") else breadth.color("Negative"));

plot zero = 0;
zero.DefineColor("Zero", Color.LIGHT_GRAY);

 Good luck trading.

1 comment:

CP said...

Andy, I am looking for a script that will scan for intraday volume on stocks that breakout with high volume. Can you help?