<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Donchian channel]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/7901/" />
	<updated>2019-11-17T17:55:27Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/7901/donchian-channel/</id>
		<entry>
			<title type="html"><![CDATA[Re: Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/57967/#p57967" />
			<content type="html"><![CDATA[<p>I&#039;ll check that!</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2019-11-17T17:55:27Z</updated>
			<id>https://forexsb.com/forum/post/57967/#p57967</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/57966/#p57966" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>   double ind1upBand1 = ind1Up1;
   double ind1dnBand1 = ind1Dn1;
   double ind1upBand2 = ind1Up2;
   double ind1dnBand2 = ind1Dn1;
   bool ind1long  = Open(0) &gt; ind1upBand1 + sigma &amp;&amp; Open(1) &lt; ind1upBand2 - sigma;
   bool ind1short = Open(0) &lt; ind1dnBand1 - sigma &amp;&amp; Open(1) &gt; ind1dnBand2 + sigma;</code></pre></div><p>Line 4 above must be wrong because it&#039;s not symmetrical. That should be</p><p>&nbsp; &nbsp;double ind1dnBand2 = <strong>ind1Dn2</strong>;</p><p>Donchian channel strategy normally just needs a break-out not a gap-out. So you should use High and Low instead of Open. So I would suggest the signals be</p><p>&nbsp; &nbsp;bool ind1long&nbsp; = <strong>High</strong>(0) &gt; ind1upBand1 + sigma &amp;&amp; <strong>High</strong>(1) &lt; ind1upBand2 - sigma;<br />&nbsp; &nbsp;bool ind1short = <strong>Low</strong>(0) &lt; ind1dnBand1 - sigma &amp;&amp; <strong>Low</strong>(1) &gt; ind1dnBand2 + sigma;</p><p>This way, Donchian should be fine for use.</p>]]></content>
			<author>
				<name><![CDATA[JLA]]></name>
				<uri>https://forexsb.com/forum/user/10721/</uri>
			</author>
			<updated>2019-11-17T15:36:33Z</updated>
			<id>https://forexsb.com/forum/post/57966/#p57966</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/56421/#p56421" />
			<content type="html"><![CDATA[<p>Thank you for the testing and feedback. :-)</p>]]></content>
			<author>
				<name><![CDATA[Kennith]]></name>
				<uri>https://forexsb.com/forum/user/11433/</uri>
			</author>
			<updated>2019-07-25T12:31:34Z</updated>
			<id>https://forexsb.com/forum/post/56421/#p56421</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/56420/#p56420" />
			<content type="html"><![CDATA[<p>It opened and closed a position.</p><p>Anyway, because EA Studio trades only at Bar open, Donchian Channel may rise open or close signal only when there is a gap above the previous max High or below the previous lowest Low. It happens rarely. That&#039;s why I made the indicator &quot;not recomended&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2019-07-25T11:50:06Z</updated>
			<id>https://forexsb.com/forum/post/56420/#p56420</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/56419/#p56419" />
			<content type="html"><![CDATA[<p>Everything looks fine on the backtest. Do you have any errors or warning in the MT&#039;s &quot;Expert&quot; or &quot;Journal&quot; pages?</p><p>You run the EA on the correct market - EURUSD M5, right?&nbsp; </p><p>I&#039;ll put it on a demo on M1 on several charts to see if there are any problems.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2019-07-25T11:22:49Z</updated>
			<id>https://forexsb.com/forum/post/56419/#p56419</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/56415/#p56415" />
			<content type="html"><![CDATA[<p>Sure. I attached the code. Hopefully the error can be resolved.</p>]]></content>
			<author>
				<name><![CDATA[Kennith]]></name>
				<uri>https://forexsb.com/forum/user/11433/</uri>
			</author>
			<updated>2019-07-25T07:19:32Z</updated>
			<id>https://forexsb.com/forum/post/56415/#p56415</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/56414/#p56414" />
			<content type="html"><![CDATA[<p>Perhaps you can attach the EA so that people can examine it.</p>]]></content>
			<author>
				<name><![CDATA[Blaiserboy]]></name>
				<uri>https://forexsb.com/forum/user/2491/</uri>
			</author>
			<updated>2019-07-25T07:09:24Z</updated>
			<id>https://forexsb.com/forum/post/56414/#p56414</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Donchian channel]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/56413/#p56413" />
			<content type="html"><![CDATA[<p>Hi Popov and other readers</p><p>I generated a strategy on Expert Advisor Studio which uses Donchian channels (19) as exit. The exit rule indicator for a buy reads: &quot;The bar opens above upper band after opening below it.&quot; And vice versa for a short.</p><p>The strategy tested fine on MT4 strategy tester and avg holding period period is less than 2 days on the strategy tester.</p><p>However, when trading strategy live, the trades do not close and stay open forever.</p><p>Can you please look at the MQL code generated by the software. I believe there must be something wrong with the OrderClose function.</p><p>Thank you</p>]]></content>
			<author>
				<name><![CDATA[Kennith]]></name>
				<uri>https://forexsb.com/forum/user/11433/</uri>
			</author>
			<updated>2019-07-25T07:06:27Z</updated>
			<id>https://forexsb.com/forum/post/56413/#p56413</id>
		</entry>
</feed>
