DYO: Narrow Range 7 bars


Q:  Thank you for building the DYO Candle body vs. True Range.   I have another request.  Would it be possible to build a DYO that would identify NR7 bars?  I know it is available in the Donchain Channel Study; however I am unable to use it in an alert.  The NR7 marker would be much more flexible if it was in a DYO.   Thanks Howard for all your tireless work.

A:  This is a solution using a DYO.

Lines A through F find the ranges of the 6 prior bars and stores these range values in consecutive Global Variables [1]..[6].  Line G finds the smallest value in this set of 6 values and stores this smallest value in GV[7].   Line H compares the smallest value with the current bar's Range, and marks the current bar with the chevron marker when its range is smaller.

Last modified 8/8/08 11:41 AM