<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Suspend and delay signals when market is off around midnight]]></title>
		<link>https://forexsb.com/forum/topic/7979/suspend-and-delay-signals-when-market-is-off-around-midnight/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/7979/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Suspend and delay signals when market is off around midnight.]]></description>
		<lastBuildDate>Tue, 04 Jan 2022 11:34:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/67438/#p67438</link>
			<description><![CDATA[<div class="quotebox"><cite>Popov wrote:</cite><blockquote><p>Hello traders,</p><p>I want to add a fix in the EA&#039;s code to work around the problem with the brokers that suspend the trading around midnight for swap calculations.</p><p>The problem appears when we trade mostly on D1, H4, or H1 charts and the strategy has a signal at 00:00 but the market is off.</p><p>A possible solution is to &quot;remember&quot; the signals and execute it when the market is open.</p><p>We have to add some limitations for how long the signal can be delayed. </p><p>A possible workflow is:<br /> - save the signal if the market is closed<br /> - periodically check if the market is open (let&#039;s say every 15 seconds)<br /> - send the order if the market is open.<br /> - cancel the signal if the market is closed for longer than N minutes. Log a message.</p><p>I also want to have a predefined time for this procedure. Let&#039;s say:</p><br /><p>We can add these options in the EA Studio&#039;s Settings. Something like that:<br />&nbsp; [ V ] Enable signal delay on Market Closed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Expected Market Closed time start:&nbsp; 23:55<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Expected Market Closed time end:&nbsp; &nbsp;00:05<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Maximum time for signal delay in minutes: 2.0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Retry interval in seconds: 15</p><p>Please share your opinion.</p><p>If you have a working code, please share it. It will help us to come with a faster and more stable solution.</p></blockquote></div><p>did you have implemented this?</p>]]></description>
			<author><![CDATA[null@example.com (Roughey)]]></author>
			<pubDate>Tue, 04 Jan 2022 11:34:15 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/67438/#p67438</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/65270/#p65270</link>
			<description><![CDATA[<p>can we use the spread pro andicator ? do not enter a position when the spread is above the 22 for example...<br />then the position wont be open at midnight... <br />but still there is a problem and that is when you set the spread in symbol details at 22 the FSB app think that the spread is always at 22 .</p>]]></description>
			<author><![CDATA[null@example.com (dotacool)]]></author>
			<pubDate>Fri, 04 Jun 2021 17:11:03 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/65270/#p65270</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/65253/#p65253</link>
			<description><![CDATA[<p>hi <br />when i check the jornal i see that the strategy opens a long position at 00.05 but in real live acc at 00.5 opens a short is the problem is related to this topic?<br />how to solve it?</p>]]></description>
			<author><![CDATA[null@example.com (chelbeastsea)]]></author>
			<pubDate>Fri, 04 Jun 2021 08:27:36 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/65253/#p65253</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/65055/#p65055</link>
			<description><![CDATA[<div class="quotebox"><cite>Arc wrote:</cite><blockquote><p>Did this ever receive an implementation? I encountered the issue tonight where trades weren&#039;t opened during rollover</p></blockquote></div><p>I am having the same issue</p>]]></description>
			<author><![CDATA[null@example.com (lance298)]]></author>
			<pubDate>Fri, 14 May 2021 11:54:35 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/65055/#p65055</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/65020/#p65020</link>
			<description><![CDATA[<p>Did this ever receive an implementation? I encountered the issue tonight where trades weren&#039;t opened during rollover</p>]]></description>
			<author><![CDATA[null@example.com (Arc)]]></author>
			<pubDate>Tue, 11 May 2021 22:50:25 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/65020/#p65020</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/57291/#p57291</link>
			<description><![CDATA[<p>Sleep, may not work well because it effectively suspends the complete expert.</p><p>I think fo saving the signal&#039;s details and re-sending in particular time interval.</p><p>The idea of eacoder of checking the price shift is very good for the robustness of the expert.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Fri, 27 Sep 2019 18:15:51 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/57291/#p57291</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/57290/#p57290</link>
			<description><![CDATA[<p>When do you plan to implement this feature?</p><p>I think such code before all ordersend, orderclose, ordermodify can work:<br />if (Hour() == XX &amp;&amp; (Minute() &gt;= Y1 &amp;&amp; Minute()&lt;=Y2)) Sleep((Y2-Minute())*1000);<br />where market is closed at XX hours between Y1 and Y2 minutes</p>]]></description>
			<author><![CDATA[null@example.com (Finmod123)]]></author>
			<pubDate>Fri, 27 Sep 2019 17:42:48 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/57290/#p57290</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/57177/#p57177</link>
			<description><![CDATA[<p>Finally, we&#039;ve been waiting for this.</p><p>I think the best way of doing this is to add parameter MaxPriceDeviation = 0.1 which is 0.1% of the open price.<br />When the market is available again the EA will place the trade only if the entry price is within 0.1% range. Otherwise, the signal is missed.</p><br /><p>&gt; - cancel the signal if the market is closed for longer than N minutes. Log a message.</p><p>I do not think this is a good idea, especially in 2 minutes time. Markets might be closed for rollover for 20 minutes. With GBE brokers that&#039;s normal. And when the markets are back again the price might be very reasonable.</p><p>This problem of market rollover is mostly affected when trading on Daily timeframe, so there&#039;s practically no chance that the entry rules changes in 20 or even 60 minutes. So if the price is reasonable the trade should be executed.</p><br /><p>For lower timeframes, for example, M15, the chance of getting an entry at 00:00 is very small compared to trading on Daily timeframes. But it will happen indeed, so it would be wise to check if the entry rules are still met.</p><br /><p>When OrderSend receives error 132 it means market is closed and it is a possible rollover.<br />The following code confirms if it is a rollover:</p><p>if(err == 132 &amp;&amp; DayOfWeek() != 6 &amp;&amp; Hour() == 0 &amp;&amp; Minute() &lt;= 30)</p><p>Hope this helps.</p>]]></description>
			<author><![CDATA[null@example.com (eacoder)]]></author>
			<pubDate>Fri, 20 Sep 2019 13:29:21 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/57177/#p57177</guid>
		</item>
		<item>
			<title><![CDATA[Re: Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/57174/#p57174</link>
			<description><![CDATA[<p>I posed this problem years ago, now that trading is my only job I try to give advice: &quot;save the signal if the market is closed&quot; is the only answer that makes sense to me. No software corrects the swap and spread problem in the cfd and forex, as a result all the strategies become distorted. Is necessary the transition from automatic to quantitative-discretionary trading.<br />It would be better to focus on something else</p><p>Ragards</p>]]></description>
			<author><![CDATA[null@example.com (D5QM54S7)]]></author>
			<pubDate>Fri, 20 Sep 2019 11:01:44 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/57174/#p57174</guid>
		</item>
		<item>
			<title><![CDATA[Suspend and delay signals when market is off around midnight]]></title>
			<link>https://forexsb.com/forum/post/57170/#p57170</link>
			<description><![CDATA[<p>Hello traders,</p><p>I want to add a fix in the EA&#039;s code to work around the problem with the brokers that suspend the trading around midnight for swap calculations.</p><p>The problem appears when we trade mostly on D1, H4, or H1 charts and the strategy has a signal at 00:00 but the market is off.</p><p>A possible solution is to &quot;remember&quot; the signals and execute it when the market is open.</p><p>We have to add some limitations for how long the signal can be delayed. </p><p>A possible workflow is:<br /> - save the signal if the market is closed<br /> - periodically check if the market is open (let&#039;s say every 15 seconds)<br /> - send the order if the market is open.<br /> - cancel the signal if the market is closed for longer than N minutes. Log a message.</p><p>I also want to have a predefined time for this procedure. Let&#039;s say:</p><br /><p>We can add these options in the EA Studio&#039;s Settings. Something like that:<br />&nbsp; [ V ] Enable signal delay on Market Closed<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Expected Market Closed time start:&nbsp; 23:55<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Expected Market Closed time end:&nbsp; &nbsp;00:05<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Maximum time for signal delay in minutes: 2.0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Retry interval in seconds: 15</p><p>Please share your opinion.</p><p>If you have a working code, please share it. It will help us to come with a faster and more stable solution.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Fri, 20 Sep 2019 08:27:41 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/57170/#p57170</guid>
		</item>
	</channel>
</rss>
