<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Bollinger Band Upgrade]]></title>
		<link>https://forexsb.com/forum/topic/5297/bollinger-band-upgrade/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/5297/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Bollinger Band Upgrade.]]></description>
		<lastBuildDate>Mon, 27 Apr 2015 16:33:16 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Bollinger Band Upgrade]]></title>
			<link>https://forexsb.com/forum/post/28801/#p28801</link>
			<description><![CDATA[<p>Attached My trial But not working </p><p>Any help making it work !!!!</p><br /><p>Thnx</p>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Mon, 27 Apr 2015 16:33:16 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28801/#p28801</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bollinger Band Upgrade]]></title>
			<link>https://forexsb.com/forum/post/28794/#p28794</link>
			<description><![CDATA[<p>I tryed this step by combining the MA and bollinger bands open close slots but it didnot work<br />So how to merge this MA code with the code in the previous post !!!!</p><div class="codebox"><pre><code>if (SlotType == SlotTypes.Open || SlotType == SlotTypes.Close)
            {
                Component = new IndicatorComp[2];

                Component[1] = new IndicatorComp {Value = new double[Bars]};

                for (int bar = firstBar; bar &lt; Bars; bar++)
                {
                    // Covers the cases when the price can pass through the MA without a signal
                    double value = movingAverage[bar - previous]; // Current value
                    double value1 = movingAverage[bar - previous - 1]; // Previous value
                    double tempVal = value;
                    if ((value1 &gt; High[bar - 1] &amp;&amp; value &lt; Open[bar]) || // The Open price jumps above the indicator
                        (value1 &lt; Low[bar - 1] &amp;&amp; value &gt; Open[bar]) || // The Open price jumps below the indicator
                        (Close[bar - 1] &lt; value &amp;&amp; value &lt; Open[bar]) || // The Open price is in a positive gap
                        (Close[bar - 1] &gt; value &amp;&amp; value &gt; Open[bar])) // The Open price is in a negative gap
                        tempVal = Open[bar];
                    Component[1].Value[bar] = tempVal; // Entry or exit value
                }
            }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Mon, 27 Apr 2015 12:56:21 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28794/#p28794</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bollinger Band Upgrade]]></title>
			<link>https://forexsb.com/forum/post/28793/#p28793</link>
			<description><![CDATA[<p>The middle line is a Moving Average. You don&#039;t need to make the code unnecessary complex by calculating the Bands. However, if you want to do it,&nbsp; see the MA application code and include it in the BB code.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Mon, 27 Apr 2015 12:45:24 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28793/#p28793</guid>
		</item>
		<item>
			<title><![CDATA[Bollinger Band Upgrade]]></title>
			<link>https://forexsb.com/forum/post/28792/#p28792</link>
			<description><![CDATA[<p>iam trying to use all the three lines of bollingerbands&nbsp; to be used in the 4 slots </p><p>but i faced the problem in the code part of SlotType == SlotTypes.Open || SlotType == SlotTypes.Close</p><p>it uses the upper and lower bands as interchange to each other </p><p>My problem: I cannot add the middle line to that part of code </p><p>Any help !!!</p><div class="codebox"><pre><code>  if (SlotType == SlotTypes.Open || SlotType == SlotTypes.Close)
            {
                if (nMA &gt; 1)
                {
                    for (int bar = firstBar; bar &lt; Bars; bar++)
                    {
                        // Covers the cases when the price can pass through the band without a signal.
                        double open = Open[bar]; // Current open price

                        // Upper band
                        double valueUp = adUpBand[bar - prvs]; // Current value
                        double valueUp1 = adUpBand[bar - prvs - 1]; // Previous value
                        double tempValUp = valueUp;

                        if ((valueUp1 &gt; High[bar - 1] &amp;&amp; valueUp &lt; open) || // The Open price jumps above the indicator
                            (valueUp1 &lt; Low[bar - 1] &amp;&amp; valueUp &gt; open) || // The Open price jumps below the indicator
                            (Close[bar - 1] &lt; valueUp &amp;&amp; valueUp &lt; open) || // The Open price is in a positive gap
                            (Close[bar - 1] &gt; valueUp &amp;&amp; valueUp &gt; open)) // The Open price is in a negative gap
                            tempValUp = open; // The entry/exit level is moved to Open price

                        // Lower band
                        double valueDown = adDnBand[bar - prvs]; // Current value
                        double valueDown1 = adDnBand[bar - prvs - 1]; // Previous value
                        double tempValDown = valueDown;

                        if ((valueDown1 &gt; High[bar - 1] &amp;&amp; valueDown &lt; open) ||
                            // The Open price jumps above the indicator
                            (valueDown1 &lt; Low[bar - 1] &amp;&amp; valueDown &gt; open) ||
                            // The Open price jumps below the indicator
                            (Close[bar - 1] &lt; valueDown &amp;&amp; valueDown &lt; open) || // The Open price is in a positive gap
                            (Close[bar - 1] &gt; valueDown &amp;&amp; valueDown &gt; open)) // The Open price is in a negative gap
                            tempValDown = open; // The entry/exit level is moved to Open price

                        if (IndParam.ListParam[0].Text == &quot;Enter long at Upper Band&quot; ||
                            IndParam.ListParam[0].Text == &quot;Exit long at Upper Band&quot;)
                        {
                            Component[3].Value[bar] = tempValUp;
                            Component[4].Value[bar] = tempValDown;
                        }
                        else
                        {
                            Component[3].Value[bar] = tempValDown;
                            Component[4].Value[bar] = tempValUp;
                        }
                    }
                }
                else
                {
                    for (int bar = 2; bar &lt; Bars; bar++)
                    {
                        if (IndParam.ListParam[0].Text == &quot;Enter long at Upper Band&quot; ||
                            IndParam.ListParam[0].Text == &quot;Exit long at Upper Band&quot;)
                        {
                            Component[3].Value[bar] = adUpBand[bar - prvs];
                            Component[4].Value[bar] = adDnBand[bar - prvs];
                        }
                        else
                        {
                            Component[3].Value[bar] = adDnBand[bar - prvs];
                            Component[4].Value[bar] = adUpBand[bar - prvs];
                        }
                    }
                }
            }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ahmedalhoseny)]]></author>
			<pubDate>Mon, 27 Apr 2015 12:41:45 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/28792/#p28792</guid>
		</item>
	</channel>
</rss>
