how to auto compute a distance from a peak/trough on any curve ?

 

i need to measure a distance from a peak on a custom curve


the problem is that the curve value changes with the parameters i use.

sometimes it can be from -50 to +100

or from 1.213 to 1.214 for example


so my question is : how to compute a value that would be visually the same distance from a peak, regardles of the boundaries or intrinsic value of the curve


i've thought of two ways : 

1) the actual value of the curve : but that's not very precise, also the curve value can be high but the global volatility low. And the curve can be close to 0 at one moment but we still need a positive value. So this doesn't work

2) use the maximum-mininum of the curve from the past N bars and deduce a value from there : it is better, but still not optimal : if we are in a low volatility period, the max-min value can be very low but we need still a higher value to measure from the peaks/troughs


so how can i have the perfect auto-measured distance from peaks for any curve of any value and range ? Or does it have to be manually customized each time ?


thanks


Jeff

 
With the point value you can measure price differences in terms of money. This way you can better recognize range zones (small amounts) and trends.
 
look at the ZigZag indicator. 

then apply ur proposed method 2, 
then subtract the 2. 

or look for ICWR indicatorinthis forum a postfrom 2009 I think then look at the code it was done but using Price values 

so u must make a custom function similar to iHighest iLowest etc but for your indicator values, its already there as ArrayMax and ArrayMin though 
 
Jefferson Metha:
look at the ZigZag indicator. 

then apply ur proposed method 2, 
then subtract the 2. 

or look for ICWR indicatorinthis forum a postfrom 2009 I think then look at the code it was done but using Price values 

so u must make a custom function similar to iHighest iLowest etc but for your indicator values, its already there as ArrayMax and ArrayMin though 

thanks i'll look into it


also maybe apply a MA to the max-min value ? so it doesn't "jump" from one value to another ?

Reason: