<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — I need help to customize this indicator]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/6907/" />
	<updated>2017-09-08T20:21:18Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/6907/i-need-help-to-customize-this-indicator/</id>
		<entry>
			<title type="html"><![CDATA[Re: I need help to customize this indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/46278/#p46278" />
			<content type="html"><![CDATA[<p>Thank you very much for your excellent support.</p>]]></content>
			<author>
				<name><![CDATA[Houro]]></name>
				<uri>https://forexsb.com/forum/user/10044/</uri>
			</author>
			<updated>2017-09-08T20:21:18Z</updated>
			<id>https://forexsb.com/forum/post/46278/#p46278</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: I need help to customize this indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/46277/#p46277" />
			<content type="html"><![CDATA[<p>Yes, High[bar] is current bar.</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-09-08T19:59:06Z</updated>
			<id>https://forexsb.com/forum/post/46277/#p46277</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: I need help to customize this indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/46275/#p46275" />
			<content type="html"><![CDATA[<p>Thank you so much for your great help. My problem is solved now because of your help.<br />I just have another little question. I am a little confused about current bar and previous ones.<br />For example this code below is from three bars swing pattern wrote by popov. The link is here<br /><a href="http://forexsb.com/forum/topic/1199/three-bars-swing-pattern-requested-by-ahmedalhoseny/">http://forexsb.com/forum/topic/1199/thr … dalhoseny/</a><br /></p><div class="codebox"><pre><code>for (int bar = firstBar; bar &lt; Bars; bar++)
{
    // Long trade
    if (Close[bar - 3] &lt; Open[bar - 3] &amp;&amp; // Candle 1 is black</code></pre></div><p>In above code Close[bar - 3] is 4th previous bar?<br />So the high price of the current bar which is not closed yet would be <br />high[bar]?</p>]]></content>
			<author>
				<name><![CDATA[Houro]]></name>
				<uri>https://forexsb.com/forum/user/10044/</uri>
			</author>
			<updated>2017-09-08T18:34:38Z</updated>
			<id>https://forexsb.com/forum/post/46275/#p46275</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: I need help to customize this indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/46272/#p46272" />
			<content type="html"><![CDATA[<p>You are not correct. Standard momentum subtracts previous price from current price, previous price is defined by period, meaning how many bars ago.</p><div class="codebox"><pre><code>momentum[bar] = price[bar] - price[bar - period];</code></pre></div><p>If one wishes so, the initial momentum value can be smoothed, this means making a moving average out of it.</p><div class="codebox"><pre><code> if (smoothing &gt; 0)
momentum = MovingAverage(smoothing, 0, maMethod, momentum);</code></pre></div><p>What I did was move your one line into for loop because you left array out in the open, hence your error. That&#039;s it.</p><p>If I understand you correctly, you have to change the same line to:<br /></p><div class="codebox"><pre><code>momentum[bar] = momen1[bar] - myminimum;</code></pre></div><p>Another tip - momen1[1] is the second value of the array, not the last. </p><p>Hope this helps to steer you in the right path.</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-09-08T15:28:06Z</updated>
			<id>https://forexsb.com/forum/post/46272/#p46272</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: I need help to customize this indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/46268/#p46268" />
			<content type="html"><![CDATA[<p>Thank you so much footon but i have a question. I wanted the momentum of first bar to be subtracted from minimum if last bars. I mean i wanted to have momentum = momen1[1] - myminimum; but the coded you provided gives&nbsp; momentum[bar] = momen1[1] - myminimum;<br />As i mentioned before, the usual momentum indicator subtracts current bar&#039;s momentum from moving average of last i.e 20 bar&#039;s momentums but i want to subtract current bar&#039;s momentum from minimum momentum of last i.e 20 bars. <br />Could you please review it again?</p>]]></content>
			<author>
				<name><![CDATA[Houro]]></name>
				<uri>https://forexsb.com/forum/user/10044/</uri>
			</author>
			<updated>2017-09-08T12:49:38Z</updated>
			<id>https://forexsb.com/forum/post/46268/#p46268</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: I need help to customize this indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/46267/#p46267" />
			<content type="html"><![CDATA[<p>Now it loads up. But I think your calculation is off.</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-09-08T12:17:48Z</updated>
			<id>https://forexsb.com/forum/post/46267/#p46267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[I need help to customize this indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/46264/#p46264" />
			<content type="html"><![CDATA[<p>Hello,<br /><em> First of all after posting this post I found that i should have posted it in&nbsp; Developers Forum so please transfer this topic to Developers Forum if its needed</em>. <br />I decided to make a custom indicator from momentum indicator for an experiment but i faced some errors in coding it. I know probably my custom indicator is not useful, but i need it so please help me to fix the cide. <br />I attached the code. Most parts of it is the main momentum.cs file but i just added some lines to it. My changes start from line 111 and ends to line 133.<br />The usual moment indicators takes a moving average from (price[bar] - price[bar - period]) but i want to only substract the price of first bar, i mean price[1], from minimum value of all other bars. I exactly mean this: price[1] - minimumprice[1 to period]. For examplke if there is 10 bars, i want to have this:<br />price[1] - minimumprice[1 to 10]<br />My code has this error.<br />ERROR: &quot;Momentum&quot; compilation failed.<br />&nbsp; &nbsp; &nbsp;Line 133 Column 16: Cannot implicitly convert type &#039;double&#039; to &#039;double[]&#039;.<br />Please help me to fix this issue.<br />I attached my customed code. (not important but I also changed the indicator name to mymomentum to avoid facing problem with this).<br />Thanks a lot in adavnce for your help.</p>]]></content>
			<author>
				<name><![CDATA[Houro]]></name>
				<uri>https://forexsb.com/forum/user/10044/</uri>
			</author>
			<updated>2017-09-08T10:43:26Z</updated>
			<id>https://forexsb.com/forum/post/46264/#p46264</id>
		</entry>
</feed>
