Reversal Knockout v1.1\ Reversal Knockout v1.1 — User Manual \
Reversal Knockout is a technical indicator designed to detect potential price turning points using a dual approach: a reversal logic with bar coloring and a combined sequence of setups, countdowns, and exhaustion patterns.
\ What does this indicator do?\
\ Colors candles\ based on the relationship between two smoothed moving averages (T3).
\ Identifies overextension conditions\ based on a sequence of 9 consecutive closes aligned with price direction.
\ Confirms exhaustion\ if, after that setup, 13 follow-through conditions (countdown) are met.
\ Highlights special signals called “Knockouts”\ , which represent strong potential reversal scenarios.
\ Candle Coloring\
Candles are automatically colored to make trend and potential reversal points visually easier to interpret:
🔵 Bull Trend: User-defined color (default light blue)
🔴 Bear Trend: User-defined color (default light red)
🟡 Bullish Reversal: When price crosses below the slower average (default yellow)
🟡 Bearish Reversal: When price crosses above the slower average (default yellow)
This logic is based on the relationship between two T3 moving averages (one fast, one slow), calculated with a customizable smoothing factor.
\ Setup and Countdown Logic\
Setups (9):
A bullish setup forms if the price closes below the close from 4 bars earlier for 9 consecutive candles.
A bearish setup forms if the price closes above the close from 4 bars earlier for 9 consecutive candles.
When the ninth close is completed, a green “9” (buy) or purple “9” (sell) is displayed.
Countdowns (13):
After a setup, a follow-through phase begins.
If 13 additional conditions are met (price < low\ for buys or > high\ for sells), a purple “13” is shown, signaling potential exhaustion.
\ Knockout: Explosive Reversal Potential\
The indicator also identifies special reversal patterns called \ Knockout\ .
These signals appear when, in addition to a “9”, the price shows technical excess behavior near key support or resistance zones:
Knockout ▲ (buy): Appears below the candle when a buy signal is detected with specific downside pressure conditions.
Knockout ▼ (sell): Appears above the candle when a sell signal is detected with upside pressure conditions.
These signals stand out as high-probability reversal opportunities.
\ Usage Recommendations\
The indicator is designed to work on any timeframe, but it is recommended to use it alongside market structure and volume analysis.
“Knockout” signals may be used as high-probability trend change alerts, especially after a “13”.
Can be combined with momentum indicators and moving averages for greater effectiveness.
Análise de Tendência
SuperTrend: Silent Shadow 🕶️ SuperTrend: Silent Shadow — Operate in trend. Vanish in noise.
Overview
SuperTrend: Silent Shadow is an enhanced trend-following system designed for traders who demand clarity in volatile markets and silence during indecision.
It combines classic Supertrend logic with a proprietary ShadowTrail engine and an adaptive Silence Protocol to filter noise and highlight only the cleanest signals.
Key Features
✅ Core Supertrend Logic
Built on Average True Range (ATR), this trend engine identifies directional bias with visual clarity. Lines adjust dynamically with price action and flip when meaningful reversals occur.
✅ ShadowTrail: Stepped Counter-Barrier
ShadowTrail doesn’t predict reversals — it reinforces structure.
When price is trending, ShadowTrail forms a stepped ceiling in downtrends and a stepped floor in uptrends. This visual containment zone helps define the edges of price behavior and offers a clear visual anchor for stop-loss placement and trade containment.
✅ Silence Protocol: Adaptive Noise Filtering
During low-volatility zones, the system enters “stealth mode”:
• Trend lines turn white to indicate reduced signal quality
• Fill disappears to reduce distraction
This helps avoid choppy entries and keeps your focus sharp when the market isn’t.
✅ Visual Support & Stop-Loss Utility
When trendlines flatten or pause, they naturally highlight price memory zones. These flat sections often align with:
• Logical stop-loss levels
• Prior support/resistance areas
• Zones of reduced volatility where price recharges or rejects
✅ Custom Styling
Full control over line colors, width, transparency, fill visibility, and silence behavior. Tailor it to your strategy and visual preferences.
How to Use
• Use Supertrend color to determine bias — flips mark momentum shifts
• ShadowTrail mirrors the primary trend as a structural ceiling/floor
• Use flat segments of both lines to identify consolidation zones or place stops
• White lines = low-quality signal → stand by
• Combine with RSI, volume, divergence, or your favorite tools for confirmation
Recommended For:
• Traders seeking clearer trend signals
• Avoiding false entries in sideways or silent markets
• Identifying key support/resistance visually
• Structuring stops around real market containment levels
• Scalping, swing, or position trading with adaptive clarity
Built by Sherlock Macgyver
Forged for precision. Designed for silence.
When the market speaks, you listen.
When it doesn’t — you wait in the shadows.
Smart S/R ZonesThis is not your average S/R script.
It combines proximity, bounce frequency, and volume clustering to automatically identify the most reliable support and resistance zones on your chart — no guesswork needed.
How It Works:
• Scans for recent highs/lows, SMA50 & SMA200, and pivot swing points
• Ranks each potential level using a weighted scoring system:
• Proximity to current price (50%)
• Bounce Count (30%) — how many times price respected that level
• Volume Score (20%) — how much volume traded around that level
• The top support and resistance levels are plotted with:
• Clear dashed lines
• Color-filled zones
• Simple percentage distance labels
Why This Script Stands Out:
• No settings to tweak — it just works
• Helps you react faster with high-confidence levels
• Adapts to any market: crypto, forex, stocks, indexes
• Ideal for both intraday and swing trading setups
Built-in Intelligence. Clean Visuals. Zero Noise.
Advanced Candlestick Pattern Detector (12 Types)This Pine Script identifies 12 major candlestick patterns and distinguishes them based on market context (trend), especially for those with similar shapes (e.g., Hammer vs Hanging Man).
[TehThomas] - Fair Value GapsThis script is designed to automatically detect and visualize Fair Value Gaps (FVGs) on your chart in a clean, intuitive, and highly responsive way. It’s built with active traders in mind, offering both dynamic updates and customization options that help you stay focused on price action without being distracted by outdated or irrelevant information.
What Are Fair Value Gaps?
Fair Value Gaps are areas on a chart where there’s an inefficiency in price, typically formed when price moves aggressively in one direction, leaving a gap between the wicks of consecutive candles. These gaps represent imbalanced price action where not all buy or sell orders were efficiently matched. As a result, they often become magnet zones where price returns later to "fill" the imbalance before continuing in its intended direction. Many traders use them as points of interest for entries, re-entries, or anticipating reversals and consolidations.
This concept is frequently used in Smart Money and ICT-based trading models, where understanding how price seeks efficiency is crucial to anticipating future moves. When combined with concepts like liquidity, displacement, and market structure, FVGs become powerful tools for technical decision-making.
Script Features & Functionality
1. Live Updating Gaps (Dynamic Shrinking)
One of the core features of this script is its ability to track and dynamically shrink Fair Value Gaps as price trades into them. Instead of leaving a static zone on your chart, the gap will adjust in real-time, reflecting the portion that has been filled. This gives you a much more accurate picture of remaining imbalance and avoids misleading zones.
2. Automatic Cleanup After Fill
Once price fully fills an FVG, the script automatically removes it from the chart. This helps keep your workspace clean and focused only on relevant price zones. There’s no need to manually manage your gaps, everything is handled behind the scenes to reduce clutter and distraction.
3. Static Mode Option
While dynamic updating is the default, some traders may prefer to keep the original size of the gap visible even after partial fills. For that reason, the script includes a toggle to switch from live-updating (shrinking) mode to static mode. In static mode, FVGs stay fixed from the moment they are drawn, giving you a more traditional visual reference point.
4. Multi-Timeframe Support (MTF)
You can now view higher timeframe FVGs, such as those from the 1H or 4H chart, while analyzing lower timeframes like the 5-minute. This allows you to see key imbalances from broader market context without having to flip between charts. FVGs from higher timeframes will be drawn distinctly so you can differentiate them at a glance.
5. Cleaner Visualization
The script is designed with clarity in mind. All drawings are streamlined, and filled gaps are removed to maintain a minimal, distraction-free chart. This makes it easier to combine this tool with other indicators or price-action-based strategies without overloading your workspace.
6. Suitable for All Market Types
This script can be used on any asset that displays candlestick-based price action — including crypto, forex, indices, and stocks. Whether you're scalping low-timeframe setups or swing trading with a higher timeframe bias, FVGs remain a useful concept and this script adapts to your trading style.
Use Case Examples
On a 5-minute chart, display 1-hour FVGs to catch major imbalance zones during intraday trading.
Combine the FVGs with liquidity levels and inducement patterns to build ICT-style trade setups.
Use live-updating gaps to monitor in-progress fills and evaluate whether a zone still holds validity.
Set the script to static mode to perform backtesting or visual replay with historical setups.
Final Notes
Fair Value Gaps are not a standalone trading signal, but when used with market structure, liquidity, displacement, and order flow concepts, they provide high-probability trade locations that align with institutional-style trading models. This script simplifies the visualization of those zones so you can react faster, stay focused on clean setups, and eliminate unnecessary distractions.
Whether you’re trading high volatility breakouts or patiently waiting for retracements into unfilled imbalances, this tool is designed to support your edge with precision and flexibility.
___________________________________
Thanks for your support!
If you found this indicator helpful or learned something new, drop a like 👍 and leave a comment, I’d love to hear your thoughts! 🚀
Make sure to follow me for more price action insights, free indicators, and trading strategies. Let’s grow and trade smarter together! 📈
AlgoRanger Dynamic Trend Flow + Smart Buy and Sell📊 AlgoRanger Dynamic Trend Flow + Smart Buy/Sell
An Intelligent Trend Indicator with Automated Buy & Sell Signals
🔍 What This Indicator Does:
This indicator dynamically visualizes market trend direction using color-coded zones (green for bullish, red for bearish), along with automated Buy/Sell labels to guide your entry and exit points.
🟢 Green Zones = Bullish Trend
🔴 Red Zones = Bearish Trend
✅ Buy/Sell Labels = Smart signals based on momentum and trend strength
Perfect for trend-following traders looking for a clean, simple visual to assess trend direction and make confident trading decisions.
⭐ Best Used with Line Chart (Not Candlesticks)
This indicator is designed to work best with Line Charts, which emphasize price flow and trend direction without the noise of candlestick wicks.
Using it with Line Charts provides a clearer visualization of Trend Flow and smoother signal recognition.
It reduces market noise, especially on lower timeframes, improving accuracy in identifying trend changes.
🧠 How to Use:
1. Watch for Zone Colors
Green Zone = Look for Buy opportunities
Red Zone = Look for Sell opportunities
Frequent color shifts = Ranging market — use caution
2. Follow Buy/Sell Signals
Buy Signal: When the zone turns green and a Buy label appears
Sell Signal: When the zone turns red and a Sell label appears
Tip: Signals work best in trending conditions where zones hold direction consistently
⚙️ Customization & Flexibility
Adjustable smoothing and sensitivity settings (for short- or long-term trends)
Turn Buy/Sell labels on/off
Market Structure- ZigZag, Break of Structure & Order BlocksDescription:
This script is an all-in-one market structure tool designed for traders who follow price action, Smart Money Concepts (SMC), or institutional order flow. It combines Order Block detection , Break of Structure (BOS) , Internal Structure Shifts (CHoCH) , and a ZigZag swing framework to provide a clear and actionable view of market behavior.
Key Features:
Order Blocks (OB) :
-Detects Bullish (Green) and Bearish (Red) order blocks upon valid market structure shifts.
-Optional deletion of mitigated (touched) blocks to keep charts clean.
-Customizable block duration, fill color, and border color.
Break of Structure (BOS) :
-Marks BOS with horizontal dotted lines when price breaks previous swing highs/lows.
-Confirms new trends and structural shifts.
Internal Structure Shifts (CHoCH-like) :
-Detects early internal changes in direction before BOS.
-User-selectable logic: based on candle Open or High/Low.
-Plotted as small black triangle markers.
ZigZag Swings :
-Connects confirmed internal shifts with black zigzag lines.
-Visually simplifies trend structure and major swing points.
-Tracks last swing highs/lows for BOS validation.
Alerts :
-Bullish/Bearish Engulfments (OB signals)
-Internal Structure Shifts
-Bullish/Bearish Break of Structure
-OB Mitigation Events
Inputs & Settings :
-Show/Hide Bullish or Bearish Order Blocks
-Calculate internal shifts by: Open or High/Low
-Set order block fill and border colors
-Enable or disable automatic deletion of mitigated blocks
-Set duration for order block display
This tool is designed to support price action trading by visually mapping key structural changes and zones of interest directly on your chart. It is not intended to function as a standalone trading strategy , but rather as a supplementary tool to inform your own analysis and discretion.
The Ultimate Buy and Sell Indicator: Unholy Grail Edition"You see, Watson, the market is not random—it simply whispers in a code too complex for the average trader. Lucky for you, I am not average."
They searched for the Holy Grail of trading for decades—promises, false prophets, and overpriced PDFs.
But they were all looking in the wrong place.
This isn’t a relic buried in the desert.
This is the Unholy Grail — a machine-forged fusion of logic, engineering, and tactical overkill .
Built by Sherlock Macgyver , this is not a mystical object. It’s a surveillance system for trend detection, signal validation, and precision entries .
⚠️ Important: This script draws its own candles.
To see it properly, disable regular candles by turning off "Body", "Wick" and "Border" colors.
🔧 What You’re Looking At
This overlay plots confirmed Buy/Sell signals , momentum-based “watch” zones , adaptive candle coloring , SuperTrend bias detection , dual Bollinger Bands , and a moving average ribbon .
It’s not “minimalist” —it’s comprehensive .
📍 Configuring the Tool: Follow the Breadcrumbs
Every setting includes a tooltip — read them . They're not filler. They explain exactly how each feature functions so you can dial this thing in like you're tuning a surveillance rig in a Cold War bunker .
If you skip them, you're walking blind in a minefield .
🕰️ Timeframes: The Signal Sweet Spot
Each asset has a tempo . You need to find the one where signals align with clarity —not chaos .
Start with 4H or 1H —work up or down from there.
Too many fakeouts? → Higher timeframe
Too slow? → Drop to 15m or 5m —but expect more noise and adjust settings accordingly.
The signals scale with time, but you must find the rhythm that best fits your asset—and your trading lifestyle .
♻️ RSI Cycle = Signal Sensitivity
This is the heart of the system . It controls how reactive the RSI engine is.
Adjust based on noise level and how often you can actually monitor your charts.
Short cycle (14–24): More signals, more speed, more noise
Longer cycle (36–64): Smoother entries, better for swing traders
Tip: If your signals feel too jittery, increase the cycle. If they lag too much, reduce it.
📉 SuperTrend: Your Trend Bias Compass
This isn’t your average SuperTrend. It adapts with RSI overlay logic and detects market “silence” via EMA compression— turning white right before the chaos . That said, you still control its aggression.
ATR Length = how many bars to average
ATR Factor = how tight or loose it hugs price
Lower = more sensitive (more trades, more noise)
Higher = confirmation only (fewer, but stronger signals)
Tweak until it feels like a sniper rifle.
No, you won’t get it perfect on the first try.
Yes, it’s worth it.
🛠️ Modular Signals: Why Things Fire (or Don’t)
Buy/Sell entries require conditions to align. The logic is modular, and that’s on purpose.
RSI signals only fire if RSI crosses its smoothed MA outside the dead zone and a “Watch” condition is active.
SuperTrend signals can be enabled to act on crossovers, optionally ignoring the Watch filter .
Watch conditions (colored squares) act as early recon and hint at possible upcoming trades.
Background color changes are “pre-signal warnings” and will repaint . Use them as leading signals, not gospel.
Want more trades? Loosen your filters .
Want sniper entries? Lock them down .
🌈 Candles and MAs: Visual Market Structure
Candles adapt in real-time to MA structure:
Green = bullish (above both fast/slow MAs)
Yellow = indecision (between)
Red = bearish (below both)
Buy/Sell signals override candles with bright orange and fuchsia —because subtlety doesn’t win wars .
You can also enable up to 8 customizable moving averages —great for confluence , trend confirmation , or just looking like a wizard .
🧠 Pro Usage Tips (TL;DR for Smart People):
Use tooltips in the settings menu —every toggle and slider is explained
Test timeframes until signal frequency and reliability match your goals
Adjust RSI cycle to reduce noise or speed up signals based on how frequently you trade
Tweak SuperTrend factor and ATR to fit volatility on your asset
Start with visual confirmation :
• Are watch signals lining up with trend zones?
• Are backgrounds firing before price moves?
• Are candle colors agreeing with signal direction?
📣 Alerts & Integration
Alerts are available for:
Buy/Sell entries (confirmed or advanced background)
Watch signals
Full band agreement (both Bollinger bands bullish or bearish)
Use these with webhook systems , bots , or your own trade journals .
Created by Sherlock Macgyver
Because sometimes the best trade…
is knowing exactly when not to take one.
π Pi-MA Bandπ Pi-MA Band – Parametric Moving Averages with π Scaling
The π Pi-MA Band is a custom moving average indicator that applies the mathematical constant π (3.14159) as a multiplier to traditional moving average lengths, offering a unique perspective on market smoothing and trend detection.
🔍 Core Features:
Three Dynamic MAs: Includes a Fast, Slow, and Long moving average, each with customizable base lengths and types (EMA, SMA, WMA, HMA, RMA, VWMA, DEMA, TEMA).
π-Based Lengths: Each MA length is automatically scaled by π to align with cyclical and fractal market behavior.
Color Adaptive Bands:
The fast/slow band dynamically changes color based on trend direction (green when fast > slow, red when fast < slow).
A secondary fill highlights when both fast and slow MAs are positioned above or below the long-term MA, indicating strong bullish or bearish alignment.
Visual Clarity: Distinct line thickness and color coding for fast, slow, and long MAs make it easy to assess momentum and trend shifts.
Alerts: Built-in alert conditions notify you of key crossover events between the fast and slow MAs.
📈 Use Cases:
Trend Confirmation: Use the alignment of all three MAs to validate bullish or bearish market conditions.
Momentum Shift Detection: Crossover alerts help traders identify emerging trends early.
Customization: Suitable for scalpers, swing traders, and long-term investors due to adjustable lengths and MA types.
RSI Horizontal resistance levelsRSI Horizontal Resistance Levels
Purpose
This study automatically draws horizontal price rays every time the Relative Strength Index (RSI) trades inside a user‑defined band (default = 50 ± 1). The idea is to spotlight price levels that historically coincided with a specific RSI state—levels that often evolve into short‑term support or resistance as sentiment repeats.
How it works
Raw RSI – The script computes an un‑smoothed RSI of the closing price (rsiLength, default = 3).
Trigger zone – Whenever RSI falls within level ± tolerance (e.g., 49 – 51) the close price of that bar becomes a reference.
Horizontal ray – A ray (extend.right) is drawn from that close and continues indefinitely to the right, creating a live price level.
History management – Only the most recent N rays are kept (maxRays, default = 5); the oldest line is deleted automatically to avoid chart clutter.
Inputs
Name Default Description
RSI Length 3 Look‑back of the RSI calculation.
RSI Level 50 Center of the trigger zone. Common alternatives: 30, 70, custom mid‑lines.
Tolerance 1 Width of the RSI band on each side of RSI Level (set 0 for an exact hit).
Max Rays 5 Maximum number of active horizontal levels kept on screen.
Ray Color Yellow Visual color of the rays.
Ray Width 2 Thickness of the rays.
How to use it
Spot recurring reaction zones – Markets often hesitate near prices where momentum has flipped before. The rays reveal those spots automatically.
Combine with candlestick or volume cues – A level marked by this script plus a rejection wick, volume spike, or divergence can strengthen conviction.
Adapt the band –
50 ± tolerance → momentum balance line (trend pullbacks)
70 ± tolerance → overbought fade levels
30 ± tolerance → oversold bounce levels
Works on any asset or timeframe; shorter RSI periods highlight intraday rotations, longer periods capture swing pivots.
Tips & cautions
A drawn line is not a guarantee of future reversal—always validate with price action and risk management.
For high‑frequency strategies, consider lowering tolerance or increasing rsiLength to reduce noise.
You can add custom alerts on RSI crossing the band to receive push or email notifications.
Happy trading!
Moffitt Candle ClosureMoffitt Candle Closure method, wait for a closure above or below the wick of the prior opposing candle!
Asian Range + Midpoint + Liquidity Grab AlertsPlot Asian Range 12am to 08am GMT with Midpoint and Liquidity Grab Alerts
AlgoRanger Momentum + Trend - Following📘 AlgoRanger Momentum + Trend - Following
Dynamic Trend and Momentum Tracking Indicator
🔍 Overview:
This indicator combines trend direction and momentum strength using a dynamic multi-moving average ribbon (MA Ribbon). It helps traders clearly visualize both the direction and the power of price movement.
The ribbon lines automatically change color based on momentum:
🟢 Green = Bullish momentum
🔴 Red = Bearish momentum
📈 How to Use:
1. Identifying Trend Direction
When all lines are aligned upward and turn green → strong bullish trend
When all lines slope downward and turn red → strong bearish trend
2. Measuring Momentum Strength
Tight and close ribbon → weak momentum
Wide-spread ribbon → strong momentum
Frequent color flips → choppy or sideways market
3. Trading Strategy
Trend Following:
Enter Buy when the ribbon turns green and aligns upward
Enter Sell when the ribbon turns red and aligns downward
Filtering False Signals:
Avoid trading when the ribbon flips colors often or trends are flat
4. Exit Points / Take Profit
Ribbon turns green to red → Exit Buy
Ribbon turns red to green → Exit Sell
Combine with support/resistance or Supply & Demand Zones for confirmation
🧠 Pro Tips:
Combine with other AlgoRanger indicators for best results:
Use Smart Signal for auto entries
Use Supply & Demand Zones to validate price targets
Customize the ribbon speed:
Fast settings for scalping (1m, 5m charts)
Slower settings for swing trading (1h, 4h charts)
🔧 Features:
✅ Auto-color based on momentum shifts
✅ Multiple MA lines for better accuracy
✅ Works on all timeframes
✅ Combines trend and momentum in a single tool
💡 Best For:
Trend-following traders
Scalpers needing fast momentum tracking
Traders seeking signal filtering
All skill levels wanting to visualize trend strength
CME Gaps on Price chart (Xpdev)This script was published to help traders monitor market gaps on the CME and overlay them directly on the price chart.
The script works in general for any market and on any time frame.
The script allows the user to:
- Specify the CME ticket for gap searching (default is BTC1!);
- Specify the time frame for gap searching;
- Specify how the gaps should be filled;
- Identify price gaps of a custom width (Gap Width);
- Overlay on the price chart gaps found through showing red and green areas.
- Option to show label and price CME on chart with a proximity parameter
- Option to show only Bull or Bear gaps
- Option to customize color for Bull and Bear gaps
- Options for gap info label
- Option for gap filling criteria
- Option to show closer Gaps info table
- Option to show statistic info table
** WARNING **
CME data may be delayed or unavailable depending on the type of subscription or additional packages purchased for your TW profile.
CandelaCharts - Buyside & Sellside 📝 Overview
The Buyside & Sellside Liquidity Indicator is designed to identify and emphasize one of the foundational concepts within the ICT (Inner Circle Trader) trading methodology: liquidity levels.
This tool focuses on pinpointing key areas in the market where buy-side and sell-side liquidity is concentrated, providing traders with insights into potential price targets, reversal zones, and institutional order flow behavior.
By highlighting these liquidity zones, the indicator serves as a strategic aid in understanding market dynamics and enhancing decision-making in alignment with ICT principles.
📦 Features
Buyside & Sellside Liquidity
Invalidated Liquidity
Threshold
Styling
⚙️ Settings
Liquidity: Controls visibility of Bullish/Bearish Liquidity levels.
Invalidated: Displays the invalidated liquidity levels.
Levels: Controls the number of Liquidity levels that will be displayed.
Line Style: Customize the line style and width.
Threshold: Filter by swing points the Liquidity levels.
Labels: Control the Labels visibility.
⚡️ Showcase
Buyside & Sellside
Invalidated
🚨 Alerts
This script offers alert options for all signal types.
Bearish Signal
A bearish signal is generated when the price reaches a Buyside Liquidity level.
Bullish Signal
A bullish signal is generated when the price reaches a Sellside Liquidity level.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
Granger Causality Flow IndicatorGranger Causality Flow Indicator (GC Flow)
█ OVERVIEW
The Granger Causality Flow Indicator (GC Flow) attempts to quantify the potential predictive relationship between two user-selected financial instruments (Symbol X and Symbol Y). In essence, it explores whether the past values of one series (e.g., Symbol X) can help explain the current value of another series (e.g., Symbol Y) better than Y's own past values alone.
This indicator provides a "Granger Causality Score" (GC Score) for both directions (X → Y and Y → X). A higher score suggests a stronger statistical linkage where one series may lead or influence the other. The indicator visualizes this "flow" of potential influence through background colors and on-chart text.
Important Note: "Granger Causality" does not imply true economic or fundamental causation. It is a statistical concept indicating predictive power or information flow. This implementation also involves simplifications (notably, using AR(1) models) due to the complexities of full Vector Autoregression (VAR) models in Pine Script®.
█ HOW IT WORKS
The indicator's methodology is based on comparing the performance of Autoregressive (AR) models:
1. Data Preprocessing:
Fetches historical close prices for two user-defined symbols (X and Y).
Optionally applies first-order differencing (`price - price `) to the series. Differencing is a common technique to achieve a proxy for stationarity, which is an underlying assumption for Granger Causality tests. Non-stationary series can lead to spurious correlations.
2. Autoregressive (AR) Models (Simplified to AR(1)):
Due to Pine Script's current limitations for complex multivariate time series models, this indicator uses simplified AR(1) models (where the current value is predicted by its immediately preceding value).
Restricted Model (for Y → Y): Predicts the target series (e.g., Y) using only its own past value (Y ).
`Y = c_R + a_R * Y + residuals_R`
The variance of `residuals_R` (Var_R) is calculated.
Unrestricted Model (Proxy for X → Y): To test if X Granger-causes Y, the indicator examines if the past values of X (X ) can explain the residuals from the restricted model of Y.
`residuals_R = c_UR' + b_UR * X + residuals_UR`
The variance of these final `residuals_UR` (Var_UR) is calculated.
The same process is repeated to test if Y Granger-causes X.
3. Granger Causality (GC) Score Calculation:
The GC Score quantifies the improvement in prediction from adding the other series' past values. It's calculated as:
`GC Score = 1 - (Var_UR / Var_R)`
A score closer to 1 suggests that the "causing" series significantly reduces the unexplained variance of the "target" series (i.e., Var_UR is much smaller than Var_R), indicating stronger Granger causality.
A score near 0 (or capped at 0 if Var_UR >= Var_R) suggests little to no improvement in prediction.
The score is calculated over a rolling `Calculation Window`.
Pine Script® Snippet (Conceptual GC Score Logic):
// Conceptual representation of GC Score calculation
// var_R: Variance of residuals when Y is predicted by Y
// var_UR: Variance of residuals when Y's AR(1) residuals are predicted by X
score = 0.0
if var_R > 1e-9 // Avoid division by zero
score := 1.0 - (var_UR / var_R)
score := score < 0 ? 0 : score // Ensure score is not negative
4. Determining Causal Flow:
The calculated GC Scores for X → Y and Y → X are compared against a user-defined `Significance Threshold for GC Score`.
If GC_X→Y > threshold AND GC_Y→X > threshold: Bidirectional flow.
If GC_X→Y > threshold only: X → Y flow.
If GC_Y→X > threshold only: Y → X flow.
Otherwise: No significant flow.
█ HOW TO USE IT
Interpreting the Visuals:
Background Color:
Green: Indicates X → Y (Symbol 1 potentially leads Symbol 2).
Orange: Indicates Y → X (Symbol 2 potentially leads Symbol 1).
Blue: Indicates Bidirectional influence.
Gray: No significant Granger causality detected based on the threshold.
Data Window Plots: The actual GC Scores for X → Y (blue) and Y → X (red) are plotted and visible in TradingView's Data Window. A dashed gray line shows your `Significance Threshold`.
On-Chart Table (Last Bar): Displays the currently detected causal direction text (e.g., "BTCUSDT → QQQ").
Potential Applications:
Intermarket Analysis: Explore potential lead-lag relationships between different asset classes (e.g., commodities and equities, bonds and currencies).
Pair Trading Components: Identify if one component of a potential pair tends to lead the other.
Confirmation Tool: Use alongside other analyses to see if a move in one asset might foreshadow a move in another.
Considerations:
Symbol Choice: Select symbols that have a plausible economic or market relationship.
Stationarity: Granger Causality tests ideally require stationary time series. The `Use Differencing` option is a simple proxy. True stationarity testing is complex. Non-stationary data can yield misleading results.
Lag Order (p): This indicator is fixed at p=1 due to Pine Script® limitations. In rigorous analysis, selecting the optimal lag order is crucial.
Calculation Window: Shorter windows are more responsive but may be noisier. Longer windows provide smoother scores but lag more.
Significance Threshold: Adjust this based on your desired sensitivity for detecting causal links. There's no universally "correct" threshold; it depends on the context and noise level of the series.
█ INPUTS
Symbol 1 (X): The first symbol in the analysis.
Symbol 2 (Y): The second symbol (considered the target when testing X → Y).
Use Differencing: If true, applies first-order differencing to both series as a proxy for stationarity.
Calculation Window (N): Lookback period for AR model coefficient estimation and variance calculations.
Lag Order (p): Currently fixed at 1. This defines the lag used (e.g., X , Y ) in the AR models.
Significance Threshold for GC Score: A value between 0.01 and 0.99. The calculated GC Score must exceed this to be considered significant.
█ VISUALIZATION
Background Color: Dynamically changes based on the detected Granger causal flow (Green for X → Y, Orange for Y → X, Blue for Bidirectional, Gray for None).
GC Scores (Data Window):
Blue Plot: GC Score for X → Y.
Red Plot: GC Score for Y → X.
Significance Threshold Line: A dashed gray horizontal line plotted at the level of your input threshold.
On-Chart Table: Displayed on the top-right (on the last bar), showing the current causal direction text.
█ ALERTS
The indicator can generate alerts for:
Emergence of X → Y causality.
Emergence of Y → X causality.
General change or cessation of a previously detected causal relationship.
█ IMPORTANT DISCLAIMERS & LIMITATIONS
Correlation vs. Causation: Granger causality measures predictive power, not true underlying economic causation. A strong GC Score doesn't prove one asset *causes* another to move, only that its past values improve predictions.
Stationarity Assumption: While differencing is offered, it's a simplified approach. Non-stationary data can lead to spurious (false) Granger causality detection.
Model Simplification (AR(1)): This script uses AR(1) models for simplicity. Real-world relationships can involve more complex dynamics and higher lag orders. The fixed lag of p=1 is a significant constraint.
Sensitivity to Parameters: Results can be sensitive to the chosen symbols, calculation window, differencing option, and significance threshold.
No Statistical Significance Testing (p-values): This indicator uses a direct threshold on the GC Score itself, not a formal statistical test (like an F-test producing p-values) typically found in econometric software.
Use this indicator as an exploratory tool within a broader analytical framework. Do not rely on it as a standalone basis for trading decisions.
█ CREDITS & LICENSE
Author: mastertop ( Twitter: x.com )
Version: 1.0 (Released: 2025-05-08)
This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
© mastertop, 2025
Inside Bar IndicatorFind Inside Bar helps price action traders spot inside bars without having to watch the chart constantly.
EMA 9/21/50 + VWAP + MACD + RSI Pro [v7]Updated to make table update on bar close, any time frame. Removed RSI plots
200W MA Extension ZonesThis indicator is specifically designed for analyzing Bitcoin on a 1-week chart. It plots the 200-week simple moving average (SMA) and visualizes key extension zones above it (50%, 100%, and 150%) to help assess long-term valuation extremes.
The zones are color-coded to highlight potential accumulation or distribution areas:
🟦 Very Cheap
🟩 Cheap
🟨 Fair Value
🟧 Expensive
🟥 Very Expensive
These visual bands help identify when Bitcoin may be significantly undervalued or overvalued relative to its long-term trend.
⚠️ Important: Use this indicator only on the weekly time frame (1W). Applying it to daily or intraday charts will not reflect the intended valuation model.
You can adjust the extension levels and shading transparency in the settings panel for personalized analysis.
Multi-Timeframe Trend Lines📌 What This Indicator Does
This tool helps you see the direction of the market across different timeframes—all on one chart.
Imagine you're looking at the price of a stock, crypto, or any other asset. You probably know the price can move differently in the short term and the long term. This indicator draws slanted lines to show if the price is generally going up or down over different time periods—like the past 1 minute, 5 minutes, 1 hour, 1 day, or even 1 month.
These lines are colored:
Green if the price is going up (a rising trend).
Red if the price is going down (a falling trend).
You can choose which timeframes you want to see—like 5 minutes or 1 day—by ticking checkboxes.
✅ Why This Is Useful
1. Helps You See the Bigger Picture
Even if you’re trading on a short timeframe (like 5 minutes), this indicator shows you the trend in longer timeframes (like 1 hour or 1 day). This helps you avoid going against the overall direction of the market.
2. Gives You More Confidence
When several timeframes show the same direction (all lines green, for example), it gives you more confidence that the trend is strong.
3. Saves Time
Instead of switching between different charts (like going from a 1-hour chart to a daily chart), you can see all the trends right on your current chart.
4. Easier Decision Making
You can quickly decide if it’s a good idea to buy (when most lines are green) or sell (when most lines are red).
👶 Example for a Beginner
Let’s say you’re looking at a 15-minute chart and thinking of buying.
* The 15-minute line is green (short-term price is going up).
* The 1-hour line is also green (medium-term price is going up).
* The 1-day line is green too (long-term price is going up).
This is a good sign that everything is moving upward, and it may be safer to buy.
But if the 1-day line is red while the shorter ones are green, it might mean the upward move is just temporary. That’s something to be careful about.
FVG Candle HighlighterThis indicator highlights only the true Fair Value Gap (FVG) creator candle — the middle candle in a 3-bar FVG formation — with zero clutter.
🔹 Bullish FVG: Candle is colored if price gaps above the high two bars back
🔹 Bearish FVG: Candle is colored if price gaps below the low two bars back
✨ No boxes. No zones. Just pure, visual price-action accuracy.
🔧 Powered by Pine Script v6
🧠 Based on institutional-style FVG logic
🎯 Ideal for Smart Money / ICT / Order Block strategies
Ichimoku SentinelThis version of the Ichimoku Cloud features an alarm system helping you to catch entry and exit points and get warnings when you have to act to secure your profit.
Only relevant alerts will be triggered. For instance, if you're in a uptrend there will be alerts only when the Price crosses down Tenkan, not when crossing up.
Also, the frequent Tenkan-Kijun-Price-crossovers which occur when the price is hovering in the cloud will also not trigger alerts.
There is a warning alert when the price is approaching the cloud which is an early sign that the end of the trend is near.
You can define this warning distance to the cloud in the settings.
Conditions for long entry are the traditional triple:
- Price and Chikou-Sen above Cloud
- Chikou-Sen above Price
- Tenkan-Sen above Kijun-Sen
For Short Entries accordingly.
For Exit alerts you can chose between these options:
a) Price crosses Kijun (default)
b) Tenkan crosses Kijun
c) Price crosses Tenkan
Barcoloring : Green candles when above cloud (considered an uptrend), red when below (downtrend) and orange when within the warning distance from the cloud (consolidation)