<?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 : Trailing stops and initial stops tradesim:</title>
  <link>http://www.bullcharts.com.au/forum/</link>
  <description>This is an XML content feed of; BullCharts : TradeSim discussion : Trailing stops and initial stops tradesim:</description>
  <copyright>Copyright (c) 2006-2009 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Tue, 09 Jun 2026 20:43:58 +0000</pubDate>
  <lastBuildDate>Sun, 17 May 2009 00:15:34 +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=552</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>Trailing stops and initial stops tradesim: : Hello jazza, Using programs can...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2067#2067</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> 552<br /><strong>Posted:</strong> 17&nbsp;May&nbsp;2009 at 12:15am<br /><br /><P>Hello jazza,</P><DIV>Using programs can be frustrating at times.&nbsp;&nbsp; I am having problems myself with another backtesting program called&nbsp;&nbsp;Wealthlab.&nbsp; I have&nbsp;the code but it's having problems plotting indicators while&nbsp;loading multiple symbols and only trading only once&nbsp;per week rrrr.&nbsp;&nbsp; Anyhow don't give up!&nbsp;&nbsp;&nbsp; I have found a source of Jim berg's full methodology, perhaps&nbsp;I&nbsp;can build some code when&nbsp;I manage to finish the other thing with Wealthlab.&nbsp;&nbsp;&nbsp;Jim's strategy&nbsp;looks to be very&nbsp;sound going&nbsp;on long term trend and&nbsp;temporary oversold periods each one are&nbsp;known to work quite well.&nbsp;&nbsp;&nbsp; Try the simple things first and then build up to something more complicated, works for me.&nbsp;&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Click on Download for free with filefactory basic.&nbsp; An interesting read.</DIV><DIV>&nbsp;</DIV><DIV><a href="http://www.filefactory.com/file/747b74/n/JBTStrategies_rar" target="_blank">http://www.filefactory.com/file/747b74/n/JBTStrategies_rar</A></DIV><DIV>&nbsp;</DIV><DIV>Max</DIV><span style="font-size:10px"><br /><br />Edited by maximo - 17&nbsp;May&nbsp;2009 at 2:59pm</span>]]>
   </description>
   <pubDate>Sun, 17 May 2009 00:15:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2067#2067</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: :  Hi Maximo,Sorry about my long...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2061#2061</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=351" rel="nofollow">jazza</a><br /><strong>Subject:</strong> 552<br /><strong>Posted:</strong> 10&nbsp;May&nbsp;2009 at 6:22pm<br /><br /><font face="Arial, Helvetica, sans-serif">Hi Maximo,<br><br>Sorry about my long delay in getting back to you.<br><br>Thanks for posting the Ferret Formulas for stops re Tradesim. I had big concerted go at trying to make them work in conjunction with the JBerg backtest but could not get them to work. So back to the drawing board.<br><br>Cheers for now,<br><br>Jazza<br></font>< id="gwProxy" =""><!--Sessi&#111;n -->< ="jsCall;" id="jsProxy" =""><div id="ref"></div>]]>
   </description>
   <pubDate>Sun, 10 May 2009 18:22:15 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2061#2061</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: : Hi Maximo,Thanks for the explanation....</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2034#2034</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=351" rel="nofollow">jazza</a><br /><strong>Subject:</strong> 552<br /><strong>Posted:</strong> 01&nbsp;Apr&nbsp;2009 at 11:53pm<br /><br />Hi Maximo,<br><br>Thanks for the explanation. One step further in the coding journey. When I get tradsim I can convert the stoploss into the exact JB formula and see how it goes. <br><br>Will keep you posted. Thanks again.<br><br>Cheers,<br><br>Jazza<br>]]>
   </description>
   <pubDate>Wed, 01 Apr 2009 23:53:21 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2034#2034</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: : Hi Jazza, I don&amp;#039;t currently...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2033#2033</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> 552<br /><strong>Posted:</strong> 01&nbsp;Apr&nbsp;2009 at 2:43am<br /><br /><P>Hi Jazza,</P><P>I don't currently use Tradesim, but do understand the logic as it's Bullscript/Metastock language.</P><P>From the first line of code:&nbsp;&nbsp; LongEntryPrice := Open;&nbsp; { Buy at market on Open (once entry criteria is met this will get executed in simulation)&nbsp;}</P><DIV></DIV><P>Ref( ,-1) is yesterday and the -0.01 is a fraction under the price bar.&nbsp; Since LLV is the Lowest Low Value it's of 3 bars.&nbsp;&nbsp; The alternative Long initial stop uses an Average&nbsp;True Range&nbsp;of the past 30 bars * 1.5&nbsp; NOTE: This is not the actual&nbsp;JBerg strategy but it does show a working&nbsp;example of Tradesim coding of stoplosses.</P><P>Unfortunately I live way out in country NSW.&nbsp; Send Ferret a privmsg, he might still be around.</P><P>Max</P><span style="font-size:10px"><br /><br />Edited by maximo - 01&nbsp;Apr&nbsp;2009 at 11:21pm</span>]]>
   </description>
   <pubDate>Wed, 01 Apr 2009 02:43:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2033#2033</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: :      Normal   0       ...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2032#2032</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=351" rel="nofollow">jazza</a><br /><strong>Subject:</strong> 552<br /><strong>Posted:</strong> 31&nbsp;Mar&nbsp;2009 at 10:35pm<br /><br />< ="-" ="text/; =utf-8">< name="ProgId" ="Word.">< name="Generator" ="Microsoft Word 11">< name="Originator" ="Microsoft Word 11"><a href="file:///C:%5CDOCUME%7E1%5Cadc%5CLOCALS%7E1%5CTemp%5Cmsohtml1%5C01%5Cclip_filelist.xml" target="_blank"><o:smarttag uri="urn:schemas-microsoft-com:office:smarttags" name="City"></o:smarttag><o:smarttag uri="urn:schemas-microsoft-com:office:smarttags" name="place"></o:smarttag><!--if gte mso 9> <w:Word>  <w:View>Normal</w:View>  <w:Zoom>0</w:Zoom>  <w:Punctuati&#111;nKerning/>  <w:ValidateAgainstSchemas/>  <w:SaveIfInvalid>false</w:SaveIfInvalid>  <w:IgnoreMixed>false</w:IgnoreMixed>  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>  <w:Compatibility>   <w:BreakWrappedTables/>   <w:SnapToGridInCell/>   <w:WrapTextWithPunct/>   <w:UseAsianBreakRules/>   <w:D&#111;ntGrowAutofit/>  </w:Compatibility>  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:Word><!--><!--if gte mso 9> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles><!--><!--if !mso><   id=":38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>st1\:*{behavior:url(#ieooui) }<!--><!--    Style Definiti&#111;ns    p.Ms&#111;normal, li.Ms&#111;normal, div.Ms&#111;normal   mso-style-parent:"";   margin:0cm;   margin-bottom:.0001pt;   mso-paginati&#111;n:widow-orphan;   font-size:12.0pt;   font-family:"Times New Roman";   mso-fareast-font-family:"Times New Roman";  @page Secti&#111;n1   size:612.0pt 792.0pt;   margin:72.0pt 90.0pt 72.0pt 90.0pt;   mso-er-margin:35.4pt;   mso-footer-margin:35.4pt;   mso-paper-source:0;  div.Secti&#111;n1   page:Secti&#111;n1;  --><!--if gte mso 10> /* Style Definitions */ table.MsoNormalTable	{mso-style-name:"Table Normal";	mso-tstyle-rowband-size:0;	mso-tstyle-colband-size:0;	mso-style-noshow:yes;	mso-style-parent:"";	mso-padding-alt:0cm 5.4pt 0cm 5.4pt;	mso-para-margin:0cm;	mso-para-margin-bottom:.0001pt;	mso-pagination:widow-orphan;	font-size:10.0pt;	font-family:"Times New Roman";	mso-ansi-language:#0400;	mso-fareast-language:#0400;	mso-bidi-language:#0400;}<!--><p ="Ms&#111;normal">Hi Maximo,</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">Thanks for collating the screen shots from the wiz programmer‘Ferret’ Thanks to the both of you. </p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">I will have to wait until I purchase Tradsim to see how Igo. Will <span style="">&nbsp;</span>get onto it soon and let youknow how I go.</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">Is it possible for you or Ferret to decipher the exit codingin laymen’s terms for me so I can understand what I will be entering?</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal"><u>LongEntryPrice :</u> = Open: (Opening Price)?</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal"><u>LongInitialStop:</u>= Ref(LLV(L,3),-1)-0.01;<span style="">&nbsp; </span>{OPEN – 1 .5*Ref(ATR(30),-1;} </p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">I understand (LLV(L,10) but can you explain Ref, and-1)-0.01? <span style="">&nbsp;</span>Assume the second part is openminus 1.5 atr over 30 days ?</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">LongTrailingStop:- Ref(LLV(L,10),-1)-0.01;<span style="">&nbsp; </span></p><p ="Ms&#111;normal">LongTrailingStopTrig:- L&lt; LongTrailingStop</p><p ="Ms&#111;normal">LongTrailingStopPrice:- if (Open&lt; = LongTrailStop,Open, LongTrailStop);</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">Thanks in advance. </p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">Question: Do you guys by any chance live in <st1:city w:st="&#111;n"><st1:place w:st="&#111;n">Sydney</st1:place></st1:city> and are able to teach Bullscript?</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">Cheers for now,</p><p ="Ms&#111;normal"><o:p>&nbsp;</o:p></p><p ="Ms&#111;normal">Jazza</p>]]>
   </description>
   <pubDate>Tue, 31 Mar 2009 22:35:13 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2032#2032</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: : I&amp;#039;ll post these screenshots...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2031#2031</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> 552<br /><strong>Posted:</strong> 31&nbsp;Mar&nbsp;2009 at 1:50am<br /><br />I'll post these screenshots which maybe of&nbsp;help to you for Tradesim and JB system.&nbsp;&nbsp; Note: The&nbsp;Berg system has&nbsp;3 other entry rules which&nbsp;look to be&nbsp;important in it's implementation. <DIV>&nbsp;</DIV><DIV>Cheers!</DIV><DIV>&nbsp;</DIV><DIV><img src="http://www.bullcharts.com.au/forum/uploads/189/JimBerg-SystemRules.gif" height="534" width="1150" border="0" /></DIV><DIV>&nbsp;<img src="http://www.bullcharts.com.au/forum/uploads/189/TradesimTrailingstop.gif" height="115" width="673" border="0" /></DIV><span style="font-size:10px"><br /><br />Edited by maximo - 31&nbsp;Mar&nbsp;2009 at 1:51am</span>]]>
   </description>
   <pubDate>Tue, 31 Mar 2009 01:50:42 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2031#2031</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: : Hi Rod,Much appreciated for your...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2030#2030</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=351" rel="nofollow">jazza</a><br /><strong>Subject:</strong> 552<br /><strong>Posted:</strong> 30&nbsp;Mar&nbsp;2009 at 9:35pm<br /><br />Hi Rod,<br><br>Much appreciated for your reply. Thanks for pointing out the error. I actually used the ma(H,13,E) for the exit in Tradesim rather than the Mov(H,13,E). I copy/ pasted the (Mov) from a Jim Berg article for the forum. I am not a metastock user but I think mestastock uses (Mov) and Bullcharts uses (ma)&nbsp;&nbsp; <br><br>In my Tradesim programing I used the method you suggested. Was able to get entry and exit.<br><br>The stops caused me problems. Everywhich way I tried, caused an exit on entry day, causing bizare results. The problem is that stops do require a bullscript. Even the default setting of 2* ATR causes this exit on entry day problem. <br><br>I was using a trial 2 week test of the Tradesim which has now expired. I would buy it if I could figure out how to program the stops and trailing stops. Trouble is that the extensive manual is written for Metastock. There is minimal written info on using Tradesim with Bullcharts!<br><br>Would be very interested if you could let me know how you achieved yourinitial stop and trailing stop criteria in the back test. Also did theBerg system stack up?<br><br>Cheers for now,<br><br>Tony<br>]]>
   </description>
   <pubDate>Mon, 30 Mar 2009 21:35:25 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2030#2030</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: : The coding you are using for the...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2019#2019</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=632" rel="nofollow">rcameron</a><br /><strong>Subject:</strong> 552<br /><strong>Posted:</strong> 26&nbsp;Mar&nbsp;2009 at 3:49pm<br /><br />The coding you are using for the exit has an error, rather than Mov(H,13,E) try ma(H,13,E). Too start learning how to run Tradesim scans, my suggestion is that you use Bullcharts pre-coded indicators in the Entry and Exit sections. Once you get the knack then use Bullscript - in other words take the easy way out in the early stages.<DIV>&nbsp;</DIV><DIV>Like you I wanted to backtest Berg's system so I modified the Bullcharts code and wrote the following indicator so that I could select each of the Entry, Exit etc criteria when writing a scan &nbsp;without using Bullscript and risking an error in coding. You can easily select the Entry and Exit criteria, but a few tips for you using an example.</DIV><DIV>&nbsp;</DIV><DIV>First, in setting up the Tradesim scan go to the Entry tab and select "New", in the Category dropbox select "is an indicator signal" and then in the indicator drop box below the Category drop box select JB Volatility Profit Taker 1 (or the name you apply to the code provided below), then click on the "Parameters"&nbsp;button and select "Entry"i.e. Berg's blue bar)&nbsp;in the Marker Drop box, then "OK". Repeat this process in the Exit tab except select "Exit" or "Stopped out" or repeat if you want to test with the Stop and Profit taker exit. </DIV><DIV>&nbsp;</DIV><DIV>Complete the other steps in setting up the scan and then run it. It is relatively straight forward but&nbsp;remember that Entry and Exit criteria in my coding are "indicator signals" and cannot be seen&nbsp;unless you select the "is an indiactor signal" in the Category drop box. Make sure you understand the differences between each category.</DIV><DIV>&nbsp;</DIV><DIV>It is a bit difficult to convey clearly what I mean but let me know if you need any further clarification. </DIV><DIV>&nbsp;</DIV><DIV>Cheers Rod</DIV><DIV>&nbsp;</DIV><DIV>JB Volatility Profit Taker 1</DIV><DIV><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;citation</FONT></FONT><FONT size=3>="'Share Traders Handbook', Jim Berg;</P><P>'A Winning Combination for Traders', Jim Berg, Leverage July 2004 Issue 32 p15-17 www.leveragemag.com.au"</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</P><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>author</FONT></FONT><FONT size=3>=Cameron, Rod</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>=Stop Loss|Volatility</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</P></FONT></FONT><FONT size=3><P>al := </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 Length"</FONT></FONT><FONT size=3>, 10, 1);</P><P>am := </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, 0);</P><P>use15 := </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>"Combine with P15 1=yes, 0=no"</FONT></FONT><FONT size=3>, 1, 0, 1);</P><P>mamethod := </FONT><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>"MA method"</FONT></FONT><FONT size=3>,</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>EXPONENTIAL</FONT></FONT><FONT size=3>);</P><P>n := </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>"MA Time periods"</FONT></FONT><FONT size=3>,13,1);</P><P>lhn := </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>"Low High periods"</FONT></FONT><FONT size=3>,20,1);</P><P>sn := </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>"Stop High periods"</FONT></FONT><FONT size=3>,15,1);</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;name</FONT></FONT><FONT size=3>=JBPT</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>=Orange</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</P></FONT></FONT><FONT size=3><P>pt := </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>ma</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>H</FONT></FONT><FONT size=3>,n,mamethod) + am*ATR(al);</P><P>pt;</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;name</FONT></FONT><FONT size=3>=Stop</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>&#093;</P></FONT></FONT><FONT size=3><P>ts := </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>hhv</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>C</FONT></FONT><FONT size=3>-am*ATR(al),</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>if</FONT></FONT><FONT size=3>(use15,sn,1));</P><P>ts;</P></FONT><FONT color=#008000 size=3><FONT color=#008000 size=3><P>{ Markers }</P><P>{ Note: These markers do not include the stop after initial entry, which is placed just below the previous trough }</P></FONT></FONT><FONT size=3><P>entry := </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>cross</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>C</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>L</FONT></FONT><FONT size=3>,lhn)+am*atr(al)));</P><P>takeprofit := </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>cross</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>C</FONT></FONT><FONT size=3>,pt);</P><P>stopped := </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>C</FONT></FONT><FONT size=3>&lt;ts </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>hist</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>C</FONT></FONT><FONT size=3>&lt;ts,1) </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>hist</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>C</FONT></FONT><FONT size=3>&gt;=ts,2);</P><P>inMarket :=</P></FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3><P>if</FONT></FONT><FONT size=3> (entry, true,</P></FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3><P>if</FONT></FONT><FONT size=3> (takeprofit </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>or</FONT></FONT><FONT size=3> stopped, false, </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>prev</FONT></FONT><FONT size=3>));</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;name</FONT></FONT><FONT size=3>=Enter</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>=marker</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>=Green</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>marker</FONT></FONT><FONT size=3>=type3</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>tooltip</FONT></FONT><FONT size=3>="Volatility Start"</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</P></FONT></FONT><FONT size=3><P>inMarket </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>not</FONT></FONT><FONT size=3> </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>hist</FONT></FONT><FONT size=3>(inMarket,1);</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;name</FONT></FONT><FONT size=3>=Exit</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>=marker</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>=Green</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>marker</FONT></FONT><FONT size=3>=type1</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>not</FONT></FONT><FONT size=3> inMarket </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>hist</FONT></FONT><FONT size=3>(inMarket,1) </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>and</FONT></FONT><FONT size=3> takeprofit;</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;name</FONT></FONT><FONT size=3>=Stopped Out</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>=marker</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>;</FONT></FONT><FONT size=3> </FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>marker</FONT></FONT><FONT size=3>=type2</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>not</FONT></FONT><FONT size=3> inMarket </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>hist</FONT></FONT><FONT size=3>(inMarket,1) </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>and</FONT></FONT><FONT size=3> stopped </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>not</FONT></FONT><FONT size=3> takeprofit;</P></FONT><FONT color=#008000 size=3><FONT color=#008000 size=3><P>{ Bar colours }</P></FONT></FONT><FONT size=3><P>r1 := (</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>L</FONT></FONT><FONT size=3>,lhn) + am*atr(al));</P><P>r2 := (</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>hhv</FONT></FONT><FONT size=3>(</FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>H</FONT></FONT><FONT size=3>,lhn) - am*atr(al));</P><P>jbmode := </FONT><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>C</FONT></FONT><FONT size=3>&gt;r1, 1, </FONT><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>C</FONT></FONT><FONT size=3>&lt;r2, -1, </FONT><FONT color=#0000c0 size=3><FONT color=#0000c0 size=3>prev</FONT></FONT><FONT size=3>) );</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;linestyle</FONT></FONT><FONT size=3>=PriceColor</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</P><P>&#091;name</FONT></FONT><FONT size=3>=Rising</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>=rgb(30,70,190)</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</FONT></FONT><FONT size=3> jbmode = 1;</P></FONT><FONT color=#800080 size=3><FONT color=#800080 size=3><P>&#091;name</FONT></FONT><FONT size=3>=Oversold</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>=FireBrick</FONT><FONT color=#800080 size=3><FONT color=#800080 size=3>&#093;</FONT></FONT><FONT size=3> jbmode = -1;</P><P>&nbsp;</P><P>&nbsp;</P></FONT></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 26 Mar 2009 15:49:11 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2019#2019</guid>
  </item> 
  <item>
   <title>Trailing stops and initial stops tradesim: :  Hi all, Hoping someone can...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2013#2013</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=351" rel="nofollow">jazza</a><br /><strong>Subject:</strong> 552<br /><strong>Posted:</strong> 23&nbsp;Mar&nbsp;2009 at 6:55pm<br /><br /><UL =disc><LI =Ms&#111;normal style="MARGIN: 0cm 0cm 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Hi all,</SPAN></LI></UL><P =Ms&#111;normal style="MARGIN: 0cm 0cm 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Hoping someone can help. Trying to backtest the JB profitaker on tradesim. Can achieve the main entry and exit criteria of:</P><UL =disc><LI =Ms&#111;normal style="MARGIN: 0cm 0cm 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">ENTRY trigger occurs when the closing price has moved the distance from the recent low equivalent to two times the average true range of the last ten days: C&gt;(LLV(L,20) + 2*ATR(10))<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></LI><LI =Ms&#111;normal style="MARGIN: 0cm 0cm 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">EXIT on a CLOSE above moving average of Highs plus 2 times the ten day ATR: Mov(H,13,E) + 2*ATR(10)</SPAN></LI></UL><P =Ms&#111;normal style="MARGIN: 0cm 0cm 10pt; LINE-HEIGHT: normal; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt"><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">However cannot get the programming to work for the stop or trailing stop as below:</SPAN></P><DIV></SPAN><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"></SPAN></DIV><DIV><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">STOP: Initial stop is just under the recent low but once prices continue to rise then use a Volatility Trailing Stop. Exit after two consecutive closes below trailing stop. The stop is two times the ATR subtracted from the close: HHV(C-2*ATR(10),15)</SPAN></DIV><DIV><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"></SPAN>&nbsp;</DIV><DIV><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Any programming wiz people out there that can help.</SPAN></DIV><DIV><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'"></SPAN>&nbsp;</DIV><DIV><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">Thanks in advance,</SPAN></DIV><DIV><SPAN lang=EN-US style="FONT-SIZE: 12pt; FONT-FAMILY: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman'">&nbsp;Jazza</SPAN></DIV>]]>
   </description>
   <pubDate>Mon, 23 Mar 2009 18:55:03 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=552&amp;PID=2013#2013</guid>
  </item> 
 </channel>
</rss>