<?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 : Reset Trailing Stop</title>
  <link>http://www.bullcharts.com.au/forum/</link>
  <description>This is an XML content feed of; BullCharts : BullScript : Reset Trailing Stop</description>
  <copyright>Copyright (c) 2006-2009 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 13:25:21 +0000</pubDate>
  <lastBuildDate>Wed, 23 Dec 2009 15:28:14 +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=579</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>Reset Trailing Stop : I only just discovered this reply...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2231#2231</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=225" rel="nofollow">kmuntz</a><br /><strong>Subject:</strong> 579<br /><strong>Posted:</strong> 23&nbsp;Dec&nbsp;2009 at 3:28pm<br /><br />I only just discovered this reply - many thanks it works well.&nbsp; I was having trouble coming to grips with the "prev" function at the time]]>
   </description>
   <pubDate>Wed, 23 Dec 2009 15:28:14 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2231#2231</guid>
  </item> 
  <item>
   <title>Reset Trailing Stop : A simple more efficient version....</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2222#2222</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=189" rel="nofollow">maximo</a><br /><strong>Subject:</strong> 579<br /><strong>Posted:</strong> 06&nbsp;Dec&nbsp;2009 at 6:03pm<br /><br />A simple more efficient version. <DIV>&nbsp;</DIV><DIV><FONT size=3><DIV>&nbsp;</DIV><DIV><FONT size=3><P>Mult:=</FONT><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>"ATR Multiplier"</FONT></FONT><FONT size=3>,2,1);</P><P>Nb:=</FONT><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>"Nb Periods"</FONT></FONT><FONT size=3>,14,1);</P><P>HH := </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>Close</FONT></FONT><FONT size=3>-Mult*ATR(Nb);</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;target</FONT></FONT><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>color</FONT></FONT><FONT size=3>=black</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>linestyle</FONT></FONT><FONT size=3>=solid</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>;&#093;</P></FONT></FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3><P>if</FONT></FONT><FONT size=3>(HH&lt;</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>prev</FONT></FONT><FONT size=3> </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>and</FONT></FONT><FONT size=3> </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>close</FONT></FONT><FONT size=3>&gt;</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>prev</FONT></FONT><FONT size=3>,</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>prev</FONT></FONT><FONT size=3>,HH);</P><DIV></DIV></FONT></DIV></FONT></DIV><span style="font-size:10px"><br /><br />Edited by maximo - 10&nbsp;Dec&nbsp;2009 at 2:33am</span>]]>
   </description>
   <pubDate>Sun, 06 Dec 2009 18:03:04 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2222#2222</guid>
  </item> 
  <item>
   <title>Reset Trailing Stop : Hi kmuntz and welcome to the Forum....</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2140#2140</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=189" rel="nofollow">maximo</a><br /><strong>Subject:</strong> 579<br /><strong>Posted:</strong> 22&nbsp;Sep&nbsp;2009 at 11:59pm<br /><br />Hi kmuntz and welcome to the Forum.&nbsp; I have modified it to do that, though left the previous non retreating line in dotted, so both levels are visible.&nbsp; You can simply remove <DIV>the last 2 lines of code if you&nbsp;only want the (close &lt; stop value) line.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;target</FONT></FONT><FONT size=3>=price</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</P></FONT></FONT><FONT size=3><P>TDate:=</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>InputDate</FONT></FONT><FONT size=3>(</FONT><FONT color=#008b8b size=3><FONT color=#008b8b size=3>"Date of trend"</FONT></FONT><FONT size=3>, </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>date</FONT></FONT><FONT size=3>(2009,2,10));</FONT><FONT color=#008000 size=3><FONT color=#008000 size=3></P></FONT></FONT><FONT size=3><P>Value1:=</FONT><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>"ATR Range X"</FONT></FONT><FONT size=3>,3,1);</P><P>Value2:=</FONT><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>"ATR Periods"</FONT></FONT><FONT size=3>,20,3);</P><P>HoldingDays:=</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>BarsSince</FONT></FONT><FONT size=3>(OnOrSkipped(TDate));</P><P>Stop:=</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>CLOSE</FONT></FONT><FONT size=3>-(Value1*ATR(Value2));</P><P>ValueB := </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>If</FONT></FONT><FONT size=3>(Stop&gt;</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>PREV</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>undefined</FONT></FONT><FONT size=3>),Stop,</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>If</FONT></FONT><FONT size=3>(Stop&lt;=</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>PREV</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>undefined</FONT></FONT><FONT size=3>),</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>PREV</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>undefined</FONT></FONT><FONT size=3>),Stop*Holdingdays));</P></FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3><P>if</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>Close</FONT></FONT><FONT size=3>&lt;ValueB </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>or</FONT></FONT><FONT size=3> </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>LLV</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>C</FONT></FONT><FONT size=3>,2)&lt;ValueB,</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>LLV</FONT></FONT><FONT size=3>(Stop,8),ValueB);</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;linestyle</FONT></FONT><FONT size=3>=dotted</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</P></FONT></FONT><FONT size=3><P>ValueB;</P><DIV></DIV></FONT></DIV><span style="font-size:10px"><br /><br />Edited by maximo - 23&nbsp;Sep&nbsp;2009 at 11:55am</span>]]>
   </description>
   <pubDate>Tue, 22 Sep 2009 23:59:20 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2140#2140</guid>
  </item> 
  <item>
   <title>Reset Trailing Stop : I am using the BullCharts indicator...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2139#2139</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=225" rel="nofollow">kmuntz</a><br /><strong>Subject:</strong> 579<br /><strong>Posted:</strong> 22&nbsp;Sep&nbsp;2009 at 9:28pm<br /><br />I am using the BullCharts indicator ATR Inital Stop (by Leon Wilson). This stop is a specified number of ATRs below the close. It can only rise, not fall ie. if today's calculation is less than the previous calculation then the previous calculation is used.&nbsp; I would like to modify this indicator so that when the stop is hit (close &lt; stop value)&nbsp; the indicator resets - it recalculates to today's value.&nbsp; In other words it's as if the start date starts from the day the stop was hit.&nbsp; Does anyone have any idea how to do this in BullScript?<br><br>Here is the code (slightly simplified) that I want to modify:<br>TDate:=InputDate("Date of trend", date(2004,6,25));<br>Value1:=Input("ATR Range&nbsp; X",4.5,1);<br>Value2:=Input("ATR Periods",20,3);<br><br>HoldingDays:=BarsSince(OnOrSkipped(TDate));<br>Stop:=CLOSE-(Value1*ATR(Value2));<br>ValueB := If(Stop&gt;PREV(undefined),Stop,If(Stop&lt;=PREV(undefined),PREV(undefined),Stop*Holdingdays));<br><br><br>]]>
   </description>
   <pubDate>Tue, 22 Sep 2009 21:28:10 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=579&amp;PID=2139#2139</guid>
  </item> 
 </channel>
</rss>