<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — Problem:  IsOutOfSession always returns 'true']]></title>
		<link>https://forexsb.com/forum/topic/6806/problem-isoutofsession-always-returns-true/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/6806/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Problem:  IsOutOfSession always returns 'true'.]]></description>
		<lastBuildDate>Tue, 08 Aug 2017 20:45:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Problem:  IsOutOfSession always returns 'true']]></title>
			<link>https://forexsb.com/forum/post/45396/#p45396</link>
			<description><![CDATA[<p>Excellent -- thank you, Popov.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 Aug 2017 20:45:01 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/45396/#p45396</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem:  IsOutOfSession always returns 'true']]></title>
			<link>https://forexsb.com/forum/post/45391/#p45391</link>
			<description><![CDATA[<p>Please reload EA Studio.</p><p>You will see the Trading Session settings. After exporting the EA again, it will have the time set there.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Tue, 08 Aug 2017 19:16:53 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/45391/#p45391</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem:  IsOutOfSession always returns 'true']]></title>
			<link>https://forexsb.com/forum/post/45387/#p45387</link>
			<description><![CDATA[<p>At the beginning of the expert I see the following:</p><p>// Session time is set in seconds from 00:00<br />int sessionSundayOpen&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 7777001;<br />int sessionSundayClose&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 7777002;<br />int sessionMondayThursdayOpen&nbsp; &nbsp;= 7777003;<br />int sessionMondayThursdayClose&nbsp; = 7777004;<br />int sessionFridayOpen&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 7777005;<br />int sessionFridayClose&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 7777006;<br />bool sessionIgnoreSunday&nbsp; &nbsp; &nbsp; &nbsp; = 7777007;<br />bool sessionCloseAtSessionClose = 7777008;<br />bool sessionCloseAtFridayClose&nbsp; = 7777009;</p><p>But I&#039;m not sure what to do with these.</p><p>In my currently running EA Studio when I look under Tools / Settings it only shows Account Info.&nbsp; There is nothing about &#039;Trading Session&#039;.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 Aug 2017 18:59:45 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/45387/#p45387</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem:  IsOutOfSession always returns 'true']]></title>
			<link>https://forexsb.com/forum/post/45385/#p45385</link>
			<description><![CDATA[<p>Please see the session times and settings at the beginning of the expert.</p>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Tue, 08 Aug 2017 18:47:22 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/45385/#p45385</guid>
		</item>
		<item>
			<title><![CDATA[Re: Problem:  IsOutOfSession always returns 'true']]></title>
			<link>https://forexsb.com/forum/post/45384/#p45384</link>
			<description><![CDATA[<p>A bit more information...</p><p>In the same account I have two other Portfolio EAs running and they are doing fine.&nbsp; The other two were created a few weeks ago and their OnBar() does not include a call to IsOutOfSession().&nbsp; Only the new Portfolio EA (that I created a few days ago) checks for IsOutOfSession() and it is the only EA that doesn&#039;t trade.</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 Aug 2017 18:12:19 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/45384/#p45384</guid>
		</item>
		<item>
			<title><![CDATA[Problem:  IsOutOfSession always returns 'true']]></title>
			<link>https://forexsb.com/forum/post/45383/#p45383</link>
			<description><![CDATA[<p>I created a new EURUSD, H1,&nbsp; Portfolio Expert with nearly 100 strategies -- and it never trades.&nbsp; In the past, when I&#039;ve created similar EAs there would be between 10-30 trades per day.</p><p>I added a few Print statements to the code and it appears that IsOutOfSession() always returns &#039;true&#039;.&nbsp; IsOutOfSession() checks for &#039;weekDay&#039; and then sets &#039;skipTrade&#039; to true or false.&nbsp; In my case it appears to always get set to &#039;true&#039;.</p><div class="codebox"><pre><code>   else if(weekDay&lt;5)
     {
      int lastBarFix=sessionCloseAtSessionClose ? periodLength : 0;
      skipTrade=timeFromMidnight&lt;sessionMondayThursdayOpen || timeFromMidnight+lastBarFix&gt;sessionMondayThursdayClose;
     }</code></pre></div><p>When IsOutOfSession() returns &#039;true&#039; then it immediately returns from OnBar() and trading will never occur.&nbsp; </p><p>Is this a bug or do I have some setting that is wrong.&nbsp; Thanks...</p>]]></description>
			<author><![CDATA[null@example.com (sleytus)]]></author>
			<pubDate>Tue, 08 Aug 2017 17:32:22 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/45383/#p45383</guid>
		</item>
	</channel>
</rss>
