Can someone help with adding array function or any other idea to check for highest value in last n candles for tales indicator?
I am using variables to store the value of each shift candle and calculating mathmax etc. But I want to pass a value in EA so that it will look for max/min value of n candles instead of writing mathmax for all the variable I save.
double SI(int buff,int shift){ return(iCustom(NULL,PERIOD_H4,"tales",buff,shift));} //indicator
double TalesU1=NormalizeDouble(SI(0,1),4);
double TalesU2=NormalizeDouble(SI(0,2),4);
double TalesU3=NormalizeDouble(SI(0,3),4);
double TalesU4=NormalizeDouble(SI(0,4),4);
double TalesU5=NormalizeDouble(SI(0,5),4);
double TalesU6=NormalizeDouble(SI(0,6),4);
double MaxU=NormalizeDouble((MathMax(TalesU2,TalesU3)),4);
double MaxU1=NormalizeDouble((MathMax(MaxU,TalesU4)),4);
I am using variables to store the value of each shift candle and calculating mathmax etc. But I want to pass a value in EA so that it will look for max/min value of n candles instead of writing mathmax for all the variable I save.
double SI(int buff,int shift){ return(iCustom(NULL,PERIOD_H4,"tales",buff,shift));} //indicator
double TalesU1=NormalizeDouble(SI(0,1),4);
double TalesU2=NormalizeDouble(SI(0,2),4);
double TalesU3=NormalizeDouble(SI(0,3),4);
double TalesU4=NormalizeDouble(SI(0,4),4);
double TalesU5=NormalizeDouble(SI(0,5),4);
double TalesU6=NormalizeDouble(SI(0,6),4);
double MaxU=NormalizeDouble((MathMax(TalesU2,TalesU3)),4);
double MaxU1=NormalizeDouble((MathMax(MaxU,TalesU4)),4);
Believe in your thesis and stick to the plan, don't get scared with moves