<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Questions About ambiguous Codes inside indicators '' Why & What]]></title>
		<link>https://forexsb.com/forum/topic/4786/questions-about-ambiguous-codes-inside-indicators-why-what/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/4786/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Questions About ambiguous Codes inside indicators '' Why & What.]]></description>
		<lastBuildDate>Fri, 09 May 2014 19:13:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Questions About ambiguous Codes inside indicators '' Why & What]]></title>
			<link>https://forexsb.com/forum/post/25024/#p25024</link>
			<description><![CDATA[<p><strong>System</strong> namespace contains many important .NET classes as Math, Enum, ...</p><p>In your question, MA uses Enum class to take the list of MAMethod items:</p><br /><div class="codebox"><pre><code>IndParam.ListParam[1].Caption = &quot;Smoothing method&quot;;
IndParam.ListParam[1].ItemList = Enum.GetNames(typeof (MAMethod));
IndParam.ListParam[1].Index = (int) MAMethod.Simple;</code></pre></div><br /><p>Here <br /></p><div class="codebox"><pre><code>IndParam.ListParam[1].ItemList = Enum.GetNames(typeof (MAMethod));</code></pre></div><p>can be replaced with the following one without System namespace:<br /></p><div class="codebox"><pre><code>IndParam.ListParam[1].ItemList = new string[] {&quot;Simple&quot;, &quot;Weighted&quot;, &quot;Exponential&quot;, &quot;Smoothed&quot;};</code></pre></div><br /><p>However, the first code has a big advantage that if you add new Moving Average type in the future, it will be automatically added to the indicator. If you use the second code, you have to add the new method manually.<br />Other advantage is that you are protected from a spelling mistake. The following code will be compiled successfully, but the indicator will crash on runtime (S<strong>a</strong>mple).<br /></p><div class="codebox"><pre><code>IndParam.ListParam[1].ItemList = new string[] {&quot;Sample&quot;, &quot;Weighted&quot;, &quot;Exponential&quot;, &quot;Smoothed&quot;};</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Fri, 09 May 2014 19:13:08 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/25024/#p25024</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions About ambiguous Codes inside indicators '' Why & What]]></title>
			<link>https://forexsb.com/forum/post/25020/#p25020</link>
			<description><![CDATA[<p>Why <br /></p><div class="codebox"><pre><code>using System;</code></pre></div><p> in indicator like moving average </p><p>and not using it in Donchian Channel For example</p>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Fri, 09 May 2014 12:03:00 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/25020/#p25020</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions About ambiguous Codes inside indicators '' Why & What]]></title>
			<link>https://forexsb.com/forum/post/25018/#p25018</link>
			<description><![CDATA[<p>Thanks fotoon And Pop now its clear to me</p>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Fri, 09 May 2014 12:00:22 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/25018/#p25018</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions About ambiguous Codes inside indicators '' Why & What]]></title>
			<link>https://forexsb.com/forum/post/25005/#p25005</link>
			<description><![CDATA[<p>I&#039;m posting description of some parameters:</p><div class="quotebox"><blockquote><p>IsDeafultGroupAll = true; /false;</p></blockquote></div><p>Default value: IsDeafultGroupAll = false; </p><p>It sets if the program uses the default group for the indicator as per the corresponding slot or sets group &quot;All&quot;.</p><p>Normally FSB sets the Logical Groups of the indicators automatically. It sets group &quot;A&quot; for the first &quot;Opening Logic Slot&quot;, group &quot;B&quot; for the second...&nbsp; The program sets group &quot;a&quot; for all &quot;Closing logic slots&quot; by default.</p><p>This logic works for most of the indicators, but some indicators require to be used in all groups. Some examples are &quot;Entry Time&quot;, &quot;Enter Once&quot;, &quot;Long or Short&quot;...</p><div class="quotebox"><blockquote><p>IsGeneratable = true; /false;</p></blockquote></div><p>Default value:&nbsp; IsGeneratable = true;<br />Sets if Generator will use this indicator.</p><p>We set IsGeneratable = false; for the indicators, we don&#039;t to be used in Generator. Examples are: Long or Short, Lot Limiter...</p><div class="quotebox"><blockquote><p>IsDiscreteValues = true; /false;</p></blockquote></div><p>Default value: IsDiscreteValues = false;</p><p>Most of the indicators has moving values, but some of them has jumping values.<br />We set IsDiscreteValues = true; for the indicators that stay constant for several bars. For example: Aroon Histogram.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Thu, 08 May 2014 10:52:27 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/25005/#p25005</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions About ambiguous Codes inside indicators '' Why & What]]></title>
			<link>https://forexsb.com/forum/post/25000/#p25000</link>
			<description><![CDATA[<p>The answer is simple here. If &quot;High[iBar] - Low[iBar]&quot; = 0, we&#039;ll receive <strong>Deviation by zero</strong> error. <br />Since we compare double numbers we cannot use 0 for comparison. That&#039;s why Point is used as a minimal value (instead of zero).<br />Otherwise the code should be <br /></p><div class="codebox"><pre><code>Sigma = Point;
if(Math.Abs((High[iBar] - Low[iBar])-0) &gt; Sigma) ...</code></pre></div><p>Most probably High[iBar] is always greater or equal to&nbsp; Low[iBar]. That&#039;s why the code is simplified to <br /></p><div class="codebox"><pre><code>if (High[iBar] - Low[iBar] &gt; Point)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Thu, 08 May 2014 05:09:40 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/25000/#p25000</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questions About ambiguous Codes inside indicators '' Why & What]]></title>
			<link>https://forexsb.com/forum/post/24998/#p24998</link>
			<description><![CDATA[<p>The function? To define a movement bigger of at least 1 point or 1/10 of a point, depending on digits. To answer existential questions turn to a decent search engine and find the author and the concept behind the indicator.</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Wed, 07 May 2014 21:47:25 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/24998/#p24998</guid>
		</item>
		<item>
			<title><![CDATA[Questions About ambiguous Codes inside indicators '' Why & What]]></title>
			<link>https://forexsb.com/forum/post/24997/#p24997</link>
			<description><![CDATA[<p>Sometimes i see some small parts inside codes and donot know why they are here and what they are doing&nbsp; i will post my Questions here and i hope answers will help </p><p>1st Question: In Balance of Power Indicator <br /></p><div class="codebox"><pre><code>// Calculation
            int iFirstBar = iPeriod + 2;

            var adBop = new double[Bars];

            for (int iBar = 1; iBar &lt; Bars; iBar++)
            {
                if (High[iBar] - Low[iBar] &gt; Point)
                    adBop[iBar] = (Close[iBar] - Open[iBar])/(High[iBar] - Low[iBar]);
                else
                    adBop[iBar] = 0;
            }

            adBop = MovingAverage(iPeriod, 0, maMethod, adBop);</code></pre></div><p>Why&nbsp; if (High[iBar] - Low[iBar] &gt; Point) exist and what is the function of it ?</p>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Wed, 07 May 2014 20:59:07 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/24997/#p24997</guid>
		</item>
	</channel>
</rss>
