<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ThinkScripter - Custom ThinkScript Indicators for thinkorswim &#187; up/down volume ratio</title>
	<atom:link href="http://www.thinkscripter.com/tag/updown-volume-ratio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thinkscripter.com</link>
	<description>Custom ThinkScript Indicator Scripts for thinkorswim</description>
	<lastBuildDate>Mon, 28 Jun 2010 02:18:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Four Volume</title>
		<link>http://www.thinkscripter.com/2009/05/13/four-volume/</link>
		<comments>http://www.thinkscripter.com/2009/05/13/four-volume/#comments</comments>
		<pubDate>Thu, 14 May 2009 04:27:37 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[thinkscript]]></category>
		<category><![CDATA[up/down volume ratio]]></category>
		<category><![CDATA[volume]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=1243</guid>
		<description><![CDATA[Here is a bit of a twist on my earlier Up/Down Volume Ratio study. Rather than plot the ratio of an underlying equity or future contract, this study averages the volume of the /ES, /YM, /NQ, and /TF and performs the same calculations. In essence, I&#8217;m trying to see if more of the volume is [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a bit of a twist on my earlier <a href="http://www.thinkscripter.com/2009/01/20/updown-volume-ratio">Up/Down Volume Ratio</a> study. Rather than plot the ratio of an underlying equity or future contract, this study averages the volume of the /ES, /YM, /NQ, and /TF and performs the same calculations. In essence, I&#8217;m trying to see if more of the volume is going into the bars that close down or to those that close up. You can see from the plot that very high ratios often precede tops and very low ratios often precede bottoms. The indicator can also produce nice divergences as well.  (NOTE: This one is a resource hog! You may not want to run this on a &#8220;challenged&#8221; machine)</p>
<div id="attachment_1242" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/05/fourvolume.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/05/fourvolume.png" alt="Four Volume" title="fourvolume" width="450" height="500" class="size-full wp-image-1242" /></a><p class="wp-caption-text">Four Volume</p></div>
<p><code><br />
# TS_FourVolume<br />
# (c) 2009 http://www.thinkscripter.com<br />
# thinkscripter@gmail.com<br />
# Last Update 13 May 2009</p>
<p>declare lower;</p>
<p>input VolumePeriod = 10;<br />
input OscillatorLength = 10;<br />
input priceChangeWeighted = NO;<br />
input overbought = 80.0;<br />
input oversold = 20.0;</p>
<p>input mode = {default UP_DOWN_VOL_RATIO, OSCILLATOR};</p>
<p>def price1 = close(&quot;/ES&quot;);<br />
def price2 = close(&quot;/NQ&quot;);<br />
def price3 = close(&quot;/YM&quot;);<br />
def price4 = close(&quot;/TF&quot;);</p>
<p>def volume1 = volume(&quot;/ES&quot;);<br />
def volume2 = volume(&quot;/NQ&quot;);<br />
def volume3 = volume(&quot;/YM&quot;);<br />
def volume4 = volume(&quot;/TF&quot;);</p>
<p>def avePrice = (price1+price2+price3+price4)/4.0;<br />
def delta = absValue(avePrice-avePrice[1]);<br />
def aveVolume = (volume1+volume2+volume3+volume4)/4.0;<br />
def multiplier = if(priceChangeWeighted, delta,1);</p>
<p>plot maxLine = 80.0;<br />
plot minLine = 20.0;<br />
maxLine.setDefaultColor(color.BLUE);<br />
minLine.setDefaultColor(color.BLUE);<br />
plot midLine = 50.0;<br />
midLine.setDefaultColor(color.WHITE);</p>
<p>def up = if(avePrice&gt;avePrice[1], aveVolume*multiplier, 0);<br />
def down = if(avePrice&lt;avePrice[1], aveVolume*multiplier, 0);<br />
def upvol = sum(up, VolumePeriod);<br />
def downvol = sum(down, VolumePeriod);</p>
<p>def UPDVR= ((upvol/(downvol+upvol)));</p>
<p>def highestVR = Highest(UPDVR, OscillatorLength);<br />
def lowestVR = Lowest(UPDVR, OscillatorLength);</p>
<p>plot FourVolume;</p>
<p>switch (mode) {</p>
<p>case UP_DOWN_VOL_RATIO:<br />
FourVolume = UPDVR*100;<br />
case OSCILLATOR:<br />
FourVolume = (UPDVR - lowestVR) / (highestVR - lowestVR)*100;<br />
}</p>
<p>FourVolume.DefineColor(&quot;OverBought&quot;, Color.DOWNTICK);<br />
FourVolume.DefineColor(&quot;Normal&quot;, color.cyan);<br />
FourVolume.DefineColor(&quot;OverSold&quot;, Color.UPTICK);<br />
FourVolume.AssignValueColor(if FourVolume &lt; oversold then FourVolume.color(&quot;OverSold&quot;)<br />
else if FourVolume &gt; overbought then FourVolume.color(&quot;OverBought&quot;)<br />
else FourVolume.color(&quot;Normal&quot;));</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/2009/05/13/four-volume/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Up/Down Volume Ratio</title>
		<link>http://www.thinkscripter.com/2009/01/20/updown-volume-ratio/</link>
		<comments>http://www.thinkscripter.com/2009/01/20/updown-volume-ratio/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 02:35:19 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[thinkscript]]></category>
		<category><![CDATA[up/down volume ratio]]></category>
		<category><![CDATA[volume]]></category>

		<guid isPermaLink="false">http://thinkscripter.wordpress.com/?p=135</guid>
		<description><![CDATA[This indicator attempts to capture the ratio of rising price volume to falling price volume. The display is an average of up bar volume divided by down bar volume. The mid line is the 50/50 ratio. A divergence between price and the indicator can signal non-confirmation of the trend. (Note: Initial positing of the code [...]]]></description>
			<content:encoded><![CDATA[<p>This indicator attempts to capture the ratio of rising price volume to falling price volume. The display is an average of up bar volume divided by down bar volume. The mid line is the 50/50 ratio. A divergence between price and the indicator can signal non-confirmation of the trend. (Note: Initial positing of the code had some lines missing)</p>
<div id="attachment_136" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/01/updownvolratio.png"><img class="size-full wp-image-136" title="updownvolratio" src="http://www.thinkscripter.com/wp-content/uploads/2009/01/updownvolratio.png" alt="Up/Down Volume Ratio" width="450" height="432" /></a><p class="wp-caption-text">Up/Down Volume Ratio</p></div>
<p><code style="text-align:left;"># UPDOWNVOLUMERATIO<br />
# (c) 2009 http://www.thinkscripter.com<br />
# thinkscripter@gmail.com<br />
# Last Update 19 Jan 2009</p>
<p>declare lower;</p>
<p>input period = 10;<br />
input smoothingPeriod = 3;<br />
input priceChangeWeighted = NO;<br />
def delta = absValue(close-close[1]);<br />
def multiplier = if(priceChangeWeighted, delta,1);<br />
 <br />
plot maxLine = 80.0;<br />
plot minLine = 20.0;<br />
maxLine.setDefaultColor(color.BLUE);<br />
maxLine.setLineWeight(2);<br />
minLine.setDefaultColor(color.BLUE);<br />
minLine.setLineWeight(2);<br />
plot midLine = 50.0;<br />
midLine.setDefaultColor(color.WHITE);<br />
midLine.setLineWeight(2);<br />
 <br />
DEF up = if(close&gt;close[1], volume*multiplier, 0);<br />
DEF down = if(close&lt;close[1], volume*multiplier, 0);<br />
DEF upvol = sum(up, period);<br />
DEF downvol = sum(down, period);<br />
DEF ratio = (100.0*(upvol/(downvol+upvol)));<br />
DEF UPDVR = HullMovingAvg(ratio,smoothingPeriod); <br />
 <br />
DEF lineColor = if(UPDVR&gt;=80.0, 6, if(UPDVR&lt;20.0,5,1));<br />
DEF plotData = UPDVR;<br />
plot VolumeRatio = UPDVR;<br />
VolumeRatio.AssignValueColor(getColor(linecolor));<br />
VolumeRatio.setLineWeight(3);<br />
VolumeRatio.setPaintingStrategy(paintingStrategy.HISTOGRAM);<br />
plot VolumeRatioLine = UPDVR;<br />
VolumeRatioLine.AssignValueColor(getColor(if(linecolor != 1, linecolor, 9)));<br />
VolumeRatioLine.setLineWeight(2);</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/2009/01/20/updown-volume-ratio/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
