Download MetaTrader 5
To add comments, please log in or register
Do you have Mac OS? Find out how to install MetaTrader on it!
Alberto Tortella
480
Alberto Tortella 2016.06.30 12:19 

Hi all, I have this error when I load the attached indicator on a median renko chart.

incorrect start position 2365 for Array/Minum (or Array/Maximum) function

Could you help me?

Thank you!

Blahtech Limited
2833
James Cater 2016.06.30 13:35  
Alberto_jazz:


Hi all, I have this error when I load the attached indicator on a median renko chart.

incorrect start position 2365 for Array/Minum (or Array/Maximum) function

Could you help me?

Thank you!

for(i = limit-1; i >= 0; i--)


you should start your for loop from limit-1

whroeder1
13602
whroeder1 2016.06.30 14:21  
Prices[i] = iMA(NULL,0,1,0,MODE_SMA,PriceType,i);

Split it into two loops. One to fill Prices. The look back is zero.


double MaxH = Prices[ArrayMaximum(Prices,period,i)];
double MinL = Prices[ArrayMinimum(Prices,period,i)];
One for the rest. The look back is period.
Do your lookbacks correctly.
Alberto Tortella
480
Alberto Tortella 2016.07.01 11:20  
Thank you very much!
/
To add comments, please log in or register