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.