John Kironyo
John Kironyo

Reputation: 1

Function to find common high or low prices for a number of candles

Normally we use the function (iHigh) or (iLow) to find the highest or lowest price of a certain candle. My question is, is there a way or function i can use to find a common price shared by a number of candles..lets say 10 previous candles...and use the returned values to draw a line of support or resistance

Upvotes: 0

Views: 887

Answers (1)

PaulB
PaulB

Reputation: 1403

You can find the highest high or the lowest low of a series of candles using iHighest() and iLowest(). An example would be:

int index=iHighest(NULL,0,MODE_HIGH,20,4);
double highest=iHigh(NULL,0,index);

This example would find the highest high of the candles from bar 4 to 23.

Upvotes: 0

Related Questions