<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>BullCharts : deviati&#111;n to moving average</title>
  <link>http://www.bullcharts.com.au/forum/</link>
  <description>This is an XML content feed of; BullCharts : BullScript : deviati&#111;n to moving average</description>
  <copyright>Copyright (c) 2006-2009 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 12:09:11 +0000</pubDate>
  <lastBuildDate>Tue, 30 Aug 2005 22:57:27 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.bullcharts.com.au/forum/RSS_post_feed.asp?TID=285</WebWizForums:feedURL>
  <image>
   <title>BullCharts</title>
   <url>http://www.bullcharts.com.au/forum/http://www.bullcharts.com.au/images/bull_logo.gif</url>
   <link>http://www.bullcharts.com.au/forum/</link>
  </image>
  <item>
   <title>deviati&#111;n to moving average : thanks pipsqueek i will see what...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1034#1034</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=105" rel="nofollow">john</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 30&nbsp;Aug&nbsp;2005 at 10:57pm<br /><br /><P>thanks pipsqueek</P><P>i will see what your coding gives me.</P><P>used with indices, chart two can give early warning signals.</P><P>regards, John</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 30 Aug 2005 22:57:27 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1034#1034</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : HI John, Try this for chart2 pd:=input(&amp;#034;moving...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1028#1028</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=54" rel="nofollow">pipsqueek</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 25&nbsp;Aug&nbsp;2005 at 10:45pm<br /><br /><P>HI John,</P><P>Try this for chart2</P><P><FONT size=2>pd:=<FONT color=#0000c0>input</FONT>(<FONT color=#008b8b>"moving average period"</FONT>,20,1,250);</FONT></P><P><FONT size=2>Devo:=(<FONT color=#0000c0>close</FONT>-<FONT color=#0000c0>ma</FONT>(<FONT color=#0000c0>c</FONT>,pd,<FONT color=#0000c0>e</FONT>))/<FONT color=#0000c0>ma</FONT>(<FONT color=#0000c0>c</FONT>,pd,<FONT color=#0000c0>e</FONT>)*100;</FONT></P><P><FONT size=2>{or Devo:=(close/ma(c,pd,e)-1)*100&nbsp;&nbsp; is exactly the same thing}</FONT></P><P><FONT size=2>NormDevo:=<FONT color=#0000c0>sum</FONT>(Devo,pd)/pd;</FONT></P><P><FONT size=3><FONT size=2>(Devo - NormDevo)*100</FONT> </FONT></P><P><FONT size=3><FONT size=2>Looks like I've just calculated the difference between (the %deviation&nbsp;of the close from its moving average) and (the average of this deviation). Multiplied by 100 to give a bigger number.</FONT></P><P><FONT size=2>If you don't multply by 100, then you can plot your chart1 and chart2 in the same pane as their scales will&nbsp;be the same.&nbsp;They have the same basic shape.</FONT></P><P><FONT size=2>Not quite sure what this is all about John, but hope it does what you wanted.</FONT></P><P><FONT size=2>Pipsqueek</FONT></P><P>&nbsp;</P></FONT>]]>
   </description>
   <pubDate>Thu, 25 Aug 2005 22:45:32 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1028#1028</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : G&amp;#039;Day Pipsqueek, Thanks...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1027#1027</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=105" rel="nofollow">john</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 24&nbsp;Aug&nbsp;2005 at 11:04pm<br /><br /><P>G'Day Pipsqueek,</P><P>Thanks for persisting...</P><P>--------------------</P><P>Is the "Devo" you refer to equal to the percentage deviation of the close from the moving average?? I'm guessing that it is. Correct?</P><P>-&gt;Yep</P><P>What do you mean by "NormDevo"? </P><P>-&gt; Norm meaning normalisation. NormDevo&nbsp;is the average of Devo&nbsp;for the&nbsp;Period.</P><P>You are using 2 period references in "Chart two" ... one is the period for summing the "Devo data points" and the other is the period for "NormDevo". Do you want these periods to be the same as the period you used in Chart1 or are they different?</P><P>The period remains constant across all calculations. The Period is equal to&nbsp;the reference i.&nbsp; So in the last part of chart two calcs we are subtracting the average Devo from Devo.</P><P>Hope this is clearer.</P><P>Thanks, John</P>]]>
   </description>
   <pubDate>Wed, 24 Aug 2005 23:04:53 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1027#1027</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : John I&amp;#039;m a bit confused...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1026#1026</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=54" rel="nofollow">pipsqueek</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 24&nbsp;Aug&nbsp;2005 at 9:58pm<br /><br /><P>John</P><P>I'm a bit confused here ....</P><P>Is the "Devo" you refer to equal to the percentage deviation of the close from the moving average?? I'm guessing that it is. Correct?</P><P>What do you mean by "NormDevo"? </P><P>You are using 2 period references in "Chart two" ... one is the period for summing the "Devo data points" and the other is the period for "NormDevo". Do you want these periods to be the same as the period you used in Chart1 or are they different?</P><P>Regards, Pipsqueek</P>]]>
   </description>
   <pubDate>Wed, 24 Aug 2005 21:58:30 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1026#1026</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : Thanks for your valuable posts...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1025#1025</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=105" rel="nofollow">john</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 21&nbsp;Aug&nbsp;2005 at 10:55pm<br /><br /><P>Thanks for your valuable posts pipsqueek and cobra.</P><P>I have been able to use a hybrid between both suggestions to get my first chart. There was one other chart. Great if you could help me get this one.</P><P>Thanks guys, John&nbsp;</P><P>REFERENCES:<BR>i. Moving average (MA) period = no. bars in MA calculation (Period)<BR>ii. MA value = current MA value (MA)<BR>iii. Stock closing price (Stock)<BR><BR>CHART ONE*:<BR>Deviation of MA from Stock price, expressed as a %<BR>A. Formula: ((Stock/MA)-1)*100 (Devo)<BR><BR>* the above chart has been completed.<BR><BR>CHART TWO:<BR>Second deviation of MA, expressed as a %<BR><BR>This has two parts. Firstly to calculate average of<BR>Devo<BR><BR>B.&nbsp; sum(Devo data points for Period)/Period (NormDevo)<BR><BR>Then the finale...<BR><BR>C. (Devo - NormDevo)*100 (or (A-B)*100)<BR><BR></P>]]>
   </description>
   <pubDate>Sun, 21 Aug 2005 22:55:01 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1025#1025</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : Hi John Yep, you are right. What...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1024#1024</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=54" rel="nofollow">pipsqueek</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 20&nbsp;Aug&nbsp;2005 at 10:41pm<br /><br /><P>Hi John</P><P>Yep, you are right. What I suggested should plot the difference between the close and the moving average. If the close is above the moving average then this difference is positive, if the close is below the moving average then the differnce is negative. </P><P>I see your point about wanting to display this difference as a percentage. Makes comparisons easier.</P><P>Try this</P><FONT color=#800080><FONT size=3><FONT color=#800080 size=3><P>&#091;target</FONT><FONT color=#000000 size=3>=default</FONT><FONT color=#800080 size=3>&#093;</P></FONT><FONT size=3><P>pd:=</FONT><FONT color=#0000c0 size=3>input</FONT><FONT size=3>(</FONT><FONT color=#008b8b size=3>"moving average period"</FONT><FONT size=3>,20,1,250);</P><P>(</FONT><FONT color=#0000c0 size=3>close</FONT><FONT size=3>-</FONT><FONT color=#0000c0 size=3>ma</FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3>c</FONT><FONT size=3>,pd,</FONT><FONT color=#0000c0 size=3>e</FONT><FONT size=3>))/</FONT><FONT color=#0000c0 size=3>ma</FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3>c</FONT><FONT size=3>,pd,</FONT><FONT color=#0000c0 size=3>e</FONT><FONT size=3>)*100;</P></FONT></FONT></FONT><P>The difference between the close and the moving average has been expressed as a percentage of the moving average. Plonk the indicator into a new pane (it will go there anyway by default) and add a horizontal line at x = 0 if you wish. When the indicator is zero, then the close and the moving average are equal.</P><P>Regards, pipsqueek</P>]]>
   </description>
   <pubDate>Sat, 20 Aug 2005 22:41:04 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1024#1024</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : John, I use this basic script...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1020#1020</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=44" rel="nofollow">Cobra</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 19&nbsp;Aug&nbsp;2005 at 12:37pm<br /><br />John,<br>I use this basic script for deviation from 200 day moving average - <br><br>&#091;target=price&#093;<br>&#091;horzlines=1&#093;<br><br>C/(sum(C,200)/200)<br><br>Save as a indicator then add it to a new pane.<br><br>Any use?. Let me know if you find a way of displaying the scale inpercent, I'm sure there would be a way, I just haven't had time to lookinto it.<br>One problem I find with this indicator is that each stock is different,as to what constitutes a large deviation away from the average andhence a buy or sell signal, from a scan viewpoint. If the divergencefrom 1 could be converted into a percentage it may be more meaningful??.<br><br><br>]]>
   </description>
   <pubDate>Fri, 19 Aug 2005 12:37:20 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1020#1020</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : Pipsqueek, This shoul be plotting...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1018#1018</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=105" rel="nofollow">john</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 18&nbsp;Aug&nbsp;2005 at 11:58pm<br /><br /><P>Pipsqueek,</P><P>This shoul be plotting the difference (above or below) between the price and the ma value. is that what its doing?</P><P>John&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 18 Aug 2005 23:58:25 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1018#1018</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : Thanks Pip, Got close there....</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1017#1017</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=105" rel="nofollow">john</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 18&nbsp;Aug&nbsp;2005 at 11:54pm<br /><br /><P>Thanks Pip,</P><P>Got close there. </P><P>An input function would work well. I don't know how to display the scale as a %.</P><P>Regards, John&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 18 Aug 2005 23:54:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1017#1017</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : Hi John What kind of deviations...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1016#1016</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=54" rel="nofollow">pipsqueek</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 18&nbsp;Aug&nbsp;2005 at 10:38pm<br /><br /><P>Hi John</P><P>What kind of deviations from the moving average?</P><P>Are you just talking about the actual distance of the close from a moving average? Or something a bit more exotic?</P><P>If its the former, then wouldn't you just do something like...</P><P>close-ma(c,20,e); 0;</P><P>You could use an input function to allow you to change the moving average period as you apply the indicator. </P><P>Don't know if this what you were after ....</P><P>Pipsqueek</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Thu, 18 Aug 2005 22:38:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1016#1016</guid>
  </item> 
  <item>
   <title>deviati&#111;n to moving average : Folks, Has anyone experimented...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1014#1014</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=105" rel="nofollow">john</a><br /><strong>Subject:</strong> 285<br /><strong>Posted:</strong> 18&nbsp;Aug&nbsp;2005 at 8:54pm<br /><br /><P>Folks,</P><P>Has anyone experimented creating an indicator displaying price deviations to&nbsp;<!--StartFragment --> a moving average. the values would be displayed either side of a zero axis to represent prices above or below the moving average.</P><P>Any help would be appreciated <IMG src="http://www.bullcharts.com.au/forum/smileys/smiley32.gif" border="0"></P><P>Thanks, John</P>]]>
   </description>
   <pubDate>Thu, 18 Aug 2005 20:54:13 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=285&amp;PID=1014#1014</guid>
  </item> 
 </channel>
</rss>