<?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 &#187; MACD</title>
	<atom:link href="http://www.thinkscripter.com/tag/macd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thinkscripter.com</link>
	<description>thinkScript Indicators for thinkorswim</description>
	<lastBuildDate>Mon, 06 Sep 2010 19:13:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>HLC MACD</title>
		<link>http://www.thinkscripter.com/indicator/hlc-macd/</link>
		<comments>http://www.thinkscripter.com/indicator/hlc-macd/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 03:00:33 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[MACD]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://thinkscripter.wordpress.com/?p=50</guid>
		<description><![CDATA[MACD based on the HLC/3 datapoint better at showing divergences. <a href="http://www.thinkscripter.com/indicator/hlc-macd/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a MACD with a few subtle changes:</p>
<p>1) The price data used is (H+L+C)/3 rather than the close. I find this makes a subtle improvement in the display of divergences.</p>
<p>2) You can plot a second long time frame MACD line on the same chart (hidden by default).</p>
<p>3) The histogram bars are colored based on the relationship to the previous bar vice the standard above/below zero line coloring.</p>
<p>4) The color of the main MACD line is white when the slope is positive and purple when negative.</p>
<div id="attachment_2444" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/01/macdhlc.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/01/macdhlc.png" alt="" title="macdhlc"  class="size-full wp-image-2444" /></a><p class="wp-caption-text">MACD HLC/3</p></div>
<pre class="brush: thinkscript;"># MACDHLC
# http://thinkscripter.wordpress.com
# thinkscripter@gmail.com
# Last Update 17 Jan 2009

declare lower;

input ShortTimeFrameFastLength = 7;
input ShortTimeFrameSlowLength = 28;
input STFMACDLength = 7;
input LongTimeFrameFastLength = 28;
input LongTimeFrameSlowLength = 112;
input LTFMACDLength = 5;

def fastAvg = ExpAverage(data = hlc3, length = ShortTimeFrameFastLength);
def slowAvg = ExpAverage(data = hlc3, length = ShortTimeFrameSlowLength);

plot STFValue = fastAvg - slowAvg;
STFValue.setLineWeight(2);
DEF STFslope = (STFValue-STFValue[1]);
DEF STFslopeColor = if(STFslope &gt; 0.0,9,0);
STFValue.AssignValueColor(getColor(STFSlopeColor));
 
plot STFAvg = ExpAverage(data = STFValue, length = STFMACDLength);
STFAvg.SetDefaultColor(GetColor(8));

def LfastAvg = ExpAverage(data = hlc3, length = LongTimeFrameFastLength);
def LslowAvg = ExpAverage(data = hlc3, length = LongTimeFrameSlowLength);
 
plot LTFValue = LfastAvg - LslowAvg;
LTFValue.setDefaultColor(color.green);
LTFValue.hide();

plot Diff = STFvalue - STFavg;
diff.AssignValueColor(if diff &gt;= diff[1] then Color.UPTICK else Color.DOWNTICK);
Diff.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Diff.SetDefaultColor(GetColor(5));
 
plot ZeroLine = 0;
ZeroLine.SetDefaultColor(GetColor(0));</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/hlc-macd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
