Narrow Range Breakout

Is there a code available to mirror Narrow Range 4 (NR4) period and Narrow Range 7 ( NR7) period?