<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Swing Highs or Lows as an entry condition]]></title>
		<link>https://forexsb.com/forum/topic/1920/swing-highs-or-lows-as-an-entry-condition/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/1920" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Swing Highs or Lows as an entry condition.]]></description>
		<lastBuildDate>Tue, 16 Nov 2010 03:21:42 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Swing Highs or Lows as an entry condition]]></title>
			<link>https://forexsb.com/forum/post/7269/#p7269</link>
			<description><![CDATA[<div class="quotebox"><cite>Hyoru wrote:</cite><blockquote><p>Thank you very much to krog for his suggestions and to footon for his feedback, you made the indicator work.</p></blockquote></div><p>That&#039;s great !! Happy to help out, and glad to hear it is working as expected.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Tue, 16 Nov 2010 03:21:42 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/7269/#p7269</guid>
		</item>
		<item>
			<title><![CDATA[Re: Swing Highs or Lows as an entry condition]]></title>
			<link>https://forexsb.com/forum/post/7267/#p7267</link>
			<description><![CDATA[<p>Hyoru,<br />Excellent job with that indicator.</p><p>I made two very small changes to it:<br />1. Increased the max value of the shift to +- 200 pips due to 5 digit brokers;<br />2. Added ToString() function in order to print the name of the indicator properly on the indicator chart.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Mon, 15 Nov 2010 23:46:21 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/7267/#p7267</guid>
		</item>
		<item>
			<title><![CDATA[Re: Swing Highs or Lows as an entry condition]]></title>
			<link>https://forexsb.com/forum/post/7266/#p7266</link>
			<description><![CDATA[<p>Ok, finally I made it work, one thing I wasn&#039;t aware of was that FSB first draws the indicator and then runs the test.</p><p>In the last version I was drawing the line on the candle with the swing (when it&#039;s not valid yet), now the line is being drawn only for the candles where the recent swing is valid (from the third candle after the swing has occurred).</p><p>I made a couple of tests with FST and works as intented, some orders are not opened at the exact price but that issue comes from slippage or not-fixed spread from my test broker.</p><p>Thank you very much to krog for his suggestions and to footon for his feedback, you made the indicator work.</p><p>I&#039;m going to start testing some old strategies I had using this indicator, if I find more issues I&#039;ll update the indicator, and if I find a good strategy I&#039;ll let you know.</p><p>Thanks again</p>]]></description>
			<author><![CDATA[null@example.com (Hyoru)]]></author>
			<pubDate>Mon, 15 Nov 2010 23:06:40 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/7266/#p7266</guid>
		</item>
		<item>
			<title><![CDATA[Re: Swing Highs or Lows as an entry condition]]></title>
			<link>https://forexsb.com/forum/post/7251/#p7251</link>
			<description><![CDATA[<p>Thanks a lot for all the feedback, I&#039;ve tested too and I&#039;ll modify the code this sunday to make it work as it should be.</p><p>Again, thank you very much for the posts and the suggestions.</p>]]></description>
			<author><![CDATA[null@example.com (Hyoru)]]></author>
			<pubDate>Fri, 12 Nov 2010 17:16:27 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/7251/#p7251</guid>
		</item>
		<item>
			<title><![CDATA[Re: Swing Highs or Lows as an entry condition]]></title>
			<link>https://forexsb.com/forum/post/7240/#p7240</link>
			<description><![CDATA[<p>You might try the Fractal indicator, built in with FSB. It does the same thing of looking for a high that is higher than the previous and next 2 bars. It has several more cases or types of swings, but you could customize it by removing the extra cases you don&#039;t want by commenting out Fractal Types 2-7.</p><p>For the Recent Swing High Low indicator, I think the problem is at line 91-92 and 101-102:</p><div class="codebox"><pre><code>                    if (High[iBar] &gt;= High[iBar - 1] &amp;&amp; High[iBar] &gt; High[iBar - 2] &amp;&amp;  // Check 2 candles to the left
                        High[iBar] &gt;= High[iBar + 1] &amp;&amp; High[iBar] &gt; High[iBar + 2])    // Check 2 candles to the right
                    {</code></pre></div><p>iBar+1 and iBar+2 is like saying &quot;look at the current bar and compare against the 2 bars in the future&quot;, which the indicator cannot know in real trading. Instead, the swing high (or swing low) should be 3 bars in the past, so we can be sure the next 2 bars are also in the past and can be known.<br />This might work, try replacing the above with:</p><div class="codebox"><pre><code>                    if (High[iBar-3] &gt;= High[iBar - 4] &amp;&amp; High[iBar-3] &gt; High[iBar - 5] &amp;&amp;  // Check 2 candles to the left
                        High[iBar-3] &gt;= High[iBar - 2] &amp;&amp; High[iBar -3] &gt; High[iBar -1])    // Check 2 candles to the right
                    {</code></pre></div><p>Then, when the high price is set, the entry signal will start on the bar after the formation, not sent back to the bar with the swing high or low. If the entry signal lags too much, try [-0, -1, .. -4] instead of [-1, -2, .. -5], then be careful in testing that it is not giving and entering signals before info can be known.</p><p>Also, line 75, change iFirstBar = 3 to something higher (eg 10), and line 81, from &quot;for (int iBar = 1&quot; to &quot;for (int iBar = iFirstBar&quot;. If not, you may get an &quot;Out of Range error&quot;, where you get a dialog box asking &quot;quit or continue&quot;.</p><p>Hope that helps.</p>]]></description>
			<author><![CDATA[null@example.com (krog)]]></author>
			<pubDate>Thu, 11 Nov 2010 18:19:25 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/7240/#p7240</guid>
		</item>
		<item>
			<title><![CDATA[Re: Swing Highs or Lows as an entry condition]]></title>
			<link>https://forexsb.com/forum/post/7235/#p7235</link>
			<description><![CDATA[<p>Hi, I made it just thinking about the backtester, I really think it&#039;ll have problems with live market as it is; I&#039;ll test it and modify if needed.</p>]]></description>
			<author><![CDATA[null@example.com (Hyoru)]]></author>
			<pubDate>Thu, 11 Nov 2010 16:01:53 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/7235/#p7235</guid>
		</item>
		<item>
			<title><![CDATA[Swing Highs or Lows as an entry condition]]></title>
			<link>https://forexsb.com/forum/post/7229/#p7229</link>
			<description><![CDATA[<p>Hi all,</p><p>First I want to thank Popov and all the people involved in the development of this great software.</p><p>I&#039;m not an expert programmer but I&#039;m capable of creating my own MT4 indicators and now I&#039;m starting to create indicators for FSB.</p><p>My first indicator open positions when the most recent swing high or low is reached, at the moment it only gives FSB and opening and closing point for the position.</p><p>My logic for a swing high is a candle which high is above the closest two on both sides (inverse logic applies for a swing low). So you have to wait for at least 2 candles before getting a confirmation that you have a valid swing high/low.</p><p>I need some help to solve a problem, when a swing is confirmed, the tester goes back to the swing candle and opens a position there (so far I can avoid the problem by adding 1 pip to the vertical shift but could be better without the issue).</p><p>That&#039;s it, I&#039;ll appreciate all the suggestions/complains you have.</p><p>Thanks a lot.</p>]]></description>
			<author><![CDATA[null@example.com (Hyoru)]]></author>
			<pubDate>Thu, 11 Nov 2010 01:27:13 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/7229/#p7229</guid>
		</item>
	</channel>
</rss>
