<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Forex Software — "Array out of range"]]></title>
		<link>https://forexsb.com/forum/topic/6421/array-out-of-range/</link>
		<atom:link href="https://forexsb.com/forum/feed/rss/topic/6421/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in "Array out of range".]]></description>
		<lastBuildDate>Mon, 18 Nov 2019 06:41:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: "Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/57972/#p57972</link>
			<description><![CDATA[<p>I am having this exact same problem. I too am getting the &quot;array out of range&quot; error. Similar to the OP, the offending line of code is... </p><div class="quotebox"><blockquote><p>indCompLong.Value[bar]=0;</p></blockquote></div><p>Here is the generated code around this.</p><div class="codebox"><pre><code>void Indicator::OscillatorLogic(int firstBar,int previous,const double &amp;adIndValue[],double levelLong,
                                double levelShort,IndicatorComp &amp;indCompLong,IndicatorComp &amp;indCompShort,
                                IndicatorLogic indLogic)
  {
   double sigma=Sigma();
   firstBar=MathMax(firstBar,2);

   for(int bar=0; bar&lt;firstBar; bar++)
     {
      indCompLong.Value[bar]=0;
      indCompShort.Value[bar]=0;
     }

   switch(indLogic)
     {
      // etc.
     }
   }</code></pre></div><p>Is this a bug, or is this something I can fix?</p>]]></description>
			<author><![CDATA[null@example.com (sidmcfarland)]]></author>
			<pubDate>Mon, 18 Nov 2019 06:41:23 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/57972/#p57972</guid>
		</item>
		<item>
			<title><![CDATA[Re: "Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/47224/#p47224</link>
			<description><![CDATA[<p>Yes, everything works well, no errors.</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Mon, 23 Oct 2017 09:49:19 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/47224/#p47224</guid>
		</item>
		<item>
			<title><![CDATA[Re: "Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/47208/#p47208</link>
			<description><![CDATA[<p>Thank you very much footon for your quick reply.<br />Can you load the Strategy in open market now?<br />Can you or somebody rebuild mql4 and mql5 files for me? Because my license expired some days before update.<br />Very grateful if you can check and rebuild.</p><p>Regards,<br />Samuel.</p>]]></description>
			<author><![CDATA[null@example.com (srsantana86)]]></author>
			<pubDate>Sun, 22 Oct 2017 23:43:23 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/47208/#p47208</guid>
		</item>
		<item>
			<title><![CDATA[Re: "Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/47199/#p47199</link>
			<description><![CDATA[<p>Samuel, update your FSB to 3.8.4, everything works fine on my end. I&#039;ll check it when market opens later as well.</p>]]></description>
			<author><![CDATA[null@example.com (footon)]]></author>
			<pubDate>Sun, 22 Oct 2017 12:40:29 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/47199/#p47199</guid>
		</item>
		<item>
			<title><![CDATA[Re: "Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/47192/#p47192</link>
			<description><![CDATA[<p>Hello Popov and Team! <img src="https://forexsb.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /><br />Same error when trying to load the EA into the trade demo account.<br />Image 1.<br />We have a similar problem in the following strategy (FSB 3.8.2.0, version 46.0 code):<br />In Zip file are all files (images, xml, mql4, ex4, and log).<br />I checked the lines code cited by Popov and were already correct (lines 2538, 2973, 3239, 3574).<br />I also loaded a good amount of bars in the graph to force the history (as Image 2).<br />I believe there is something else causing the same error.<br />Very grateful if you can check.</p><p>The other EAs are working correctly, even loading a minimum amount of pre-bars between 100 and 200.<br />Thanks in advance for the great tools!</p><p>Regards,<br />Samuel.</p>]]></description>
			<author><![CDATA[null@example.com (srsantana86)]]></author>
			<pubDate>Sun, 22 Oct 2017 06:29:44 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/47192/#p47192</guid>
		</item>
		<item>
			<title><![CDATA[Re: "Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/40418/#p40418</link>
			<description><![CDATA[<p>Thank you very much Popov.</p>]]></description>
			<author><![CDATA[null@example.com (Hannes)]]></author>
			<pubDate>Mon, 19 Dec 2016 19:11:43 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/40418/#p40418</guid>
		</item>
		<item>
			<title><![CDATA[Re: "Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/40407/#p40407</link>
			<description><![CDATA[<p>Thank you for the report.</p><p>This bug is fixed in FSB Pro v 3.8.1 with EA Code v41.</p><p>Please update FSB Pro (you can download the installer and run over your previous installation) and re-export the EA.</p><p>The core of the problem is wrong firstBar calculation in the &quot;Average True Range&quot; indicator.</p><p>You can also fix the bug manually in your EA:</p><p>Change line 2746 from</p><div class="codebox"><pre><code>   int firstBar=period+period+2;</code></pre></div><p> </p><p>to</p><div class="codebox"><pre><code>   int firstBar=period+previous+2;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Popov)]]></author>
			<pubDate>Mon, 19 Dec 2016 07:49:24 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/40407/#p40407</guid>
		</item>
		<item>
			<title><![CDATA["Array out of range"]]></title>
			<link>https://forexsb.com/forum/post/40400/#p40400</link>
			<description><![CDATA[<p>As soon as I attach the following EA to a chart, it removes it instantaneously. </p><p>Screenshot: <a href="http://imgur.com/a/QFjj1">http://imgur.com/a/QFjj1</a></p><p>The log file says the following:</p><div class="quotebox"><blockquote><p>0&nbsp; &nbsp; 00:47:00.586&nbsp; &nbsp; MaxMillion USDJPY USDJPY,H1: MaxMillion USDJPY loaded.<br />0&nbsp; &nbsp; 00:47:00.598&nbsp; &nbsp; MaxMillion USDJPY USDJPY,H1: Loading data: USDJPY,H1, Minumum bars: 202...<br />1&nbsp; &nbsp; 00:47:00.599&nbsp; &nbsp; MaxMillion USDJPY USDJPY,H1: array out of range in &#039;MaxMillion USDJPY.mq4&#039; (1672,22)<br />3&nbsp; &nbsp; 00:47:00.599&nbsp; &nbsp; MaxMillion USDJPY USDJPY,H1: not initialized<br />0&nbsp; &nbsp; 00:47:00.599&nbsp; &nbsp; MaxMillion USDJPY USDJPY,H1: uninit reason 8<br />0&nbsp; &nbsp; 00:47:00.603&nbsp; &nbsp; Expert MaxMillion USDJPY USDJPY,H1: removed<br />0&nbsp; &nbsp; 00:48:34.270&nbsp; &nbsp; Expert MaxMillion USDJPY USDJPY,H1: loaded successfully</p></blockquote></div><p>The following line causes the Exception (left loop in just for context):<br /></p><div class="codebox"><pre><code>for (int bar = 0; bar &lt; firstBar; bar++)
        indComp.Value[bar] = 0; //this one</code></pre></div><p>Could anyone help me? It would be quite the pain to look into it myself, as I have no idea how FSB structures its EAs code wise.</p>]]></description>
			<author><![CDATA[null@example.com (Hannes)]]></author>
			<pubDate>Mon, 19 Dec 2016 03:17:16 +0000</pubDate>
			<guid>https://forexsb.com/forum/post/40400/#p40400</guid>
		</item>
	</channel>
</rss>
