<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Questionable Entries]]></title>
		<link>https://forexsb.com/forum/topic/1152/questionable-entries/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/1152/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Questionable Entries.]]></description>
		<lastBuildDate>Tue, 15 Dec 2009 09:46:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3900/#p3900</link>
			<description><![CDATA[<p>Popov,</p><p>I&#039;m gonna try that mod on BB and will let you know about the results.<br />(I am not skilled <strong>at all</strong> in MQL4 but that should not be so difficult according to your previous explanation).</p><p>Alain</p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Tue, 15 Dec 2009 09:46:45 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3900/#p3900</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3895/#p3895</link>
			<description><![CDATA[<p>You are write about the difference between back test and real trade. It is not correct to use the current bar High / Low since we don&#039;t know them until the end of the bar.</p><p>Alain, thank you for the report!</p><p>With a little change we can make everything on place. We can calculate &quot;Jumps&quot; by using the current bar opening price (instead High/Low).</p><p>Example for MA Crossover entry:</p><p>Rules:<br />We enter long when the market price touches a MA.<br /> - If the price was below the MA before the touch, we enter long.<br /> - If the price was above the MA before the touch, we enter short.&nbsp; &nbsp;</p><p>Normal conditions:<br /> The bar opens below the MA and goes up. When it touches MA, we enter long.<br />Jump upward:<br />&nbsp; The bar opens below the MA and closes 3 pips below it without touch. The next (now the current) bar opens 2 pips above MA. We have a crossover but because of the discrete nature of MA we missed the exact entry. So we enter at Open, which is the first possible price after the crossover.</p><br /><p>The code for covering special cases such jumps and gaps is:<br /></p><div class="codebox"><pre><code>for (int iBar = 2; iBar &lt; Bars; iBar++)
{   // Covers the cases when the price can pass through the MA without a signal
    double dValue   = adMA[iBar - iPrvs];     // Current value
    double dValue1  = adMA[iBar - iPrvs - 1]; // Previous value
    double dTempVal = dValue;
    if ((dValue1 &gt; High[iBar - 1] &amp;&amp; dValue &lt; Open[iBar])|| // The Open price jumps above the indicator
        (dValue1 &lt; Low[iBar - 1]  &amp;&amp; dValue &gt; Open[iBar])|| // The Open price jumps below the indicator
        (Close[iBar - 1] &lt; dValue &amp;&amp; dValue &lt; Open[iBar])|| // Positive gap
        (Close[iBar - 1] &gt; dValue &amp;&amp; dValue &gt; Open[iBar]))  // Negative gap
        dTempVal = Open[iBar];
    Component[1].Value[iBar] = dTempVal; // Entry or exit value
}</code></pre></div><p>This logic has to be applied at other &quot;entry&quot; indicators like: Bollinger Bands, Envelop, Keltner Channel, Starc Bands...</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Tue, 15 Dec 2009 04:28:42 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3895/#p3895</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3886/#p3886</link>
			<description><![CDATA[<p>Popov,</p><p>You quoted :</p><p><span style="color:blue"><em><strong>- the usage of code for &quot;Jumping&quot; bars highly improves the backtest</strong>.</em></span><br />no doubt, but backtest only !!! <br />that could be frustrating once used in real-time trading...<br /><span style="color:blue"><em><strong>- in the real trade we have O=H=L=C at the bar opening and we can apply the formula.</strong></em></span><br />yes, that sounds smart ... but how robust enough is this assumption on a long-term real-time strategy<br /><span style="color:blue"><strong>- if the price goes in the direction of the Jump, the trade and the backtest are equal.</strong></span><br />sure, but it goes back and forth ... the price may increase fisrt then reverse ... then close in the opposite direction, thus making the &quot;open bar&quot; entry strategy totally irrelevant !<br /><span style="color:blue"><strong>- if the price goes in the opposite direction, the entry error is Open - Indicator value</strong></span><br />arithmetically true ... but so treachery. It could make the backtest very promising but then a deceitful real-time trading.</p><p>I am not a top expert in trading algorithms, but don&#039;t you think that it would be more coherent to :<br />1- keep your &#039;previous bar&#039; analysis that is essential and arithmetically 100%-proof (compared to the META-TRADER &#039;current bar&#039; analysis that is evidently wrong)<br />2- then keep the bar that follows for testing purposes (what&#039;s the trend, is the &quot;previous bar&quot; entry touched, is it a gap, is it a jump ... )<br />3- and finally take the position on the THIRD bar : at previous(-2) bar value or at open according to the test made in 2-</p><p>I understand that this option might lead to some &quot;LAGGING&quot; on position opportunities but it would be perhaps a way to have BACKTESTING get &quot;closer&quot; to REAL-TIME reality .... </p><p>What do you think ?</p><p>Alain</p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Mon, 14 Dec 2009 20:09:45 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3886/#p3886</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3874/#p3874</link>
			<description><![CDATA[<p>Hello Alain,</p><p>To your first question:<br />1. Congratulations, the noted values and variables are correct.</p><p>2. The formula for backtesting&nbsp; and for real trade is the same. My ideas for that are:</p><p>a) Indicator is used for entry<br /> - the usage of code for &quot;Jumping&quot; bars highly improves the backtest.<br /> - in the real trade we have O=H=L=C at the bar opening and we can apply the formula.<br /> - if the price goes in the direction of the Jump, the trade and the backtest are equal.<br /> - if the price goes in the opposite direction, the entry error is Open - Indicator value</p><p>b) The indicator is used for exit<br /> - All points are the same as the previous except the last one. If the indicator determines a SL,<br />the exit will be executed at first possible price, which is Bar Open. So there is no error.</p><p>In case of pending orders - the execution can be either at the indicator value or at&nbsp; bar open.</p><p>So I think if we have an error, it will be several pips at entry. In the opposite case we will miss many signals in the backtest as well as in the real trade.</p><p>I was surprised when I noticed this in a MT expert 5-6 years ago. The expert was set to open a position at a Moving Average. The price was well below it. Later I noticed that the price was crossed over the MA but no entry was executed. My further observations showed that the price was jumped over the MA with one pips.</p><br /><p>To your second question:</p><p><a href="http://www.postimage.org/image.php?v=aV1lAEi"><span class="postimg"><img src="http://s4.postimage.org/1lAEi.jpg" alt="http://s4.postimage.org/1lAEi.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Mon, 14 Dec 2009 15:40:09 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3874/#p3874</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3873/#p3873</link>
			<description><![CDATA[<p>Popov,</p><p>Sorry to bother you for I think you have a lot of work with the FST new release, but I have another question concerning the <strong>&quot;JUMP&amp;GAP</strong>&quot; theory ... (see pic).</p><p>Alain</p><p><a href="http://www.postimage.org/image.php?v=TsYBVs0"><span class="postimg"><img src="http://s2.postimage.org/YBVs0.jpg" alt="http://s2.postimage.org/YBVs0.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Mon, 14 Dec 2009 14:57:33 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3873/#p3873</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3871/#p3871</link>
			<description><![CDATA[<p>Popov,</p><p>I understand the<span style="color:blue"> <strong>&quot;JUMP&amp;GAP&quot;</strong></span> principle much better now.</p><p>But I believe this theory can apply <strong>ONLY</strong> to FSB <strong>BACK-TESTING</strong> on Historical Data.</p><p>How do you handle this principle with a <strong>REAL-TIME </strong> feed through FST ?</p><p>You can <strong>NOT </strong>test in <strong>REAL-TIME</strong> High[iBar] (or Low[iBar]) and <strong>THEN </strong>place an entry (stop or limit) on Open[iBar] according to the test result ....<br />By the time the current bar (iBar) is tested, it&#039;s already over and it becomes a <strong>PAST </strong>bar and you can no longer place an entry on Open[iBar] !</p><p>Please see the attached pic for a concrete example.</p><p>Thanks.</p><p>Alain</p><p><a href="http://www.postimage.org/image.php?v=TsYzqj0"><span class="postimg"><img src="http://s2.postimage.org/Yzqj0.jpg" alt="http://s2.postimage.org/Yzqj0.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Mon, 14 Dec 2009 14:36:23 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3871/#p3871</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3845/#p3845</link>
			<description><![CDATA[<p>Excellent. Three notes only.</p><p>&nbsp; <br /><a href="http://www.postimage.org/image.php?v=TsXzem0"><span class="postimg"><img src="http://s2.postimage.org/Xzem0.jpg" alt="http://s2.postimage.org/Xzem0.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Mon, 14 Dec 2009 05:55:18 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3845/#p3845</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3842/#p3842</link>
			<description><![CDATA[<p>Thank you Popov, it&#039;s now <em><strong>a bit</strong></em> &#039;clearer&#039; to me ... not that easy to comprehend, though !!! <br />Would you agree with the following (see pic) ?<br />Alain<br /><a href="http://www.postimage.org/image.php?v=PqbPAJ0"><span class="postimg"><img src="http://s3.postimage.org/bPAJ0.jpg" alt="http://s3.postimage.org/bPAJ0.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Mon, 14 Dec 2009 05:18:37 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3842/#p3842</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3796/#p3796</link>
			<description><![CDATA[<p>In the first case we have a jump.</p><p>The second case is a positive gap. The entry value is between the previous close and the current open. That&#039;s why the program opens at the first possible price - current open.</p><br /><p><a href="http://www.postimage.org/image.php?v=aV1YxcY9"><span class="postimg"><img src="http://s4.postimage.org/1YxcY9.jpg" alt="http://s4.postimage.org/1YxcY9.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Mon, 14 Dec 2009 00:02:37 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3796/#p3796</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3792/#p3792</link>
			<description><![CDATA[<p>Popov,</p><p>I am a bit lost with your figures because they now show <strong>&#039;Currrent values&#039;</strong> instead of <strong>&#039;Previous Bar value&quot;</strong> !!!</p><p>Is it possible for you to <span style="color:blue"><strong>REDRAW</strong></span> them all with<strong> &quot;Previous Bar value&quot;</strong> ?</p><p>Before you do so, would you agree with these two pictures ?</p><p>Alain<br /><a href="http://www.postimage.org/image.php?v=TsWTour"><span class="postimg"><img src="http://s2.postimage.org/WTour.jpg" alt="http://s2.postimage.org/WTour.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Sun, 13 Dec 2009 21:32:01 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3792/#p3792</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3772/#p3772</link>
			<description><![CDATA[<p>There is nothing special in this bar. There is no entry there because the bar doesn&#039;t touch the entry price.</p><br /><p><a href="http://www.postimage.org/image.php?v=gxwZ9zA"><span class="postimg"><img src="http://s1.postimage.org/wZ9zA.jpg" alt="http://s1.postimage.org/wZ9zA.jpg" /></span></a></p><p>The formula for fixing &quot;jumping prices&quot; doesn&#039;t prevent signals. It moves the entry level to the bar&#039;s opening when we have such cases.</p><p>The code is here (for Moving Average):<br /></p><div class="codebox"><pre><code>for (int iBar = 2; iBar &lt; Bars; iBar++)
{   // Covers the cases when the price can pass through the MA without a signal
    double dValue   = adMA[iBar - iPrvs];     // Current value
    double dValue1  = adMA[iBar - iPrvs - 1]; // Previous value
    double dTempVal = dValue;
    if ((dValue1 &gt; High[iBar - 1] &amp;&amp; dValue &lt; Low[iBar]) || // It jumps below the current bar
        (dValue1 &lt; Low[iBar - 1]  &amp;&amp; dValue &gt; High[iBar])|| // It jumps above the current bar
        (Close[iBar - 1] &lt; dValue &amp;&amp; dValue &lt; Open[iBar])|| // Positive gap
        (Close[iBar - 1] &gt; dValue &amp;&amp; dValue &gt; Open[iBar]))  // Negative gap
        dTempVal = Open[iBar];
    Component[1].Value[iBar] = dTempVal;
}</code></pre></div><p>In normal conditions the entry is at the indicator value:<br />&nbsp; &nbsp; double dValue&nbsp; &nbsp;= adMA[iBar - iPrvs];&nbsp; &nbsp; &nbsp;// Current value<br />&nbsp; &nbsp; double dTempVal = dValue;</p><p>In one of the special conditions the entry is at the bar open:<br />&nbsp; &nbsp; dTempVal = Open[iBar];</p><p>The conditions are:</p><p>1. The bar jumps above the indicator without touching it:<br />&nbsp; &nbsp; &nbsp; &nbsp; dValue1 &gt; High[iBar - 1] &amp;&amp; dValue &lt; Low[iBar]<br />(The previous indicator is above the previous high and current indicator is below the current low)</p><p><a href="http://www.postimage.org/"><span class="postimg"><img src="http://s4.postimage.org/1X1UsS.png" alt="http://s4.postimage.org/1X1UsS.png" /></span></a></p><p>2. The bar jumps below the indicator:<br />&nbsp; &nbsp; &nbsp; &nbsp; dValue1 &lt; Low[iBar - 1]&nbsp; &amp;&amp; dValue &gt; High[iBar]<br />(The previous indicator is below the previous low and current indicator is above the current high)</p><p><a href="http://www.postimage.org/"><span class="postimg"><img src="http://s2.postimage.org/VKpNJ.png" alt="http://s2.postimage.org/VKpNJ.png" /></span></a></p><p>3. The indicator value is in a positive gap:<br />&nbsp; &nbsp; &nbsp; &nbsp; Close[iBar - 1] &lt; dValue &amp;&amp; dValue &lt; Open[iBar]</p><p><a href="http://www.postimage.org/"><span class="postimg"><img src="http://s2.postimage.org/VJqr9.png" alt="http://s2.postimage.org/VJqr9.png" /></span></a></p><p>4. The indicator is in a negative gap:<br />&nbsp; &nbsp; &nbsp; &nbsp; Close[iBar - 1] &gt; dValue &amp;&amp; dValue &gt; Open[iBar]</p><p><a href="http://www.postimage.org/"><span class="postimg"><img src="http://s3.postimage.org/9VKnA.png" alt="http://s3.postimage.org/9VKnA.png" /></span></a></p><br /><p>All the images show indicators without &quot;Use previous bar value&quot; (iPrvs = 0). If&nbsp; &quot;Use previous bar value&quot; = true, iPrvs = 1.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Sun, 13 Dec 2009 15:04:11 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3772/#p3772</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3769/#p3769</link>
			<description><![CDATA[<p>Popov,</p><p>I am back on this topic !!!</p><p>I am now 100% convinced that<span style="color:blue"><strong> &#039;Previous Bar Value&#039;</strong></span> is <strong>DEFINITELY</strong> the right way to do things ... (I don&#039;t use anymore your custom &#039;Current BB&#039; indicator).</p><p>HOWEVER, I still have a few doubts that I would like you to raise :<br />Look at this bar #45136.<br />It should normally go LONG, why didn&#039;t it do so ? (see pic)</p><p>This is not the single instance that I picked in the chart, I could show you other doubtful instances.<br />But as I am sure that there is a <strong>RATIONAL </strong>explanation, I prefer to show you only one example for you to explain.</p><p>Thanks.</p><p>Alain<br /><a href="http://www.postimage.org/image.php?v=TsVqA89"><span class="postimg"><img src="http://s2.postimage.org/VqA89.jpg" alt="http://s2.postimage.org/VqA89.jpg" /></span></a></p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Sun, 13 Dec 2009 13:01:05 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3769/#p3769</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3648/#p3648</link>
			<description><![CDATA[<p>There is HUGE difference in the reliability of back test.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Thu, 26 Nov 2009 17:14:59 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3648/#p3648</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3629/#p3629</link>
			<description><![CDATA[<p>Popov,<br />You said <span style="color:blue"><em><strong>Yesterday 15:39:44</strong></em></span>:<br /><span style="color:blue"><em><strong>&quot;90% of the experts I&#039;ve seen rise signals at the current indicator&#039;s value and do not use modifications for &quot;jumping&quot; prices&quot;.</strong></em></span><br />Do you think that what makes a HUGE difference of profitability between your FSB and most EA&#039;s is the implementation of &quot;previous bar value analysis&quot; and &quot;jumping prices management&quot; algorithms ?<br />Alain</p>]]></description>
			<author><![CDATA[null@example.com (alevi)]]></author>
			<pubDate>Thu, 26 Nov 2009 04:58:50 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3629/#p3629</guid>
		</item>
		<item>
			<title><![CDATA[Re: Questionable Entries]]></title>
			<link>https://forexsb.com/forum/post/3619/#p3619</link>
			<description><![CDATA[<p>This custom indicator is for testing the different logic rules. The entry points will be much clear because they are exactly on the BB bands. This indicator will act exactly like the MetaTrader BB indicator. 90% of the experts I&#039;ve seen rise signals at the current indicator&#039;s value and do not use modifications for &quot;jumping&quot; prices. </p><p>You can compare the results between the original BB and this custom BB. You can use both and you can make&nbsp; custom indicators from almost all standard codes. They are free for download from the indicators section.</p><p>Anyway I think that the standard indicators are more safe and reliable because of these modes. All the sources are publicly available.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Wed, 25 Nov 2009 13:39:44 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/3619/#p3619</guid>
		</item>
	</channel>
</rss>
