<?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; pivot</title>
	<atom:link href="http://www.thinkscripter.com/tag/pivot/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thinkscripter.com</link>
	<description>thinkScript Indicators for thinkorswim</description>
	<lastBuildDate>Sun, 29 Jan 2012 16:11:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Pivot Point Moving Average</title>
		<link>http://www.thinkscripter.com/indicator/pivot-point-moving-average/</link>
		<comments>http://www.thinkscripter.com/indicator/pivot-point-moving-average/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 23:28:13 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[moving average]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[pivot point moving average]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=3215</guid>
		<description><![CDATA[Calculates the moving average of the daily pivot point. <a href="http://www.thinkscripter.com/indicator/pivot-point-moving-average/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Reader Len asked for a moving average of the daily pivot point (H+L+C/3). This provided a great opportunity to demonstrate using the <code>fold</code> command to calculate a moving average from a higher timeframe. This method is extensible and you can let your scripting imaginations run wild with other possibilities. Good luck out there.<br />
-Eric</p>
<div id="attachment_3218" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2011/01/PPMA.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2011/01/PPMA.png" alt="" title="PPMA" class="size-full wp-image-3218" /></a><p class="wp-caption-text">Pivot Point Moving Average</p></div>
<pre class="brush: thinkscript; title: ; notranslate">
# TS_PivotPointMovingAverage
# By Eric Purdy, ThinkScripter LLC
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 30 Jan 2011

input period = 3;
input displace = 0;

plot PivotPointMovingAverage = (fold i = 1 + displace
to period + 1 + displace
with sum = 0 do sum
+ getValue(hlc3(period=&quot;Day&quot;),i,period+1))/period;

PivotPointMovingAverage.setDefaultColor(color.magenta);
PivotPointMovingAverage.setLineWeight(2);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/pivot-point-moving-average/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fractal Pivot Levels</title>
		<link>http://www.thinkscripter.com/indicator/fractal-pivot-levels/</link>
		<comments>http://www.thinkscripter.com/indicator/fractal-pivot-levels/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 16:19:37 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[fractal]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=3134</guid>
		<description><![CDATA[Plots fractal pivot hi/lo price levels across the chart. <a href="http://www.thinkscripter.com/indicator/fractal-pivot-levels/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Reading price action is probably the single most important skill of any trader. Over time, you become attuned to seeing prior pivots and the reaction of the price action thereto. I&#8217;ve had numerous requests to implement an indicator which displays the historical fractal swing levels across the chart automatically avoiding the need to plot these by hand.  The Fractal Pivot Levels indicator is the resulting study. The user inputs the price or percentage swing threshold that must be exceeded to trigger a fractal pivot reversal. Once identified, the pivot level is plotted for all future bars. The indicator will display up to 60 (30 High, 30 Low) fractal pivots. I&#8217;ve indicated on the lower image where price respected a prior pivot level. <span style="color:gray;" > (Note: This will be added to the <a href="http://www.thinkscripter.com/pro-membership/">Pro Member</a> bundle with next week&#8217;s update)</span><br />
<div id="pro" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2010/12/FPL.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2010/12/FPL.png" alt="" title="FPL"  class="size-full wp-image-3133" /></a><p class="wp-caption-text">Fractal Pivot Levels</p></div><br />
<div id="pro" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2010/12/FPCHL.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2010/12/FPCHL.png" alt="" title="FPCHL"  class="size-full wp-image-3142" /></a><p class="wp-caption-text">Price Action at Fractal Pivots</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/fractal-pivot-levels/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hourly Rolling Pivots Update</title>
		<link>http://www.thinkscripter.com/uncategorized/hourly-rolling-pivots-update/</link>
		<comments>http://www.thinkscripter.com/uncategorized/hourly-rolling-pivots-update/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 02:20:29 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[Hourly rolling pivots]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=1183</guid>
		<description><![CDATA[One of our forum members pointed out a problem with the Rolling Pivots study that caused them to fail when plotted on tick charts. After a bit of troubleshooting I found my mistake and got the study up and running &#8230; <a href="http://www.thinkscripter.com/uncategorized/hourly-rolling-pivots-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of our forum members pointed out a problem with the <a href="http://www.thinkscripter.com/2009/03/21/hourly-rolling-pivots/">Rolling Pivots</a> study that caused them to fail when plotted on tick charts. After a bit of troubleshooting I found my mistake and got the study up and running again. Good as new. The update is posted in the &#8220;Requests&#8221; forum in the Gold Donor section and will be added to the weekly update this Sunday.</p>
<div id="pro" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/04/rollingupdate.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/04/rollingupdate.png" alt="Rolling Pivots on Tick Charts" title="rollingupdate"  class="size-full wp-image-1186" /></a><p class="wp-caption-text">Rolling Pivots on Tick Charts</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/uncategorized/hourly-rolling-pivots-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Auto-Hiding Fixed Pivots</title>
		<link>http://www.thinkscripter.com/indicator/auto-hiding-fixed-pivots/</link>
		<comments>http://www.thinkscripter.com/indicator/auto-hiding-fixed-pivots/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 23:12:37 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[auto-hide]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=1174</guid>
		<description><![CDATA[Basic set of user input fixed pivots. <a href="http://www.thinkscripter.com/indicator/auto-hiding-fixed-pivots/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another reader request for a basic set of user input fixed pivots. I&#8217;ve thrown in some extra plumbing to make the pivots auto-hide when price diverges a user selectable percentage from the pivot.</p>
<div id="attachment_1176" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/04/fixedpivots.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/04/fixedpivots.png" alt="Auto-Hiding Fixed Pivots" title="fixedpivots"  class="size-full wp-image-1176" /></a><p class="wp-caption-text">Auto-Hiding Fixed Pivots</p></div>
<pre class="brush: thinkscript; title: ; notranslate"># TS_FixedPivots
# http://thinkscripter.wordpress.com
# thinkscripter@gmail.com
# Last Update 20 APR 2009

input hide_if_percent = 1.0;
input pivot = 800.0;
input r_1 = 810.0;
input r_2 = 820.0;
input r_3 = 830.0;
input s_1 = 790.0;
input s_2 = 780.0;
input s_3 = 770.0;

def deltar1 = AbsValue(close - r_1);
def percentDeltar1 = (deltar1 / close) * 100.0;
plot r1 = if (percentDeltar1 &lt; hide_if_percent, r_1, double.nan);
r1.SetDefaultColor(color.red);

def deltapp = AbsValue(close - pivot);
def percentDeltapp = (deltapp / close) * 100.0;
plot pp = if (percentDeltapp &lt; hide_if_percent, pivot, double.nan);
pp.SetDefaultColor(color.white);

def deltar2 = AbsValue(close - r_2);
def percentDeltar2 = (deltar2 / close) * 100.0;
plot r2 = if (percentDeltar2 &lt; hide_if_percent, r_2, double.nan);
r2.SetDefaultColor(color.red);

def deltar3 = AbsValue(close - r_3);
def percentDeltar3 = (deltar3 / close) * 100.0;
plot r3 = if (percentDeltar3 &lt; hide_if_percent, r_3, double.nan);
r3.SetDefaultColor(color.red);

def deltas1 = AbsValue(close - s_1);
def percentDeltas1 = (deltas1 / close) * 100.0;
plot s1 = if (percentDeltas1 &lt; hide_if_percent, s_1, double.nan);
s1.SetDefaultColor(color.green);

def deltas2 = AbsValue(close - s_2);
def percentDeltas2 = (deltas2 / close) * 100.0;
plot s2 = if (percentDeltas2 &lt; hide_if_percent, s_2, double.nan);
s2.SetDefaultColor(color.green);

def deltas3 = AbsValue(close - s_3);
def percentDeltas3 = (deltas3 / close) * 100.0;
plot s3 = if (percentDeltas3 &lt; hide_if_percent, s_3, double.nan);
s3.SetDefaultColor(color.green);</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/auto-hiding-fixed-pivots/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>ThinkScripter Pivot Confluence</title>
		<link>http://www.thinkscripter.com/indicator/thinkscripter-pivot-confluence/</link>
		<comments>http://www.thinkscripter.com/indicator/thinkscripter-pivot-confluence/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 00:13:59 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[confluence]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=1163</guid>
		<description><![CDATA[Evaluates the monthly, weekly, and daily pivot levels, makes a comparison and only plots the levels that are within a specified percentage of each other. <a href="http://www.thinkscripter.com/indicator/thinkscripter-pivot-confluence/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>YAPS!&#8230;.yet another pivot study. Folks are requesting these so I keep doing them&#8230;. In this particular case we have a study that looks at the monthly, weekly, and daily pivot levels, makes a comparison and only plots the levels that are within a specified percentage of each other. In other words, we are looking for confluences of the various time-frame pivots as more likely to provide support and resistance.</p>
<div id="pro" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/04/pivotconfluence.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/04/pivotconfluence.png" alt="Pivot Confluence" title="pivotconfluence" w class="size-full wp-image-1166" /></a><p class="wp-caption-text">Pivot Confluence</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/thinkscripter-pivot-confluence/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Weekly/Monthly Pivots</title>
		<link>http://www.thinkscripter.com/indicator/basic-pivots/</link>
		<comments>http://www.thinkscripter.com/indicator/basic-pivots/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 01:26:48 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=1150</guid>
		<description><![CDATA[Weekly and monthly pivots that remain constant for that whole period. <a href="http://www.thinkscripter.com/indicator/basic-pivots/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a Friday night quickie for the masses. I posted this in the forum earlier in the week. This is just the basic weekly and and monthly pivots with a slight improvement. If you&#8217;ve used the TOS pivots you might have noticed that the weekly and monthly pivots don&#8217;t behave as expected. Rather than stay the same for a whole month or week, they change on a daily basis. Many of us want weekly and monthly pivots that remain constant for the whole period. If you fall into that category, then these pivots are for you. The pivots are always calculated on all the available data which means 24Hr data for futures.</p>
<div id="attachment_1153" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/04/tspivots.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/04/tspivots.png" alt="ThinkScripter Pivots" title="tspivots" class="size-full wp-image-1153" /></a><p class="wp-caption-text">ThinkScripter Weekly/Monthly Pivots</p></div>
<pre class="brush: thinkscript; title: ; notranslate"># TS_Pivots
# (c) 2009 http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 20 APR 2009

input timeFrame = {default WEEK, MONTH};
input showOnlyToday = no;

def H = high(period = timeFrame)[1];
def L = low(period = timeFrame)[1];
def C = close(period = timeFrame)[1];

def calc_PP = (H + L + C) / 3;
def calc_R1 =  (2 * calc_PP) - L;
def calc_R2 = calc_PP + H - L;
def calc_R3 = H + 2 * (calc_PP - L);

def calc_S1 = (2 * calc_PP) - H;
def calc_S2 = calc_PP - H + L;
def calc_S3 = L - 2 * (H - calc_PP);

plot R3;
plot R2;
plot R1;
plot PP;
plot S1;
plot S2;
plot S3;

if (showOnlyToday and !IsNaN(close(period = timeFrame)[-1])) or
(getAggregationPeriod() &gt; if timeframe == timeframe.WEEK then AggregationPeriod.WEEK else AggregationPeriod.MONTH)

then {
    R1 = Double.NaN;
    R2 = Double.NaN;
    R3 = Double.NaN;
    PP = Double.NaN;
    S1 = Double.NaN;
    S2 = Double.NaN;
    S3 = Double.NaN;
}
else {
    R1 = calc_R1;
    R2 = calc_R2;
    R3 = calc_R3;
    PP = calc_PP;
    S1 = calc_S1;
    S2 = calc_S2;
    S3 = calc_S3;
}

PP.SetDefaultColor(color.white);
R1.SetDefaultColor(color.red);
R2.SetDefaultColor(color.red);
R3.SetDefaultColor(color.red);
S1.SetDefaultColor(color.green);
S2.SetDefaultColor(color.green);
S3.SetDefaultColor(color.green);

PP.SetStyle(Curve.POINTS);
R1.SetStyle(Curve.POINTS);
R2.SetStyle(Curve.POINTS);
R3.SetStyle(Curve.POINTS);
S1.SetStyle(Curve.POINTS);
S2.SetStyle(Curve.POINTS);
S3.SetStyle(Curve.POINTS);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/basic-pivots/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>ThinkScripter Regular Trading Hours Multi-Pivots</title>
		<link>http://www.thinkscripter.com/indicator/thinkscripter-regular-trading-hours-multi-pivots/</link>
		<comments>http://www.thinkscripter.com/indicator/thinkscripter-regular-trading-hours-multi-pivots/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 01:51:08 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[camarilla]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[DeMark]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[thinkscript]]></category>
		<category><![CDATA[Woodies]]></category>

		<guid isPermaLink="false">http://www.thinkscripter.com/?p=1132</guid>
		<description><![CDATA[A set of pivot points (Floor, Camarilla, DeMark Hi/Lo, Woodie's) based on regular trading hours (RTH 0930-1600 EST) only regardless of the hours displayed. <a href="http://www.thinkscripter.com/indicator/thinkscripter-regular-trading-hours-multi-pivots/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Why create yet another set of pivots? First and foremost, I wanted a set of pivot points based on regular trading hours (RTH 0930-1600 EST) only regardless of the hours I have displayed. TOS allows you to display regular trading hours only or the full 24 hours. Unfortunately, the standard TOS pivot points will recalculate based on what you have displayed. This annoyed me so I built a set of pivots always based on RTH regardless of what you display. Rather than stopping there I decided to throw four types of pivots into the one study. You can choose between the traditional floor trader&#8217;s pivots, Camarilla pivots, DeMark Hi/Lo pivots or Woodie&#8217;s pivots. You also have the option to display a midline for the traditional and Woodie&#8217;s pivots.</p>
<p>Also pictured are the <a href="http://www.thinkscripter.com/2009/03/12/thinkscripter-multi-stops">ThinkScripter Multi-Stops</a> using a fibonacci stop of the standard settings, as well as the Better Volume indicator from <a href="http://www.emini-watch.com">Emini-Watch</a>. I simply ported his code over for use in thinkScript.</p>
<div id="pro" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/04/multipivots.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/04/multipivots.png" alt="ThinkScripter RTH MultiPivots" title="multipivots" width="450" height="500" class="size-full wp-image-1135" /></a><p class="wp-caption-text">ThinkScripter RTH MultiPivots</p></div>
<div id="pro" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/04/mpquad.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/04/mpquad.png" alt="Four Types of Pivots" title="mpquad" class="size-full wp-image-1136" /></a><p class="wp-caption-text">Four Types of Pivots</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/thinkscripter-regular-trading-hours-multi-pivots/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Hourly Rolling Pivots</title>
		<link>http://www.thinkscripter.com/indicator/hourly-rolling-pivots/</link>
		<comments>http://www.thinkscripter.com/indicator/hourly-rolling-pivots/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 15:13:11 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[Hourly rolling pivots]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://thinkscripter.wordpress.com/?p=774</guid>
		<description><![CDATA[Each hour (or any time period you choose), the pivot levels will be recalculated based on the last hour's high/low/close. <a href="http://www.thinkscripter.com/indicator/hourly-rolling-pivots/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a few donors request an implementation of Hourly Rolling Pivots. Each hour (or any time period you choose), the pivot levels will be recalculated based on the last hour&#8217;s high/low/close. These pivots are good for intraday trading and especially during periods of chop.</p>
<div id="pro" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/03/rollingpivots.png"><img class="size-full wp-image-776" title="rollingpivots" src="http://www.thinkscripter.com/wp-content/uploads/2009/03/rollingpivots.png" alt="Hourly Rolling Pivots" /></a><p class="wp-caption-text">Hourly Rolling Pivots</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/hourly-rolling-pivots/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Previous Day&#8217;s Regular Hours High/Low/Close +</title>
		<link>http://www.thinkscripter.com/indicator/previous-days-regular-hours-highlowclose/</link>
		<comments>http://www.thinkscripter.com/indicator/previous-days-regular-hours-highlowclose/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 02:58:28 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[close]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[high]]></category>
		<category><![CDATA[low]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[regular trading hours]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://thinkscripter.wordpress.com/?p=495</guid>
		<description><![CDATA[Displays the previous day's regular trading hours high/low/close as well as two custom pivots. The script works on both 24H charts as well as Trading Hours only charts. <a href="http://www.thinkscripter.com/indicator/previous-days-regular-hours-highlowclose/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a custom script a reader commissioned me to build. It displays the previous day&#8217;s <em>regular trading hours</em> high/low/close as well as two custom pivots. The script works on both 24H charts as well as Trading Hours only charts. The custom pivots are defined as follows:</p>
<p>1) yesterday&#8217;s high + (yesterday&#8217;s high-two day&#8217;s ago high)<br />
2) yesterday&#8217;s low + (yesterday&#8217;s low-two day&#8217;s ago low)<br />
<div id="attachment_497" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/03/prevhlc.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/03/prevhlc.png" alt="Previous Day&#39;s Regular Hours H/L/C" title="prevhlc"  class="size-full wp-image-497" /></a><p class="wp-caption-text">Previous Day's Regular Hours H/L/C</p></div></p>
<pre class="brush: thinkscript; title: ; notranslate">
# PREVDAYHLC
# (c) 2009 http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 08 Mar 2009

input showOnlyToday = YES;
input Market_Open_Time = 0930;
input Market_Close_Time = 1600;

def day = getDay();
def lastDay = getLastDay();
def isToday = if(day == lastDay, 1, 0);
def shouldPlot = if(showOnlyToday and isToday, 1, if(!showOnlyToday, 1, 0));

def pastOpen = if((secondsTillTime(Market_Open_Time) &gt; 0), 0, 1);
def pastClose = if((secondsTillTime(Market_Close_Time) &gt; 0), 0, 1);
def marketOpen = if(pastOpen and !pastClose, 1, 0);
def firstBar = if (day[1] != day, 1, 0);

def closingBell = if secondsTillTime(Market_Close_Time)[1] &gt; 0 and
secondsTillTime(Market_Close_Time)&lt;=0 or
(secondsTillTime(Market_Close_Time)[1]&lt;secondsTillTime(Market_Close_Time)
and secondsTillTime(Market_Close_Time)[1]&gt;0)  then 1 else 0;

rec regHoursHigh = if(high &gt; regHoursHigh[1] and marketOpen, high,
if(marketOpen and !firstBar, regHoursHigh[1], high));
rec regHoursLow = if(low &lt; regHoursLow[1] and marketOpen, low,
if(marketOpen and regHoursLow[1] &gt; 0 and !firstBar, regHoursLow[1], low));

rec runningClose = compoundValue(1, if closingbell then close[1] else runningClose[1], close);
rec prevClose = compoundValue(1, if closingBell  then runningClose else prevClose[1], close);
rec prevHigh = compoundValue(1, if closingBell then regHoursHigh[1] else prevHigh[1], high);
rec prevLow = compoundValue(1, if closingBell then regHourslow[1] else prevlow[1], low);
rec prevHigh2 = compoundValue(1, if closingBell then prevHigh[1] else prevHigh2[1], high);
rec prevLow2 = compoundValue(1, if closingBell then prevLow[1] else prevlow2[1], low);

plot pc = if shouldPlot then prevClose else double.nan;
pc.SetStyle(curve.SHORT_DASH);
pc.setDefaultColor(color.white);

plot pl = if shouldPlot then prevLow else double.nan;
pl.SetDefaultColor(color.dark_red);
plot ph = if shouldPlot then prevHigh else double.nan;
ph.SetDefaultColor(color.dark_green);

plot pl2 = if shouldPlot then pl+(pl-prevLow2) else double.nan;
pl2.SetDefaultColor(color.darK_red);
pl2.SetStyle(curve.LONG_DASH);
plot ph2 =if shouldPlot then ph+(ph-prevHigh2) else double.nan;
ph2.SetStyle(curve.LONG_DASH);
ph2.SetDefaultColor(color.dark_green);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/previous-days-regular-hours-highlowclose/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Three Day Pivot Range</title>
		<link>http://www.thinkscripter.com/indicator/three-day-pivot-range/</link>
		<comments>http://www.thinkscripter.com/indicator/three-day-pivot-range/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 02:10:36 +0000</pubDate>
		<dc:creator>ThinkScripter</dc:creator>
				<category><![CDATA[Indicator]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[pivot]]></category>
		<category><![CDATA[range]]></category>
		<category><![CDATA[thinkscript]]></category>

		<guid isPermaLink="false">http://thinkscripter.wordpress.com/?p=334</guid>
		<description><![CDATA[The three day rolling pivot range. The pivots are calculated using 24 hour data (vice normal hours) which appears to be a limitation of ThinkScript's high() and low() functions. <a href="http://www.thinkscripter.com/indicator/three-day-pivot-range/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another reader request. The three day rolling pivot range. The pivots are calculated using 24 hour data (vice normal hours) which appears to be a limitation of ThinkScript&#8217;s high() and low() functions. If anyone knows a workaround, I&#8217;d love to hear it.</p>
<p>The formulas for the high and low pivot range are as follows:</p>
<p>The Pivot= (3day High + 3day Low + Close)/3<br />
The Midpoint= (3day High + 3 day Low)/2<br />
Pivot Range= Absolute Value (Pivot &#8211; Midpoint)<br />
Pivot High= Pivot + Range<br />
Pivot Low= Pivot &#8211; Range</p>
<div id="attachment_337" class="wp-caption aligncenter" style="width: 640px"><a href="http://www.thinkscripter.com/wp-content/uploads/2009/02/threedaypivotrange.png"><img src="http://www.thinkscripter.com/wp-content/uploads/2009/02/threedaypivotrange.png" alt="Three Day Pivot Range" title="threedaypivotrange" class="size-full wp-image-337" /></a><p class="wp-caption-text">Three Day Pivot Range</p></div>
<pre class="brush: thinkscript; title: ; notranslate"># THREEDAYPIVOTRANGE
# http://www.thinkscripter.com
# thinkscripter@gmail.com
# Last Update 22 Feb 2009

input timeFrame = {default DAY};
input showOnlyToday = no;

def day = getDay();
def lastDay = getLastDay();
def isToday = if(day &gt;= lastDay, 1, 0);
def shouldPlot = if(showOnlyToday and isToday, 1, if(!showOnlyToday, 1, 0));

def HA = high(period = timeFrame)[1];
def HB = high(period = timeFrame)[2];
def HC = high(period = timeFrame)[3];
def LA = low(period = timeFrame)[1];
def LB = low(period = timeFrame)[2];
def LC = low(period = timeFrame)[3];
def C = close(period = timeFrame)[1];

def H3 = Max(Max(HA, HB), HC);
def L3 = Min(Min(LA, LB), LC);

def calc_PP = (H3 + L3 + C) / 3;
def calc_MP = (H3 + L3) / 2;
def calc_PR = AbsValue(calc_PP - calc_mp);
def calc_PH = Calc_PP + calc_PR;
def calc_PL = Calc_PP - calc_PR;

plot PH =if (shouldPlot , calc_PH, double.nan);
plot PL = if (shouldPlot , calc_PL, double.nan);

PH.setStyle(curve.POINTS);
PL.setStyle(curve.POINTS);

PH.SetDefaultColor(color.cyan);
PL.SetDefaultColor(color.yellow);

PH.SetStyle(Curve.POINTS);
PL.SetStyle(Curve.POINTS);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkscripter.com/indicator/three-day-pivot-range/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

