I am having some trouble trying to identify the highest high for the last x number of candles.
I already have a for loop running to identify other Highs and Lows.
- The for loop has to work backwards from eg 10 candles to the live candle.
Any help is greatly appreciated
Thanks in advance
double highest_value =High[highest_shift];
//Or as 1 line
double highest_value =High[iHighest(Symbol(),0,MODE_HIGH,10,0)];
That is great thanks
What if I didn't want to include the live candle/bar?
gets the highest shift from bar shift 0 to and including bar shift 9, a total of 10 bars
Just change the last 0 to a 1, then you will get the highest shift of the last 10 closed bars. ie from the bar shift 1 to and including bar shift 10.
Make sure that you read the documentation and fully understand the function.
To add comments, please log in or register