Hello folks,
I'm experimenting with an array which can give me the high of the last 6 hours.
My main question about the code below is:
Can it be written different - seems to get quite large, if I would like to have the high from the last 20 hours as an example.
Another question:
Can I use variables to that the array will calculate x bars (eg. 3, 5, 10 etc)?
Thanks. MikeFT
I'm experimenting with an array which can give me the high of the last 6 hours.
My main question about the code below is:
Can it be written different - seems to get quite large, if I would like to have the high from the last 20 hours as an example.
Another question:
Can I use variables to that the array will calculate x bars (eg. 3, 5, 10 etc)?
Thanks. MikeFT
Inserted Code
double MyArray_Prev6High[5]; MyArray_Prev24High[0]=iHigh(Symbol(),PERIOD_H1,1); MyArray_Prev24High[1]=iHigh(Symbol(),PERIOD_H1,2); MyArray_Prev24High[2]=iHigh(Symbol(),PERIOD_H1,3); MyArray_Prev24High[3]=iHigh(Symbol(),PERIOD_H1,4); MyArray_Prev24High[4]=iHigh(Symbol(),PERIOD_H1,5); Prev6High=ArrayMaximum(MyArray_Prev6High);