Indicator identifying "impulse-candles"

 

I have just scimmed hundreds of indicators in the codebase without result.

I need to identify candles closing in the extreme 20% of the candle's range (high-low).

Example: CandleHigh = 1.3400 CandleLow = 1.3300 - The indy should mark the candle if close is > 1.3380 OR if close is <1.3320

I'm sure its a simple task for the skilled coders in this magnificent forum :)

Thank you in advance!

Finn

 
finnsol:
I need to identify candles closing in the extreme 20% of the candle's range (high-low).
double  H = High[i],    L = Low[i],     range = H-L;
if ( Close[i] >= H - 0.20*range){ ...   // top 20%
 
WHRoeder:


Hi WH,

Thank you for the reply - I did hope for a compiled indicator, but see your codeidea.

Guess I have to learn programming...

Kind regards and thanks again.

 
No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.
 
WHRoeder:
No Slaves here, learn to code or pay someone. We're not going to code it FOR you. We are willing to HELP you.

Got it - thanks for making the point!
Reason: