<?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 : or/and c&#111;nditi&#111;ns in same scan</title>
  <link>http://www.bullcharts.com.au/forum/</link>
  <description>This is an XML content feed of; BullCharts : BullScript : or/and c&#111;nditi&#111;ns in same scan</description>
  <copyright>Copyright (c) 2006-2009 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 13:56:56 +0000</pubDate>
  <lastBuildDate>Tue, 10 Oct 2006 01:11: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=388</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>or/and c&#111;nditi&#111;ns in same scan : I think I&amp;#039;ve answered my...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=388&amp;PID=1442#1442</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=196" rel="nofollow">cudderbean</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 10&nbsp;Oct&nbsp;2006 at 1:11am<br /><br /><P>I think I've answered my own question by doing the obvious... RTBM - "Read The Blinking Manual!". Durrrrh! <IMG src="http://www.bullcharts.com.au/forum/smileys/smiley9.gif" border="0">I'm always like this with new software, like a kid, rip open the Christmas parcel and start playing without reading the instructions. Anyway, for the benefit of other newbies in the same boat as me, here is the solution:</P><P>Under the section Logical Operators in the Bullscript Help Files:</P><P>"Note in the table above that AND has a higher order of precedence than OR. The AND and OR operators behave like multiply and plus with respect to each other. For example, the expression: "tea OR coffee AND sugar" is actually interpreted to be "tea OR (coffee AND sugar)". Parentheses must be manually added to force the OR to have a higher precedence, such as in: "(tea OR coffee) AND sugar" This may seem counter intuitive at first, but it is standard in most computer languages." </P><P>Here's the answer I was looking for. Note the brackets!</P><P>{Variables}</P><P>_var1 := ma(Close,14,Simple);<BR>_var2 := formula("MACD Histogram", 12, 26, 9);<BR>_var3 := formula("Directional Movement +DI", 14);<BR>_var4 := formula("Directional Movement -DI", 14);</P><P>&nbsp;{Condition}<BR>filter := ((Close &gt; _var1)<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; and (_var2 &gt; 0))<BR>&nbsp;or</P><P> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ((Close &gt; _var1)<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; and (cross(_var3, _var4)));<BR>filter;</P><P>Thumbs up to the BC development team: I'm thoroughly enjoying your product. <IMG src="http://www.bullcharts.com.au/forum/smileys/smiley1.gif" border="0"><BR></P>]]>
   </description>
   <pubDate>Tue, 10 Oct 2006 01:11:40 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=388&amp;PID=1442#1442</guid>
  </item> 
  <item>
   <title>or/and c&#111;nditi&#111;ns in same scan : I am loving Bullcharts but I am...</title>
   <link>http://www.bullcharts.com.au/forum/forum_posts.asp?TID=388&amp;PID=1439#1439</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.bullcharts.com.au/forum/member_profile.asp?PF=196" rel="nofollow">cudderbean</a><br /><strong>Subject:</strong> 388<br /><strong>Posted:</strong> 02&nbsp;Oct&nbsp;2006 at 11:41am<br /><br /><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>I am loving Bullcharts<IMG src="http://www.bullcharts.com.au/forum/smileys/smiley20.gif" border="0"> but I am still on a learning curve with Bullscipt. Apologies to members if it’s something I’ve missed..Could someone please write a simple Bullscript which demonstrates how to write two sets of “alternative” conditions all in the “same” scan…like Excel’s IF(OR(AND(…,…),(AND…,…)).</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>For example,</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>I want to grab both sets of contingencies in the “same” scan..</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>EITHER </FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>the close is greater than the simple 14 day MA of the close AND the MACD Histogram is greater than 0</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>OR, </FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>the close is greater than the simple 14 day MA of the close AND Directional Movement +DI crosses above the Directional Movement -DI</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>{Variables}</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>_var1 := ma(Close,14,Simple);</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>_var2 := formula("MACD Histogram", 12, 26, 9);</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>_var3 := formula("Directional Movement +DI", 14);</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>_var4 := formula("Directional Movement -DI", 14);</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>{Condition}</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>{EITHER} filter := (Close &gt; _var1)</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </SPAN>and (_var2 &gt; 0)</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>{OR}</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </SPAN>and (Close &gt; _var1)</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT size=3><FONT face="Times New Roman"><SPAN style="mso-tab-count: 1"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; </SPAN>and (cross(_var3, _var4));</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>filter;</FONT></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=3>Thank you for your help.</FONT></P>]]>
   </description>
   <pubDate>Mon, 02 Oct 2006 11:41:32 +0000</pubDate>
   <guid isPermaLink="true">http://www.bullcharts.com.au/forum/forum_posts.asp?TID=388&amp;PID=1439#1439</guid>
  </item> 
 </channel>
</rss>