<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Data import - Exclude Weekend Data]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/6525/" />
	<updated>2017-02-18T11:48:40Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/6525/data-import-exclude-weekend-data/</id>
		<entry>
			<title type="html"><![CDATA[Re: Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41778/#p41778" />
			<content type="html"><![CDATA[<p>As I&#039;m working with 8 pairs, I need similar and same length datasets for proper evaluation and scenarios. That&#039;s why I went to duka data. Additionally, I can set up a bit higher spread with imported data, that way I make the test a bit harder.</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-02-18T11:48:40Z</updated>
			<id>https://forexsb.com/forum/post/41778/#p41778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41775/#p41775" />
			<content type="html"><![CDATA[<p>Thanks.....!</p><p>So far, I have been using broker data (MT5).</p><p>Is there some reason why you have use dukas data instead of your broker.&nbsp; Did you do some testing to see a benefit?</p><p>I have the script set to 100,000 bars.....</p><p>The data supplied by EA Studio is much less as Popov has tried to get quality data only.</p><p>I am kinda mixed up as to which to use.... broker data with errors or clean data supplied or. dukas. LOLOL</p><p>Lately I have been using the supplied data and been having good luck using the strategies.. of course, that could change as the weeks pass.</p><p>Opinion?</p><br /><p>(I am running two copies to generate new strategies..... and a third to try to improve on the best strategies generated, like copying the generated strategy into the third copiy and adding a couple indicators to see if I can generate better quality metrics..... sorta tedious but getting some good results for very little effort because EA Studio is so powerful.)</p>]]></content>
			<author>
				<name><![CDATA[Blaiserboy]]></name>
				<uri>https://forexsb.com/forum/user/2491/</uri>
			</author>
			<updated>2017-02-18T01:23:12Z</updated>
			<id>https://forexsb.com/forum/post/41775/#p41775</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41747/#p41747" />
			<content type="html"><![CDATA[<p>Yeah, dukas has weekends marked, very annoying. With this script no weekend bars.</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-02-16T19:22:28Z</updated>
			<id>https://forexsb.com/forum/post/41747/#p41747</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41743/#p41743" />
			<content type="html"><![CDATA[<p>Do you use that when downloading from Dukas?</p>]]></content>
			<author>
				<name><![CDATA[Blaiserboy]]></name>
				<uri>https://forexsb.com/forum/user/2491/</uri>
			</author>
			<updated>2017-02-16T17:45:09Z</updated>
			<id>https://forexsb.com/forum/post/41743/#p41743</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41731/#p41731" />
			<content type="html"><![CDATA[<p>It might be for useful for others as well, data import script with weekend data exclusion below.</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-02-16T10:48:41Z</updated>
			<id>https://forexsb.com/forum/post/41731/#p41731</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41730/#p41730" />
			<content type="html"><![CDATA[<p><img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /> It works! Thank you, Miroslav, you&#039;re a star!</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-02-16T10:43:35Z</updated>
			<id>https://forexsb.com/forum/post/41730/#p41730</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41721/#p41721" />
			<content type="html"><![CDATA[<p>The problem is that <strong>Time</strong> is the time of the current chart, but later you export <strong>rates</strong> ... Depending on the chart you run the script, it may happen that <strong>bars</strong> is longer than the number of bars on the current chart and Time[ i ] crashes.</p><p>The solution is simple - replace Time with rates[ i ].time:</p><div class="codebox"><pre><code>    for (int i = bars - 1; i &gt;= 0; i--)
    {
        int dayOfWeek = TimeDayOfWeek(rates[i].time);
        if (dayOfWeek &gt; SUNDAY &amp;&amp; dayOfWeek &lt; SATURDAY)
        {
            StringAdd(time,   IntegerToString((rates[i].time - millennium) / 60) + &quot;,&quot;);
            StringAdd(open,   IntegerToString((int) MathRound(rates[i].open  * multiplier)) + &quot;,&quot;);
            StringAdd(high,   IntegerToString((int) MathRound(rates[i].high  * multiplier)) + &quot;,&quot;);
            StringAdd(low,    IntegerToString((int) MathRound(rates[i].low   * multiplier)) + &quot;,&quot;);
            StringAdd(close,  IntegerToString((int) MathRound(rates[i].close * multiplier)) + &quot;,&quot;);
            StringAdd(volume, IntegerToString(rates[i].tick_volume) + &quot;,&quot;);
        }    
    }</code></pre></div><p>..</p><p>and replacing the negation != with &gt; &lt; <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2017-02-16T04:45:15Z</updated>
			<id>https://forexsb.com/forum/post/41721/#p41721</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Data import - Exclude Weekend Data]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/41713/#p41713" />
			<content type="html"><![CDATA[<p>I modified the script to remove Saturday and Sunday candles.</p><div class="codebox"><pre><code>for (int i = bars - 1; i &gt;= 0; i--)
    {
        if (TimeDayOfWeek(Time[i]) != 0 &amp;&amp; TimeDayOfWeek(Time[i]) != 6)
        {
           StringAdd(time,   IntegerToString((rates[i].time - millennium) / 60) + &quot;,&quot;);
           StringAdd(open,   IntegerToString((int) MathRound(rates[i].open  * multiplier)) + &quot;,&quot;);
           StringAdd(high,   IntegerToString((int) MathRound(rates[i].high  * multiplier)) + &quot;,&quot;);
           StringAdd(low,    IntegerToString((int) MathRound(rates[i].low   * multiplier)) + &quot;,&quot;);
           StringAdd(close,  IntegerToString((int) MathRound(rates[i].close * multiplier)) + &quot;,&quot;);
           StringAdd(volume, IntegerToString(rates[i].tick_volume) + &quot;,&quot;);
        }
    }</code></pre></div><p>Everything worked well!</p><p>Today I decided to update my data and now the script has stopped working, giving me array out of range error for that if-statement.</p><p>Only change was MT update, did it mess up the script behaviour?</p>]]></content>
			<author>
				<name><![CDATA[footon]]></name>
				<uri>https://forexsb.com/forum/user/1242/</uri>
			</author>
			<updated>2017-02-16T01:10:15Z</updated>
			<id>https://forexsb.com/forum/post/41713/#p41713</id>
		</entry>
</feed>
