<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — MT4 Charts Do Not Trade Equally]]></title>
		<link>https://forexsb.com/forum/topic/7127/mt4-charts-do-not-trade-equally/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/7127" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in MT4 Charts Do Not Trade Equally.]]></description>
		<lastBuildDate>Wed, 09 May 2018 00:16:34 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50467/#p50467</link>
			<description><![CDATA[<p>This is a single EA (straight from FSB).&nbsp; It was run in a single MT4 instance with no other EA&#039;s running on it. It is still using ontick.&nbsp; Yes the accuracy is nice - and at least we have timestamps as to where the two get out of sync. I&#039;ll have to spend some time today looking at the two to understand. It still worries me that there is 2 instances where execution differs (the sample size of trades isnt that big - so it will depend on the style of system to the impact that would have).</p>]]></description>
			<author><![CDATA[null@example.com (DoCZero)]]></author>
			<pubDate>Wed, 09 May 2018 00:16:34 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50467/#p50467</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50465/#p50465</link>
			<description><![CDATA[<div class="quotebox"><blockquote><p>To me it looks like a single strategy -- in which case the results show that FSB backtesting matches closely with trading in a Demo account, which is good to know.&nbsp; But I&#039;m pretty sure Popov has already verified that.</p></blockquote></div><p>DocZero -- I&#039;d like to make a correction.&nbsp; When I made the above comment my brain was thinking you were comparing backtests between MT4 and FSB -- which I know Popov has done.&nbsp; Your comparison of a Demo account versus an FSB backtest is very interesting.&nbsp; I&#039;ve thought about doing it, but never have.&nbsp; Even though there is a &quot;disconnect&quot; between backtests and live accounts, it is reassuring to know under certain conditions they do track closely.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 May 2018 18:09:17 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50465/#p50465</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50464/#p50464</link>
			<description><![CDATA[<p>Hello GD,</p><p>I understand.</p><p>Trades will occur if the code that opens new positions gets to execute.&nbsp; If the code that opens new positions doesn&#039;t have the opportunity to execute, then there will be less trading.</p><p>A program is just like a recipe.&nbsp; For example, suppose the recipe to make a cake has 20 steps.&nbsp; But each time when you get to step #7 you are interrupted.&nbsp; And when you return to the kitchen you have to start over again at step #1.&nbsp; In the end, the cake will never be baked.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 May 2018 17:50:45 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50464/#p50464</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50462/#p50462</link>
			<description><![CDATA[<p>Sleytus</p><p>I ask the questions to make everything clear.<br />I use onTimer.<br />Normally all orders should execute. But why few of them not as you also mentioned?<br />I try to find reasons</p><p>Suppose that some specific orders corresponded to specific EAs in portfolio cannot be executed cause the moment of execution the broker&#039;s server is busy, what will happen?</p><p>Can we increase thread time in windows to be dead?</p>]]></description>
			<author><![CDATA[null@example.com (GD)]]></author>
			<pubDate>Tue, 08 May 2018 17:41:54 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50462/#p50462</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50461/#p50461</link>
			<description><![CDATA[<p>Hello GD,</p><p>OnTimer <strong>can</strong> fully execute.&nbsp; This is because it is called by Windows and is not under MT4&#039;s thread control.</p><p>OnTimer does not run into the same problems as OnTick.&nbsp; I believe the reason is because OnTick forces threads to be synchronized and they execute code at the same time.&nbsp; When using OnTimer, the charts are not necessarily executing their code at the same time -- they are a few seconds apart.&nbsp; It depends on how frequently OnTimer is called.&nbsp; In Portfolio Maker the default is once every 10 seconds.</p><p>Again -- this is based on mine and other&#039;s observations.&nbsp; It&#039;s fine to question it.&nbsp; Portfolio Maker has been coded to use OnTimer because it misses too many trades when using OnTick.&nbsp; If you prefer to use OnTick, that is fine.&nbsp; I was just sharing my test results and observations.&nbsp; It&#039;s easy enough to do your own testing to verify whether or not OnTick can handle a portfolio EA with many strategies.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 May 2018 17:37:44 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50461/#p50461</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50460/#p50460</link>
			<description><![CDATA[<p>Hi Sleytus</p><p>case 1</p><p>In this case even onTimer solution cannot possibly full execute all the portfolio EAs as threading can stop. Am I right?<br />The situation should be the same. </p><p>case 2</p><p>With onTimer, I think the problem is when many orders asked to be done with portfolio&nbsp; cannot be completed cause of bottleneck<br />Maybe if you can add some delay between&nbsp; executions of orders. I am not sure.</p><p>Sidekick can be used even with one by one. But it is very hard to do it... for a big number of EAs.</p>]]></description>
			<author><![CDATA[null@example.com (GD)]]></author>
			<pubDate>Tue, 08 May 2018 17:27:16 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50460/#p50460</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50459/#p50459</link>
			<description><![CDATA[<p>Hello GD,</p><p>Yes -- I&#039;ve seen that.&nbsp; And your English is fine...</p><p>I&#039;ve seen other posts on mql5.com where others have seen a similar problem.&nbsp; &nbsp;Also, that statement may be true as long as the EA doesn&#039;t take up too much time executing all of its code.&nbsp; Once an EA or Indicator have exceeded a time limit then MT4 kills the thread that was executing.</p><p>The arrival of new ticks is non-deterministic and they can arrive very quickly, one after the other.&nbsp; If MT4 killed a thread when each new tick arrived then if you were trading EURUSD during a busy period your EA would never complete (since ticks would arrive many times per second).&nbsp; So, I think that statement is true as long as the EA completes within a fixed period of time.&nbsp; However, once that time has been exceeded then MT4 will kill the thead.&nbsp; &nbsp;I&#039;ve seen this happen with indicators.&nbsp; The strategies created by FSBPro are very <strong>HEAVY</strong> -- i.e. complex and take some time to execute.&nbsp; When you place 50 FSBPro-generated strategies in a single, portfolio EA then it takes a long time to execute all 50.&nbsp; From my testing, the first 7 or 8 strategies will always get executed, but then it drops off very dramatically from there.&nbsp; So, strategies 20-50 very rarely get executed.</p><p>I don&#039;t have access to MT4 code, so I can&#039;t prove this -- this is simply based on observations and testing.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 May 2018 17:08:09 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50459/#p50459</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50457/#p50457</link>
			<description><![CDATA[<p>Sleytus</p><p>I attach this from MQL4 Refernce manual</p><p>https://docs.mql4.com/runtime/event_fire#newtick</p><p>NewTick</p><p>The NewTick event is generated if there are new quotes, it is processed by OnTick() of Expert Advisors attached. In case when OnTick function for the previous quote is being processed when a new quote is received, the new quote will be ignored by an Expert Advisor, because the corresponding event will not enqueued.</p><p><strong>All new quotes that are received while the program is running are ignored until the OnTick() is completed. </strong>After that the function will run only after a new quote is received. The NewTick event is generated irrespective of whether automated trade is allowed or not (&quot;Allow/prohibit Auto trading&quot; button). The prohibition of automated trading denotes only that sending of trade requests from an Expert Advisor is not allowed, while the Expert Advisor keeps working.</p><p>The prohibition of automated trading by pressing the appropriate button will not stop the current execution of the OnTick() <br />function.</p><p>My English is not GOOD.... I am confused now!!!!</p>]]></description>
			<author><![CDATA[null@example.com (GD)]]></author>
			<pubDate>Tue, 08 May 2018 16:49:28 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50457/#p50457</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50455/#p50455</link>
			<description><![CDATA[<div class="quotebox"><cite>GD wrote:</cite><blockquote><p>why we cannot secure if some trades are not completed in first tick to be completed in the next one?</p></blockquote></div><p>GD -- I think I understand your question, but I&#039;m not sure.</p><p>I believe that MT4 has a threading / performance problem.&nbsp; With each tick an EA is given a certain amount of time to execute, and if it exceeds that time or if the next tick arrives before it has completed executing, then that first thread is killed.&nbsp; </p><p>When the next tick arrives the EA starts at the beginning again -- it does NOT begin where it left-off.&nbsp; As a result, the code at the end of the EA never gets executed.&nbsp; This probably explains the observation that an FSB-generated portfolio EA seems to miss trades.&nbsp; Using OnTimer (instead of OnTick) appears to solve the problem.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 May 2018 16:39:52 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50455/#p50455</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50454/#p50454</link>
			<description><![CDATA[<div class="quotebox"><cite>DoCZero wrote:</cite><blockquote><p> I have built a very simple system to test</p></blockquote></div><p>I&#039;m not clear about your test system.&nbsp; Are you testing a single strategy or a portfolio EA created by Portfolio Maker.</p><p>In the comparison -- I understand the left side is from the Demo Account and the right side from FSB.&nbsp; Are you comparing a single strategy in the Demo and FSB or a portfolio?</p><p>To me it looks like a single strategy -- in which case the results show that FSB backtesting matches closely with trading in a Demo account, which is good to know.&nbsp; But I&#039;m pretty sure Popov has already verified that.</p><p>This issue has to do with testing a portfolio EA of 40 strategies attached to a single chart, versus the same 40 strategies attached to their own, separate charts.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 May 2018 16:32:43 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50454/#p50454</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50453/#p50453</link>
			<description><![CDATA[<p>Sleytus</p><p>why we cannot secure if some trades are not completed in first tick to be completed in the next one?</p><p>IsTradeContextBusy can be used somehow?</p><p>I think this is what Popov means.</p>]]></description>
			<author><![CDATA[null@example.com (GD)]]></author>
			<pubDate>Tue, 08 May 2018 16:18:32 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50453/#p50453</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50451/#p50451</link>
			<description><![CDATA[<p>Ok All - coming back to this topic. I have built a very simple system to test - Logic here:<br /><a href="https://postimg.cc/image/n13ck30tz/"><span class="postimg"><img src="https://s7.postimg.cc/n13ck30tz/Simpletest.jpg" alt="https://s7.postimg.cc/n13ck30tz/Simpletest.jpg" /></span></a></p><p>And I have run this on live demo test (Global prime is my broker - I&#039;m running the EA on a i7 4980 - 32gb Dedicated server based in NY - 1.5ms ping to my broker) for the last few months. I have just pulled up the data / reloaded new data into FSB and done a comparison... This is my findings:</p><p><a href="https://postimg.cc/image/8jaqphr3b/"><span class="postimg"><img src="https://s7.postimg.cc/8jaqphr3b/MT4_VSFSB.jpg" alt="https://s7.postimg.cc/8jaqphr3b/MT4_VSFSB.jpg" /></span></a></p><br /><p>As you can see - most of the time it executes correctly - minus some slippage and time setting differences (??).&nbsp; Where I get a bit confused is where I have marked exit issues. I&#039;m not really sure what is going on here.&nbsp; When i pull up the chart in FSB:</p><br /><br /><p><a href="https://postimg.cc/image/qbwaxgvhz/"><span class="postimg"><img src="https://s7.postimg.cc/qbwaxgvhz/1604_FSB.jpg" alt="https://s7.postimg.cc/qbwaxgvhz/1604_FSB.jpg" /></span></a></p><p>And then compare with MT4:</p><p><a href="https://postimg.cc/image/aqezdmm5j/"><span class="postimg"><img src="https://s7.postimg.cc/aqezdmm5j/1604_MT4.jpg" alt="https://s7.postimg.cc/aqezdmm5j/1604_MT4.jpg" /></span></a></p><p>To my eyes it looks similar.&nbsp; So at this stage - I&#039;m not really sure why there is a different in execution.&nbsp; Either MT4 is missing trades (could be) or FSB is somehow taking trades when it shouldnt (unlikely).&nbsp; I&#039;m not at a definitive root cause for different at this stage (probably sleep on it - and maybe think of a better test to try uncover the difference)</p><p>if you want the EA file / FSB file or raw data to look at - please let me know (PM).. Happy to share.</p>]]></description>
			<author><![CDATA[null@example.com (DoCZero)]]></author>
			<pubDate>Tue, 08 May 2018 15:36:42 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50451/#p50451</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/50317/#p50317</link>
			<description><![CDATA[<p>A portfolio EA does use a single time frame.&nbsp; Also, one of the more unique features of FSBPro and EA Studio is their ability to generate collections of strategies that are then converted into a single, portfolio EA *.ex4. </p><p>Others prefer to create a single, <strong>perfect</strong> strategy and stick with it.&nbsp; However, creating a single perfect strategy is easier said than done.&nbsp; Using a portfolio EA that contains many strategies relieves you of having to create a single, perfect strategy.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 24 Apr 2018 16:28:56 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/50317/#p50317</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/49793/#p49793</link>
			<description><![CDATA[<p>For those who are interested, there is an updated version of Portfolio Maker.&nbsp; This new version *does* use OnTimer in place of OnTick.&nbsp; Here is a link:<br />http://nutsaboutnets-downloads.s3.amazonaws.com/PortfolioMaker_Setup.exe</p><p>For a brief explanation why I now prefer OnTimer, please refer to the FAQ &quot;OnTick versus OnTimer Events -- which works better for portfolio EAs?&quot; on the following link:<br />http://mt4tracker.com/faq/</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Mon, 26 Mar 2018 03:13:32 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/49793/#p49793</guid>
		</item>
		<item>
			<title><![CDATA[Re: MT4 Charts Do Not Trade Equally]]></title>
			<link>https://forexsb.com/forum/post/48889/#p48889</link>
			<description><![CDATA[<p>Hi Steve, </p><p>Im currently travelling in China and wont resume testing for 1 week. If its ok , share with me the private build and i&#039;ll use that for my next batch of testing (that way its semi controlled - and my own coding with ontimer wont get in the way <img src="https://forexsb.com/forum/img/smilies/wink.png" width="15" height="15" alt="wink" />&nbsp; )</p><p>PT</p>]]></description>
			<author><![CDATA[null@example.com (DoCZero)]]></author>
			<pubDate>Mon, 22 Jan 2018 01:19:03 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/48889/#p48889</guid>
		</item>
	</channel>
</rss>
