KD

Construction

 * H [p] (i) = max (P(j), j=i-p, i-p+1, ..., i)
 * L [p] (i) = min (P(j), j=i-p, i-p+1, ..., i)


 * K (i) = 100% * [ (P(i) - L [p] (i)) / (H [p] (i) - L [p] (i) ] /* fast */
 * D (i) = 100% * [ (P(i) - L [q] (i)) / (H [q] (i) - L [q] (i) ] /* slow */


 * KD = K/D