<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forex Software — Array out of range error in exported MQ4 EA]]></title>
	<link rel="self" href="https://forexsb.com/forum/feed/atom/topic/5235/" />
	<updated>2015-03-13T09:55:05Z</updated>
	<generator>PunBB</generator>
	<id>https://forexsb.com/forum/topic/5235/array-out-of-range-error-in-exported-mq4-ea/</id>
		<entry>
			<title type="html"><![CDATA[Re: Array out of range error in exported MQ4 EA]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/28336/#p28336" />
			<content type="html"><![CDATA[<p>Great, thank you!</p><p>I&#039;ve re-loaded Indicators&#039; index, then HMA itself, and then re-generated MQL4 EA - and now it works (or at least - was placed on the chart) OK.</p>]]></content>
			<author>
				<name><![CDATA[vlad123]]></name>
				<uri>https://forexsb.com/forum/user/7056/</uri>
			</author>
			<updated>2015-03-13T09:55:05Z</updated>
			<id>https://forexsb.com/forum/post/28336/#p28336</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Array out of range error in exported MQ4 EA]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/28334/#p28334" />
			<content type="html"><![CDATA[<p>I found the problem with the repo.</p><p>When MQL code is updated in the repo, it has different file ID. However, FSB Pro updates the indicator indexes every 24 hours. If your index was updated recently and someone update the mql code of an indicator, the program will try to download the old file ID and actually will download an error html page <img src="https://forexsb.com/forum/img/smilies/sad.png" width="15" height="15" alt="sad" /> . <br />It can be fixed by reloading the indicator&#039;s index.</p><p><a href="http://postimg.org/image/qsd9vwyhl/"><span class="postimg"><img src="http://s28.postimg.org/qsd9vwyhl/screenshot_838.jpg" alt="http://s28.postimg.org/qsd9vwyhl/screenshot_838.jpg" /></span></a></p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2015-03-13T09:07:10Z</updated>
			<id>https://forexsb.com/forum/post/28334/#p28334</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Array out of range error in exported MQ4 EA]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/28332/#p28332" />
			<content type="html"><![CDATA[<p>There was a problem in the MQL code of HMA indicator - Component[1] was not initialized.<br />You can download the fixed version from the repository: <a href="http://forexsb.com/repository/repository_indicators/forex_indicator_review/140/hma-hull-moving-average">HMA: Hull Moving Average</a></p><p>Place it in <strong>C:\Program Files\Forex Strategy Builder Pro\User Files\MT4 Files\MQL\Forexsb.com\Custom</strong> folder and export your expert again.</p><p>...</p><p>There is some problem when the indicator is download from the program&#039;s Indicator Repository page. I&#039;ll try to fix it soon. Use the web Repository for now.</p><p>Thank you for the report.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2015-03-13T08:58:23Z</updated>
			<id>https://forexsb.com/forum/post/28332/#p28332</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Array out of range error in exported MQ4 EA]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/28330/#p28330" />
			<content type="html"><![CDATA[<p>Sure.<br />I&#039;ve just prepared a simple strategy with HMA and generated MQ4.<br />FSB strategy, generated MQ4 and HMA.cs are in attached archive.</p>]]></content>
			<author>
				<name><![CDATA[vlad123]]></name>
				<uri>https://forexsb.com/forum/user/7056/</uri>
			</author>
			<updated>2015-03-13T07:29:09Z</updated>
			<id>https://forexsb.com/forum/post/28330/#p28330</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Array out of range error in exported MQ4 EA]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/28329/#p28329" />
			<content type="html"><![CDATA[<p>Can you attach the strategy and/or expert?</p><p>You have to not change the expert. The issue can be in an indicator code or something other.<br />We cannot do anything to fix it without the strategy.</p>]]></content>
			<author>
				<name><![CDATA[Popov]]></name>
				<uri>https://forexsb.com/forum/user/2/</uri>
			</author>
			<updated>2015-03-13T07:17:30Z</updated>
			<id>https://forexsb.com/forum/post/28329/#p28329</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Array out of range error in exported MQ4 EA]]></title>
			<link rel="alternate" href="https://forexsb.com/forum/post/28328/#p28328" />
			<content type="html"><![CDATA[<p>Hello!</p><br /><p>At first - great progress with FSB! Its functionality, even in free mode - very impressive!</p><br /><p>But I faced with an issue - I exported FSB strategy to MQ4, but when I&#039;m trying to attach it to the MetaTrader chart - it writes &quot;Array out of range&quot; in expert&#039;s log and disappears from chart.</p><p>Line and position numbers points to the method &quot;void HMA::Calculate(DataSet &amp;dataSet)&quot;, line &quot;Component[1].Value[bar]=tempVal;&quot;. Error occurs accessing &quot;Value[bar]&quot;.</p><p>I&#039;ve inserted some debug lines before this line, and here are some details:<br />- Accessing Component[1], ArraySize(Component)=10<br />- Assigning Component[1].Value[4], ArraySize(Component[1].Value)=0</p><p>I found that there are two lines in the original HMA.cs:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component = new IndicatorComp[2];<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Component[1] = new IndicatorComp {Value = new double[Bars]};<br />but there is nothing similar/corresponding in generated MQ4.</p><br /><p>Any idea - how to fix this?<br />In general - generated MQ4 doesn&#039;t look as one-to-one replica of initial CS, so I&#039;m afraid to make manual changes to MQ4.</p>]]></content>
			<author>
				<name><![CDATA[vlad123]]></name>
				<uri>https://forexsb.com/forum/user/7056/</uri>
			</author>
			<updated>2015-03-13T07:15:46Z</updated>
			<id>https://forexsb.com/forum/post/28328/#p28328</id>
		</entry>
</feed>
