how can i find a bar which have lowest or highest indicator index? - page 3

 
kjwoong001:
 

I'm sorry if I'm rude. again I'm sorry because my bad English.

Not rude, but very unspecific...

The first example, with CI RSI, I thought as a concept to get the high/low bar index for a period of x bars. - 10 in the example.
Then I got confused by phi.nuts comment and your statement, that it does not work. Therefore I tried it with iATR. Due to the format issue (my fault) I wrongly assumed it does really not work.
So I googled for ATR calculation to get an idea on how the indicator works and is calculated (yes, I did not know that). From the calculation I found here I have seen, the indicator is not limited to 4 digits and I went back to the code snippet to find the issue.
I fixed the formating and I added some other Print() functions, I ask you where you see an issue, because I don't see it. 
Finally I spent a lot of time on it already and I am still not sure what exactly you want. At least, please tell us why the suggested snipped does not work for you? Is it because you are not looking for the high/low of the last x bars, but something where Time must be included. If so, maybe you have to ask these guys, at least as long as you don't post your own attempts to do it.

 
kjwoon001, use Google Translate (translate.google.com) or Microsoft translate (www.bing.com/translator/)
 
kjwoong001:


Recent highest and lowest ATR index...

at  Recent highest and lowest ATR index , the BAR's open/close price

Alternatively, save the index as you find the local extreme:
#define INF 0x6FFFFFFF // Not quite infinite, Jul 2029, or 1,879,048,191
double  LL=INF,  HH=0;
int    iLL,     iHH;
for (int i = 0; i < 20; i++){
   double IndicatorValue=iATR(NULL,0,14,i);
   if (IndicatorValue < LL){ LL=IndicatorValue; iLL=i; }
   if (IndicatorValue > HH){ HH=IndicatorValue; iHH=i; }
}