Granger Causality Flow IndicatorGranger Causality Flow Indicator
█ OVERVIEW
The Granger Causality Flow Indicator is a statistical analysis tool designed to identify predictive relationships between two assets (Symbol X and Symbol Y). In econometrics, "Granger Causality" does not test for actual physical causation (e.g., rain causes mud); rather, it tests for predictive causality .
This script is designed to answer a specific question for traders: "Does the past price action of Asset X provide statistically significant information about the future price of Asset Y, beyond what is already contained in the past prices of Asset Y itself?"
This tool is particularly useful for Pairs Traders , Arbitrageurs , and Macro Analysts looking to identify lead-lag relationships between correlated assets (e.g., BTC vs. ETH, NASDAQ vs. SPY, or Gold vs. Silver).
█ CONCEPTS & CALCULATIONS
To determine if Symbol X "Granger-causes" Symbol Y, this script utilizes a variance-reduction approach based on Auto-Regressive (AR) models. Due to the runtime constraints of Pine Script™, we employ an optimized proxy for the standard Granger test using an AR(1) logic (looking back 1 period).
The calculation performs a comparative test over a rolling window (Default: 50 bars):
The Restricted Model (Baseline):
We attempts to predict the current value of Y using only the previous value of Y (Auto-Regression). We measure the error of this prediction (the "Residuals") and calculate the Variance of the Restricted Model (Var_R) .
The Unrestricted Model (Proxy):
We then test if the past value of X can explain the errors made by the Restricted Model. If X contains predictive power, including it should reduce the error variance. We calculate the remaining Variance of the Unrestricted Model (Var_UR) .
The GC Score:
The script calculates a score based on the ratio of variance reduction:
Score = 1 - (Var_UR / Var_R)
If the Score is High (> 0) : It implies that including X significantly reduced the prediction error for Y. Therefore, X "Granger-causes" Y.
If the Score is Low or 0 : It implies X added no predictive value.
█ HOW TO USE
This indicator is not a simple Buy/Sell signal generator; it is a context filter for cross-asset analysis.
1. Setup
Symbol 1 (X): The potential "Leader" (e.g., BINANCE:BTCUSDT).
Symbol 2 (Y): The potential "Follower" (e.g., BINANCE:ETHUSDT).
Differencing: Enabled by default. This checks the changes in price rather than absolute price, which is crucial for statistical stationarity.
2. Interpreting the Visuals
The script changes the background color and displays a table to indicate the current flow of causality:
Green Background (X → Y): Symbol 1 is leading Symbol 2. Price moves in Symbol 1 are statistically likely to foreshadow moves in Symbol 2.
Orange Background (Y → X): Symbol 2 is leading Symbol 1. The relationship has inverted.
Blue Background (Bidirectional): Both assets are predicting each other (tight coupling or feedback loop).
Gray/No Color: No statistically significant relationship detected.
3. Trading Application
Trend Confirmation: If you trade Symbol Y, wait for the background to turn Green . This indicates that the "Leader" (Symbol X) is currently exerting predictive influence, potentially making trend-following setups on Symbol Y more reliable.
Divergence Warning: If you are trading a correlation pair and the causality breaks (turns Gray), the correlation may be weakening, signaling a higher risk of divergence.
█ SETTINGS
Symbol 1 (X) & Symbol 2 (Y): The two tickers to analyze.
Use Differencing: (Default: True) Converts prices to price-changes. Highly recommended for accurate statistical results to avoid spurious regression.
Calculation Window: The number of bars used to compute the variance and coefficients. Larger windows provide smoother, more stable signals but react slower to regime changes.
Significance Threshold: (0.01 - 0.99) The minimum variance reduction score required to trigger a causal signal.
█ DISCLAIMER
This tool provides statistical analysis of historical price data and does not guarantee future performance. Granger Causality is a measure of predictive capability, not necessarily fundamental causation. Always use appropriate risk management.
Indicators and strategies
Expert 3-EMA MTF SuiteCurrent 20 period EMA timeframe.
Other 2 20 period EMA timeframes (Options) can plot on current timeframe.
DuoBlocks — ICT Order Block DetectorDuoBlocks — ICT Order Block Detector
⚪ Overview
DuoBlocks detects bullish and bearish Order Blocks that form immediately under/over a valid Fair Value Gap. Each zone inherits its height from ATR, so the OB reflects realistic volatility instead of fixed candlestick based values. This makes the zones more adaptive, cleaner, and more faithful to ICT(Inner Circle Trader)-style OB identification.
The indicator displays only the most relevant live block — the one that price is most likely to interact with next.
⚪ Core Logic
DuoBlocks evaluates a two-bar displacement to confirm a real gap (FVG behavior). When a valid upward or downward gap forms, it captures the origin candle as the potential OB and builds the zone using:
• ATR-based height → natural volatility-scaled zone width
• Gap validation above/below price → ensures it’s a true imbalance
• ICT-style logic → the OB sits directly behind the displacement/FVG
• Adaptive time-frame filter → different gap thresholds for <1h and ≥1h charts
• Lookback limit → prevents ancient blocks from cluttering the chart
• Automatic invalidation → block dies if price breaks its boundary
Only surviving blocks remain active, giving a clean and trustworthy supply/demand map.
⚪ Block Selection Engine
When multiple OBs exist, DuoBlocks automatically picks the most relevant:
Bearish OB (supply)
• Must sit above current price
• Chooses the nearest one overhead
• If equal → prefers the newest
• Optional fallback to the closest OB if none sit above price
Bullish OB (demand)
• Must sit below current price
• Chooses the nearest underfoot OB
• If equal → prefers the newest
• Optional fallback enabled in no-OB conditions
⚪ Midline System
Each active OB can show a “midline” at its exact center:
⚪ Inputs & Controls
• ATR length
• Right-side zone extension
• Lookback depth
• Max stored OBs per side
• Optional nearest-fallback
• Toggleable midline + width control
• Custom bull/bear colors
Disclaimer
This script is for educational purposes only and is not financial advice. Trading involves risk, and you are fully responsible for your decisions and results.
ONE Clear Multi‑Timeframe Synchronization (MTS) [Sync]**Script Profile — ONE Clear Multi‑Timeframe Synchronization (MTS) (Pine v6)**
* **Purpose:** Identifies a *multi‑timeframe “ignition”* pattern—strong daily upside confirmed by the next day and aligned with weekly & monthly structure—designed for pattern recognition and research (non‑financial advice).
* **Core Signals:**
* **MTS D1 (Ignition):** Day‑1 ≥ **+7%**, **close near high** (≥95%), **volume expansion** vs 20‑day average, and **prior‑day hammer** (stabilization).
* **MTS D2 (Confirmation):** Day‑2 ≥ **+5%** to validate D1.
* **Higher‑TF Alignment:** Confirms **weekly** (close above prior week’s high or green week) and **monthly** (close above prior month’s high or green month) conditions via `request.security`.
* **Context Overlays (optional):** Pivot‑based **Support/Resistance** with **“B” breaks** (green = resistance break; red = support break) gated by a **volume oscillator** (EMA5 vs EMA10).
* **Alerts:**
* **MTS Ignition Confirmed** (D1 + D2 + hammer + weekly/monthly + volume gate)
* **Support/Resistance Broken** (with volume gate)
* **Stability Fix:** Precomputes `ta.crossover`/`ta.crossunder` **once per bar** and reuses variables in conditions to avoid inconsistent historical evaluation—*no change in strategy logic or thresholds.*
* **Typical Read:** Use D1 (low/mid/high) as reference levels; D2 confirms regime shift; green “B” after D2 suggests continuation, red “B” warns of failure.
DewaSMC — Prepare Entry + EMA AlertsA modern SMC indicator based on Market Structure Breaks (BOS/CHoCH), equipped with a Prepare Entry system, EMA confirmation, and alert signals to improve entry execution accuracy.
✨ Main Features
1. Automatic Market Structure
- Detects swing High/Low with flexible periods.
- Displays BOS ↗/↘ and CHoCH in real-time.
- Candles can be colored according to structural trend direction.
2. Prepare Entry Zone (NEW FEATURE)
Before a BOS occurs, the indicator marks a “PREPARE ENTRY” area when price approaches a structure within a certain percentage radius. Helps traders get ready early before momentum kicks in.
- PREPARE Long when price approaches a High structure.
- PREPARE Short when price approaches a Low structure.
- PREP zones disappear automatically after several candles.
3. EMA Confirmation (NEW FEATURE)
Additional confirmation to filter false breaks:
- Short EMA & long EMA to determine trend direction.
- Option to require both EMAs to be aligned or only short EMA.
- Used for both PREPARE and ENTRY signals.
4. Automatic Entry + Targets
After a valid BOS/CHoCH:
- Entry level is drawn automatically.
- SL automatically calculated using ATR.
- TP1, TP2, TP3 automatically calculated and displayed.
- Visual box: Risk Zone & Reward Zone for quick RRR visualization.
5. Ready-to-Use Alerts
- Alert for PREPARE ENTRY.
- Alert for ENTRY (BOS/CHoCH).
- Static alert messages for TradingView compatibility.
6. Trade Information Table
- When a trade is active, a table is displayed showing:
- Direction (LONG/SHORT)
- Entry
- SL
- TP1/TP2/TP3 + status
- EMA confirmation status
- Risk/Reward Ratio
- All neatly arranged according to selected position.
🎯 Use Case
This indicator is ideal for traders who use:
- Smart Money Concepts (SMC)
- Scalping & Intraday
- Breakout & Retest strategies
- Precision entries requiring multi-signal confirmation
- Traders who want PREPARE ENTRY alerts before BOS occurs
Evo Cipher Pro – 2025 + Optimized DivergencesEvo Cipher Pro – 2025 + Optimized Divergences is the flagship evolution of the Solace Cipher series, a premium TradingView indicator engineered for precision momentum trading with built-in divergence detection. Released in 2025, this all-in-one tool combines WaveTrend crossovers for high-probability green/red dot signals, strength grading for filtered entries, and advanced regular/hidden divergence scanning to spot reversals and continuations early. With optimized code for zero lag and repainting, it's perfect for crypto, forex, stocks, and futures traders seeking an edge in volatile markets. Whether scalping on 3m charts or swinging on hourly, Evo Cipher Pro delivers actionable insights with professional-grade visuals
Solace Cipher EVO Signals (with ATR TP/SL bands)Solace Cipher EVO Signals is a powerful, all-in-one TradingView indicator that delivers high-probability buy/sell signals based on advanced momentum, money flow, and trend analysis – now enhanced with automatic ATR-based Take-Profit (TP) and Stop-Loss (SL) bands for precise risk management. As the latest evolution in the Solace Cipher series, it combines WaveTrend oscillators, RSI, DBSI scoring, and divergence detection to filter out noise and highlight strong trading opportunities. Ideal for crypto, forex, stocks, and futures traders, this indicator helps you enter and exit trades with confidence, reducing emotional decision-making and boosting profitability. Released in 2025, it's designed for scalpers, day traders, and swing traders who demand accuracy and simplicity in volatile markets.
Solace EVO HUDThe Solace EVO HUD (Heads-Up Display) is a cutting-edge, all-in-one TradingView indicator that transforms your chart into a professional trading dashboard. As the pinnacle of the Solace Cipher EVO series, it combines momentum signals, trend filters, volatility bands, and multiple oscillators into a cohesive "HUD" for real-time decision-making. Designed for crypto, forex, stocks, and futures traders, it provides at-a-glance insights to spot high-probability setups without cluttering your screen. Whether you're scalping on 1-minute charts or swinging on daily, the EVO HUD delivers actionable intelligence with precision and style
Solace Evo 50 & 200 EMAOverview
The Solace Evo 50 & 200 EMA is a premium TradingView indicator designed for trend-following traders, combining the timeless simplicity of Exponential Moving Averages (EMAs) with advanced visual aids to identify market trends, crossovers, and potential entry/exit points. Built as an evolution of the Solace Cipher EVO series, this tool focuses on the 50-period and 200-period EMAs – often called the "Golden Cross" and "Death Cross" setup – to provide clear, actionable insights for stocks, crypto, forex, and more. It's ideal for beginners and pros alike, helping you stay on the right side of the market without overcomplicating your charts.
Key Features
50 & 200 EMA Lines: Plots the 50 EMA (short-term trend) and 200 EMA (long-term trend) with customizable colors and thickness. Easily toggle each line on/off for clutter-free analysis.
Golden/Death Cross Alerts & Labels: Automatically detects and labels "Golden Cross" (50 EMA crosses above 200 EMA – bullish) and "Death Cross" (50 EMA crosses below 200 EMA – bearish) with on-chart labels and built-in alerts for real-time notifications.
Background Tint for Trend Bias: Colors the chart background green when 50 EMA > 200 EMA (bullish) or red when 50 EMA < 200 EMA (bearish), giving you an instant visual cue on market direction. Toggleable for clean charts.
High Customization: Adjust EMA lengths (default 50/200), line styles, colors, and alert settings to fit your strategy. Works on any timeframe from 1-minute scalping to daily swings.
Lightweight & Efficient: No lag or repainting – uses TradingView's native ta.ema() for fast calculations. Compatible with mobile and desktop.
How It Works
This indicator leverages the classic EMA crossover strategy:
Bullish Trend: When the 50 EMA is above the 200 EMA, the market is in an uptrend. Look for buys on pullbacks.
Bearish Trend: When the 50 EMA is below the 200 EMA, the market is in a downtrend. Favor shorts.
Crossovers: The Golden Cross signals potential trend reversals to the upside (strong buy), while the Death Cross warns of downside shifts (strong sell).
Integrated with Solace EVO's core logic, it pairs perfectly with momentum oscillators for confluence trades.
HVTC 1HVTC – SMC Market Structure & Trend Indicator
HVTC is a Smart Money Concepts–based tool that helps traders visualize market structure and trend direction with clarity.
Features:
CHoCH & BOS Detection
Automatically identifies structural shifts using true SMC logic and labels them directly on the chart.
Trend Filter
Confirms bullish or bearish conditions using an internal trend system to keep trades aligned with the major direction.
EMA 25 Guide
EMA 25 acts as dynamic support/resistance, helping define momentum and bias.
Alerts (Optional)
Notify traders when CHoCH/BOS or key retests occur—ideal for those who don’t monitor charts continuously.
Use Cases:
Works for Crypto, Forex, Gold, Indices, and Stocks across all timeframes. Helps improve entries, exits, and overall market understanding based on institutional structure.
Not financial advice. Use with proper risk management.
HVTC 2HVTC – SMC Market Structure & Trend Indicator
HVTC is a Smart Money Concepts–based tool that helps traders visualize market structure and trend direction with clarity.
Features:
CHoCH & BOS Detection
Automatically identifies structural shifts using true SMC logic and labels them directly on the chart.
Trend Filter
Confirms bullish or bearish conditions using an internal trend system to keep trades aligned with the major direction.
EMA 25 Guide
EMA 25 acts as dynamic support/resistance, helping define momentum and bias.
Alerts (Optional)
Notify traders when CHoCH/BOS or key retests occur—ideal for those who don’t monitor charts continuously.
Use Cases:
Works for Crypto, Forex, Gold, Indices, and Stocks across all timeframes. Helps improve entries, exits, and overall market understanding based on institutional structure.
Not financial advice. Use with proper risk management.
W Alart Supernova Predictor [Float + Squeeze + RVOL]the script will automatically fetch the Float size of the stock you are looking at.
If the Float is Low (< 10M), it will show a "Low Float" label on the chart.
The "ROCKET" alert will ONLY fire if the stock is actually a Low Float stock. This prevents you from getting false signals on heavy stocks like Apple or Tesla.
How to read the signals on your chart
The Grey Background (The Warning):
When you see the background of the chart turn Grey, this indicates a Squeeze.
This matches the left side of your screenshot where the price was flat. It tells you: "Pay attention, energy is building up."
The Purple Line:
This is the VWAP. Generally, you only want to take long trades when the price is above this line.
The "ROCKET" Label:
This label will appear only when three things happen at once:
Price breaks the upper Bollinger Band.
Price is above VWAP.
Volume is 2.5x higher than average (you can change this number in settings).
******A Crucial Note on "False Positives"****
This script is designed to catch the start of the move. However, sometimes a stock will break out and then immediately fail (a "fake out").
To protect yourself, professional traders usually wait for the candle with the "ROCKET" signal to close, and then enter the trade only if the next candle breaks the high of that signal candle.
Demand & Supply (3 MTF) + SMC & Alerts by StockFusion 3.2Demand & Supply (3 MTF) + SMC & Alerts by StockFusion 3.2
**Overview**
Demand & Supply (3 MTF) + SMC & Alerts by StockFusion 3.2 is a multi–timeframe institutional-style trading tool that automatically detects high-quality Demand & Supply zones (3 TF), Smart Money Concepts (CHoCH & BOS), institutional volume footprints, Fair Value Gaps (FVG), and structural Premium/Discount levels. It is designed to give traders a clear HTF–MTF–LTF view, with smart alerts and a compact trend meter, so that execution can be done with more clarity and discipline.
**Description**
This indicator combines three core engines in one:
* **3× MTF Demand & Supply Zones**
* Auto-detection of RBR/DBR (DZ) and DBD/RBD (SZ) across TF-1 / TF-2 / TF-3.
* Manual / Normal / Conservative / Analysis modes for zone quality control (explosive/body ratios, ATR multipliers, volume filters).
* Dynamic zone removal on retest/mitigation (first & second-leg logic) with optional historical label retention.
* Multi-TF visibility controls (show HTF zones on LTF, LTF on HTF, etc.) and live “Nearest Zone Table” with Proximal/Distal & proximity %.
* **SMC (CHoCH, BOS, FVG, Premium/Discount)**
* Automatic CHoCH & BOS mapping with swing-based detection, visual lines and labels.
* FVG detection (bullish & bearish) with mitigation tracking, optional opacity reduction and mitigation alerts.
* Auto structure engine (HH/LL, BOS/CHoCH) with configurable lookback and line styles.
* Premium/Discount auto-fib levels (1.0/0.78/0.71/0.5/0.0) + optional “P / D” labels and 0.71 touch alerts when aligned with FVG & volume.
* **Institutional Volume, Trend Meter & Extras**
* Institutional “I/X” footprint detection with volume multipliers, significant & extreme volume spike markers + optional alerts.
* Trend Meter table for 3 higher timeframes using 50-period MAs (D/W/M by default) with quick visual up/down bias.
* 3-in-1 colored SMA/EMA pack, inside-bar detector with optional coloring and high/low lines for price action traders.
All key components are modular: you can toggle zones, SMC, institutional activity, FVG, fib structure, alerts, trend meter, and inside candles as per your trading style (intraday, swing, positional, or pure analysis).
**Disclaimer**
This indicator is for **educational and analytical purposes only** and does **not** constitute financial, investment, or trading advice. No buy/sell/hold recommendations are given, and no profitability or performance is guaranteed. Markets are risky; always do your own research, test on demo first, and consult your financial advisor if needed. By using this script, you accept that you are fully responsible for your own trading decisions and results.
gelizon ema pack (9 EMA, 21 EMA, 55 EMA, 200 SMA)This indicator plots a set of commonly used moving averages designed for trend identification, momentum confirmation, and multi-timeframe alignment. It includes three exponential moving averages (9, 21, 55) and one long-term simple moving average (200). These moving averages help traders quickly assess short-term momentum, medium-term trend structure, and overall market direction.
Included Moving Averages:
9 EMA – Fast momentum guide; useful for scalping and intraday trend continuation.
21 EMA – Medium-speed EMA that helps identify short-term trend structure.
55 EMA – Smoother trend line offering a broader view of momentum flow.
200 SMA – Widely used long-term trend benchmark for overall market bias.
Features:
Toggle each moving average on or off
Customize colors for all MAs
Clean overlay design for easy chart interpretation
This indicator is ideal for day traders, swing traders, and algorithmic setups that rely on moving-average alignment or crossover behavior to confirm trend direction and identify high-probability entries.
HTF Candle Overlay – Multi-Timeframe Visualization ToolThis indicator overlays true Higher Timeframe (HTF) candlesticks directly onto any lower timeframe chart, allowing you to see the larger market structure while trading on precise execution timeframes such as 1-minute, 3-minute, or 5-minute.
Instead of constantly switching chart timeframes, you can now see both higher and lower timeframe price action at the same time. Each HTF candle is drawn as a large transparent candlestick with full upper and lower wicks, perfectly aligned in both time and price.
This makes it easy to identify:
- Trend direction from the higher timeframe
- Key support and resistance zones inside each HTF candle
- Liquidity sweeps and rejections across timeframes
- Optimal entries on lower timeframes with higher-timeframe confirmation
Key Features
- Displays true Higher Timeframe candles on any lower timeframe
- Clear transparent candle bodies for unobstructed price visibility
- Full upper and lower wicks
- Non-repainting confirmed candles
- Optional live display of the currently forming HTF candle
- Accurate time-based alignment
- Lightweight and optimized for performance
Who This Indicator Is For
- Scalpers who want higher-timeframe bias
- Day traders using multi-timeframe confirmation
- Smart Money / ICT traders monitoring HTF structure
- Anyone who wants clean multi-timeframe clarity without chart switching
How To Use
- Apply the indicator to any chart.
- Select your preferred Higher Timeframe (HTF) in the settings.
- Use your lower timeframe for entries while respecting HTF structure and direction.
- This tool helps you trade with the bigger picture in view while executing with precision on lower timeframes.
Sai Scalper ProSai Scalper Pro – Feature Summary
Trend Engine
- ATR-based trailing stop with Fibonacci levels (61.8%, 78.6%, 88.6%)
- Auto trend detection with swing point tracking
Scalping Detection (0-10 Score)
- Analyzes 7 factors: ATR compression, ADX, Volume, Range, Consolidation, RSI, BB Squeeze
- Smart state machine with hysteresis to prevent false signals
- Adjustable sensitivity & stability settings
Cloud Modes (7 Options)
- Full Zone, Entry Zone, Premium/Discount, Fib Bands, Upper/Middle/Lower Band
Pro Dashboard
- Real-time scalp score with visual meter
- Entry quality rating & zone display
- Suggested TP/SL based on ATR
- Session detection (Sydney/Tokyo/London/NY) with overlap alerts
- 3 styles (Minimal/Pro/Full) × 4 sizes × 9 positions
Alerts
- Scalp ready, Prime conditions (8+), Optimal entry zone
- Direction-specific (Long/Short bias)
Combines trend-following Fibonacci analysis with intelligent ranging detection for optimal scalping opportunities.
VLB Entry TOOL — Dynamic Key Levels & Continuation Behavior ModThe VLB Entry Tool is a behavior-driven analysis system built specifically for XAUUSD.
It focuses on two structural elements that consistently influence gold’s movement:
1. Key Levels
2. Continuation thresholds after expansion
The indicator automatically identifies and displays key levels on the chart—levels that gold frequently reacts to through rejections, breaks, or pullbacks.
Since these levels form the foundation of most intraday movement, the tool removes the need to manually update them each session.
A core observation behind this model is that gold often breaks through a major level, retraces, and then gains continuation strength once price expands beyond the level by a predefined threshold.
This “break → pullback → continuation” behavior is used to plot objective price zones where continuation has historically shown a higher probability of developing.
Dynamic Adaptive Levels
The VLB Entry Tool continuously adjusts its key levels and continuation thresholds as market structure evolves.
As price forms new highs/lows or shifts intraday behavior, the tool automatically recalibrates to the new environment—helping traders stay aligned with real-time market structure without redrawing levels manually.
What the indicator provides:
-Automatically mapped key levels based on gold’s structural behavior
-Highlighted continuation zones after price expansion
-Real-time adaptive recalculation as market conditions change
-Objective, rules-based entry zones
-A consistent framework that reduces guesswork around “where” to enter
-A focus on price behavior rather than predictions
The VLB Entry Tool does not provide guaranteed outcomes or financial advice.
It organizes XAUUSD structure into predefined reference points using historical behavior, volatility characteristics, and a rules-based approach.
Traders remain responsible for their own timing, confirmation, fundamental context, and risk management.
This tool is designed for traders who want a structured, adaptive, and behavior-focused framework for interpreting XAUUSD movement—centered on the key levels that matter most.
SPY Flow + ORBSPY Flow is an intraday overlay indicator combining:
9/21 EMA ribbon calculated on Heikin-Ashi candles
5-minute opening range high/ low with persistent box and breakout detection
Daily VWAP (Heikin-Ashi based)
Unique behavior: master signals fire only on concurrent ORB breakout and EMA ribbon direction alignment. All other conditions are suppressed. Result is extremely low signal frequency with high alignment probability on SPY.
3EMA-8EMA Current Candle Scannerintraday scanner can also be used for short term trades, crossing above the ema high and low with volume gives signal
猛の掟・本物っぽいTradingViewスクリーナー 完全版//@version=5
indicator("猛の掟・本物っぽいTradingViewスクリーナー 完全版", overlay=false, max_labels_count=500, max_lines_count=500)
// =============================
// 入力パラメータ
// =============================
emaLenShort = input.int(5, "短期EMA", minval=1)
emaLenMid = input.int(13, "中期EMA", minval=1)
emaLenLong = input.int(26, "長期EMA", minval=1)
macdFastLen = input.int(12, "MACD Fast", minval=1)
macdSlowLen = input.int(26, "MACD Slow", minval=1)
macdSignalLen = input.int(9, "MACD Signal", minval=1)
macdZeroTh = input.float(0.2, "MACDゼロライン近辺とみなす許容値", step=0.05)
volMaLen = input.int(5, "出来高平均日数", minval=1)
volMinRatio = input.float(1.3, "出来高倍率(初動判定しきい値)", step=0.1)
volStrongRatio = input.float(1.5, "出来高倍率(本物/三点シグナル用)", step=0.1)
highLookback = input.int(60, "直近高値の参照本数", minval=10)
pullbackMin = input.float(5.0, "押し目最小 ", step=0.5)
pullbackMax = input.float(15.0, "押し目最大 ", step=0.5)
breakLookback = input.int(15, "レジブレ後とみなす本数", minval=1)
wickBodyMult = input.float(2.0, "ピンバー:下ヒゲが実体の何倍以上か", step=0.5)
// 表示設定
showPanel = input.bool(true, "下パネルにスコアを表示する")
showTable = input.bool(true, "右上に8条件チェック表を表示する")
// =============================
// 基本指標計算
// =============================
emaShort = ta.ema(close, emaLenShort)
emaMid = ta.ema(close, emaLenMid)
emaLong = ta.ema(close, emaLenLong)
= ta.macd(close, macdFastLen, macdSlowLen, macdSignalLen)
volMa = ta.sma(volume, volMaLen)
volRatio = volMa > 0 ? volume / volMa : 0.0
recentHigh = ta.highest(high, highLookback)
prevHigh = ta.highest(high , highLookback)
pullbackPct = recentHigh > 0 ? (recentHigh - close) / recentHigh * 100.0 : 0.0
// ローソク足要素
body = math.abs(close - open)
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
// =============================
// A:トレンド条件
// =============================
emaUp = emaShort > emaShort and emaMid > emaMid and emaLong > emaLong
goldenOrder = emaShort > emaMid and emaMid > emaLong
aboveEma2 = close > emaLong and close > emaLong
trendOK = emaUp and goldenOrder and aboveEma2
// =============================
// B:MACD条件
// =============================
macdGC = ta.crossover(macdLine, macdSignal)
macdNearZero = math.abs(macdLine) <= macdZeroTh
macdUp = macdLine > macdLine
macdOK = macdGC and macdNearZero and macdUp
// =============================
// C:出来高条件
// =============================
volInitOK = volRatio >= volMinRatio // 8条件用
volStrongOK = volRatio >= volStrongRatio // 三点シグナル用
volumeOK = volInitOK
// =============================
// D:ローソク足パターン
// =============================
isBullPinbar = lowerWick > wickBodyMult * body and lowerWick > upperWick and close >= open
isBullEngulf = close > open and open < close and close > open
isBigBullCross = close > emaShort and close > emaMid and open < emaShort and open < emaMid and close > open
candleOK = isBullPinbar or isBullEngulf or isBigBullCross
// =============================
// E:価格帯(押し目&レジブレ)
// =============================
pullbackOK = pullbackPct >= pullbackMin and pullbackPct <= pullbackMax
isBreakout = close > prevHigh and close <= prevHigh
barsSinceBreak = ta.barssince(isBreakout)
afterBreakZone = barsSinceBreak >= 0 and barsSinceBreak <= breakLookback
afterBreakPullbackOK = afterBreakZone and pullbackOK and close > emaShort
priceOK = pullbackOK and afterBreakPullbackOK
// =============================
// 8条件の統合
// =============================
allRulesOK = trendOK and macdOK and volumeOK and candleOK and priceOK
// =============================
// 最終三点シグナル
// =============================
longLowerWick = lowerWick > wickBodyMult * body and lowerWick > upperWick
macdGCAboveZero = ta.crossover(macdLine, macdSignal) and macdLine > 0
volumeSpike = volStrongOK
finalThreeSignal = longLowerWick and macdGCAboveZero and volumeSpike
buyConfirmed = allRulesOK and finalThreeSignal
// =====================================================
// スクリーナー用スコア(0=なし, 1=猛, 2=確)
// =====================================================
score = buyConfirmed ? 2 : (allRulesOK ? 1 : 0)
// 色分け(1行で安全な書き方)
col = score == 2 ? color.new(color.yellow, 0) : score == 1 ? color.new(color.lime, 0) : color.new(color.gray, 80)
// -----------------------------------------------------
// ① 視覚用:下パネルのカラム表示
// -----------------------------------------------------
plot(showPanel ? score : na,
title = "猛スコア(0=なし,1=猛,2=確)",
style = plot.style_columns,
color = col,
linewidth = 2)
hline(0, "なし", color=color.new(color.gray, 80))
hline(1, "猛", color=color.new(color.lime, 60))
hline(2, "確", color=color.new(color.yellow, 60))
// -----------------------------------------------------
// ② Data Window 用出力(スクリーナー風)
// -----------------------------------------------------
plot(score, title="Score_0なし1猛2確", color=color.new(color.white, 100), display=display.data_window)
plot(allRulesOK ? 1 : 0, title="A_Trend_OK", color=color.new(color.white, 100), display=display.data_window)
plot(macdOK ? 1 : 0, title="B_MACD_OK", color=color.new(color.white, 100), display=display.data_window)
plot(volumeOK ? 1 : 0, title="C_Volume_OK", color=color.new(color.white, 100), display=display.data_window)
plot(candleOK ? 1 : 0, title="D_Candle_OK", color=color.new(color.white, 100), display=display.data_window)
plot(priceOK ? 1 : 0, title="E_Price_OK", color=color.new(color.white, 100), display=display.data_window)
plot(longLowerWick ? 1 : 0, title="F_Pin下ヒゲ_OK", color=color.new(color.white, 100), display=display.data_window)
plot(macdGCAboveZero ? 1 : 0, title="G_MACDゼロ上", color=color.new(color.white, 100), display=display.data_window)
plot(volumeSpike ? 1 : 0, title="H_出来高1.5倍", color=color.new(color.white, 100), display=display.data_window)
// -----------------------------------------------------
// ③ 右上に「8条件チェック表」を表示(最終バーのみ)
// -----------------------------------------------------
var table info = table.new(position.top_right, 2, 9,
border_width = 1,
border_color = color.new(color.white, 60))
// 1行分の表示用ヘルパー
fRow(string label, bool cond, int row) =>
color bg = cond ? color.new(color.lime, 70) : color.new(color.red, 80)
string txt = cond ? "達成" : "未達"
// 左列:条件名
table.cell(info, 0, row, label, text_color = color.white, bgcolor = color.new(color.black, 0))
// 右列:結果(達成 / 未達)
table.cell(info, 1, row, txt, text_color = color.white, bgcolor = bg)
if barstate.islast and showTable
// ヘッダー(2列とも黒背景)
table.cell(info, 0, 0, "猛の掟 8条件チェック", text_color = color.white, bgcolor = color.new(color.black, 0))
table.cell(info, 1, 0, "", text_color = color.white, bgcolor = color.new(color.black, 0))
fRow("A: トレンド", trendOK, 1)
fRow("B: MACD", macdOK, 2)
fRow("C: 出来高", volumeOK, 3)
fRow("D: ローソク", candleOK, 4)
fRow("E: 押し目/レジブレ", priceOK, 5)
fRow("三点: ヒゲ", longLowerWick, 6)
fRow("三点: MACDゼロ上", macdGCAboveZero,7)
fRow("三点: 出来高1.5倍", volumeSpike, 8)
Trinity Ultimate 10 MA Ribbons)I got tired of trying to find a multi MA ribbon that could also color change and allow different types, if it exists then I could not find it... So here it is...
The **Trinity Ultimate 10 MA Ribbon** is a highly customizable, professional-grade moving average ribbon that combines extreme flexibility with beautiful visual feedback. Designed for traders who want full control without sacrificing clarity, it allows you to build a ribbon using up to ten completely independent moving averages — each with its own length, type, color, thickness, and visibility setting — while automatically coloring both the lines and the fills according to bullish or bearish conditions.
### Key Features
- Ten fully independent moving averages that can be mixed and matched exactly as you want.
- Each MA has its own selectable type: EMA (default), SMA, WMA, HMA, RMA, VWMA, or ALMA — perfect for combining fast EMAs with a slow HMA or a classic 200-period SMA.
- Every single MA line automatically changes color in real time: bright green when price is above the MA (bullish) and red when price is below the MA (bearish), making trend strength instantly visible across all timeframes.
- Smart, reactive ribbon fills that appear only between consecutive enabled MAs. Turn any MA on or off and the fills instantly adjust — no gaps, no broken bands, no manual rework.
- Nine layered fills with individually adjustable transparency (default is gradually increasing transparency from the fastest to the slowest MA), creating a smooth, depth-like ribbon effect that looks stunning on any chart background.
- Fill color itself is dynamic: green for bullish candles (close > open) and red for bearish candles, or you can customize both colors to any shade you prefer.
- Full control over every visual element: base colors, line thickness (1–10), lengths, and show/hide toggles for each of the ten MAs.
- Clean and lightweight code that compiles instantly in Pine Script v5 and works on all markets and timeframes without lag.
In short, this is the most flexible and visually informative moving-average ribbon available on TradingView today. Whether you want a classic 9-EMA ribbon, a Guppy-style multiple-timeframe setup, a hybrid EMA/HMA mix, or just three or four key levels, the indicator adapts perfectly while always telling you at a glance where the bulls and bears are in control.
Session Fibonacci Tracker with Dynamic Range FreezeSession Fibonacci Tracker with Dynamic Range Freeze
This indicator plots Fibonacci retracement and extension levels based on session high/low ranges with a unique "freeze" mechanism that locks levels during volatility and recalculates only when price returns to the established range.
How It Works:
The indicator uses a three-stage process to maintain stable Fibonacci levels:
Range Establishment: At the start of each session (default 1800 ET), the indicator tracks the session high and low. Fibonacci levels are calculated with dynamic anchoring - when price is above the session open, 0 anchors at the high with 1 at the low; when below, 0 anchors at the low with 1 at the high.
Freeze Mechanism: Once the range is established, it immediately freezes. If a candle closes outside this range, the Fibonacci levels remain locked at their current values even as new session highs or lows form. This prevents levels from constantly recalculating during trending moves.
Recalculation: The frozen range only updates when price action (high or low) touches back inside the established range. At this point, levels recalculate based on the current session high/low, then freeze again.
Key Features:
Customizable Fibonacci levels: All retracement (0.236, 0.382, 0.500, 0.618, 0.786) and extension levels (-1.0, -0.618, -0.272, 1.272, 1.618, 2.0) can be enabled/disabled and adjusted to custom values
Time-based line extension prevents historical buffer overflow errors
Works across all timeframes
Session start time fully customizable
Visual status indicator shows whether levels are frozen or active
All lines and labels are fully customizable (colors, width, labels, prices)
Use Cases:
This indicator is particularly useful for traders who want stable reference levels during volatile periods. Traditional Fibonacci tools recalculate with every new extreme, making them difficult to use as support/resistance during trends. This implementation keeps levels stable until price returns to consolidation, providing consistent reference points for entries, exits, and stop placement.
Settings:
Session Settings: Configure session start time (default 1800 ET)
Fibonacci Levels: Enable/disable and customize each retracement level value
Extension Levels: Enable/disable and customize each extension level value
Visual Settings: Adjust line extension, width, labels, and price display
Colors: Customize colors for open line, 0 level, 1 level, retracements, and extensions






















