<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — is this an error in the "Top Bottom Price Indicator"?]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/3044/" />
	<updated>2012-02-20T21:34:25Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/3044/is-this-an-error-in-the-top-bottom-price-indicator/</id>
		<entry>
			<title type="html"><![CDATA[Re: is this an error in the "Top Bottom Price Indicator"?]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/12731/#p12731" />
			<content type="html"><![CDATA[<p>Thank you very much for the detailed explanation, the word &quot;FORCE&quot; is what made me believe that the two IndComponentType were reversed, and since they do have similar functions they might have been missed in testing.&nbsp; <br />now I understand the reason.... basicaly when the condition becomes true in one of the closing filters it might not close the position unless the IndComponentType has a FORCE command in it, without it the program will keep the position open until all filters are congruent on closing the position... I guess the filters also must belong to the same group to function that way...</p><p>Thank you again&nbsp; <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[dr.B]]></name>
				<uri>https://forexsb.com/forum/user/3783/</uri>
			</author>
			<updated>2012-02-20T21:34:25Z</updated>
			<id>https://forexsb.com/forum/post/12731/#p12731</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: is this an error in the "Top Bottom Price Indicator"?]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/12706/#p12706" />
			<content type="html"><![CDATA[<p>1. Change component type:<br />We change the component type for the different slots because the purpose of the slot(component) is different. <br />- When an indicator is at &quot;slotType == SlotTypes.Close&quot;, it represent an actual price level, where we have to close a position once the level was reached. The values of such components are prices.<br />The components types are:<br /> Component[2].DataType = IndComponentType.CloseLongPrice; which is the price at we have to close a long position, and<br /> Component[3].DataType = IndComponentType.CloseShortPrice;; price for closing a short position.<br />The corresponding components names are:<br /> Component[2].CompName = &quot;Long position closing price&quot;;<br /> Component[3].CompName = &quot;Short position closing price&quot;;</p><p>- When an indicator is in &quot;Closing Logic Condition&quot; slot, it acts like filter that has to activate position closing. Its value is a True or False (<strong>0</strong> or <strong>1</strong>). The components types are accordingly:<br /> Component[2].DataType = IndComponentType.ForceCloseLong; and<br /> Component[3].DataType = IndComponentType.ForceCloseShort;<br />We use the word &quot;Force&quot; because the interaction logic of the closing logic slots is &quot;<strong>OR</strong>&quot;. That means that when even one satisfied logical condition is enough to &quot;force&quot; the closing.</p><p>2. What is function of Point in double dShift = IndParam.NumParam[0].Value * Point;<br />Point = 0.0001 for 4 digit broker and Point = 0.00001 for 5 digit broker.<br />User enters the Shift parameter as an integer number, let say 20.<br />Multiplying by Point makes the Shift proper for calculation the price.<br />Example: Top = 1.26356, Shift = 20<br />Shifted Top Price = Top + Shift * Point = 1.26356 + 0.00001 * 20 = 1.26356 + 0.00020 = 1.26376</p><p>3.&nbsp; &nbsp;Purpose of double dTop&nbsp; &nbsp; = double.MinValue;<br />This is a standard way of initialization of a variable when searching for a higher value. double.MinValue is the absolutely minimal value a double number can take. <br />Later on the code we have:<br />if (High[iBar - 1] &gt; dTop)<br />&nbsp; &nbsp; &nbsp;dTop = High[iBar - 1];<br />So, when the High of previous bar is higher than the current dTop, we make dTop = Previous High.<br />We set dTop to double.MinValue before checking the previous High in order to be sure that it is lower than what ever a High price can be.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2012-02-20T08:53:21Z</updated>
			<id>https://forexsb.com/forum/post/12706/#p12706</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[is this an error in the "Top Bottom Price Indicator"?]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/12702/#p12702" />
			<content type="html"><![CDATA[<p>hi <br />is this an error in the &quot;Top Bottom Price Indicator&quot;?<br />line 221<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (slotType == <span style="color:Red">SlotTypes.Close</span>)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[2].CompName = &quot;Long position closing price&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[2].DataType = <span style="color:blue">IndComponentType.CloseLongPrice</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[3].CompName = &quot;Short position closing price&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[3].DataType = <span style="color:blue">IndComponentType.CloseShortPrice</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else if (slotType == <span style="color:Blue">SlotTypes.CloseFilter</span>)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[2].CompName = &quot;Close out long position&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[2].DataType = <span style="color:Red">IndComponentType.ForceCloseLong</span>;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[3].CompName = &quot;Close out short position&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[3].DataType = <span style="color:red">IndComponentType.ForceCloseShort</span>;</p><p>should the Component[#].DataType be switched between the two Slot types ie the IndComponentType.CloseLongPrice for the SlotTypes.CloseFilter and the IndComponentType.ForceCloseLong; for the SlotTypes.Close?&nbsp; or are they correct the way they are?<br />also, since we are on the subject of this indicator, could someone explaine this commands? <br />line line 135<br />double dShift = IndParam.NumParam[0].Value * <span style="color:DarkGreen">Point</span>;<br />what is the function of the &quot;Point&quot;<br />and&nbsp; line 145 <br />double dTop&nbsp; &nbsp; = double.MinValue;<br />double dBottom = double.MaxValue;<br />how to interpret, and when to use the MinValue/MaxValue?<br />Thanks</p>]]></content>
			<author>
				<name><![CDATA[dr.B]]></name>
				<uri>https://forexsb.com/forum/user/3783/</uri>
			</author>
			<updated>2012-02-20T00:53:40Z</updated>
			<id>https://forexsb.com/forum/post/12702/#p12702</id>
		</entry>
</feed>
