<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — EA generator data import fails with big time horizon]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/9470/" />
	<updated>2023-06-16T13:53:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/9470/ea-generator-data-import-fails-with-big-time-horizon/</id>
		<entry>
			<title type="html"><![CDATA[Re: EA generator data import fails with big time horizon]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/75298/#p75298" />
			<content type="html"><![CDATA[<p>I took a look in the code of gen.js and noticed that the program expects UTF8 encoding.<br />After changing the encoding from UTF16 to UTF8 it works.</p><p>It looks like that UTF8 encoding is neither enforced in the data export script nor in gen.js.<br />I&#039;ve modified the SaveFile function inside the data export script but not tested yet since it takes a couple of hours for the export. Maybe it&#039;s also necessary to change FILE_TXT -&gt; FILE_ANSI.</p><div class="quotebox"><blockquote><p>void SaveFile(const string fileName, const string data)<br />&nbsp; {<br />&nbsp; &nbsp;ResetLastError();<br />&nbsp; &nbsp;const int file_handle = FileOpen(fileName, FILE_WRITE | FILE_TXT,<strong> &#039;\t&#039;, CP_UTF8</strong>);<br />&nbsp; &nbsp;if(file_handle != INVALID_HANDLE)<br />&nbsp; &nbsp; &nbsp;{<br />&nbsp; &nbsp; &nbsp; FileWrite(file_handle, data);<br />&nbsp; &nbsp; &nbsp; FileClose(file_handle);<br />&nbsp; &nbsp; &nbsp;}<br />&nbsp; }</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[johannesq354]]></name>
				<uri>https://forexsb.com/forum/user/14502/</uri>
			</author>
			<updated>2023-06-16T13:53:54Z</updated>
			<id>https://forexsb.com/forum/post/75298/#p75298</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[EA generator data import fails with big time horizon]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/75270/#p75270" />
			<content type="html"><![CDATA[<p>Hello,</p><p>to describe my problem I&#039;ll talk about what I did first.<br />1. Download Data Export.mq5 from EA Studio Data tab.<br />2. Import script in Metatrader5<br />3. Apply script to EURUSD <br />4. Copy exported data in separate folder in EA generator.</p><p>When I apply the script with default settings it works with the generator.</p><p>But when I set the maximum count of bars to unlimited and the start limitation to 1989 I get the following error when I start the generator. When I import the data into EA Studio there are no errors and everything looks good.<br />Do you have any idea on how to fix this?</p><p>I don&#039;t want to compromise on the time horizon.<br />Other users have reported that they use older data than what I have.&nbsp; <br />So I don&#039;t realy understand where I did go wrong.</p><div class="quotebox"><blockquote><p>C:\Users\PC\Desktop\EA Generator&gt;node .\bin\gen.js --symbol EURUSD --period M30 --data_file = ./data/IC_Markets/EURUSD30.json<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ..:: Express Generator v2.34 ::..<br />SyntaxError: Unexpected token � in JSON at position 0<br />&nbsp; &nbsp; at JSON.parse (&lt;anonymous&gt;)<br />&nbsp; &nbsp; at Object.&lt;anonymous&gt; (C:\Users\PC\Desktop\EA Generator\bin\gen.js:59:25)<br />&nbsp; &nbsp; at Module._compile (node:internal/modules/cjs/loader:1254:14)<br />&nbsp; &nbsp; at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)<br />&nbsp; &nbsp; at Module.load (node:internal/modules/cjs/loader:1117:32)<br />&nbsp; &nbsp; at Module._load (node:internal/modules/cjs/loader:958:12)<br />&nbsp; &nbsp; at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)<br />&nbsp; &nbsp; at node:internal/main/run_main_module:23:47</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[johannesq354]]></name>
				<uri>https://forexsb.com/forum/user/14502/</uri>
			</author>
			<updated>2023-06-15T09:00:09Z</updated>
			<id>https://forexsb.com/forum/post/75270/#p75270</id>
		</entry>
</feed>
