<?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 : Display single value as text.</title>
  <link>http://www.bullcharts.com.au/forum/</link>
  <description>This is an XML content feed of; BullCharts : BullScript : Display single value as text.</description>
  <copyright>Copyright (c) 2006-2009 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 08:46:52 +0000</pubDate>
  <lastBuildDate>Tue, 16 Oct 2012 22:34:40 +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=866</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>Display single value as text. : Here is the chart:     </title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3101#3101</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=1055" rel="nofollow">markos</a><br /><strong>Subject:</strong> 866<br /><strong>Posted:</strong> 16&nbsp;Oct&nbsp;2012 at 10:34pm<br /><br /><div>Here is the chart:</div><img src="uploads/1055/MovingAverage_ROAR.jpg" height="535" width="1063" border="0" />]]>
   </description>
   <pubDate>Tue, 16 Oct 2012 22:34:40 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3101#3101</guid>
  </item> 
  <item>
   <title>Display single value as text. : CharlesThanks for the pointer....</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3100#3100</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=1055" rel="nofollow">markos</a><br /><strong>Subject:</strong> 866<br /><strong>Posted:</strong> 16&nbsp;Oct&nbsp;2012 at 10:31pm<br /><br />Charles<div><br></div><div>Thanks for the pointer. &nbsp;I managed to get it to work with a bit more tweaking.</div><div>Below is the code:</div><div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb0, 143, 39; ">{Moving Average Calculation}</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; "><span style="color: #971f8e">&#091;target</span>=Price<span style="color: #971f8e">;</span> <span style="color: #971f8e">category</span>=Moving Average<span style="color: #971f8e">;&#093;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb0, 156, 156; "><span style="color: #000000">expr := </span><span style="color: #162bc4">expression</span><span style="color: #000000">(</span>"Expression"<span style="color: #000000">);</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">method := <span style="color: #162bc4">inputma</span>(<span style="color: #009c9c">"Method"</span>,<span style="color: #162bc4">SIMPLE</span>);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb0, 156, 156; "><span style="color: #000000">n := </span><span style="color: #162bc4">input</span><span style="color: #000000">(</span>"Time periods"<span style="color: #000000">,14,1);</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">res := <span style="color: #162bc4">ma</span>(expr,n,method);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb151, 31, 142; ">&#091;linestyle<span style="color: #000000">=Solid</span>;<span style="color: #000000"> </span>color<span style="color: #000000">=Red</span>&#093;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">res;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb0, 143, 39; ">{Alan Hull's ROAR calculation for best fit Moving Average}</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb151, 31, 142; ">&#091;linestyle<span style="color: #000000">=hidden</span>;<span style="color: #000000"> </span>visible<span style="color: #000000">=no</span>&#093;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">ResNow := Res;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">Res52W :=<span style="color: #162bc4">ref</span>(res,-52);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">Change := ResNow - Res52w;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">ROARtxt := 100*(Change/ResNow);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb0, 143, 39; ">{This part displays the ROAR as a percentage}</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb22, 43, 196; "><span style="color: #000000">a:=</span>IF<span style="color: #000000">(</span>systemdate<span style="color: #000000">=</span>Systemdate<span style="color: #000000"> ,RoarTxt, </span>Undefined<span style="color: #000000">);</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb151, 31, 142; ">&#091;linestyle<span style="color: #000000">=Text</span>;<span style="color: #000000"> </span>textalign<span style="color: #000000">=Above,Left</span>;<span style="color: #000000"> </span>target<span style="color: #000000">=price</span>;visible<span style="color: #000000">=yes</span>&#093;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb22, 43, 196; ">if<span style="color: #000000">(</span>barnumber<span style="color: #000000">=</span>lastvalue<span style="color: #000000">(</span>barnumber<span style="color: #000000">), </span>Round<span style="color: #000000">(a,2) + </span><span style="color: #009c9c">"%"</span><span style="color: #000000">, </span>undefined<span style="color: #000000">);</span>High<span style="color: #000000">;</span></p></div><div><img src="webkit-fake-url://C4394A19-EE0E-4F9E-811E-197A191EE96C/imagef" border="0" /></div><div><span style="color: #000000"><br></span></div>]]>
   </description>
   <pubDate>Tue, 16 Oct 2012 22:31:59 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3100#3100</guid>
  </item> 
  <item>
   <title>Display single value as text. :   MarkosI looked at a charrt...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3099#3099</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=1044" rel="nofollow">cmacdon</a><br /><strong>Subject:</strong> 866<br /><strong>Posted:</strong> 16&nbsp;Oct&nbsp;2012 at 9:03pm<br /><br />Markos<div>&nbsp;</div><div>I looked at a charrt after using your scrip.&nbsp; It shows aa MA line with I think the current value shown as text at every bar.&nbsp; Ther was another line but it seem off the scale?</div><div>&nbsp;</div><div>From the gist of your narrative I assume you want to only show a text value at the last bar?</div><div>&nbsp;</div><div>I hacked some&nbsp;code previously provided by Maximo on a bullscript post for "Text on Chart" and attach the amendment&nbsp; to uyou code as it only shows the value allocated for the last bar.</div><div>&nbsp;</div><div>I coverd up you second line as i did not understand what it was.</div><div>&nbsp;</div><div>You can reiinstate by removing THE BRACKETS{} and further amend if you so wish</div><div>&nbsp;</div><div>The last bar text is turned on by ticking the text box in the style menu.</div><div>&nbsp;</div><div>Regards</div><div>Charles</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div><font color="#800080" size="3"><font color="#800080" size="3"><p>&#091;target</p></font><p></p></font><p><font size="3">=Price</font><font color="#800080" size="3"><font color="#800080" size="3">;</font></font><font size="3"> </font><font color="#800080" size="3"><font color="#800080" size="3">category</font></font><font size="3">=Moving Average</font><font color="#800080" size="3"><font color="#800080" size="3">;&#093;</font></font></p><font color="#800080" size="3"><font color="#800080" size="3"></font></font><font size="3"><p>expr := </p></font><p><font color="#0000c0" size="3"><font color="#0000c0" size="3">expression</font></font><font size="3">(</font><font color="#008b8b" size="3"><font color="#008b8b" size="3">"Expression"</font></font><font size="3">);</font></p><font size="3"><p>method := </p></font><p><font color="#0000c0" size="3"><font color="#0000c0" size="3">inputma</font></font><font size="3">(</font><font color="#008b8b" size="3"><font color="#008b8b" size="3">"Method"</font></font><font size="3">,</font><font color="#0000c0" size="3"><font color="#0000c0" size="3">SIMPLE</font></font><font size="3">);</font></p><font size="3"><p>n := </p></font><p><font color="#0000c0" size="3"><font color="#0000c0" size="3">input</font></font><font size="3">(</font><font color="#008b8b" size="3"><font color="#008b8b" size="3">"Time periods"</font></font><font size="3">,14,1);</font></p><font size="3"><p>res := </p></font><p><font color="#0000c0" size="3"><font color="#0000c0" size="3">ma</font></font><font size="3">(expr,n,method);</font></p><font size="3"></font><font color="#800080" size="3"><font color="#800080" size="3"><p>&#091;linestyle</p></font><p></p></font><p><font size="3">=Solid</font><font color="#800080" size="3"><font color="#800080" size="3">;</font></font><font size="3"> </font><font color="#800080" size="3"><font color="#800080" size="3">color</font></font><font size="3">=Red</font><font color="#800080" size="3"><font color="#800080" size="3">&#093;</font></font><font size="3"> </font></p><font size="3"><p>res;</p></font><font color="#800080" size="3"><font color="#800080" size="3"><p>&#091;linestyle</p></font><p></p></font><p><font size="3">=hidden</font><font color="#800080" size="3"><font color="#800080" size="3">;</font></font><font size="3"> </font><font color="#800080" size="3"><font color="#800080" size="3">visible</font></font><font size="3">=no</font><font color="#800080" size="3"><font color="#800080" size="3">&#093;</font></font></p><font color="#800080" size="3"><font color="#800080" size="3"></font></font><font size="3"><p>ResNow := Res;</p><p>Res52W := </p></font><p><font color="#0000c0" size="3"><font color="#0000c0" size="3">ref</font></font><font size="3">(res,-52);</font></p><font size="3"><p>Change := ResNow - Res52w;</p><p>ROARtxt := 100*(Change/ResNow);</p></font><font color="#008000" size="3"><font color="#008000" size="3"><p>{ROARtxt;}</p></font></font><font size="3"></font><font color="#008000" size="3"><font color="#008000" size="3"><p>{&#091;linestyle=text; visible = yes; colour = blue&#093;</p><p>lastROAR:= lastvalue(ROARtxt);</p><p>lastROAR;close}</p></font></font><font size="3"></font><font color="#008000" size="3"><font color="#008000" size="3"><p>{ This additional bit is just a hacking and slight amendment of the code Maximo supplied in his Bullscript Forum  post For Text on Chart }</p></font></font><font size="3"><p>a:=</p></font><p><font color="#0000c0" size="3"><font color="#0000c0" size="3">IF</font></font><font size="3">(</font><font color="#0000c0" size="3"><font color="#0000c0" size="3">systemdate</font></font><font size="3">=</font><font color="#0000c0" size="3"><font color="#0000c0" size="3">Systemdate</font></font><font size="3"> ,RoarTxt, </font><font color="#0000c0" size="3"><font color="#0000c0" size="3">Undefined</font></font><font size="3">);</font></p><font size="3"><p>Bars:=</p></font><p><font color="#0000c0" size="3"><font color="#0000c0" size="3">datediff</font></font><font size="3">(</font><font color="#008b8b" size="3"><font color="#008b8b" size="3">"D"</font></font><font size="3">, </font><font color="#0000c0" size="3"><font color="#0000c0" size="3">Systemdate</font></font><font size="3">, </font><font color="#0000c0" size="3"><font color="#0000c0" size="3">systemdate</font></font><font size="3">) + 1;</font></p><font size="3"></font><font color="#800080" size="3"><font color="#800080" size="3"><p>&#091;linestyle</p></font></font><font size="3"><p>=Text</p></font><p><font color="#800080" size="3"><font color="#800080" size="3">;</font></font><font size="3"> </font><font color="#800080" size="3"><font color="#800080" size="3">textalign</font></font><font size="3">=Above,Left</font><font color="#800080" size="3"><font color="#800080" size="3">;</font></font><font size="3"> </font><font color="#800080" size="3"><font color="#800080" size="3">target</font></font><font size="3">=price</font><font color="#800080" size="3"><font color="#800080" size="3">&#093;</font></font></p><font color="#800080" size="3"><font color="#800080" size="3"></font></font><font color="#0000c0" size="3"><font color="#0000c0" size="3"><p>if</p></font><p></p></font><p><font size="3">(</font><font color="#0000c0" size="3"><font color="#0000c0" size="3">barnumber</font></font><font size="3">=</font><font color="#0000c0" size="3"><font color="#0000c0" size="3">lastvalue</font></font><font size="3">(</font><font color="#0000c0" size="3"><font color="#0000c0" size="3">barnumber</font></font><font size="3">), </font><font color="#0000c0" size="3"><font color="#0000c0" size="3">Round</font></font><font size="3">(a,2) + </font><font color="#008b8b" size="3"><font color="#008b8b" size="3">" "</font></font><font size="3">, </font><font color="#0000c0" size="3"><font color="#0000c0" size="3">undefined</font></font><font size="3">);</font></p><font size="3"></font><font color="#0000c0" size="3"><font color="#0000c0" size="3"><p>High</p></font><p></p></font><p><font size="3">;</font></p><font size="3"></font></div><div>&nbsp;</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Tue, 16 Oct 2012 21:03:47 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3099#3099</guid>
  </item> 
  <item>
   <title>Display single value as text. : Hi all,I have written a script...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3098#3098</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=1055" rel="nofollow">markos</a><br /><strong>Subject:</strong> 866<br /><strong>Posted:</strong> 15&nbsp;Oct&nbsp;2012 at 9:36pm<br /><br />Hi all,<div><br></div><div>I have written a script (we copied bits from here and there and added something of my own).</div><div>But I am having an issue with the output. &nbsp;Basically the indicator plots two plots on a symbol, but I want the second plot to only display its las value as text. &nbsp;I can get it to display as text, but I get every value.</div><div>I created the script this way as I wanted the same time frame applied to both plots (I also couldn't work out how to use the timeframe specified in one indicator in another without having to set it each time I applied it)</div><div><br></div><div>Any assistance would be appreciated</div><div><br></div><div>Here is my last effort:</div><div><br></div><div><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; "><span style="color: #971f8e">&#091;target</span>=Price<span style="color: #971f8e">;</span> <span style="color: #971f8e">category</span>=Moving Average<span style="color: #971f8e">&#093;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; min-height: 12px; "><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb0, 156, 156; "><span style="color: #000000">expr := </span><span style="color: #162bc4">expression</span><span style="color: #000000">(</span>"Expression"<span style="color: #000000">);</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">method := <span style="color: #162bc4">inputma</span>(<span style="color: #009c9c">"Method"</span>,<span style="color: #162bc4">SIMPLE</span>);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb0, 156, 156; "><span style="color: #000000">n := </span><span style="color: #162bc4">input</span><span style="color: #000000">(</span>"Time periods"<span style="color: #000000">,14,1);</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; min-height: 12px; "><br></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">res := <span style="color: #162bc4">ma</span>(expr,n,method);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb151, 31, 142; ">&#091;linestyle<span style="color: #000000">=Solid</span>;<span style="color: #000000"> </span>color<span style="color: #000000">=Red</span>&#093;<span style="color: #000000">&nbsp;</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">res;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb151, 31, 142; ">&#091;linestyle<span style="color: #000000">=hidden</span>;<span style="color: #000000"> </span>visible<span style="color: #000000">=no</span>&#093;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">ResNow := Res;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">Res52W := <span style="color: #162bc4">ref</span>(res,-52);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">Change := ResNow - Res52w;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">ROARtxt := 100*(Change/ResNow);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">ROARtxt;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; color: rgb151, 31, 142; ">&#091;linestyle<span style="color: #000000">=text</span>;<span style="color: #000000"> </span>visible<span style="color: #000000"> = yes</span>;<span style="color: #000000"> </span>colour<span style="color: #000000"> = blue</span>&#093;</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">lastROAR:= <span style="color: #162bc4">lastvalue</span>(ROARtxt);</p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; ">lastROAR;<span style="color: #162bc4">close</span></p><p style="margin: 0px; font-size: 11px; line-height: normal; font-family: 'Courier New'; min-height: 12px; "><br></p></div>]]>
   </description>
   <pubDate>Mon, 15 Oct 2012 21:36:10 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=866&amp;PID=3098#3098</guid>
  </item> 
 </channel>
</rss>