<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Moving Average Logic]]></title>
		<link>https://forexsb.com/forum/topic/2410/moving-average-logic/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/2410/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Moving Average Logic.]]></description>
		<lastBuildDate>Sat, 24 Dec 2011 16:39:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Moving Average Logic]]></title>
			<link>https://forexsb.com/forum/post/11980/#p11980</link>
			<description><![CDATA[<div class="quotebox"><cite>ahmedalhoseny wrote:</cite><blockquote><p>Footon , but using this condition means we override the previous bar option am i right!!!!</p></blockquote></div><p>What do you mean by it? Previous bar value usage? If you mean PBV, then it doesn&#039;t override, look at the logic calculation block:<br /></p><div class="codebox"><pre><code>protected void BarOpensAboveIndicatorAfterOpeningBelowLogic(int iFirstBar, int iPrvs, double[] adIndValue, ref IndicatorComp indCompLong, ref IndicatorComp indCompShort)
        {
            double dSigma = Sigma();
 
            for (int iBar = iFirstBar; iBar &lt; Bars; iBar++)
            {
                int iBaseBar = iBar - 1;
                while (Math.Abs(Open[iBaseBar] - adIndValue[iBaseBar - iPrvs]) &lt; dSigma &amp;&amp; iBaseBar &gt; iFirstBar)
                { iBaseBar--; }
 
                indCompLong.Value[iBar]  = Open[iBar] &gt; adIndValue[iBar - iPrvs] + dSigma &amp;&amp; Open[iBaseBar] &lt; adIndValue[iBaseBar - iPrvs] - dSigma ? 1 : 0;
                indCompShort.Value[iBar] = Open[iBar] &lt; adIndValue[iBar - iPrvs] - dSigma &amp;&amp; Open[iBaseBar] &gt; adIndValue[iBaseBar - iPrvs] + dSigma ? 1 : 0;
            }
 
            return;
        }</code></pre></div><p>First open from current bar compared to previous bar MA, then previous open compared to MA value from the second bar from current.</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Sat, 24 Dec 2011 16:39:52 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/11980/#p11980</guid>
		</item>
		<item>
			<title><![CDATA[Re: Moving Average Logic]]></title>
			<link>https://forexsb.com/forum/post/11978/#p11978</link>
			<description><![CDATA[<p>Footon , but using this condition means we override the previous bar option am i right!!!!</p>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Sat, 24 Dec 2011 16:16:07 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/11978/#p11978</guid>
		</item>
		<item>
			<title><![CDATA[Re: Moving Average Logic]]></title>
			<link>https://forexsb.com/forum/post/9714/#p9714</link>
			<description><![CDATA[<p>It is previous bar opens below, current bar opens above and vice versa. Opening of the position is carried out at the beginning of the current bar, it is when we know it has opened above/below the MA. Study the charts, maybe you&#039;ll find that it does what you need after all.</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Tue, 12 Jul 2011 10:03:46 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/9714/#p9714</guid>
		</item>
		<item>
			<title><![CDATA[Moving Average Logic]]></title>
			<link>https://forexsb.com/forum/post/9713/#p9713</link>
			<description><![CDATA[<p>Can someone please clarify the opening logic with the Moving Average. What I am looking for is a bar that opens below the moving average and closes above it. Then I want to enter long on the next bar. So basically I will open at the open of the next bar.</p><p>One of the logic settings in Moving Average is &quot;The bar opens below the moving average after opening above it&quot; which is really a contradiction. </p><p>What exactly does this logic mean because it can&#039;t open below and above at the same time, can it?</p>]]></description>
			<author><![CDATA[null@example.com (SpiderMan)]]></author>
			<pubDate>Tue, 12 Jul 2011 08:03:38 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/9713/#p9713</guid>
		</item>
	</channel>
</rss>
