Historical IQBy:MasterTonyTA
---
**Historical IQ— Track % Bull/Bear to gauge Historical Context of moves**
This indicator measures the historical reliability of key percentage levels derived from pivot highs and pivot lows. Rather than simply drawing support and resistance zones, it scores each level based on what price actually did when it arrived there — giving you a data-driven read on whether a level is worth trading or fading. CUSTOM PICK A % MOVE TO SEE HOW PRICE AS REACTED AT THAT %
---
**HOW IT'S CALCULATED**
The indicator operates in one of two modes — Bear or Bull — never both at once, keeping the chart clean and the analysis focused.
**Bear Mode (Pivot High → -N%)**
Every confirmed pivot high is identified using a configurable left/right bar lookback. From that pivot, a horizontal band is drawn at your chosen percentage below it — for example, -10% — with an adjustable tolerance creating a band rather than a single line. Once price enters a new pivot's range the previous band is closed off and locked for historical scoring.
On the final bar, every historical band is scanned bar by bar across its entire time window. Each band falls into one of three outcomes: price reached the band and closed above it (held as support — painted gold), price reached the band and closed below it (broke through — painted red), or price never reached the band at all (untouched — painted red but excluded from scoring).
**Bull Mode (Pivot Low → +N%)**
The same logic runs in reverse. Every confirmed pivot low generates a band at your chosen percentage above it. The three outcomes become: price reached the band and stalled without closing above it (resistance held — gold), price reached the band and closed above it (broke through — painted green), or price never reached the band (untouched — excluded from scoring).
**The Scoring**
Only bands that price actually tested are included in the stats. Untouched bands are deliberately excluded because a level that was never reached tells you nothing about whether it would have held. The gold hit rate is therefore a pure measure — out of every time price came to this level, how often did it respect it?
---
**HOW TO READ THE TABLE**
The stats table sits top-right and updates on every bar. It shows:
**🟡 Gold (held/stalled)** — the number of historical bands where price tested the level and respected it. In Bear mode this means closed above; in Bull mode this means stalled without closing above.
**🔴 Broke through / 🟢 Broke through** — the number of times price tested the level and pushed straight through. These are the failures.
**Times tested** — gold plus broke. This is the denominator for all calculations. Untouched bands are not included here.
**○ Not yet reached** — shown for context only. These bands exist on the chart but have no vote in the ratio since price never arrived.
**🎯 Gold hit rate** — the headline number. This is gold divided by times tested, expressed as a percentage. A reading above 60% lights up gold. Below 60% it turns red. This is the number to watch.
**Gold : Broke ratio** — the same relationship expressed as a simplified ratio. A 3:1 ratio means for every three times the level held, it broke once.
**Reading** — a plain-language verdict based on the gold hit rate:
- 70% and above → Strong support / Strong resistance
- 50–69% → Moderate support / Moderate resistance
- 30–49% → Weak support / Weak resistance
- Below 30% → Unreliable
---
**HOW TO USE IT** FIND HISTORICAL % AND WHAT HAPPENED TO SEE THE IMPLICATIONS OF MOVES
**Dialing in your target** — start by choosing a percentage that is meaningful for the asset you are trading. Volatile assets like crypto may show more meaningful clusters around larger moves such as 15–20%. Blue chip equities or indices often show cleaner structure at 8–12%. The goal is to find the percentage where the gold hit rate is consistently above 60% across history — that tells you the market has a genuine memory of that level.
**Using the tolerance** — the band width setting controls how precise price needs to be to count as a test. A tighter tolerance like 0.2% gives you a sharper level but fewer touches. A wider tolerance like 1% captures more wicks and approaches but may dilute the quality signal. Start tight and widen only if you are seeing very few tests.
**Bear mode use case** — after a significant high has formed and the market is declining, the gold bands ahead of price show levels where the market has historically found buyers at this same percentage distance from a prior peak. A high gold hit rate at your chosen decline level is a data-backed reason to watch for a bounce or entry there rather than guessing.
**Bull mode use case** — after a significant low has formed and the market is rallying, the gold bands show levels where price has historically stalled at this percentage distance from a prior trough. A high gold hit rate is a reason to consider taking profits, tightening stops, or watching for reversal signals as price approaches.
**Pivot sensitivity** — the left and right bar inputs control how significant a pivot needs to be to qualify. Higher values require a more dominant high or low with more bars confirming on either side, producing fewer but more meaningful pivots. Lower values produce more pivots and more bands but may include minor swings that add noise.
**The live label** — the percentage shown at the current bar tells you exactly where price sits relative to the most recent pivot. When price enters a band the label turns gold as a real-time visual alert that price is at a historically significant level right now.
---
Wskaźnik Pine Script®






















