forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Expert Advisor Studio → Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 8

1 (edited by Roughey 2020-01-19 10:16:41)

Topic: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

Hi,

now i use Popov Datafeed. All looks nice. I have data from 2007 to 2020.

Now when i test in MT4 i get this error.

2020.01.19 10:08:29.790    2017.01.02 00:00:00  Portfolio Expert EURUSD H1 EURUSD,H1: array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

It is this line of code in Portfolio.

//+------------------------------------------------------------------+
double Close(int bar)
  {
   return Close[bar];
  }

When i change my testing data time between x and x nothing happen.

What is this and how can i resolve this.

The Close is needed in a strategie with this code.

   {
      int consecutiveBullish = 0;
      int consecutiveBearish = 0;
      double pipVal = pip * 8;

      for (int b = 1 + 2; b > 0; b--)
        {
         consecutiveBullish = Close(b) - Open(b) >= pipVal ? consecutiveBullish + 1 : 0;
         consecutiveBearish = Open(b) - Close(b) >= pipVal ? consecutiveBearish + 1 : 0;
        }

      ind2long  = consecutiveBullish >= 1;
      ind2short = consecutiveBearish >= 1;
   }

It is something with the Indicator Candle Color.

Re: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

Hello Roughey,

I'm in the Netherlands now and have only a Linux laptop with me. Please try to find a solution and post an update.

I'll be back in Bulgaria on 27th of January and will be able to make tests.

Anyway, I'll try to find time to post further updates.

Trade Safe!

Re: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

i didnt get it work.

Re: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

can someone check if have same problem with candle color indicator

Re: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

I tested an expert with Candle Color and it works fine.

Please upload your expert for further analysis. It can be another reason and we must find and fix it.

Re: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

Popov wrote:

I tested an expert with Candle Color and it works fine.

Please upload your expert for further analysis. It can be another reason and we must find and fix it.

Hi,

i have now checked a little. It must be something with Open Prices Only test and Tick data test.

When i use Tickdata test than i get the out of range error when i use open prices only it is working.

But why it is ? Can you check . Here the Ea.  Use date from 02.01.2015 - 31.01.2020

Post's attachments

Portfolio Expert EURUSD H1.mq4 244.67 kb, 6 downloads since 2020-02-16 

You don't have the permssions to download the attachments of this post.

Re: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

any idea about that?

Re: Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

I tested the attached Portfolio Expert on "every tick" and found it working fine.

https://image-holder.forexsb.com/store/portfolio-ea-tick-testing-found-ok-thumb.png

It must be something of how MT generates the ticks. Generally, you don't need to use "every tick" in MT with EA Studio experts. Please check if you have similar results when you use the "bar open" or the "control points" methods with EA Studio.

Posts: 8

Pages 1

You must login or register to post a reply

Forex Forum → Expert Advisor Studio → Array out of range in 'Portfolio Expert EURUSD H1.mq4' (592,16)

Similar topics in this forum