<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — forcing base price change the indicator calculations]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/6040/" />
	<updated>2016-05-21T18:38:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/6040/forcing-base-price-change-the-indicator-calculations/</id>
		<entry>
			<title type="html"><![CDATA[Re: forcing base price change the indicator calculations]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/36020/#p36020" />
			<content type="html"><![CDATA[<p>See my previous post!</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-05-21T18:38:03Z</updated>
			<id>https://forexsb.com/forum/post/36020/#p36020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: forcing base price change the indicator calculations]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/36019/#p36019" />
			<content type="html"><![CDATA[<p>and here is the indicator after modification</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2016-05-21T18:34:05Z</updated>
			<id>https://forexsb.com/forum/post/36019/#p36019</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: forcing base price change the indicator calculations]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/36018/#p36018" />
			<content type="html"><![CDATA[<p>The indicator is the original Moving average</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2016-05-21T18:32:15Z</updated>
			<id>https://forexsb.com/forum/post/36018/#p36018</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: forcing base price change the indicator calculations]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/36016/#p36016" />
			<content type="html"><![CDATA[<p>Your code is correct. </p><p>I may help you with the code if you attach both indicators. </p><p>I can only suppose that you haven;t changed the &quot;Calculate&quot; method correspondingly.</p><p>The original code is:</p><div class="codebox"><pre><code>        public override void Calculate(IDataSet dataSet)
        {
            DataSet = dataSet;

            // Reading the parameters
            BasePrice basePrice = (BasePrice)IndParam.ListParam[2].Index;</code></pre></div><p>It will not work with your modification because it will covert the index 0 to BasePrice.Open.</p><p>You have to change the code to that:</p><div class="codebox"><pre><code>        public override void Calculate(IDataSet dataSet)
        {
            DataSet = dataSet;

            // Reading the parameters
            BasePrice basePrice = BasePrice.Close;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2016-05-21T17:26:48Z</updated>
			<id>https://forexsb.com/forum/post/36016/#p36016</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: forcing base price change the indicator calculations]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/36010/#p36010" />
			<content type="html"><![CDATA[<p>I think you need to keep index as in the original. And forcing comes easier when you do it in the calc block, why waste time with a parameter window? But the latter is only my opinion.</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2016-05-21T09:22:51Z</updated>
			<id>https://forexsb.com/forum/post/36010/#p36010</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[forcing base price change the indicator calculations]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/36008/#p36008" />
			<content type="html"><![CDATA[<p>Hello Pop <br />When trying to force MA indicator to use only close it gives me different calculations from the normal use of baseprice (close) !!!!!!</p><p>The original code :<br /></p><div class="codebox"><pre><code>IndParam.ListParam[2].Caption = &quot;Base price&quot;;
            IndParam.ListParam[2].ItemList = Enum.GetNames(typeof (BasePrice));
            IndParam.ListParam[2].Index = (int) BasePrice.Close;
            IndParam.ListParam[2].Text = IndParam.ListParam[2].ItemList[IndParam.ListParam[2].Index];
            IndParam.ListParam[2].Enabled = true;
            IndParam.ListParam[2].ToolTip = &quot;The price Moving Average is based on.&quot;;</code></pre></div><p>The modified code :<br /></p><div class="codebox"><pre><code> IndParam.ListParam[2].Caption = &quot;Base price&quot;;
            IndParam.ListParam[2].ItemList = new[] { &quot;Close&quot; };
            IndParam.ListParam[2].Index = 0;
            IndParam.ListParam[2].Text = IndParam.ListParam[2].ItemList[IndParam.ListParam[2].Index];
            IndParam.ListParam[2].Enabled = true;
            IndParam.ListParam[2].ToolTip = &quot;The price the central Moving Average is based on.&quot;;</code></pre></div><p>logically they should plot identical lines but it didnot happen !!!!</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2016-05-21T03:50:32Z</updated>
			<id>https://forexsb.com/forum/post/36008/#p36008</id>
		</entry>
</feed>
