Commodity Pulse Matrix v3 [WavesUnchained]Overview
Multi-Timeframe Confluence Indicator for Commodities. Combines 6 scoring categories across multiple timeframes with advanced entry timing and risk management.
Key Features
6-Category Scoring System
• Flow: Money flow and volume pressure
• Momentum: RSI, CCI, Rate of Change
• Trend: ADX, EMA alignment, directional movement
• Volatility: ATR-based market conditions
• Structure: Price position relative to key MAs
• Divergence: Price/indicator divergence detection
Multi-Timeframe Analysis
• Automatic TF hierarchy based on chart timeframe
• Entry/Bias/Trend from different timeframes
• Consensus scoring across all active TFs
• HTF confirmation mode (non-repainting)
Entry Engine
• Breakout entries with momentum confirmation
• Pullback entries at support/resistance
• Continuation entries in trending markets
• Counter-trend filter (optional)
• Signal density: Few / Moderate / Many
Diamond Zones
• Pivot-based support/resistance detection
• ATR-padded zone boundaries
• Zone strength scoring
• Visual boxes on chart
Signal Quality Gate
• ATR filter: No trend signals in ranging markets
• Volume filter: No entries on low volume
• Mean-reversion allowed in range markets
Heat Score System
• Setup quality assessment (0-1 scale)
• MTF alignment component
• Signal strength component
• Confluence component
Exhaustion Detection
• RSI extreme zones
• Large range candles (ATR expansion)
• High volume spikes
• Rejection wicks
• Small body candles
Mean Reversion System
• WaveTrend-based signals
• Dynamic overbought/oversold zones
• JMA smoothing for reduced lag
• Signal cooldown management
Risk Management
• ATR-based stop-loss calculation
• Multi-target take-profit levels
• Regime-aware position sizing
• Risk quality grading
Visualization
Matrix Table
• 6 category scores per timeframe
• Total score with color coding
• Setup status and confluence
• Heat score and confidence level
• TF action recommendations
Chart Elements
• JMA gradient fill (trend visualization)
• Diamond zone boxes (S/R levels)
• Signal shapes (triangles)
• Volatility stop lines
• HTF midline
• Pivot labels (S/R markers)
Configuration
Timeframes
• Confirmed HTF bars only (prevents repainting)
• Chart TF priority weight
Entry Engine
• Enable/disable entry types (Breakout/Pullback/Continuation)
• Allow counter-trend entries
• Trend JMA settings
• Volatility stop multiplier
Signal Boost
• RSI extreme boost
• WaveTrend extreme boost
• Strength threshold
Take-Profit
• Modes: Simple / Smart / Conservative / Multi-Target
• ATR multipliers for each level
• Regime-adjusted targets
Visualization
• Matrix table position and mode
• JMA lines and gradient
• Diamond zone boxes
• Pivot labels
• Signal age display
• Bottom area indicator
Mean Reversion
• WaveTrend smoothing lengths
• Zone lookback and multiplier
• Signal cooldown
• Show zones/labels/exits
TradingView Alerts
• Entry Long/Short signals
• Strong/Moderate signal differentiation
• Webhook compatible
Recommended Usage
1. Select chart timeframe (15M-Daily recommended)
2. Watch matrix table for MTF confluence
3. Wait for signal shapes on chart
4. Confirm with Heat Score (>0.5 = quality setup)
5. Check Diamond Zones for S/R context
6. Use ATR-based SL/TP from risk management
Input Groups
• Timeframes: HTF confirmation, chart weight
• Entry Engine: Entry types, density, JMA settings
• Signal Boost: RSI/WT boost settings
• Signal Quality: ATR/Volume thresholds
• Technical: ATR length, SL multiplier
• Take-Profit: Mode, ATR multiples, regime adjustment
• Visualization: Matrix, JMA, zones, labels
• HTF Midline: Mode, resolution, color
• Mean Reversion: WaveTrend settings, zones
• Colors: Bull/bear color scheme
---
Educational purposes only. Not financial advice. Test thoroughly before live trading.
Multitimeframe
tncylyv - Improved Delta Volume BubbleThis script is a specialized modification and structural upgrade of the excellent "Delta Volume Bubble " by tncylyv.
While the original tool provided a fantastic foundation for statistical volume analysis, this "Zero Float" Edition was built to solve specific visual challenges faced by active traders—specifically the issue of indicators "floating" or disconnecting from price when zooming in on lower timeframes.
The Straight Improvements
This version turns a "Signal Indicator" into a complete "Trading System" with five specific upgrades:
1. Visual Stability (The "Zero Float" Fix)
Original: Used complex coordinates that could desynchronize, causing bubbles to drift or float away from candles on fast charts (1m/5m).
My Upgrade: Implemented "Magnetic Anchoring." Labels and bubbles are now physically locked to the candle wicks. They never drift, overlap, or float, no matter how much you zoom or resize the chart.
2. Cognitive Load (The HUD)
Original: Displayed raw numbers inside colored circles, requiring you to memorize color codes.
My Upgrade: Replaced numbers with Semantic Text Labels (e.g., "ABSORB", "SQUEEZE", "MOMENTUM"). You can read the market intent instantly without decoding it.
3. Regime Adaptation (AI Engine)
Original: Used a fixed threshold (e.g., Z-Score > 2.0).
My Upgrade: Added an Adaptive Learning Window. The script scans recent volatility to automatically raise the threshold during choppy markets (filtering noise) and lower it during quiet sessions (catching subtle entries).
4. Market Memory (Smart Structure)
Original: Signals disappeared into history.
My Upgrade: Draws Support/Resistance Rails extending from major volume events. This helps you visualize exactly where institutions are defending their positions.
5. Robust Data Handling
My Upgrade: Added a Hybrid Fallback Engine. If granular 1-minute data isn't available (e.g., on historical charts), the script seamlessly switches to an estimation model so the indicator never "breaks" or disappears.
Core Logic
Z-Score Normalization: We don't look at raw volume; we look at statistical anomalies (Standard Deviations).
Absorption: Detects "Effort vs. Result"—high volume with tiny price movement (Trapped Traders).
Squeeze: Highlights areas where a breakout is imminent due to volatility compression.
Credits
Original Concept & Code: tncylyv (Delta Volume Bubble ). This script would not exist without his brilliant groundwork.
Modifications: Visual Anchoring, HUD Text System, AI Thresholding, and Structure Rails added in this edition.
This script is open-source to keep the spirit of the original author alive. Use it to understand the "Why" behind the move.
Bloomberg Terminal//@version=6
indicator("Bloomberg Terminal ", shorttitle="QUANTLABS", overlay=true, max_lines_count=500, max_labels_count=500)
// =============================================================================
// I. SETTINGS & THEME (ULTIMATE FIDELITY)
// =============================================================================
group_layout = "Terminal Layout"
sz_text = input.string(size.large, "Font Size", options= , group=group_layout)
pos_main = input.string(position.top_right, "Position", options= , group=group_layout)
group_colors = "Terminal Colors"
c_bg_main = color.black
c_bg_alt = color.rgb(15, 15, 15) // Subtle Zebra
c_amber = input.color(#ffb300, "Terminal Amber", group=group_colors)
c_header = input.color(#00294d, "Bloomberg Blue", group=group_colors)
c_bull = input.color(#00e676, " Terminal Green", group=group_colors)
c_bear = input.color(#ff1744, "Terminal Red", group=group_colors)
c_neutral = input.color(#b0bec5, "Terminal Gray", group=group_colors)
c_white = color.white
// =============================================================================
// II. DATA ENGINE & SPARKLINE LOGIC
// =============================================================================
type asset_data
float price
float chg
float rvol
bool is_up
float c1
float c2
float c3
f_get_stats(_sym) =>
= request.security(_sym, timeframe.period, [close, open, volume, ta.sma(volume, 20), close , close ], ignore_invalid_symbol=true)
_chg = (_c - _o) / _o * 100
asset_data.new(_c, _chg, _v / (_avg_v + 0.0001), _chg >= 0, _c, _c1, _c2)
// Market Data
d_spy = f_get_stats("AMEX:SPY")
d_qqq = f_get_stats("NASDAQ:QQQ")
d_iwm = f_get_stats("AMEX:IWM")
d_btc = f_get_stats("BINANCE:BTCUSDT")
d_eth = f_get_stats("BINANCE:ETHUSDT")
d_gold = f_get_stats("TVC:GOLD")
d_oil = f_get_stats("TVC:USOIL")
d_dxy = f_get_stats("TVC:DXY")
d_us10y = f_get_stats("TVC:US10Y")
d_vix = f_get_stats("CBOE:VIX")
// Active Ticker Intelligence
rsi = ta.rsi(close, 14)
= ta.supertrend(3, 10)
avg_vol = ta.sma(volume, 20)
rvol = volume / avg_vol
atr = ta.atr(14)
// Sparkline Generator (Text Based)
// We use simple block characters to simulate a "Trend"
// logic: if Price > Open -> Bullish Block, else Bearish Block.
// Ideally we'd have history but keeping it simple for now.
// Sparkline Generator (3-Bar Mini Chart)
// Sparkline char generator
f_spark_char(_p, _min, _rng) =>
_rel = (_p - _min) / (_rng == 0 ? 1 : _rng)
_rel < 0.33 ? " " : (_rel < 0.66 ? "▃" : "▇")
// Sparkline Generator (3-Bar Mini Chart)
f_spark(_d) =>
// Simple logic: Normalize 3 prices to choose low/med/high blocks
_min = math.min(_d.c1, math.min(_d.c2, _d.c3))
_max = math.max(_d.c1, math.max(_d.c2, _d.c3))
_rng = _max - _min
f_spark_char(_d.c2, _min, _rng) + f_spark_char(_d.c1, _min, _rng) + f_spark_char(_d.c3, _min, _rng)
// =============================================================================
// III. UI RENDERER (TEXT BASED TERMINAL)
// =============================================================================
// Table with thick outer frame but NO inner grid lines
var table term = table.new(pos_main, 4, 30, border_width=0, frame_width=2, frame_color=color.rgb(40,40,40), bgcolor=c_bg_main)
f_txt(_t, _c, _r, _txt, _col, _align, _bg) =>
table.cell(_t, _c, _r, _txt, text_color=_col, text_halign=_align, text_size=sz_text, bgcolor=_bg, text_font_family=font.family_monospace)
// Helper to print a row
// Helper to print a row with Zebra Striping
f_row(_row_idx, _name, _d) =>
_c_p = _d.is_up ? c_bull : c_bear
_bg_row = _row_idx % 2 == 0 ? c_bg_main : c_bg_alt // Zebra Logic
// Col 0: Ticker
f_txt(term, 0, _row_idx, _name, c_amber, text.align_left, _bg_row)
// Col 1: Price
f_txt(term, 1, _row_idx, str.tostring(_d.price, "#.##"), c_white, text.align_right, _bg_row)
// Col 2: Chg%
f_txt(term, 2, _row_idx, str.tostring(_d.chg, "+#.##") + "%", _c_p, text.align_right, _bg_row)
// Col 3: Spark (Simulated Trend)
f_txt(term, 3, _row_idx, f_spark(_d), _c_p, text.align_center, _bg_row)
if barstate.islast
// --- ROW 0: TOP MENU (F-Keys) - BLACK BG ---
_menu = " 1 2 3 4 5 6 7 8 9"
table.cell(term, 0, 0, _menu, text_color=c_amber, bgcolor=c_bg_main, text_halign=text.align_left, text_size=size.tiny, text_font_family=font.family_monospace)
table.merge_cells(term, 0, 0, 3, 0)
// --- ROW 1: BRANDING HEADER - BLACK BG ---
_time = str.format("{0,date,HH:mm:ss} EST", time)
// Simulated "BLOOMBERG" logo text + Time
f_txt(term, 0, 1, "QUANTLABS PROFESSIONAL | " + _time, c_amber, text.align_left, c_bg_main)
table.merge_cells(term, 0, 1, 3, 1)
// --- ROW 2: PANEL HEADERS - BLUE BG ---
f_txt(term, 0, 2, "SECURITY", c_white, text.align_left, c_header)
f_txt(term, 1, 2, "LAST PRICE", c_white, text.align_right, c_header)
f_txt(term, 2, 2, "NET CHANGE", c_white, text.align_right, c_header)
f_txt(term, 3, 2, "TREND", c_white, text.align_center, c_header)
// --- DATA ROWS (WATCHLIST) ---
f_row(3, "SPX Index", d_spy)
f_row(4, "NDX Index", d_qqq)
f_row(5, "RTY Index", d_iwm)
f_row(6, "VIX Index", d_vix)
// Separator
f_txt(term, 0, 7, ">> FX / CRYPTO", c_amber, text.align_left, color.new(c_header, 50))
table.merge_cells(term, 0, 7, 3, 7)
f_row(8, "BTCUSD Curncy", d_btc)
f_row(9, "ETHUSD Curncy", d_eth)
f_row(10, "DXY Curncy", d_dxy)
f_row(11, "XAU Curncy", d_gold)
// --- INTELLIGENCE SECTION ---
f_txt(term, 0, 12, ">> ACTIVE TICKER ANALYTICS", c_amber, text.align_left, color.new(c_header, 50))
table.merge_cells(term, 0, 12, 3, 12)
// Active Stats Row 1
f_txt(term, 0, 13, "RSI(14): " + str.tostring(rsi, "#.0"), c_white, text.align_left, c_bg_main)
c_rsi = rsi > 70 ? c_bear : (rsi < 30 ? c_bull : c_white)
f_txt(term, 1, 13, rsi > 70 ? "OVERBOUGHT" : (rsi < 30 ? "OVERSOLD" : "NEUTRAL"), c_rsi, text.align_right, c_bg_main)
// Active Stats Row 2
f_txt(term, 0, 14, "REL VOL(20): " + str.tostring(rvol, "#.1") + "x", c_white, text.align_left, c_bg_main)
c_vol = rvol > 2.0 ? c_amber : c_neutral
f_txt(term, 1, 14, rvol > 2.0 ? "HIGH ADVISE" : "NORMAL", c_vol, text.align_right, c_bg_main)
// Active Stats Row 3 (Merged)
_tr_txt = close > st_val ? "BULLISH TREND" : "BEARISH TREND"
c_tr = close > st_val ? c_bull : c_bear
f_txt(term, 0, 15, _tr_txt, c_tr, text.align_center, c_bg_main)
table.merge_cells(term, 0, 15, 3, 15)
// --- COMMAND LINE ---
// Blinking cursor effect
_blink = int(timenow / 500) % 2 == 0 ? "_" : " "
_cmd = "COMMAND: MONITOR " + syminfo.ticker + " " + _blink
f_txt(term, 0, 17, _cmd, c_amber, text.align_left, color.new(#222222,0))
table.merge_cells(term, 0, 17, 3, 17)
// --- NEWS TICKER (Multi-Line) ---
// We'll simulate a log by checking conditions
_msg1 = "SYSTEM READY..."
_msg2 = "MONITORING MARKETS..."
_msg3 = "NO ACTIVE ALERTS"
// Priority Alert Overwrite
if rvol > 3.0
_msg3 := ">> WHALE ALERT: VOL SPIKE <<"
else if rsi > 75
_msg3 := ">> EXTREME OB DETECTED <<"
else if rsi < 25
_msg3 := ">> EXTREME OS DETECTED <<"
// Render 3 lines of logs
f_txt(term, 0, 18, "LOG : " + _msg3, _msg3 == "NO ACTIVE ALERTS" ? c_neutral : c_amber, text.align_left, c_bg_main)
table.merge_cells(term, 0, 18, 3, 18)
f_txt(term, 0, 19, "LOG : " + _msg2, c_neutral, text.align_left, c_bg_main)
table.merge_cells(term, 0, 19, 3, 19)
f_txt(term, 0, 20, "LOG : " + _msg1, c_neutral, text.align_left, c_bg_main)
table.merge_cells(term, 0, 20, 3, 20)
Volatility Regimes | GainzAlgo📊 OVERVIEW
This is a comprehensive ATR-based trading system designed for professional traders who need advanced volatility analysis, precise trade management, and intelligent market-regime detection.
The indicator combines multiple proven volatility concepts into one powerful, highly customizable tool.
⚙️ CORE FEATURES
1️⃣ ATR BANDS (Dynamic Support & Resistance)
- Three levels of ATR-based bands plotted around price
- Band 1 (1× ATR): Closest support/resistance, primary TP target
- Band 2 (2× ATR): Secondary TP target, stronger S/R zone
- Band 3 (3× ATR): Extended TP target, major S/R level
- Bands adapt to volatility in real time
- Dotted lines mark TP points on the latest candle
2️⃣ VOLATILITY REGIME DETECTION (Market Phase Analysis)
Automatically classifies the market into four distinct volatility regimes:
🟢 COMPRESSION
ATR < 70% of baseline
Low-volatility consolidation, market is coiling
Best for: Preparing breakouts, tightening stops
🟠 EXPANSION
ATR 115–140% of baseline
Volatility breakout, early trend formation
Best for: Breakout entries, momentum trades
🔴 HIGH VOLATILITY
ATR > 140% of baseline
Strong sustained trend, maximum participation
Best for: Trend following, trailing stops
🟣 EXHAUSTION
Declining ATR after high volatility
Trend maturity, potential pause or reversal
Best for: Profit taking, reducing exposure
Additional details:
- Uses ATR Ratio (Current ATR / Long-term Baseline)
- Non-repainting logic with historical confirmation
- Background shading + regime labels for instant clarity
- Diamond markers highlight regime changes
3️⃣ DYNAMIC STOP-LOSS SYSTEM
- Automatically calculates optimal stop distance using ATR
- Adapts to current market volatility
- Separate logic for bullish and bearish trades
- Default 2× ATR multiplier (adjustable 0.5× – 5×)
- Visual cross markers display stop levels
- Tighter stops in low volatility, wider in high volatility
4️⃣ MULTIPLE TAKE-PROFIT LEVELS (TP1 / TP2 / TP3)
- Three progressive profit targets for scaling out
- TP1 (1.5× ATR): First partial profit
- TP2 (2.5× ATR): Secondary scale-out
- TP3 (4.0× ATR): Final target or runner
- Dashed lines with labels on the current bar
- Automatically aligns with trend direction
- Fully customizable multipliers
5️⃣ SUPPORT & RESISTANCE LEVELS
- Dynamic S/R detection using price extremes
- ATR-weighted significance filtering
- Adjustable lookback period (10–100 bars)
- Circle markers for visual clarity
- Updates in real time as new highs/lows form
6️⃣ RISK MANAGEMENT CALCULATOR
- Real-time position-size calculation
- Based on account size, risk percentage, and ATR stop distance
- Formula: Position Size = Risk Amount ÷ Stop Distance
- Example: $10,000 account, 1% risk, $50 stop = 200 shares
- Displays position size and dollar risk directly on chart
- Ensures consistent risk across all trades
7️⃣ ATR PERCENTILE RANKING
- Shows where current ATR ranks historically (0–100%)
- Above 80%: Extremely high volatility
- 20–80%: Normal volatility
- Below 20%: Extremely low volatility
- Adjustable lookback (50–500 bars)
- Alerts trigger at above 90% and below 10% extremes
- Adds context to all regime-based decisions
8️⃣ VOLATILITY CONTRACTION PATTERN
- Detects tight consolidation (volatility squeeze)
- Requires consecutive bars of low ATR
- Default: 7 bars below 50% of average ATR
- Yellow triangle alert when pattern completes
- Often precedes strong breakout moves
- Works on all timeframes
9️⃣ TREND DETECTION SIGNALS
- Up and down arrows on trend change with rising ATR
- Combines price direction with volatility confirmation
- Smoothing filters reduce false signals
- Green arrow for bullish, red arrow for bearish
🔟 VOLATILITY BREAKOUT SIGNALS
- Circle markers when ATR exceeds threshold
- Default threshold: 1.5× ATR average
- Indicates surge in market activity
- Can signal the start of new trends
🧠 RECOMMENDED SETTINGS BY TRADING STYLE
Day Trading (1m–15m)
ATR Length: 14
Regime Baseline: 30
SL Multiplier: 1.5–2.0
TP: 1.5 / 2.5 / 4.0
Risk: 0.5–1%
Swing Trading (1H–4H)
ATR Length: 14
Regime Baseline: 50
SL Multiplier: 2.0–2.5
TP: 2.0 / 3.5 / 6.0
Risk: 1–2%
Position Trading (Daily)
ATR Length: 14–21
Regime Baseline: 100
SL Multiplier: 2.5–3.0
TP: 3.0 / 5.0 / 8.0
Risk: 2–3%
Scalping (15s–5m)
ATR Length: 10
Regime Baseline: 20
SL Multiplier: 1.0–1.5
TP: 1.0 / 1.5 / 2.5
Risk: 0.5–1%
🧭 HOW TO USE
1. Identify the current volatility regime
2. Wait for entry confirmation (breakouts, trend arrows, contraction patterns)
3. Set stop loss using dynamic ATR-based levels
4. Scale out at TP1, TP2, TP3 or use ATR bands
5. Use the risk calculator for consistent position sizing
6. Monitor regime changes and manage exposure accordingly
🚨 ALERT SYSTEM
Alerts included for volatility breakouts, trend changes, regime transitions, ATR band crosses, contraction pattern completion, and ATR percentile extremes.
All alerts are fully configurable in TradingView.
🎨 VISUAL GUIDE
Background colors: Volatility regimes
Solid lines: ATR bands
Dotted lines: Latest TP points
Dashed lines: Take-profit levels
Cross markers: Stop-loss levels
Circles: Support, resistance, and breakouts
Arrows: Trend direction
Diamonds: Regime changes
Triangles: Contraction alerts
Labels: Regime info, ATR percentile, position size
🛠️ CUSTOMIZATION
- Toggle any feature on or off
- Adjust all thresholds and multipliers
- Customize colors
- Configure alerts
- Set account size and risk parameters
⚠️ IMPORTANT NOTES
- This indicator provides analytical tools, not trading signals
- Always apply proper risk management
- Backtest before live use
- ATR adapts to volatility, not direction
If you find this indicator useful, please leave a rating and comment ⭐
Big Trades / Intrabar Volume Clusters by HKDescription:
This indicator brings professional Order Flow and Footprint capabilities to your chart. It detects and visualizes high-volume trade clusters inside the candle, allowing you to see exactly at which price level big market participants were active.
Unlike standard volume bars, this tool uses Intrabar Data to map significant buying and selling pressure precisely within the candle body.
ℹ️ IMPORTANT: Resolution Setting (Read First) To ensure this indicator works immediately for all users (including Free/Basic accounts), the default resolution is set to "1 Minute".
Basic/Free Users: Please keep the setting at "1" (Second-based intervals often require a paid plan).
Premium Users: For the best precision and the exact look shown in the screenshots, we highly recommend changing the Resolution setting to "5S" (5 Seconds)!
🚀 Key Features
Intrabar Precision: Leverages request.security_lower_tf to look inside the candle structure.
Noise Filtering: Only displays clusters that exceed your defined Minimum Volume threshold, filtering out retail noise.
Smart Coloring:
Green: Buying pressure (Close >= Open on the lower timeframe).
Red: Selling pressure (Close < Open on the lower timeframe).
🆕 Independent Sizing: A unique feature: You can control the Font Size and Circle Size independently.
This allows for small, non-intrusive circles with large, readable text.
⚙️ Settings
Resolution: Default is 1 (Minute). Premium users should switch to 5S for true order flow precision.
Minimum Volume: The most important filter. Determines how large a trade cluster must be to appear (e.g., 150+ for ETH, higher for BTC).
Visuals: Customize Buy/Sell colors, Circle Size, and Text Size separately.
⚠️ Visual Tip (If text is hidden)
If the bubbles or numbers appear behind the candles or disappear when clicking away:
Right-click on any of the indicator bubbles.
Select Visual Order -> Bring to Front.
This ensures the Big Trades data always floats on top of your price bars.
Keltner Channel MTF with VWAP [MK]This strategy is designed for momentum and trend-following traders who prioritize high-volatility "breakout" environments. By anchoring a 15-minute volatility boundary against a lower-timeframe channel, it identifies rare moments where price action aggressively decouples from standard volatility ranges.
Strategy Overview: Keltner Channel MTF with VWAP
The Keltner Channel MTF with VWAP is a quantitative momentum strategy that uses Multi-Timeframe (MTF) volatility displacement to trigger trades. It focuses on "full channel breakouts," where the entire short-term price range (Current Timeframe Keltner Channel) shifts completely outside the medium-term volatility range (15-Minute Keltner Channel).
Pivot Point Zones [JOAT]Pivot Point Zones — Multi-Formula Pivot Levels with ATR Zones
Pivot Point Zones calculates and displays traditional pivot points with five formula options, enhanced with ATR-based zones around each level. This creates more practical trading zones that account for price noise around key levels—because price rarely reacts at exact mathematical levels.
What Makes This Indicator Unique
Unlike basic pivot point indicators, Pivot Point Zones:
Offers five different pivot calculation formulas in one indicator
Creates ATR-based zones around each level for realistic reaction areas
Pulls data from higher timeframes automatically
Displays clean labels with exact price values
Provides a comprehensive dashboard with all levels
What This Indicator Does
Calculates pivot points using Standard, Fibonacci, Camarilla, Woodie, and more formulas
Draws horizontal lines at Pivot, R1-R3, and S1-S3 levels
Creates ATR-based zones around each level for realistic price reaction areas
Displays labels with exact price values
Updates automatically based on higher timeframe closes
Provides fills between zone boundaries for visual clarity
Pivot Formulas Explained
// Standard Pivot - Classic (H+L+C)/3 calculation
pp := (pivotHigh + pivotLow + pivotClose) / 3
r1 := 2 * pp - pivotLow
s1 := 2 * pp - pivotHigh
r2 := pp + pivotRange
s2 := pp - pivotRange
// Fibonacci Pivot - Uses Fib ratios for level spacing
r1 := pp + 0.382 * pivotRange
r2 := pp + 0.618 * pivotRange
r3 := pp + 1.0 * pivotRange
// Camarilla Pivot - Tighter levels for intraday
r1 := pivotClose + pivotRange * 1.1 / 12
r2 := pivotClose + pivotRange * 1.1 / 6
r3 := pivotClose + pivotRange * 1.1 / 4
// Woodie Pivot - Weights current close more heavily
pp := (pivotHigh + pivotLow + 2 * close) / 4
// TD Pivot - Conditional based on open/close relationship
x = pivotClose < pivotOpen ? pivotHigh + 2*pivotLow + pivotClose :
pivotClose > pivotOpen ? 2*pivotHigh + pivotLow + pivotClose :
pivotHigh + pivotLow + 2*pivotClose
pp := x / 4
Formula Characteristics
Standard — Classic pivot calculation. Balanced levels, good for swing trading.
Fibonacci — Uses 0.382, 0.618, and 1.0 ratios. Popular with Fibonacci traders.
Camarilla — Tighter levels derived from range. Excellent for intraday mean-reversion.
Woodie — Weights current close more heavily. More responsive to recent price action.
TD — Conditional calculation based on open/close relationship. Adapts to bar type.
Zone System
Each pivot level includes an ATR-based zone that provides a more realistic area for potential price reactions:
// ATR-based zone width calculation
float atr = ta.atr(atrLength)
float zoneHalf = atr * zoneWidth / 2
// Zone boundaries around each level
zoneUpper = level + zoneHalf
zoneLower = level - zoneHalf
This accounts for market noise and helps avoid false breakout signals at exact level prices.
Visual Features
Pivot Lines — Horizontal lines at each calculated level
Zone Fills — Transparent fills between zone boundaries
Level Labels — Labels showing level name and exact price (e.g., "PP 45123.50")
Color Coding :
- Yellow: Pivot Point (PP)
- Red gradient: Resistance levels (R1, R2, R3) - darker = further from PP
- Green gradient: Support levels (S1, S2, S3) - darker = further from PP
Color Scheme
Pivot Color — Default: #FFEB3B (yellow) — Central pivot point
Resistance Color — Default: #FF5252 (red) — R1, R2, R3 levels
Support Color — Default: #4CAF50 (green) — S1, S2, S3 levels
Zone Transparency — 85-90% transparent fills around levels
Dashboard Information
The on-chart table (bottom-right corner) displays:
Selected pivot type (Standard, Fibonacci, etc.)
R3, R2, R1 resistance levels with exact prices
PP (Pivot Point) highlighted
S1, S2, S3 support levels with exact prices
Inputs Overview
Pivot Settings:
Pivot Type — Formula selection (Standard, Fibonacci, Camarilla, Woodie, TD)
Pivot Timeframe — Higher timeframe for OHLC data (default: D = Daily)
ATR Length — Period for zone width calculation (default: 14)
Zone Width — ATR multiplier for zone size (default: 0.5)
Level Display:
Show Pivot (P) — Toggle central pivot line
Show R1/S1 — Toggle first resistance/support levels
Show R2/S2 — Toggle second resistance/support levels
Show R3/S3 — Toggle third resistance/support levels
Show Zones — Toggle ATR-based zone fills
Show Labels — Toggle price labels at each level
Visual Settings:
Pivot/Resistance/Support Colors — Customizable color scheme
Line Width — Thickness of level lines (default: 2)
Extend Lines Right — Project lines forward on chart
Show Dashboard — Toggle the information table
How to Use It
For Intraday Trading:
Use Daily pivots on intraday charts (15m, 1H)
Pivot point often acts as the day's "fair value" reference
Camarilla levels work well for intraday mean-reversion
R1/S1 are the most commonly tested levels
For Swing Trading:
Use Weekly pivots on daily charts
Standard or Fibonacci formulas work well
R2/S2 and R3/S3 become more relevant
Zone boundaries provide realistic entry/exit areas
For Support/Resistance:
R levels above price act as resistance targets
S levels below price act as support targets
Zone boundaries are more realistic than exact lines
Multiple formula confluence adds significance
Alerts Available
DPZ Cross Above Pivot — Price crosses above central pivot
DPZ Cross Below Pivot — Price crosses below central pivot
DPZ Cross Above R1/R2 — Price breaks resistance levels
DPZ Cross Below S1/S2 — Price breaks support levels
Best Practices
Match pivot timeframe to your trading style (Daily for intraday, Weekly for swing)
Use zones instead of exact levels for more realistic expectations
Camarilla is best for mean-reversion; Standard/Fibonacci for breakouts
Combine with other indicators for confirmation
— Made with passion by officialjackofalltrades
IFVG BIASIFVG Bias Dashboard (15M / 30M / 1H / 4H)A clean, multi-timeframe ICT-inspired directional bias dashboard based on Implied Fair Value Gaps (IFVG).This indicator tracks the current bullish or bearish bias derived from the most recent valid Implied Fair Value Gap on four key higher timeframes: 15-minute, 30-minute, 1-hour, and 4-hour. It displays the results in an easy-to-read table directly on your chart — perfect for quickly assessing alignment across timeframes without switching charts.How It Works (ICT-Style IFVG Logic)Detects classic three-candle IFVGs:Bullish IFVG: Current low > high two bars ago (aggressive buying leaving an inefficiency).
Bearish IFVG: Current high < low two bars ago (aggressive selling).
When an IFVG forms, it sets the bias to match its direction (Bullish = +1, Bearish = -1).
The bias remains persistent until either:A new IFVG forms in the opposite direction, or
Price closes beyond the opposite boundary of the current IFVG (mitigation/invalidation), which flips the bias.
This creates a simple yet effective "last valid IFVG" bias that only changes on meaningful price action.
FeaturesMulti-timeframe analysis via request.security() on 15M, 30M, 1H, and 4H.
Compact table in the top-right corner showing:Timeframe (TF)
Current Bias: "Bullish" (solid green background) or "Bearish" (solid red background)
No repainting on historical bars; table updates only on the last confirmed bar.
Lightweight and overlay-friendly — does not draw boxes or lines, focusing purely on bias direction.
Ideal ForICT / Smart Money Concepts (SMC) traders looking for higher-timeframe confluence.
Confirming trend direction before taking lower-timeframe entries.
Spotting potential bias shifts when an IFVG is mitigated on higher timeframes.
A straightforward tool for staying aligned with institutional order flow inefficiencies across multiple timeframes. Add it to your chart and instantly see where the bias stands!
ADVANCED NIFTY OPTION BUY SELLADVANCED NIFTY OPTION BUY SELL – V1 is a non-repainting, trend-following TradingView indicator specially designed for NIFTY Index Options (CE / PE) traders.
This indicator focuses on:
Eliminating over-trading
Providing high-quality, low-frequency signals
Avoiding trades during sideways markets
It combines EMA crossover, RSI momentum, and ADX trend strength to deliver clean and reliable buy/sell signals.
#BLTA - CARE 7891🔷 #BLTA - CARE 7891 is an overlay toolkit designed to support structured trading preparation and chart reading. It combines a manual Trade Box + Lot Size/Risk panel, session background highlights (NY time), confirmed Previous Day/Week High-Low levels, an Asian range liquidity box, a 1H ZigZag market-structure projection, and an imbalance map (FVG / OG / VI) with an optional dashboard.
This script is an indicator (not a strategy). It does not place orders and is intended for planning, risk visualization, and market context.
✅ Main Modules
1) 💸 Risk Module (Trade Box + Lot Calculation + Table)
A complete manual trade-planning tool:
Pick an Entry Point (EP) and Stop Loss (SL) directly on the chart using input.price(..., confirm=true).
Automatically calculates:
Cash at Risk
SL distance (pips) (Forex-aware)
Lot size based on your:
Account balance
Risk %
Units per lot
Account base currency (with conversion if needed)
Draws:
Risk box (EP ↔ SL)
Target box (RR-based TP)
Displays a clean table panel with the key values.
🔁 Re-confirm Mode (Wizard)
Use “Re-confirm Trade Box Points” to force a clean logical reset and re-pick EP/SL/time anchors:
Shows temporary EP/SL labels
Shows a small wizard table guiding you step-by-step
Turn it OFF to return to normal risk table + boxes
Tip: If your chart timeframe changes or you want a fresh selection, Re-confirm mode is the safest way to reset everything cleanly.
2) 🎨 Session Visualization (New York Time)
Highlights chart background for these windows:
Day Division (17:00–17:01 NY)
London (03:00–05:00 NY) + sub-windows
New York (08:00–10:30 NY) + sub-windows
Colors are fully configurable from inputs.
3) 📰 Confirmed PDH/PDL (Previous Days)
Optional module that plots confirmed Previous Day High (PDH) and Previous Day Low (PDL):
Trading day is defined as 17:00 → 17:00 NY
Lines start exactly at the candle where the high/low occurred
Lines extend forward and can freeze when price touches them
Configurable: days to keep, style, width, and “stop on hit”
4) 📅 Confirmed Weekly High/Low (Previous Weeks)
Optional module that plots confirmed Weekly High/Low:
Confirmation occurs at Sunday 17:00 NY (typical FX week boundary)
Lines begin at the candle where the weekly extremes formed
Extends forward and can freeze on touch
Configurable: weeks to keep, style, width, stop-on-hit
5) 🈵 Asian Range Liquidity Box
Draws a session box that tracks high/low and optional midline (50%):
Uses New York time
Dynamic updates while session is active
Optional mid label and configurable line style/width
6) 📈 Market Structure - ZigZag (1H projected)
A ZigZag structure engine calculated on 1H and projected onto any timeframe:
Configurable:
Length
Source type (High/Low or Open/Close)
Colors and width
Opacity when viewing non-1H charts
Optional live extension of the last leg
Includes safe cleanup when toggling OFF (no leftover objects)
7) 📊 Imbalance Detector (FVG / OG / VI) + Dashboard
Detects and draws:
Fair Value Gaps (FVG)
Opening Gaps (OG)
Volume Imbalances (VI)
Optional dashboard shows frequencies and fill rates.
Attribution / Credits
This module is inspired by / adapted from the public concept widely known as “Imbalance Detector” (LuxAlgo-style logic). This script is independently packaged and integrated as part of the toolkit with additional modules and custom structure.
⚙️ How to Use (Quick Steps)
Add the indicator to the chart (overlay).
Enable 💸 Risk Module if you want trade planning.
Go to Trade Box Location and pick:
Entry Point (EP)
Stop Loss (SL)
Time anchors for box edges
Adjust:
Account balance, risk %, units per lot, RR target
Enable additional modules as needed:
Session backgrounds
PDH/PDL
Weekly High/Low
Asian range box
ZigZag
Imbalances + dashboard
🔎 Notes & Limitations
This script is for visual planning and context, not trade execution.
Lot sizing is based on the selected EP/SL and your inputs; always double-check broker rules, symbol specifications, and contract size.
Object-heavy features (boxes/lines/tables) may increase load on lower-end devices or very small timeframes.
Santhosh 3EMA Strict Sequential SignalsSanthosh 3EMA Strict Sequential Signals. Created with strict conditions to avoid wrong signals
Dual-Timeframe ABR DashboardDual-Timeframe ABR Dashboard 是一款专为日内交易者设计的波动率参考工具,用于同时评估当前周期与日线级别的平均K线波幅(ABR)。
该指标基于 Average Bar Range(高低差的简单平均),帮助交易者快速判断:
单根K线的“正常”波动范围
当前价格相对于 ABR 的百分比位置
当日是否已接近日线级别的常规波动极限
指标不会在图表上绘制干扰性线条,而是通过状态栏与固定表格实时展示最新 ABR 数值,适合用于:
目标利润(TP)与止盈管理
趋势是否具备延续空间的判断
避免在“已走完波幅”的位置追价入场
这是一个为实盘决策服务,而非视觉美观的专业级日内交易辅助指标。
======================================================================
Dual-Timeframe ABR Dashboard is a volatility reference tool designed specifically for day traders, providing a clear view of Average Bar Range (ABR) on both the current timeframe and the daily timeframe.
By measuring the simple average of each bar’s high–low range, this indicator helps traders quickly assess:
What constitutes a “normal” bar movement on the active timeframe
Current price movement expressed as a percentage of ABR
Whether the session has already consumed most of its typical daily range
Instead of plotting lines on the chart, the indicator presents real-time ABR values via the status line and a fixed dashboard table, keeping the chart clean and execution-focused.
This tool is particularly useful for:
Profit target and trade management
Evaluating remaining trend potential during the session
Avoiding late entries after the daily range is largely exhausted
Built for practical intraday decision-making, not visual clutter.
ATR Based SL & TP Targets from Entry (Long/Short)ATR-based target helper for manual trade planning.
Plots a single entry level plus ATR-based stop loss and take-profit targets on the price scale. The script uses a standard ATR (default 14) and lets you select the position side (Long or Short). For Long positions, it places the stop loss 1× ATR below the entry and take-profit levels at 1, 2, 3, and 4× ATR above. For Short positions, it mirrors this logic, placing the stop 1× ATR above the entry and targets 1–4× ATR below. You can adjust the entry price and ATR multipliers from the settings, and all levels update instantly, giving a clean visual of your risk and reward targets on the price scale.
-------------------
Tip:
After entry, and after I set my SL & TP levels, I hide the indicator until it's needed again.
Market Acceptance Zones [Interakktive]Market Acceptance Zones (MAZ) identifies statistical price acceptance — areas where the market reaches agreement and price rotates rather than trends.
Unlike traditional support/resistance tools, MAZ does not assume where price "should" react. Instead, it highlights regions where multiple internal conditions confirm balance: directional efficiency drops, effort approximately equals result, volatility contracts, and participation remains stable.
This is a market-state diagnostic tool, not a signal generator.
█ WHAT THE ZONES REPRESENT
MAZ (ATF) — Chart Timeframe Acceptance
A MAZ marks an area where price displayed rotational behaviour and the auction temporarily agreed on value. These zones often act as compression regions, fair-price areas, or boundaries of consolidation where impulsive follow-through is less likely.
Use ATF MAZs to:
- Identify rotational environments
- Avoid chasing price inside balance
- Frame consolidation prior to expansion
MAZ • HTF / MAZ • 2/3 — Multi-Timeframe Acceptance (AMTF)
When Multi-Timeframe mode is enabled, MAZ evaluates acceptance on:
- The chart timeframe
- Two higher structural timeframes
If the minimum consensus threshold is met (default: 2 of 3), the zone is classified as AMTF. These zones represent stronger agreement and typically decay more slowly than single-timeframe acceptance.
AMTF zones are structurally stronger and are useful for:
- Higher-quality rotation areas
- Pullback framing within trends
- Context alignment across timeframes
H • MAZ — Historic Acceptance Zones
Historic MAZs represent older acceptance that has transitioned out of active relevance. These zones are hidden by default and can be enabled to provide long-term memory context.
█ AUTO MULTI-TIMEFRAME LOGIC
When MTF Mode is set to Auto, MAZ uses a deterministic structural mapping based on the current chart timeframe:
- 5m → 15m + 1H
- 15m → 1H + 4H
- 1H → 4H + 1D
- 4H → 1D + 1W
- 1D → 1W + 1M
This ensures consistent higher-timeframe context without manual configuration. Advanced users may switch to Manual mode to define custom timeframes.
█ ZONE LIFECYCLE
MAZ zones are dynamic and maintain an internal lifecycle:
- Active — Acceptance remains relevant
- Aging — Acceptance quality is degrading
- Historic — Retained only for memory context
Zones track price interaction and re-acceptance, which can stabilise or strengthen them. Weak or stale zones are automatically removed to keep the chart clean.
█ HOW TRADERS USE MAZ
MAZ is designed to provide structure, not entries.
Common applications include:
- Avoiding chop when price is inside acceptance
- Framing expansion after clean breaks from MAZ
- Identifying higher-quality rotational pullbacks (AMTF zones)
- Defining objective invalidation using zone boundaries
█ SETTINGS OVERVIEW
Market Acceptance Zones — Core
- Acceptance Lookback
- ATR Length
- Zone Frequency (Conservative / Balanced / Aggressive)
Market Acceptance Zones — Zones
- Maximum Zones
- Fade & Stale Bars
- Historic Zone Visibility (default OFF)
Market Acceptance Zones — Timeframes
- MTF Mode (Off / Auto / Manual)
- Manual Higher Timeframes
- Minimum Consensus Requirement
Market Acceptance Zones — Visuals
- Neon / Muted Theme
- Zone Labels & Consensus Detail
- Optional Midline Display
█ DISCLAIMER
This indicator is a market context and diagnostic tool only.
It does not generate trade signals, entries, or exits.
Past acceptance behaviour does not guarantee future price action.
Always combine with independent analysis and proper risk management.
RSI Dashboard Multi-TF This script displays RSI values from multiple timeframes in a compact dashboard directly on the chart.
It is designed for traders who want to quickly identify whether the market is overbought, oversold, or neutral across different timeframes, without constantly switching chart intervals.
The dashboard shows the RSI simultaneously for the following timeframes:
- 1 minute
- 3 minutes
- 5 minutes
- 15 minutes
- 1 hour
- 4 hours
- Daily
Typical use cases:
- Scalping & intraday trading
- Multi-timeframe analysis at a glance
- Entry confirmation (e.g. pullbacks, breakouts)
- Avoiding trades against overbought or oversold market conditions
- Complementing EMA, VWAP, or price action strategies
⚙️ Notes
This dashboard is an analysis tool, not an automated trading system.
No repainting (uses request.security).
Suitable for indices, forex, crypto, and commodities.
This RSI dashboard provides a fast, clear, and visually clean market overview across multiple timeframes, making it an ideal tool for active traders who want to make efficient and well-structured trading decisions.
Market time opens @NeoNztime opens marked out new york session , london session, asia session and highs and lows of each one
Price Prediction Forecast ModelPrice Prediction Forecast Model
This indicator projects future price ranges based on recent market volatility.
It does not predict exact prices — instead, it shows where price is statistically likely to move over the next X bars.
How It Works
Price moves up and down by different amounts each bar. This indicator measures how large those moves have been recently (volatility) using the standard deviation of log returns.
That volatility is then:
Projected forward in time
Scaled as time increases (uncertainty grows)
Converted into future price ranges
The further into the future you project, the wider the expected range becomes.
Volatility Bands (Standard Deviation–Based)
The indicator plots up to three projected volatility bands using standard deviation multipliers:
SD1 (1.0×) → Typical expected price movement
SD2 (1.25×) → Elevated volatility range
SD3 (1.5×) → High-volatility / stress range
These bands are based on standard deviation of volatility, not fixed probability guarantees.
Optional Drift
An optional drift term can be enabled to introduce a long-term directional bias (up or down).
This is useful for markets with persistent trends.
Trinity Multi-Timeframe CCITrinity Multi-Timeframe CCI Indicator
This Pine Script indicator is a powerful **multi-timeframe Commodity Channel Index (MTF CCI)** tool that displays three CCI lines on a single pane:
- **Current timeframe** (whatever chart you're viewing, e.g., 1h, 15m, etc.)
- **4-hour timeframe**
- **Daily timeframe**
All three use the same CCI length (default 20, adjustable) and are fully customizable—you can enable/disable each line, change its timeframe, color, and thickness. Horizontal levels at 0 (dashed white by default), +100 (red), and -100 (green) are also included and fully editable.
### Core Functionality & Visual Signals
The standout feature is the **dynamic coloring of the current timeframe CCI line**:
- **Green**: Strong **bullish alignment**. This occurs when **all three CCIs are above the zero line** AND the current timeframe CCI is the **highest** of the three (leading the move upward with higher-timeframe confirmation).
- **Red**: Strong **bearish alignment**. This occurs when **all three CCIs are below the zero line** AND the current timeframe CCI is the **lowest** of the three (leading the move downward with higher-timeframe confirmation).
- **Yellow**: Neutral or no clear alignment (default state when the above conditions aren't met).
An optional light background shading (green or red) highlights when the indicator is in a bullish or bearish state.
Small triangle markers appear on the pane when a new bullish or bearish alignment forms, and built-in alerts notify you of new signals or when a signal ends. These are editable to enable or disable.
### How Traders Can Use It
This indicator helps identify **high-probability trend continuations or reversals** by combining momentum (CCI) across multiple timeframes with alignment confirmation:
- **Trend-following entries**: A green current line (especially with a fresh alert) suggests strong upward momentum backed by higher timeframes—ideal for long entries or adding to positions in an uptrend.
- **Bearish entries/short setups**: A red current line signals strong downward momentum confirmed across timeframes—good for short entries or exiting longs.
- **Confluence filter**: Use it as a filter for other strategies. Only take trades in the direction of the alignment (e.g., only long if current line is green).
- **Early warning of weakness**: When the current line turns yellow after being green/red, it often signals the trend is losing multi-timeframe support—useful for tightening stops or taking partial profits.
In essence, it visually answers the question: “Is the short-term momentum not only strong, but also aligned with and leading the medium- and long-term momentum?” When the answer is yes (green or red), it highlights moments of **multi-timeframe confluence**—some of the most reliable setups in technical trading.
The alerts make it practical for active traders: you get notified the moment a strong aligned signal appears, without needing to watch the chart constantly.
It's clean, highly customizable, and focuses on one clear concept—**multi-timeframe CCI leadership**—making it excellent for trend, swing, and even intraday traders looking for higher-timeframe confirmation.
Range EncapsulatorWhen a user selects a start date and the desired duration, the specified date range will be highlighted. High and low data lines corresponding to this range will be drawn. Additionally, quarter-point interval lines from the previous data range will be displayed between the high and low lines of the current range, provided they fall within those boundaries.
Account GuardianAccount Guardian: Dynamic Risk/Reward Overlay
Introduction
Account Guardian is an open-source indicator for TradingView designed to help traders evaluate trade setups before entering positions. It automatically calculates Risk-to-Reward ratios based on market structure, displays visual Stop Loss and Take Profit zones, and provides real-time position sizing recommendations.
The indicator addresses a fundamental question every trader should ask before entering a trade: "Does this setup make mathematical sense?" Account Guardian answers this question visually and numerically, helping traders avoid impulsive entries with poor risk profiles.
Core Functionality
Account Guardian performs four primary functions:
Detects swing highs and swing lows to identify logical stop loss placement levels
Calculates Risk-to-Reward ratios for both long and short setups in real-time
Displays visual SL/TP zones on the chart for immediate trade planning
Computes position sizing based on your account size and risk tolerance
The goal is to provide traders with instant feedback on whether a potential trade meets their minimum risk/reward criteria before committing capital.
How It Works
Swing Detection
The indicator uses pivot point detection to identify recent swing highs and swing lows on the chart. These swing points serve as logical areas for stop loss placement:
For Long Trades: The most recent swing low becomes the stop loss level. Price breaking below this level would invalidate the bullish thesis.
For Short Trades: The most recent swing high becomes the stop loss level. Price breaking above this level would invalidate the bearish thesis.
The swing detection lookback period is configurable, allowing you to adjust sensitivity based on your trading timeframe and style.
It automatically adjusts the tp and sl when it is applied to your chart so it is always moving up and down!
Risk/Reward Calculation
Once swing levels are identified, the indicator calculates:
Entry Price: Current close price (where you would enter)
Stop Loss: Recent swing low (for longs) or swing high (for shorts)
Risk: Distance from entry to stop loss
Take Profit: Entry plus (Risk × Target Multiplier)
R:R Ratio: Reward divided by Risk
The R:R ratio is then evaluated against your configured thresholds to determine if the setup is valid, marginal, or poor.
Visual Elements
SL/TP Zones
When enabled, the indicator draws colored boxes on the chart showing:
Red Zone: Stop Loss area - the region between your entry and stop loss
Green/Gold/Red Zone: Take Profit area - colored based on R:R quality
The color coding provides instant visual feedback:
Green: R:R meets or exceeds your "Good R:R" threshold (default 3:1)
Gold: R:R meets minimum threshold but below "Good" (between 2:1 and 3:1)
Red: R:R below minimum threshold - setup should be avoided
Swing Point Markers
Small circles mark detected swing points on the chart:
Green circles: Swing lows (potential support / long SL levels)
Red circles: Swing highs (potential resistance / short SL levels)
Dashboard Panel
The dashboard in the top-right corner displays comprehensive trade planning information:
R:R Row: Current Risk-to-Reward ratio for long and short setups
Status Row: VALID, OK, BAD, or N/A based on R:R thresholds
Stop Loss Row: Exact price level for stop loss placement
Take Profit Row: Exact price level for take profit placement
Pos Size Row: Recommended position size based on your risk parameters
Risk $ Row: Dollar amount at risk per trade
Position Sizing Logic
The indicator calculates position size using the formula:
Position Size = Risk Amount / Risk per Unit
Where:
Risk Amount = Account Size × (Risk Percentage / 100)
Risk per Unit = Entry Price - Stop Loss Price
For example, with a $10,000 account risking 1% per trade ($100), if your entry is at 100 and stop loss at 98 (risk of 2 per unit), your position size would be 50 units.
Input Parameters
Swing Detection:
Swing Lookback: Number of bars to look back for pivot detection (default: 10). Higher values find more significant swing points but may be slower to update.
Target Multiplier: Multiplier applied to risk to calculate take profit distance (default: 2). A value of 2 means TP is 2× the distance of SL from entry.
Risk/Reward Thresholds:
Minimum R:R: Minimum acceptable Risk-to-Reward ratio (default: 2.0). Setups below this show as "BAD" in red.
Good R:R: Threshold for excellent setups (default: 3.0). Setups at or above this show as "VALID" in green.
Account Settings:
Account Size ($): Your trading account size in dollars (default: 10,000). Used for position sizing calculations.
Risk Per Trade (%): Percentage of account to risk per trade (default: 1.0%). Professional traders typically risk 0.5-2% per trade.
Display:
Show SL/TP Zones: Toggle visibility of the colored zone boxes on chart (default: enabled)
Show Dashboard: Toggle visibility of the information panel (default: enabled)
Analyze Direction: Choose to analyze Long only, Short only, or Both directions (default: Both)
How to Use This Indicator
Basic Workflow:
Add the indicator to your chart
Configure your account size and risk percentage in the settings
Set your minimum and good R:R thresholds based on your trading rules
Look at the dashboard to see current R:R for potential long and short entries
Only consider trades where the status shows "VALID" or at minimum "OK"
Use the displayed SL and TP levels for your order placement
Use the position size recommendation to determine lot/contract size
Interpreting the Dashboard:
VALID (Green): Excellent setup - R:R meets your "Good" threshold. This is the ideal scenario for taking a trade.
OK (Gold): Acceptable setup - R:R meets minimum but isn't optimal. Consider taking if other confluence factors align.
BAD (Red): Poor setup - R:R below minimum threshold. Avoid this trade or wait for better entry.
N/A (Gray): Cannot calculate - usually means no valid swing point detected yet.
Best Practices:
Use this indicator as a filter, not a signal generator. It tells you IF a trade makes sense, not WHEN to enter.
Combine with your existing entry strategy - use Account Guardian to validate setups from other analysis.
Adjust the swing lookback based on your timeframe. Lower timeframes may need smaller lookback values.
Be honest with your account size input - accurate position sizing requires accurate inputs.
Consider the target multiplier carefully. Higher multipliers mean larger potential reward but lower probability of hitting TP.
Alerts
The indicator includes four alert conditions:
Good Long Setup: Triggers when long R:R reaches or exceeds your "Good R:R" threshold
Good Short Setup: Triggers when short R:R reaches or exceeds your "Good R:R" threshold
Bad Long Setup: Triggers when long R:R falls below your minimum threshold
Bad Short Setup: Triggers when short R:R falls below your minimum threshold
These alerts can help you monitor multiple charts and get notified when favorable setups appear.
Technical Implementation
The indicator is built using Pine Script v6 and includes:
Pivot-based swing detection using ta.pivothigh() and ta.pivotlow()
Dynamic box drawing for visual SL/TP zones
Table-based dashboard for clean information display
Color-coded visual feedback system
Persistent variable tracking for swing levels
Code Structure:
// Swing Detection
float swingHi = ta.pivothigh(high, swingLen, swingLen)
float swingLo = ta.pivotlow(low, swingLen, swingLen)
// R:R Calculation for Long
float longSL = recentSwingLo
float longRisk = entry - longSL
float longTP = entry + (longRisk * targetMult)
float longRR = (longTP - entry) / longRisk
// Position Sizing
float riskAmount = accountSize * (riskPct / 100)
float posSize = riskAmount / longRisk
Limitations
The indicator uses historical swing points which may not always represent optimal SL placement for your specific strategy
Position sizing assumes you can trade fractional units - adjust accordingly for instruments with minimum lot sizes
R:R calculations assume linear price movement and don't account for gaps or slippage
The indicator doesn't predict price direction - it only evaluates the mathematical viability of a setup
Swing detection has inherent lag due to the lookback period required for pivot confirmation
Recommended Settings by Trading Style
Scalping (1-5 minute charts):
Swing Lookback: 5-8
Target Multiplier: 1-2
Minimum R:R: 1.5
Good R:R: 2.0
Day Trading (15-60 minute charts):
Swing Lookback: 8-12
Target Multiplier: 2
Minimum R:R: 2.0
Good R:R: 3.0
Swing Trading (4H-Daily charts):
Swing Lookback: 10-20
Target Multiplier: 2-3
Minimum R:R: 2.5
Good R:R: 4.0
Why Risk/Reward Matters
Many traders focus solely on win rate, but profitability depends on the combination of win rate AND risk/reward ratio. Consider these scenarios:
50% win rate with 1:1 R:R = Breakeven (before costs)
50% win rate with 2:1 R:R = Profitable
40% win rate with 3:1 R:R = Profitable
60% win rate with 1:2 R:R = Losing money
Account Guardian helps ensure you only take trades where the math works in your favor, even if you're wrong more often than you're right.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not intended as financial, investment, trading, or any other type of advice or recommendation.
Trading involves substantial risk of loss and is not suitable for all investors. The calculations provided by this indicator are based on historical price data and mathematical formulas that may not accurately predict future price movements.
Position sizing recommendations are estimates based on user inputs and should be verified before placing actual trades. Always consider factors such as leverage, margin requirements, and broker-specific rules when determining actual position sizes.
The Risk-to-Reward ratios displayed are theoretical calculations based on swing point detection. Actual trade outcomes will vary based on market conditions, execution quality, and other factors not captured by this indicator.
Past performance does not guarantee future results. Users should thoroughly test any trading approach in a demo environment before risking real capital. The authors and publishers of this indicator are not responsible for any losses or damages arising from its use.
Always consult with a qualified financial advisor before making investment decisions.






















