<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — week closing indicator]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/2873/" />
	<updated>2011-12-21T19:08:18Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/2873/week-closing-indicator/</id>
		<entry>
			<title type="html"><![CDATA[Re: week closing indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/11946/#p11946" />
			<content type="html"><![CDATA[<p>if (Time[iBar].DayOfWeek &gt; DayOfWeek.Wednesday <br />// if the current bar is Thursday, Friday, or Saturday</p><p>&amp;&amp;<br />// and -- both of these must be true to activate</p><p>Time[iBar + 1].DayOfWeek &lt; DayOfWeek.Wednesday)<br />// if the next bar in the future is Sunday, Monday, or Tuesday</p><p>adBars[iBar] = Close[iBar];<br />// the exit price is the close of the current bar<br />// This works because only the last bar of the week will be Thursday or Friday with the next bar as <br />// Sunday or Monday.</p><p>else<br />&nbsp; &nbsp; &nbsp; adBars[iBar] = 0;<br />// All other bars are set to exit price of 0 -- this means they do not exit the position.</p><br /><p>Does this work in FST? Since it looks for [iBar+1], I don&#039;t think it would work (but I don&#039;t know), it is like looking into the future. <br />I think it is better to use Exit Day and Exit Time. Set Exit Day to end of your week, then Exit Time to cover 2-3 hours before time of your week&#039;s closing, to be sure it closes. If the exit time is not wide enough, it is possible FST would miss the bar and not exit at the end of the week.</p>]]></content>
			<author>
				<name><![CDATA[krog]]></name>
				<uri>https://forexsb.com/forum/user/1692/</uri>
			</author>
			<updated>2011-12-21T19:08:18Z</updated>
			<id>https://forexsb.com/forum/post/11946/#p11946</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[week closing indicator]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/11945/#p11945" />
			<content type="html"><![CDATA[<p>I need help to understand that simple part of code and how the calculations results = friday close !!!1</p><br /><p>// Calculation of the logic<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (int iBar = 0; iBar &lt; Bars - 1; iBar++)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (Time[iBar].DayOfWeek &gt; DayOfWeek.Wednesday &amp;&amp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Time[iBar + 1].DayOfWeek &lt; DayOfWeek.Wednesday)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; adBars[iBar] = Close[iBar];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; adBars[iBar] = 0;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }</p><p>Regards</p>]]></content>
			<author>
				<name><![CDATA[ahmedalhoseny]]></name>
				<uri>https://forexsb.com/forum/user/1512/</uri>
			</author>
			<updated>2011-12-21T18:47:47Z</updated>
			<id>https://forexsb.com/forum/post/11945/#p11945</id>
		</entry>
</feed>
