Smart NR2-NR20 and Inside Bar (Zeiierman)█ Overview
Smart NR2–NR20 + Inside Bar (Zeiierman) is a compression + breakout scanner that searches for the tightest Narrow Range (NR) condition across NR2…NR20, plus optional Inside Bar detection. When a valid compression forms, it draws a box around the setup, projects the high/low levels forward, and triggers on the first breakout. Optional Trend Filter logic can restrict triggers to trend-aligned breakouts, and optional Exit markers can annotate TP / SL / Time exits after a trigger.
🔘 What It Detects
The Smart Narrow Range (NR2…NR20) script continuously checks NR lengths from 2 to 20 and selects the most extreme contraction (tightest relative range vs history) inside the current Look Back window, highlighting the strongest “compression” zones where expansion risk is building. Optionally, it can also treat an Inside Bar as a valid compression trigger.
█ How It Works
⚪ 1) Compression Scan (NR Ranking Engine)
For each bar, the script evaluates NR2…NR20:
It calculates the N-bar range (highest high − lowest low).
It compares that range to prior N-bar ranges over Look Back.
It ranks candidates by “tightness” and keeps the strongest one.
Key effect:
Higher Look Back = fewer but higher-quality compressions
Lower Look Back = more frequent compressions
⚪ 2) Adaptive Look Back (Static or ADX-Adaptive)
Look Back can be:
Static: fixed comparison window
ADX Adaptive: Look Back dynamically shifts between LB Min and LB Max depending on trend strength
Conceptually:
Higher ADX (strong trend) — shorter Look Back (more responsive)
Lower ADX (chop/range) — longer Look Back (more selective)
█ How to Use
⚪ Bullish Setup
Wait for a tight range to form
Enter on a breakout above the range high
Stop below the opposite side of the range
Target a multiple of the range size or trail with momentum
Optional: wait for a small breakout retest before entering
⚪ Bearish Setup
Wait for a tight range to form
Enter on breakout below the range low
Stop above the opposite side of the range
Target a multiple of the range size or trail with weakness
Optional: enter on breakdown retest
█ Settings
Enable Inside Bar — toggles Inside Bar detection.
Look Back (compare window) — history window used to judge contraction quality.
Enable Trend Filter — gates long/short triggers relative to Trend MA.
Show Trend MA — plots the Trend MA on chart.
Trend MA Mode — Static or NR-Adaptive (length follows Look Back × multiplier).
MA Type — EMA or RMA smoothing for the Trend MA.
NR — MA Multiplier — scales adaptive MA length from Look Back.
Static MA Length — used when Trend MA Mode is Static.
Look Back Mode — Static or ADX Adaptive.
ADX Length / ADX Low / ADX High — controls adaptive response to trend strength.
LB Min / LB Max — bounds for adaptive Look Back range.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Nr7bar
NR7 Indicator Based on Thomas Bulkowski's TheoriesThis NR7 indicator was built on the concept by Thomas Bulkowski and his ThePatternSite. NR7 is based on high to low price range (true range) that is the smallest of the prior 6 days (7 days total), when one NR7 shows, it means that today's candle body (low to high) is the narrowest of the past 7 days. Then if the current close is higher than the NR7's high, we call it a bullish breakout; and if the current close is lower than the NR7's low, we call it a bearish breakout. Regardless the direction, once the current close price goes above or below the high or low of the NR7 candle, we call it a "breakout" in this strategy. Bulkowski suggested on his website that only gave 7 calendar days (NOT trading days) for the symbol to breakout after NR7 occurs, and if the underlying asset does not breakout within 7 calendar days after one NR7 occurs, we would abandon this NR7 signal and start recounting again.
Since most securities/indexes do not trade on the weekends and have no data available, I switched 7 calendar days breakout limit to 5 trading days breakout limit, which will work on most assets. However, if you are trading cryptocurrencies or forex which have data on the weekends, feel free to add 2 more days to finish the NR7 count, all you have to do is to add "Buy6", "Buy7", "Sell6" and "Sell7" under line 11 and line 17, then add the senarioes under those "if" statements.
Every "NR7" will show up on the chart with a cross symbol and text next to it, then green arrowups show bullish signals and red arrowdowns show bearish signals. Bulkowski also added a "CPI" index on his NR7 strategy, this indicator does not include that "CPI equation" for simplicity purposes and other time frame tradings other than just weekly signals. Please like and share this script, let me know if any questions, thanks!
Indicator
Two Fractals TrendlinesThis study draws a trend line for the last two Bill Williams up-fractals and down-fractals.
Trend line break signals and alerts can optionally be added.
Indicator



