<?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 : newbie programming questi&#111;ns</title>
  <link>http://www.bullcharts.com.au/forum/</link>
  <description>This is an XML content feed of; BullCharts : BullScript : newbie programming questi&#111;ns</description>
  <copyright>Copyright (c) 2006-2009 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 12:02:48 +0000</pubDate>
  <lastBuildDate>Wed, 21 Sep 2005 20:37:52 +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=294</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>newbie programming questi&#111;ns : for #3, the relative performance...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1059#1059</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=76" rel="nofollow">zorro</a><br /><strong>Subject:</strong> 294<br /><strong>Posted:</strong> 21&nbsp;Sep&nbsp;2005 at 8:37pm<br /><br />for #3, the relative performance indicator does something like this]]>
   </description>
   <pubDate>Wed, 21 Sep 2005 20:37:52 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1059#1059</guid>
  </item> 
  <item>
   <title>newbie programming questi&#111;ns : Thanks for that - now it all makes...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1057#1057</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=109" rel="nofollow">ukipeter</a><br /><strong>Subject:</strong> 294<br /><strong>Posted:</strong> 20&nbsp;Sep&nbsp;2005 at 9:18am<br /><br /><P>Thanks for that - now it all makes sense.</P>]]>
   </description>
   <pubDate>Tue, 20 Sep 2005 09:18:09 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1057#1057</guid>
  </item> 
  <item>
   <title>newbie programming questi&#111;ns : prev just returns the same result...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1055#1055</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=76" rel="nofollow">zorro</a><br /><strong>Subject:</strong> 294<br /><strong>Posted:</strong> 19&nbsp;Sep&nbsp;2005 at 10:49pm<br /><br /><font face="Arial" size="2">prev just returns the same result as the previous bar.<br>eg:<br>inMarket :=<br>if (entry, true,<br>if (takeprofit or stopped, false, prev));<br><br>in this case, 'inMarket' is set to true whenever 'entry' is true(entering the market). it is set to false if either takeprofit orstopped is true (exiting the market). and if none of the three signalsare true then the result is unchanged from the previous (if you're in,you stay in; if you're out, you stay out).<br><br></font>]]>
   </description>
   <pubDate>Mon, 19 Sep 2005 22:49:12 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1055#1055</guid>
  </item> 
  <item>
   <title>newbie programming questi&#111;ns : I&amp;#039;m just starting with BullScript....</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1048#1048</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=109" rel="nofollow">ukipeter</a><br /><strong>Subject:</strong> 294<br /><strong>Posted:</strong> 15&nbsp;Sep&nbsp;2005 at 8:11am<br /><br /><DIV><FONT face=Arial size=2>I'm just starting with BullScript.&nbsp; I've been looking through some of the scripts trying to understand how things work.</FONT></DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2>1) prev statement.&nbsp;&nbsp; I am a bit puzzled how the prev statement works.</FONT></DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2>I have copied some code from the JB Volatility Stop Loss.&nbsp; </FONT></DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2>I can work most of it out, but I am lost as to what the prev does in the following lines.&nbsp; Any clues?</FONT></DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2>&#091;citation="'Share Traders Handbook', Jim Berg;<BR>'A Winning Combination for Traders', Jim Berg, Leverage July 2004 Issue 32 p15-17 </FONT><A href="http://www.leveragemag.com.au" target="_blank"><FONT face=Arial color=#0000ff size=2>www.leveragemag.com.au</FONT></A><FONT face=Arial size=2>"&#093;<BR>&#091;target=Price; author=Berg, Jim; category=Stop Loss|Volatility&#093;</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial color=#0000ff size=2>In this inMarket statement, what does the 'prev' do in the second if statement?</FONT></DIV><DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2>inMarket :=<BR>if (entry, true,<BR>if (takeprofit or stopped, false, prev));</FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial size=2>jbmode := if (C&gt;r1, 1, if (C&lt;r2, -1, prev) );<BR></FONT></DIV><DIV>&nbsp;</DIV><DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><DIV><FONT face=Arial size=2>2) From the MACD Tradesim example</FONT></DIV><DIV><FONT face=Arial size=2><BR>{Generated BullScript for "TradeSim Sample Scan" scan}</DIV><DIV>&nbsp;</DIV><DIV>{Condition: return all securities }<BR>filter := true;<BR>filter;</DIV><DIV>&nbsp;</DIV><DIV><BR>{-- Trading System : "Sample MACD System" --}<BR>_var1 := formula("MACD", 12, 26, 9);<BR>_var2 := formula("MACD&#091;2&#093;", 12, 26, 9);<BR>EntryTrigger := (cross(_var1, _var2));<BR>EntryPrice := Open;<BR>ExitTrigger := (cross(_var2, _var1));<BR>ExitPrice := Open;<BR>InitialStop := Low-2*ATR(10);</DIV><DIV>&nbsp;</DIV><DIV>&#091;visible=no&#093;<BR>ExtFml("TradeSim.Initialize");<BR>ExtFml("TradeSim.EnableProtectiveStop",0);<BR>ExtFml("TradeSim.EnableDelayOfEntryByOneBar");<BR>ExtFml("TradeSim.EnableDelayOfAllExitsByOneBar");<BR>ExtFml("TradeSim.EnablePriceFilter");<BR>ExtFml("TradeSim.SetVolumeInfoType",LOWEST);</DIV><DIV>&nbsp;</DIV><DIV>&#091;name="Sample MACD System Trades"; dp=0; visible=yes&#093;<BR>ExtFml("TradeSim.RecordTrades",<BR>&nbsp;"TradeSim Sample Scan",<BR>&nbsp;LONG,<BR>&nbsp;EntryTrigger,<BR>&nbsp;EntryPrice,<BR>&nbsp;InitialStop,<BR>&nbsp;ExitTrigger,<BR>&nbsp;ExitPrice,<BR>&nbsp;START);</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff>What would you put if you wanted to exit if the opening price went a fixed percentage above your entry price (e.g. 5%)?</FONT></DIV><DIV><FONT color=#0000ff></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff>3) I am looking at comparing the prices with the price at a particular date, so, before that date the indicate would plot 0, after that date, it would plot the ratio of the bar to the bar at a particular date.&nbsp; For example, I would like to plot </FONT></DIV><DIV><FONT color=#0000ff></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff>Close/ Close("25/03/05")</FONT></DIV><DIV><FONT color=#0000ff></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff>How could I do this?</FONT></DIV><DIV><FONT color=#0000ff></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff>Peter Bloomfield</FONT></DIV><DIV><FONT color=#0000ff></FONT>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#0000ff></FONT>&nbsp;</DIV></FONT>]]>
   </description>
   <pubDate>Thu, 15 Sep 2005 08:11:23 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=294&amp;PID=1048#1048</guid>
  </item> 
 </channel>
</rss>