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

 
RaptorUK:

Highest and Lowest during what time period ?  10 minutes, 3 days,  2 weeks ?


Recent highest and lowest ATR index...

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

 I are not familiar with English.  please understand.  

 

Sorry, but I don't understand what you mean.

int BarsToCheck=10;
double IndicatorValues[10];
Print("ATR values:");
for(int i=0;i<BarsToCheck;i++){
   IndicatorValues[i]=iATR(NULL,0,14,i);
   Print(StringConcatenate("BarIndex_",i," ATR: ",DoubleToStr(IndicatorValues[i],8)));     
}
int BarIndexHigh=ArrayMaximum(IndicatorValues);
int BarIndexLow =ArrayMinimum(IndicatorValues);  
Print(StringConcatenate("BarIndexHigh: ",BarIndexHigh,"; BarIndexLow: ",BarIndexLow,";"));
double ATRlowestbar_closeprice  = iClose(Symbol(),60, BarIndexLow);
double ATRhighestbar_closeprice = iClose(Symbol(),60, BarIndexHigh);
Print(StringConcatenate("iClose for bar with ATR value ",DoubleToStr(IndicatorValues[BarIndexHigh],8)," is: ",DoubleToStr(ATRhighestbar_closeprice,5)));
Print(StringConcatenate("iClose for bar with ATR value ",DoubleToStr(IndicatorValues[BarIndexLow],8)," is: ",DoubleToStr(ATRlowestbar_closeprice,5)));

 These are the log entries produced by Print()

11:39:27 test EURUSD,H1: ATR values:
11:39:27 test EURUSD,H1: BarIndex_0 ATR: 0.00130571
11:39:27 test EURUSD,H1: BarIndex_1 ATR: 0.00130500
11:39:27 test EURUSD,H1: BarIndex_2 ATR: 0.00121571
11:39:27 test EURUSD,H1: BarIndex_3 ATR: 0.00115714
11:39:27 test EURUSD,H1: BarIndex_4 ATR: 0.00116786
11:39:27 test EURUSD,H1: BarIndex_5 ATR: 0.00125214
11:39:27 test EURUSD,H1: BarIndex_6 ATR: 0.00149286
11:39:27 test EURUSD,H1: BarIndex_7 ATR: 0.00154500
11:39:27 test EURUSD,H1: BarIndex_8 ATR: 0.00162357
11:39:27 test EURUSD,H1: BarIndex_9 ATR: 0.00164643
11:39:27 test EURUSD,H1: BarIndexHigh: 9; BarIndexLow: 3;
11:39:27 test EURUSD,H1: iClose for bar with ATR value 0.00164643 is: 1.29538
11:39:27 test EURUSD,H1: iClose for bar with ATR value 0.00115714 is: 1.29632

 

So what is the issue here? 

 
kjwoong001:


Recent highest and lowest ATR index...

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

 I are not familiar with English.  please understand.  

"Recent" is a relative term not an absolute one . . .   what do you mean by "recent" ?
 
RaptorUK:
"Recent" is a relative term not an absolute one . . .   what do you mean by "recent" ?


oh,, sorry,,

during 1 day,,, timeframe is 1H

Can you ?

I'm looking forward for your answers :)

 
kjwoong001:


oh,, sorry,,

during 1 day,,, timeframe is 1H

Can you ?

I'm looking forward for your answers :)

During the last 24 hours ? or during the current day ?  or during the previous day ?  what about the weekend ?
 
kronin:

Sorry, but I don't understand what you mean.

 These are the log entries produced by Print()

11:39:27 test EURUSD,H1: ATR values:
11:39:27 test EURUSD,H1: BarIndex_0 ATR: 0.00130571
11:39:27 test EURUSD,H1: BarIndex_1 ATR: 0.00130500
11:39:27 test EURUSD,H1: BarIndex_2 ATR: 0.00121571
11:39:27 test EURUSD,H1: BarIndex_3 ATR: 0.00115714
11:39:27 test EURUSD,H1: BarIndex_4 ATR: 0.00116786
11:39:27 test EURUSD,H1: BarIndex_5 ATR: 0.00125214
11:39:27 test EURUSD,H1: BarIndex_6 ATR: 0.00149286
11:39:27 test EURUSD,H1: BarIndex_7 ATR: 0.00154500
11:39:27 test EURUSD,H1: BarIndex_8 ATR: 0.00162357
11:39:27 test EURUSD,H1: BarIndex_9 ATR: 0.00164643
11:39:27 test EURUSD,H1: BarIndexHigh: 9; BarIndexLow: 3;
11:39:27 test EURUSD,H1: iClose for bar with ATR value 0.00164643 is: 1.29538
11:39:27 test EURUSD,H1: iClose for bar with ATR value 0.00115714 is: 1.29632

 

So what is the issue here? 


HI, kornin..

Thank you for efforts. My english is bad... sorry,,

I would like to know open/close price of bar which have lowest/highest ATR value during 1day

unerstand me.. 

 
RaptorUK:
During the last 24 hours ? or during the current day ?  or during the previous day ?  what about the weekend ?

Thank you for efforts!! RaptorUK.
I want ,, during the last 24H.. but all is ok.

Can you ?? 

 
kjwoong001:

Thank you for efforts!! RaptorUK.
I want ,, during the last 24H.. but all is ok.

Can you ?? 

Can I what ?  write your code for you ?  yes,  but I am not going to.

What you are asking for is quite complicated as you have to account for the weekend,  on Sunday night (GMT)  some of the last 24 hours have not been traded.  If you wanted the last 24 H1 bars then that is easy and you have already been given the code by  kronin  he has asked what your problem is with his code,  you haven't answered.

 
RaptorUK:

Can I what ?  write your code for you ?  yes,  but I am not going to.

What you are asking for is quite complicated as you have to account for the weekend,  on Sunday night (GMT)  some of the last 24 hours have not been traded.  If you wanted the last 24 H1 bars then that is easy and you have already been given the code by  kronin  he has asked what your problem is with his code,  you haven't answered.


Hello, RaptorUK

I want to simple code have concept i am looking for

 I will try :) 

Again Thank you very much for your efforts!!

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

 
kjwoong001:


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

Rude ?  not at all,  your English is OK,  you just need to explain with more detail . . .