<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Use previous bar value ( in entering and closing positions )]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/1233/" />
	<updated>2011-01-05T22:07:59Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/1233/use-previous-bar-value-in-entering-and-closing-positions/</id>
		<entry>
			<title type="html"><![CDATA[Re: Use previous bar value ( in entering and closing positions )]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/7805/#p7805" />
			<content type="html"><![CDATA[<p>This should do it:</p><p><strong>[Opening Point of the Position]</strong><br /><strong><span style="color:blue">Bar Opening</span></strong><br />&nbsp; &nbsp; &nbsp;<strong><span style="color:teal">Enter the market at the beginning of the bar</span></strong><br />&nbsp; &nbsp; &nbsp;<strong>Base price</strong>&nbsp; -&nbsp; <em>Open</em></p><p><strong>[Opening Logic Condition]</strong><br /><strong><span style="color:blue">Moving Average</span></strong><br />&nbsp; &nbsp; &nbsp;<strong><span style="color:teal">The bar opens above the Moving Average</span></strong><br />&nbsp; &nbsp; &nbsp;<strong>Smoothing method</strong>&nbsp; -&nbsp; <em>Simple</em><br />&nbsp; &nbsp; &nbsp;<strong>Base price</strong>&nbsp; -&nbsp; <em>Close</em><br />&nbsp; &nbsp; &nbsp;<strong>Period</strong>&nbsp; -&nbsp; <em>14</em><br />&nbsp; &nbsp; &nbsp;<strong>Shift</strong>&nbsp; -&nbsp; <em>0</em><br />&nbsp; &nbsp; &nbsp;<strong>Use previous bar value</strong>&nbsp; -&nbsp; <em>Yes</em></p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2011-01-05T22:07:59Z</updated>
			<id>https://forexsb.com/forum/post/7805/#p7805</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Use previous bar value ( in entering and closing positions )]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/7795/#p7795" />
			<content type="html"><![CDATA[<p>Hello,</p><p>Im trying to create an opening logic condition to go long when the price closed above the moving average (and go short otherwise?).</p><p>Im quiite confused about the concept of &quot;use previous bar value&quot;.</p><p>Can someone help me out?</p>]]></content>
			<author>
				<name><![CDATA[primaditya]]></name>
				<uri>https://forexsb.com/forum/user/3078/</uri>
			</author>
			<updated>2011-01-05T19:47:52Z</updated>
			<id>https://forexsb.com/forum/post/7795/#p7795</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Use previous bar value ( in entering and closing positions )]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/4005/#p4005" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>i understand when using MA with price close we have to use previous candle use , But&nbsp; when closing the position we can use both options (previous candle ) or not use it&nbsp; Right?</p></blockquote></div><p>Forex Strategy Builder and Forex Strategy Trader sets &quot;Use previous bar value&quot; parameter automatically. <br />Specifically for closing a position if you wont to close at a MA, you must use the previous bar value. You don&#039;t know the final current value of MA until the end of the bar.</p><p>If you want to use MA as a closing logic condition, you have to use the current value. The position closes at Bar close price (Time) so the MA is fixed for this bar and you can use it.</p><div class="quotebox"><blockquote><p>if we used the Pivot point as an exit point ( pivot point calculations use the previous bar ) so when enter or exit we donot need to use that option because if we use it it will use the day before previous day&nbsp; Am i right?</p></blockquote></div><p>Pivot Point plots the points on the same bar but trade according to previous bar points. &quot;Use previous bar&quot; option&nbsp; servers to show that fact to the users.</p><div class="quotebox"><blockquote><p>the charts in FSB draw the actual indicator on chart but use the previous bar in calculations</p></blockquote></div><p>Yes. That&#039;s right. </p><div class="quotebox"><blockquote><p>so to see the indicator at work in MT4 we have to use the shift -1 and it is only found in Moving average&nbsp; but not used in oscillator indicators</p></blockquote></div><p>You have to apply &quot;Use previous bar value&quot; logic alone in MT. You don&#039;t need &quot;Shift&quot;. simple use previous indicator value.&nbsp; </p><p>MACD1=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,<strong>1</strong>);<br />MACD2=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,<strong>2</strong>);</p><p>if(MACD1 &gt; MACD2 + sigma)<br />{<br />&nbsp; &nbsp; // Enter long<br />}</p><p>if(MACD1 &lt; MACD2 - sigma)<br />{<br />&nbsp; &nbsp; // Enter Short<br />}</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2009-12-21T11:09:50Z</updated>
			<id>https://forexsb.com/forum/post/4005/#p4005</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Use previous bar value ( in entering and closing positions )]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/3999/#p3999" />
			<content type="html"><![CDATA[<p>hello</p><p>when we say use previous bar value this means in MT4 = shift -1&nbsp; &nbsp;, right ?<br />my Q is:&nbsp; the charts in FSB draw the actual indicator on chart but use the previous bar in calculations <br />so to see the indicator at work in MT4 we have to use the shift -1 and it is only found in Moving average&nbsp; but not used in oscillator indicators&nbsp; !!!!</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2009-12-21T08:28:12Z</updated>
			<id>https://forexsb.com/forum/post/3999/#p3999</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Use previous bar value ( in entering and closing positions )]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/3994/#p3994" />
			<content type="html"><![CDATA[<p>Hello Popov <br />i understand when using MA with price close we have to use previous candle use , But&nbsp; when closing the position we can use both options (previous candle ) or not use it&nbsp; Right?</p><br /><p>Another Q: if we used the Pivot point as an exit point ( pivot point calculations use the previous bar ) so when enter or exit we donot need to use that option because if we use it it will use the day before previous day&nbsp; Am i right?</p><br /><p><a href="http://www.postimage.org/image.php?v=Ts1fyu4i"><span class="postimg"><img src="http://s2.postimage.org/1fyu4i.jpg" alt="http://s2.postimage.org/1fyu4i.jpg" /></span></a></p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2009-12-21T07:43:56Z</updated>
			<id>https://forexsb.com/forum/post/3994/#p3994</id>
		</entry>
</feed>
