ATAI Volume Pressure Analyzer V 1.0 — Pure Up/DownATAI Volume Pressure Analyzer V 1.0 — Pure Up/Down
Overview
Volume is a foundational tool for understanding the supply–demand balance. Classic charts show only total volume and don’t tell us what portion came from buying (Up) versus selling (Down). The ATAI Volume Pressure Analyzer fills that gap. Built on Pine Script v6, it scans a lower timeframe to estimate Up/Down volume for each host‑timeframe candle, and presents “volume pressure” in a compact HUD table that’s comparable across symbols and timeframes.
1) Architecture & Global Settings
Global Period (P, bars)
A single global input P defines the computation window. All measures—host‑TF volume moving averages and the half‑window segment sums—use this length. Default: 55.
Timeframe Handling
The core of the indicator is estimating Up/Down volume using lower‑timeframe data. You can set a custom lower timeframe, or rely on auto‑selection:
◉ Second charts → 1S
◉ Intraday → 1 minute
◉ Daily → 5 minutes
◉ Otherwise → 60 minutes
Lower TFs give more precise estimates but shorter history; higher TFs approximate buy/sell splits but provide longer history. As a rule of thumb, scan thin symbols at 5–15m, and liquid symbols at 1m.
2) Up/Down Volume & Derived Series
The script uses TradingView’s library function tvta.requestUpAndDownVolume(lowerTf) to obtain three values:
◉ Up volume (buyers)
◉ Down volume (sellers)
◉ Delta (Up − Down)
From these we define:
◉ TF_buy = |Up volume|
◉ TF_sell = |Down volume|
◉ TF_tot = TF_buy + TF_sell
◉ TF_delta = TF_buy − TF_sell
A positive TF_delta indicates buyer dominance; a negative value indicates selling pressure. To smooth noise, simple moving averages of TF_buy and TF_sell are computed over P and used as baselines.
3) Key Performance Indicators (KPIs)
Half‑window segmentation
To track momentum shifts, the P‑bar window is split in half:
◉ C→B: the older half
◉ B→A: the newer half (toward the current bar)
For each half, the script sums buy, sell, and delta. Comparing the two halves reveals strengthening/weakening pressure. Example: if AtoB_delta < CtoB_delta, recent buying pressure has faded.
[ 4) HUD (Table) Display /i]
Colors & Appearance
Two main color inputs define the theme: a primary color and a negative color (used when Δ is negative). The panel background uses a translucent version of the primary color; borders use the solid primary color. Text defaults to the primary color and flips to the negative color when a block’s Δ is negative.
Layout
The HUD is a 4×5 table updated on the last bar of each candle:
◉ Row 1 (Meta): indicator name, P length, lower TF, host TF
◉ Row 2 (Host TF): current ↑Buy, ↓Sell, ΔDelta; plus Σ total and SMA(↑/↓)
◉ Row 3 (Segments): C→B and B→A blocks with ↑/↓/Δ
◉ Rows 4–5: reserved for advanced modules (Wings, α/β, OB/OS, Top
5) Advanced Modules
5.1 Wings
“Wings” visualize volume‑driven movement over C→B (left wing) and B→A (right wing) with top/bottom lines and a filled band. Slopes are ATR‑per‑bar normalized for cross‑symbol/TF comparability and converted to angles (degrees). Coloring mirrors HUD sign logic with a near‑zero threshold (default ~3°):
◉ Both lines rising → blue (bullish)
◉ Both falling → red (bearish)
◉ Mixed/near‑zero → gray
Left wing reflects the origin of the recent move; right wing reflects the current state.
5.2 α / β at Point B
We compute the oriented angle between the two wings at the midpoint B:
β is the bottom‑arc angle; α = 360° − β is the top‑arc angle.
◉ Large α (>180°) or small β (<180°) flags meaningful imbalance.
◉ Intuition: large α suggests potential selling pressure; small β implies fragile support. HUD cells highlight these conditions.
5.3 OB/OS Spike
OverBought/OverSold (OB/OS) labels appear when directional volume spikes align with a 7‑oscillator vote (RSI, Stoch, %R, CCI, MFI, DeMarker, StochRSI).
◉ OB label (red): unusually high sell volume + enough OB votes
◉ OS label (teal): unusually high buy volume + enough OS votes
Minimum votes and sync window are user‑configurable; dotted connectors can link labels to the candle wick.
5.4 Top3 Volume Peaks
Within the P window the script ranks the top three BUY peaks (B1–B3) and top three SELL peaks (S1–S3).
◉ B1 and S1 are drawn as horizontal resistance (at B1 High) and support (at S1 Low) zones with adjustable thickness (ticks/percent/ATR).
◉ The HUD dedicates six cells to show ↑/↓/Δ for each rank, and prints the exact High (B1) and Low (S1) inline in their cells.
6) Reading the HUD — A Quick Checklist
◉ Meta: Confirm P and both timeframes (host & lower).
◉ Host TF block: Compare current ↑/↓/Δ against their SMAs.
◉ Segments: Contrast C→B vs B→A deltas to gauge momentum change.
◉ Wings: Right‑wing color/angle = now; left wing = recent origin.
◉ α / β: Look for α > 180° or β < 180° as imbalance cues.
◉ OB/OS: Note labels, color (red/teal), and the vote count.
◉Top3: Keep B1 (resistance) and S1 (support) on your radar.
Use these together to sketch scenarios and invalidation levels; never rely on a single signal in isolation.
[ 7) Example Highlights (What the table conveys) /i]
◉ Row 1 shows the indicator name, the analysis length P (default 55), and both TFs used for computation and display.
◉ B1 / S1 blocks summarize each side’s peak within the window, with Δ indicating buyer/seller dominance at that peak and inline price (B1 High / S1 Low) for actionable levels.
◉ Angle cells for each wing report the top/bottom line angles vs. the horizontal, reflecting the directional posture.
◉ Ranks B2/B3 and S2/S3 extend context beyond the top peak on each side.
◉ α / β cells quantify the orientation gap at B; changes reflect shifting buyer/seller influence on trend strength.
Together these visuals often reveal whether the “wings” resemble a strong, upward‑tilted arm supported by buyer volume—but always corroborate with your broader toolkit
8) Practical Tips & Tuning
◉ Choose P by market structure. For daily charts, 34–89 bars often works well.
◉ Lower TF choice: Thin symbols → 5–15m; liquid symbols → 1m.
◉ Near‑zero angle: In noisy markets, consider 5–7° instead of 3°.
◉ OB/OS votes: Daily charts often work with 3–4 votes; lower TFs may prefer 4–5.
◉ Zone thickness: Tie B1/S1 zone thickness to ATR so it scales with volatility.
◉ Colors: Feel free to theme the primary/negative colors; keep Δ<0 mapped to the negative color for readability.
Combine with price action: Use this indicator alongside structure, trendlines, and other tools for stronger decisions.
Technical Notes
Pine Script v6.
◉ Up/Down split via TradingView/ta library call requestUpAndDownVolume(lowerTf).
◉ HUD‑first design; drawings for Wings/αβ/OBOS/Top3 align with the same sign/threshold logic used in the table.
Disclaimer: This indicator is provided solely for educational and analytical purposes. It does not constitute financial advice, nor is it a recommendation to buy or sell any security. Always conduct your own research and use multiple tools before making trading decisions.
Forecasting
AndrologQuartileAndrologQuartile
This indicator is based on the assumption that if a candle closes in the upper or lower quartile of its range, the next candle often tends to take out the high or low of that candle.
The script does two things:
It calculates and displays live statistics on how often this condition occurs and how often it is successful.
It highlights candles that meet the quartile condition so you can track them in real time.
It is most meaningful to use this indicator on higher timeframes (from 1h upwards).
You can also set an alert: once configured, the alert will always trigger for the timeframe that was active at the moment of setup.
Usage tip:
Click the statistics panel in the top right corner to adjust settings and alerts.
Adjustable parameters:
Quartiles: Default values are 25% and 75%.
Min Distance: Defines how far the high/low must be from the candle’s close (in %) to be considered relevant. A smaller value is applied automatically on intraday timeframes under 5 minutes.
Renko Open Range 𝛥
Delta Renko-Style Indicator Guide (NQ Focus)
This indicator takes inspiration from the Renko Chart concept and is optimized for the RTH session (New York time zone), specifically applied to the Nasdaq futures (NQ) product.
If you’re unfamiliar with Renko charts, it may help to review their basics first, as this indicator borrows their clean, block-based perspective to simplify price interpretation.
⸻
🔧 How the Indicator Works
• At market open (9:30 AM EST), the indicator plots a horizontal open price line, referred to as 0 delta.
• From this anchor, it plots 10 incremental levels (deltas) both above and below the open, each spaced by 62.5 NQ points.
Why 62.5?
• With NQ currently trading in the 23,000–24,000 range, a 62.5-point move represents roughly 0.26% of the daily average range.
• This makes each delta step significant enough to capture movement while filtering out smaller noise.
A mini table (location adjustable) displays:
• Current delta zone
• Last touched delta level
This gives you a quick snapshot of where price sits relative to the open.
⸻
📈 How to Read the Market
• At the open, price typically oscillates between 0 and +1 / -1 delta.
• A break beyond this zone often signals stronger directional intent:
• Trending day: price can push into +2, +3, +4, +5 (or the inverse for downside).
• Range day: expect price to bounce between +1, 0, -1 deltas.
⚠️ Note: This is a visualization tool, not a trading system. Its purpose is to help you quickly recognize range vs. trend conditions.
⸻
📊 Example
• In this case, NQ reached +1 delta shortly after open.
• A retest of 0 delta followed, and price later surged to +5/+6 deltas (helped by Fed news).
⸻
🛠️ Practical Uses
This indicator can help you:
• Define profit targets
• Place hard stop levels
• Gauge whether a counter-trend trade is worth the risk
⚠️ Caution: Avoid counter-trend trades if price is aggressively pushing toward +5/+6 or -5/-6 deltas, as trend exhaustion usually hasn’t set in yet.
⸻
🔄 Adapting for ES (S&P Futures)
• On NQ, 62.5 points ≈ $1,250 per contract.
• For ES, this translates to 25 points.
• Since 1 NQ contract ≈ 2 ES contracts in dollar terms, an optimized ES delta step would be 12.5 points.
You may also experiment with different delta values (e.g., 50 or 31.25 for NQ) to align with your risk profile and trading style.
⸻
🧪 Extending Beyond NQ
You can experiment with applying this indicator to ES or even stocks, but non-futures assets may require additional calibration and testing.
⸻
✅ Bottom line: This tool provides a clean, Renko-inspired framework for quickly gauging trend vs. range conditions, setting realistic profit targets, and avoiding poor counter-trend setups.
Scalp - Victor Trader//@version=6
indicator("Scalp Fluxo Simples v6 — OP1/OP2/OP3", overlay=true, max_labels_count=500)
// === Inputs básicos ===
lenVol = input.int(50, "Janela do Volume", minval=10)
zVolThr = input.float(2.2,"Z-score mínimo p/ Clímax", step=0.1)
imbThr = input.float(0.65,"Desequilíbrio |Δ|/Vol", step=0.01)
sweepLookbk = input.int(20, "Lookback p/ Varredura", minval=5)
wickMult = input.float(1.0,"Pavio dominante vs Corpo (x)", step=0.1)
confirmClose = input.bool(true, "Confirmar só no fechamento? (anti-repaint)")
cooldownBars = input.int(8, "Cooldown OP1 (barras mínimas entre OP1)", minval=0)
// --- OP2 (reteste) ---
useOP2 = input.bool(true, "Ativar OP2 (reteste da zona)?")
retestBars = input.int(8, "Janela p/ reteste (barras após OP1)", minval=1)
// --- OP3 (confirmação do candle seguinte) ---
useOP3 = input.bool(true, "Ativar OP3 (confirmação do candle seguinte)?")
// === Funções utilitárias ===
zscore(src, len) =>
m = ta.sma(src, len)
s = ta.stdev(src, len)
s := s == 0.0 ? 1e-10 : s
(src - m) / s
// === Proxy de delta (tick rule) ===
chg = close - close
delta = volume * math.sign(chg)
// === Clímax de volume ===
zVol = zscore(volume, lenVol)
climax = zVol >= zVolThr
// === Pavio dominante ===
body = math.abs(close - open)
topWick = high - math.max(open, close)
botWick = math.min(open, close) - low
topDom = topWick > body * wickMult
botDom = botWick > body * wickMult
// === Desequilíbrio ===
imbalance = math.abs(delta) / math.max(volume, 1.0)
buyImb = imbalance >= imbThr and delta > 0
sellImb = imbalance >= imbThr and delta < 0
// === Sweeps ===
prevHH = ta.highest(high, sweepLookbk)
prevLL = ta.lowest(low, sweepLookbk)
sweepHigh = high > prevHH
sweepLow = low < prevLL
okBar = not confirmClose or barstate.isconfirmed
// === OP1 (sinal raiz) ===
topOP1_raw = climax and buyImb and sweepHigh and topDom and okBar
bottomOP1_raw = climax and sellImb and sweepLow and botDom and okBar
// Cooldown OP1
var int lastTopOP1 = na
var int lastBotOP1 = na
topOP1 = topOP1_raw and (na(lastTopOP1) or bar_index - lastTopOP1 > cooldownBars)
bottomOP1 = bottomOP1_raw and (na(lastBotOP1) or bar_index - lastBotOP1 > cooldownBars)
if topOP1
lastTopOP1 := bar_index
if bottomOP1
lastBotOP1 := bar_index
// === Guardar ZONAS do pavio do OP1 para OP2 ===
var float lastTopZoneLow = na
var float lastTopZoneHigh = na
var int lastTopBar = na
var float lastBotZoneLow = na
var float lastBotZoneHigh = na
var int lastBotBar = na
if topOP1
lastTopZoneLow := math.max(open, close)
lastTopZoneHigh := high
lastTopBar := bar_index
if bottomOP1
lastBotZoneLow := low
lastBotZoneHigh := math.min(open, close)
lastBotBar := bar_index
// === OP2 (reteste da zona do pavio dentro de N barras) ===
topOP2 = useOP2 and not na(lastTopBar) and bar_index > lastTopBar and (bar_index - lastTopBar <= retestBars) and high >= lastTopZoneLow and low <= lastTopZoneHigh and close < open and okBar
bottomOP2 = useOP2 and not na(lastBotBar) and bar_index > lastBotBar and (bar_index - lastBotBar <= retestBars) and high >= lastBotZoneLow and low <= lastBotZoneHigh and close > open and okBar
// === OP3 (confirmação do candle seguinte) ===
topOP3 = useOP3 and topOP1 and close < low and okBar
bottomOP3 = useOP3 and bottomOP1 and close > high and okBar
// === Plots ===
plotshape(series=topOP1, title="TOP OP1", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, text="TOP1")
plotshape(series=topOP2, title="TOP OP2", style=shape.triangledown, location=location.abovebar, color=color.maroon, size=size.small, text="TOP2")
plotshape(series=topOP3, title="TOP OP3", style=shape.triangledown, location=location.abovebar, color=color.orange, size=size.small, text="TOP3")
plotshape(series=bottomOP1, title="FND OP1", style=shape.triangleup, location=location.belowbar, color=color.lime, size=size.small, text="FND1")
plotshape(series=bottomOP2, title="FND OP2", style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small, text="FND2")
plotshape(series=bottomOP3, title="FND OP3", style=shape.triangleup, location=location.belowbar, color=color.teal, size=size.small, text="FND3")
// === Alertas ===
alertcondition(condition=topOP1, title="TOP OP1", message="TOP OP1 (clímax+sweep+pavio)")
alertcondition(condition=topOP2, title="TOP OP2", message="TOP OP2 (reteste da zona)")
alertcondition(condition=topOP3, title="TOP OP3", message="TOP OP3 (confirmação)")
alertcondition(condition=bottomOP1, title="FND OP1", message="FND OP1 (clímax+sweep+pavio)")
alertcondition(condition=bottomOP2, title="FND OP2", message="FND OP2 (reteste da zona)")
alertcondition(condition=bottomOP3, title="FND OP3", message="FND OP3 (confirmação)")
Liquidity-Weighted Business Cycle (Satoshi Global Base)🌍 BTC-Affinity Global Liquidity Business Cycle (MACD Model)
This indicator models Bitcoin’s macroeconomic business cycle using a BTC-weighted global liquidity index as its foundation. It adapts a MACD-based framework to visualize expansions and contractions in fiat liquidity across major economies with high Bitcoin affinity.
🔍 What It Does:
🧠 Constructs a Global M2 Liquidity Index from the top 10 most BTC-relevant fiat currencies
(USD, EUR, JPY, GBP, INR, CNY, KRW, BRL, CAD, AUD)
— each weighted by its Bitcoin adoption score and FX-converted into USD.
📊 Applies a MACD (Moving Average Convergence Divergence) signal to the index to detect macro liquidity trends.
🟢 Plots a histogram of business cycle momentum (red = expansion, green = contraction).
🔴 Marks potential cycle peaks, useful for macro trading alignment.
⚖️ BTC Affinity-Weighted Countries:
🇺🇸 United States
🇪🇺 Eurozone
🇯🇵 Japan
🇬🇧 United Kingdom
🇮🇳 India
🇨🇳 China
🇰🇷 South Korea
🇧🇷 Brazil
🇨🇦 Canada
🇦🇺 Australia
Weights are user-adjustable to reflect evolving capital controls, regulation, and real-world BTC adoption trends.
✅ Use Cases:
Confirm macro risk-on vs risk-off regimes for BTC and crypto.
Identify ideal entry and exit zones in macro pair trades (e.g., MSTR vs MSTY).
Monitor how global monetary expansion feeds into BTC valuations.
byquan AlphaTrend + Supertrend GOP"Combine the two indicators AlphaTrend and SuperTrend; if they give the same signal, display it, otherwise discard it."
Byquan Supertrend (byquan v5)Modify the Supertrend indicator as I want. Merge the two alerts, Buy and Sell, into one. Change the Buy-Sell signals into triangles to avoid interference with other indicators."
20W SMA (true 20W or 140D match)Modified SMA to reflect true 20W Smooth Moving Average.
Choose between different TF's and the price remains the same
Forex 5m Simple Scanner + RSI DivergenceHello everyone. this is a easy to use indicator.
I wanted something very easy to visualize and understand. Great for the beginner's.
About this script:
“Forex 5m Simple Scanner + RSI Divergence”
This scanner helps beginner traders quickly identify trade opportunities across the top 10 forex pairs. It combines a simple EMA crossover system with an optional RSI filter to confirm trend direction, and adds RSI divergence detection to spot potential reversals early.
The built-in table shows each pair’s trend, RSI value, buy/sell signal, and divergence status—all in one place.
For beginners, this makes it easier to:
Avoid flipping between multiple charts.
See clear BUY/SELL 🚀 signals instead of guessing.
Spot high-probability setups with RSI divergence markers (😊/☹️).
It simplifies decision-making by turning complex signals into a straightforward dashboard that highlights where attention is needed most.
Forex 60m Simple Scanner + RSI Divergence“Forex 60m Simple Scanner + RSI Divergence”
This scanner helps beginner traders quickly identify trade opportunities across the top 10 forex pairs. It combines a simple EMA crossover system with an optional RSI filter to confirm trend direction, and adds RSI divergence detection to spot potential reversals early.
The built-in table shows each pair’s trend, RSI value, buy/sell signal, and divergence status—all in one place.
For beginners, this makes it easier to:
Avoid flipping between multiple charts.
See clear BUY/SELL 🚀 signals instead of guessing.
Spot high-probability setups with RSI divergence markers (😊/☹️).
It simplifies decision-making by turning complex signals into a straightforward dashboard that highlights where attention is needed most.
Near New High ScreenerA simple indicator intended to be used in a pinescript scanner to find stocks that are re reaching highs after a pullback or base formation. To use add it as a favourite indicator so it can be selected in a pinescript scanner.
In the settings you can select whether to use the highest high or highest close for the previous high (defaults to close) and whether to use the all time high or the high from the last X days (defaults to 252 days).
Once opened in a pine scanner apply to a watchlist and scan. Stocks with a positive % have broken out from a previous high today, those with a negative % are that % away from the previous high.
You can sort by the “Pct from Prev High%” column or use the scanner filter to filter for stocks between two values, for example between 0 and -5% to find stocks near a new high, or >0 to find stocks that have broken out today.
Standard Deviations [MTRX]The standard deviations script identifies manipulation ranges and automatically draws standard deviation fibonacci retracements on the wicks of the candles. You can use the given deviation points to take high probability retracement or reversal trades.
JAIN'S ALGOIt's Going To Help you catch the Complete Trend. (Follow Only When You Know Which Day You Shall Be Trading), To make money in the market is not to trade every day, but to trade on the best days.
Daily Open & ATR Levels + Monthly/Weekly VWAP V2.0ore Functions:
Customisable ATR Levels
4 adjustable ATR percentage levels (default: 25%, 50%, 75%, 100%)
Creates 8 dynamic support/resistance lines around daily open price
Fully customisable from 0% to 200% in 5% increments
Anchored VWAP
Monthly VWAP: Resets at the beginning of each month
Weekly VWAP: Resets every Monday (after Friday close)
Toggle on/off for each VWAP independently
Smart Fill Zones
Weekly Fill: Highlights when Weekly VWAP is within Level 1 ATR range
Monthly Fill: Highlights when Monthly VWAP is within Level 2 ATR range
Customisable colors and transparency for each fill zone
Key Features:
Daily open price reference line (blue)
Step-line style for clean visualisation
Individual color controls for all levels
Works on any timeframe (uses daily ATR data)
Perfect for intraday and swing trading strategies
Use Cases:
Identify key support/resistance zones based on volatility
Spot VWAP convergence with ATR levels for potential reversals
Set profit targets and stop losses using ATR multiples
Analyze price action relative to daily open and volume-weighted averages
This indicator combines volatility-based levels with volume-weighted price analysis for comprehensive market structure visualisation.
5 min SMC Scalping [AlexSvet]Scalping for 5 minute chart.
SMC based signals.
Light and clear indicator.
⛓️ Scalping (5-15) Fusion Signals — soft SELL/BUY [AlexSvet]Signals for scalping 5-15 minutes — soft SELL/BUY.
settings there is a checkbox ✅ "Consider volume filter in signal?".
If enabled → signals only when volume is confirmed.
If disabled → BUY/SELL arrows appear more often (volume is only displayed in the table).
Alerts work for both options.
OI Proxy PA [Trend Revolt] V2.0This indicator watches price and volume and treats volume like a simple stand-in for open interest. It flags four states—Long Build-Up, Short Covering, Short Build-Up, and Long Unwinding—based on whether price and volume momentum move together or against each other.
You’ll see a colored arrow plus a centered label with the signal name and an “Estimated Sustain” window in bars, along with one best-guess time. A solid line marks the conservative window; a dotted extension shows the upper bound. The estimate isn’t magic—it learns from your chart’s own history by logging how long past phases lasted, then uses the middle of that distribution for time.
You can tweak thresholds, volume SMA length, cooldown, session filter, and label size/spacing. It uses only your chart’s OHLCV; the News field is just a manual note. Works best on time-based charts; time on range/tick/volume is approximate. Use with your own levels and risk.
****UPDATED VALUES****
X-Liquid by Logicat✨ X-Liquid: Smart Supply & Demand Liquidity Boxes (H4 Breakout Model)
X-Liquid is a smart supply & demand tool designed to highlight hidden liquidity zones and fake-out traps with high accuracy.
This indicator is based on the H4 breakout rule — a proven institutional-level concept for detecting where market makers leave pending orders, and where intraday price action is most likely to react.
🔑 Core Features
📦 Smart Demand/Supply Boxes: Automatically detects the most significant breakout bars and marks the hidden “max pain” zones using strong engulfing rule.
🎯 Fake-out Capture: Distinguishes between false breakouts and true liquidity grabs, showing the corrected liquidity pool range (X-Liquid).
⚡ Intraday Precision: Adapts the higher timeframe (H4) breakout logic into lower timeframes, letting you anticipate intraday trends and ranges with high probability.
📊 Liquidity Pool Prediction: Predicts pending orders area where the market is attracted to.
🎨 Clean chart visualization: Only the significant boxes are displayed, helping to differentiate good area to enter and obstacles to keep an eye on.
✅ How to Use
1. Switch to any intraday timeframe (M15–H1).
2. Watch the H4 breakout boxes: these represent intraday trend and market price range.
3. If price fakes out, the indicator will adjust and highlight the true X-Liquid pool — the real level where liquidity sits.
4. Use these zones to anticipate intraday reversals, continuations, and high-probability setups.
5. Wisely use the supply demand boxes to get sniper entry.
Vwapbot (VWAP + Ut Bot Alerts)Vwapbot (VWAP + Ut Bot Alerts) - Complete Guide
This Pine Script indicator combines two powerful trading tools: Volume Weighted Average Price (VWAP) and the UT Bot trend-following system. Here's a comprehensive breakdown:
What This Indicator Does
The indicator provides:
1. VWAP calculation with deviation bands
2. UT Bot trend signals with trailing stops
3. Combined confluence alerts when both indicators align
4. Visual information table showing current market conditions
Core Components
1. VWAP (Volume Weighted Average Price)
What it is: VWAP calculates the average price weighted by volume, giving more importance to high-volume periods.
Settings:
• VWAP Source: Price used for calculation (default: hlc3 - average of high, low, close)
• VWAP Anchor: Reset period (Session/Week/Month/Quarter/Year)
Usage:
• Price above VWAP = bullish bias
• Price below VWAP = bearish bias
• VWAP acts as dynamic support/resistance
2. VWAP Deviation Bands
What they show: Statistical boundaries around VWAP based on price volatility
Settings:
• Standard Deviation Multiplier: How far the bands extend (default: 1.0)
• Show Bands: Toggle visibility
Usage:
• Gray dashed lines: 1 standard deviation bands (normal price range)
• Red dotted lines: 2 standard deviation bands (extreme price levels)
• Price touching outer bands may indicate reversal opportunities
3. UT Bot (Ultimate Trend Bot)
What it does: Creates a trailing stop system that follows trends and signals reversals
Settings:
• Key Value: Sensitivity multiplier (1.0 = balanced, lower = more sensitive)
• ATR Period: Lookback period for volatility calculation (default: 10)
How it works:
• Uses ATR (Average True Range) to calculate dynamic support/resistance levels
• Green line = uptrend (trailing stop below price)
• Red line = downtrend (trailing stop above price)
4. UT Bot Alerts are integrated to the logic of Volume Profile i,e VWAP, the UT Bot Stop trailing line plot its data and change trends obtaining it's logic from the VWAP and Standard Deviation bands, thus it differs in it's logic of UT Bot alerts from other indicators.
Visual Elements
On-Chart Displays:
1. Blue line: VWAP
2. Gray lines: 1st deviation bands
3. Red lines: 2nd deviation bands
4. Green/Red thick line: UT Bot trailing stop
5. Green triangles up: Buy signals
6. Red triangles down: Sell signals
7. Background color: Light green (bullish) / Light red (bearish)
Information Table (Top Right):
• VWAP: Current VWAP value
• UT Bot: Current trailing stop level
• Trend: Bullish/Bearish status
• Price vs VWAP: Above/Below comparison
• Deviation: Percentage distance from VWAP
• Volume: Current bar volume
Trading Signals
Basic Signals:
1. UT Bot Buy: Green triangle when trend turns bullish
2. UT Bot Sell: Red triangle when trend turns bearish
3. VWAP Cross Above: Price crosses above VWAP
4. VWAP Cross Below: Price crosses below VWAP
Confluence Signals :
1. Bullish Confluence: UT Bot buy signal + Price above VWAP
2. Bearish Confluence: UT Bot sell signal + Price below VWAP
How to Use This Indicator
For Trend Following:
1. Enter long when you get a bullish confluence signal
2. Enter short when you get a bearish confluence signal
3. Exit when the UT Bot trend changes color
For Mean Reversion:
1. Look for reversals when price hits the 2nd deviation bands
2. Confirm with UT Bot signals
3. Target return to VWAP
For Support/Resistance:
1. Use VWAP as dynamic support in uptrends, resistance in downtrends
2. Watch for bounces at deviation bands
3. Confirm direction with UT Bot trend color
Best Practices
Timeframes:
• Intraday: Use Session VWAP anchor
• Swing trading: Use Weekly/Monthly anchors
• Position trading: Use Monthly/Quarterly anchors
Risk Management:
• Stop loss: Below/above the UT Bot trailing stop
• Position sizing: Smaller positions when price is at extreme deviation bands
• Confluence: Wait for both VWAP and UT Bot alignment for strongest signals
Market Conditions:
• Trending markets: Focus on UT Bot signals and VWAP direction bias
• Ranging markets: Use deviation bands for entry/exit points
• High volume periods: VWAP becomes more significant
Alert System
The indicator provides 6 types of alerts:
1. UT Bot buy/sell signals
2. VWAP crossover alerts
3. Confluence alerts (most important)
Set up alerts for confluence signals to catch the highest probability setups when both indicators align.
This indicator works best when combined with proper risk management and used in conjunction with market structure analysis. The confluence signals provide the highest probability entries, while the individual components help with market.
Advice from the publisher:
For using with Indices e.g NIFTY 50, BANKNIFTY etc. use parameters:
UT BOT Key Value : 1
UT BOT ATR Period : 10
Standard Deviation Multiplier : 1 {Default}
For using with commodities e.g NATURALGAS, CRUDEOIL etc. use parameters:
UT BOT Key Value : 2
UT BOT ATR Period : 7
Standard Deviation Multiplier : 1 {Default}
Multi Channel GRID & DCA LTF [trade_lexx]Multi Channel GRID & DCA LTF
Usage Guide
Part 1: The concept and general possibilities of the "Multi Channel GRID & DCA LTF" strategy
Introduction
Welcome to the guide to "Multi Channel GRID & DCA LTF", a powerful and versatile automated trading strategy for the TradingView platform. This tool was developed for traders who are looking for flexibility, control and a high degree of adaptability to various market conditions.
The strategy is based on a hybrid approach that combines two popular and time-tested techniques.:
1. GRID (grid trading): The classic method of averaging a position is by placing a grid of limit orders.
2. DCA (Dollar Cost averaging): Smart position averaging based on signals from external indicators.
However, "Multi Channel GRID & DCA LTF" goes far beyond the simple combination of these two techniques. The strategy includes a number of unique and innovative features, such as cascading MultiGRID grids for dealing with extreme volatility, Channel Mode range trading mode for profiting from sideways movement, and Low Time Frame analysis (LTF) to achieve surgical accuracy in backtesting. Deep customization options for risk management, capital, take profits, and stop losses allow you to configure a strategy for almost any trading style, asset, and timeframe.
The basic idea: How does it work?
Let's take a detailed look at each of the key concepts embedded in the logic of the strategy.
1. GRID — Automatic placement of buy and sell orders at certain price intervals.
This is a fundamental mode of operation. Its main goal is to systematically improve the average entry price for a position if the market is going against you.
* The principle of operation: After opening the base (first) order (`BO`), the strategy automatically places a series of pending limit orders (here they are called "safety orders" or "SO") at certain price intervals. For a long position, orders are placed below the entry price, and for a short position, orders are placed higher.
* Target: When the price moves against an open position, it consistently hits and executes safety orders. Each such execution adds additional volume to the position at a more favorable price, thereby shifting the overall average entry price (`position_avg_price') closer to the current market price. This means that a much smaller corrective movement will be required to gain ground.
* Flexibility: You have full control over the geometry of the grid: the number of safety orders, the percentage distance between them (`SO Step`), and you can even set a coefficient that will increase this step for each subsequent order (`SO Multiplier`), creating an expanding grid.
2. DCA (Signal Averaging) — Smart Averaging
This mode adds an additional layer of analysis to the averaging process. Instead of just buying/selling at the set price levels, the strategy waits for a confirmation signal.
* Working principle: You can connect any external indicator (for example, RSI, CCI, or even your own complex signal system) to the strategy, which outputs numerical values. As standard, 1 is used for a long signal, and -1 is used for a short signal. The strategy will place the next averaging order only at the moment when it receives the appropriate signal.
* Goal: To average a position not just during a fall (or a rise for a short), but at the moments that your main trading system considers the most favorable for this. This allows you to avoid "catching falling knives" and enter only if there are good reasons.
3. Hybrid Mode (GRID+DCA) is the best of the previous two modes
This mode is designed for maximum filtering and control. It requires two conditions to be fulfilled simultaneously.
* Working principle: The safety order will be executed only if the price has reached the calculated grid level and a confirmation signal has been received from your external indicator. If a confirmation signal is received from an external indicator, the next calculated grid level activates the limit order.
* Goal: To create the most reliable averaging system that protects against premature entries and requires double confirmation (both by price and indicator) before increasing the position size.
4. MultiGRID — Adaptation to extreme volatility
This is one of the most powerful and unique features of a strategy designed to survive and make a profit in the face of strong, protracted trends or "black swans".
* The problem it solves: The usual grid of orders has a limited depth. If the price goes beyond the last safety order, the strategy loses the opportunity to average and becomes vulnerable.
* The principle of operation: The MultiGRID function allows you to create "cascades" — several grids following one another. When all the orders of the first grid are executed, the strategy does not stop. Instead, she can activate the second, third (and so on) a grid of orders. The new grid can be activated by one of two triggers:
1. Offset: The new grid is activated when the price passes another set percentage deviation from the last executed order.
2. Signal: The new grid is activated when a signal is received from an external indicator.
* Goal: To significantly expand the working range of the strategy. This allows it to adapt to strong market movements that would "break" the usual grid, and continue to effectively average a position at a much greater depth of decline or growth.
5. Channel Mode — Trading in the range
This feature turns a standard averaging strategy into a machine for "farming" profits within a price channel that is formed during a sideways market movement.
* The problem it solves: In the standard grid strategy, after partially closing a take profit position, the volume of this part "leaves" the trade until the deal is fully closed. You are missing the opportunity to reuse this capital.
* Operating principle: When Channel Mode is enabled, the following happens. Suppose the price went against you, executed several safety orders, and then turned around and reached one of the partial take profits. At this point, the strategy is:
1. Fixes the profit, as it should be.
2. Instantly places a new limit order to buy (or sell for a short) at exactly the same price level where the last triggered safety order was executed. The volume of this order is equal to the volume of the part that was just closed for take profit.
3. If the price goes down again and executes this "repeat" order, the strategy immediately sets a corresponding take profit for it at the level where the previous profit was taken.
* Goal: To create a continuous buy-sell cycle within the local range (channel). The lower limit of the channel is the price of the last averaging, and the upper limit is the price of a partial take profit. This allows you to repeatedly profit from sideways price fluctuations, without waiting for the full closure of the main, large transaction.
6. LTF (Lower Timeframe Analysis) — Surgical precision of backtesting
This feature is critically important for obtaining reliable results during historical testing (backtesting) of grid strategies.
* The problem it solves: The standard testing mechanism in TradingView has a serious limitation. Working, for example, on a 4-hour chart, he sees only 4 candle points: Open, High, Low and Close. He does not know in what order the price moved within these 4 hours. He could have touched High first and then Low, or vice versa. For grid strategies, this is fatal — the engine can show that a take profit has been executed, although in reality the price first went down, collected the entire grid of orders and only then turned around.
* How it works: When you turn on the LTF mode, the strategy for each candle on your main chart (for example, 4H) requests and analyzes all candles from the lower timeframe you specified (for example, 1-minute). Then it virtually trades the entire price path for these minute candles, executing orders, take profits and stop losses in the sequence in which they would occur in reality. It works in the single take profit mode of the Grid strategy.
* Goal: To provide the most realistic and reliable backtest that reflects the real dynamics of the market. This allows you to avoid false expectations and accurately assess the potential performance of the strategy.
// ------------------------
Part 2: Detailed description of the strategy settings
This section is your main guide to all the switches and options available in the strategy. Understanding each setting is the key to unlocking the full potential of this powerful tool.
1. 🛡️ Risk Management 🛡️
This group contains fundamental parameters that determine the basic logic of risk management and the geometry of grid orders.
* Strategy type: Determines the direction of transactions.
* Long: The strategy will only open long positions (buy).
* Short: The strategy will only open short positions (sell).
* Both: The strategy will work both ways, opening long or short depending on the incoming signal.
* SO Count: Sets the maximum number of Safety (averaging) Orders (SO) that the strategy will place within the same grid. If you have MultiGRID enabled, this number applies to each individual grid.
* SO Step (%): This is the base percentage deviation from the entry price at which the first safety order will be placed. For example, at a value of 0.5, the first SO in a long trade will be placed 0.5% lower than the opening price of the base order.
* SO Multiplier: A coefficient that exponentially increases the step for each subsequent safety order. This allows you to create an expanding grid where averaging orders are placed further and further apart, which is effective with strong and accelerating price movements.
* *The step formula for the nth order*: Step(N) = (SO Step) * (SO Multiplier ^(N-1)).
* If the value is 1, all steps will be the same.
* With a value of 1.6, the step of the second SO will be 1.6 times larger than the first, the step of the third will be 1.6 times larger than the second, and so on.
* 1️⃣ TP/SL: These are simplified settings for quick configuration. They allow you to turn on/off the main take profit and stop loss and set basic percentage values for them. More detailed settings for these parameters can be found in the relevant sections below.
// ------------------------
2. 💰 Money Management 💰
Everything related to position size, leverage, and capital is configured here.
* Volume BO (Base Order): Determines the size of the trade's opening order.
* Volume BO: A fixed amount in the quote currency (for example, in USDT).
* USDT (check mark): Manages the information in the comments to the orders. If enabled, the volume of orders in USDT will be displayed in the comments. This is convenient for visual analysis and for sending the amount of USDT by the placeholder {{strategy.order.comment}} via webhooks when connecting the strategy to the exchange or trading terminals.
* or % of deposit: The amount calculated as a percentage of the available capital of the strategy. The check mark to the right of this field enables this mode. Important: using a percentage activates the effect of compounding (compound interest), as the amount of each new transaction will be automatically recalculated based on the current capital (initial capital + profit/loss). If enabled, the percentage of orders will be displayed in the comments. This is convenient for visual analysis and for sending percentages on the placeholder {{strategy.order.comment}} via webhooks when connecting the strategy to the stock exchange, trading terminals, or creating Copy trading.
* Martingale: The coefficient applied to the volume of orders. It increases the size of each subsequent insurance order compared to the base one.
* Volume formula for the nth SO: Volume SO (N) = (Volume BO) * (Martingale^N).
* With a value of 1.2, the volume of the first SO will be 1.2 times greater than the base, the second — 1.44 times (`1.2 * 1.2`) and so on.
* Leverage: Specify the size of your leverage. This parameter is used exclusively for calculating and displaying the approximate liquidation price. It does not affect the size of positions, but it helps to visually assess the risks.
* Liquidation: Enables or disables the calculation and display of the liquidation line on the chart.
* Margin type: Allows you to select a method for calculating the liquidation price, simulating the logic of exchanges:
* Isolated: The liquidation price is calculated based on the size and leverage of the current open position only.
* Cross: The calculation simulates using the entire available balance to maintain a position. In the strategy, the liquidation price is calculated as the level at which the loss on the current transaction is equal to the current capital.
* Commission (%): Specify the percentage of your exchange's commission per transaction. The correct value of this parameter is crucial for obtaining realistic backtest results.
// ------------------------
3. 🕸️ Grid Management 🕸️
This group is responsible for the logic of safety orders and advanced mechanics such as Channel Mode and MultiGRID.
* SO Type: Defines the logic of placing averaging orders.
* GRID: Classic grid. All safety orders are placed in advance as limit orders.
* DCA: Signal averaging. The strategy is waiting for a signal from an external indicator to place a market averaging order.
* GRID+DCA: Hybrid. The strategy waits for a signal, and if it arrives, places a limit order at the appropriate price level of the grid or executes a market order if the signal has arrived below the limit order level.
* Signal for SO: A data source (indicator) that will be used for signals in DCA and GRID+DCA modes.
* ↔️ Channel Mode: When this option is enabled, the strategy tries to trade in a sideways range. After partially closing a take profit position, it immediately places a limit order for re-entry at the price of the last triggered safety order. This creates a buy-sell cycle within the local channel.
* Best Price Only: This filter adds an additional condition for averaging in DCA and MultiGRID modes (when it operates on a signal). The next averaging order or a new grid will be activated only if the current price is more favorable (lower for long, higher for short) than the price of the previous entry.
* 🧩 MultiGRID ⮕ Enables cascading grid mode.
* Grid Count: The total number of grids that can be activated sequentially.
* Offset: Percentage deviation from the price of the last order of the previous grid. When this margin is reached, the following grid of orders is activated (this mode does not require a signal).
* Or signal: Allows you to use the signal from an external indicator as a trigger to activate the next grid. The checkmark on the right turns on this mode.
// ------------------------
4. 🎯 Entry and Stop 🎯
This group of settings allows you to fine-tune the conditions for starting a new trade and all aspects related to protective stop orders, including the complex mechanics of trailing and managing SL after partial take profits.
* 🎯 Signal: A data source (indicator) that will be used to determine when to enter a trade. The strategy expects a value of 1 for the start of a long trade and -1 for a short trade.
* Min Bars: Sets the minimum number of candles that must pass from the moment of opening the previous trade to the moment of opening the next one. A value of 0 disables this filter. This is a useful tool to prevent overly frequent entries in a "noisy" market.
* Non-stop: If this option is enabled, the strategy ignores the Entry Signal and opens a new trade immediately after closing the previous one (taking into account the Min Bars filter, if it is set). This turns the strategy into a constantly working mechanism that is always on the market.
* 🛑 SL Type: Defines the base price from which the stop loss percentage will be calculated. The stop loss in the first section must be enabled for this block of settings to work.
* From the entry point: SL is always calculated from the opening price of the very first base order. It remains static throughout the entire transaction unless it is moved by other functions.
* From breakeven line: SL is dynamically recalculated and shifted each time a safety order is executed. It always follows the average price of the position, being at a given percentage distance from it.
* From last executed SO: SL is recalculated from the price of the last executed order, whether it is a base or a safety order.
* From last SO: SL is calculated from the price of the most recent possible safety order in the grid. This is usually the most remote and conservative type of SL.
* Trailing SL Type: Defines the algorithm by which the stop loss will move after its activation.
* Standard: Classic trailing. After activation, SL will follow the price at a fixed distance.
* ATR: SL will follow the price at a distance equal to the value of the ATR indicator multiplied by the specified multiplier.
* External Source: SL will follow any selected line of the third-party indicator.
* Period and Multiplier: Common parameters for all types of trailing.
* Source: The source of the line for the trailing SL of the third-party indicator.
* Trailing SL after entry: The mode of activation of the trailing SL after entering the transaction
* SL management after TP (sections 1️⃣, 2️⃣, 3️⃣): These three blocks allow you to create a complex stop loss management logic as profits are recorded.
For each take profit level (TP1, TP2, TP3), you can configure:
* SL BE / SL TP1 / SL TP2: When the corresponding TP is reached, the stop loss will be moved to the breakeven point (for TP1), to the TP1 price level (for TP2) or to the TP2 price level (for TP3).
* Trailing SL: When the corresponding TP is reached, the trailing stop loss is activated according to the settings above.
* By ↔️ Signal: A very powerful option. If it is enabled, the above action (SL transfer or trailing activation) will occur when the opposite trading signal is received from an external indicator. This allows you to protect profits or reduce losses if the market turns sharply, even before reaching the target.
* SL Delay ⮕ Allows you to delay the activation of the stop loss.
* Number of Bars: The Stop loss will be physically placed on the market only after the specified number of candles has passed since entering the trade. This can help to avoid "taking out" the stop with a random short movement (squiz) immediately after opening a position.
* SL Block: Unique defensive mechanics for trading both ways (`Strategy Type: Both`).
* Number of SL: If the strategy receives the specified number of stop losses in a row in one direction (for example, 2 stops long), it temporarily blocks the opportunity to open new trades in that direction.
* Lock Reset mode:
* By direction: The lock is lifted if a profitable trade is closed in the allowed direction or if a stop loss is triggered in the opposite direction.
* First profit: The lock is lifted after closing any profitable transaction, regardless of its direction.
// ------------------------
5. ✅ Take Profit ✅
This group of settings provides comprehensive control over profit taking, from a simple take profit to a complex system of partial closures and trailing.
* ✅ TP Type: Defines the base price for calculating the percentage deviation of the take profit.
* From entry point: TP is calculated from the base order price.
* From breakeven line: TP dynamically follows the average position price.
* From last executed SO: TP is calculated from the price of the last executed order.
* Filters for closing on signal
* Only ➕: If TP is triggered by a signal, the deal will be closed only if it is in the black relative to the average price.
* Or >TP: If TP is triggered by a signal, the trade will be closed only if the closing price is better than (or equal to) the estimated price of this TP.
* TP type of trailing: Yes, take profit has a trailing too! It works differently than the SL trailing.
* Standard / ATR: After the price touches the "virtual" TP level, the trailing is activated. He does not place a stop order, but begins to move away from the price, dynamically moving the limit order to close further and further in the profitable direction, allowing him to collect the maximum from the impulse movement.
* External Source: TP will follow any selected line of the third-party indicator.
* Period and Multiplier: Parameters for calculating the trailing margin TP.
* Source: The source of the line for the trailing TP of the third-party indicator.
* TP level settings (sections 1️⃣, 2️⃣, 3️⃣, 4️⃣): The strategy supports up to four independent take profit levels, which allows for a flexible system of partial commits.
For each level, you can set:
* TP: Enable the level and set its percentage deviation from the base price.
* Size: What percentage of the current position will be closed when this level is reached. For the last active TP, this parameter is ignored, and 100% of the remaining position is closed.
* Trailing TP: Enable the above-described trailing mechanism for this particular level.
* Signal: Enable closing based on the signal from the external indicator for this level.
* Or take: If both the closing on the signal and the limit order are enabled, then whatever comes first will work.
* After SO: Activate this TP level only after the specified number of safety orders has been executed. This allows you to set closer targets for riskier (deeply averaged) positions.
// ------------------------
6. 🔬 GRID and MultiGrid Analysis on Lower TFs (LTF) 🔬
This group activates one of the most important functions for accurate testing of grid strategies.
* Enable LTF Calculation ⮕ The main switch of the analysis mode on the lower timeframes.
* Timeframe selection: A drop-down list where you can select a timeframe for detailed analysis. For example, if your main schedule is 1 hour, you can select 1 minute here. The strategy will emulate the trading of minute candles within each hour candle.
❗️Important: As mentioned in the first part, the use of this mode is critically necessary to obtain realistic backtest results, especially for strategies with a dense grid of orders. Without it, the results may be overly optimistic and not reflect the real dynamics of the market. It should be remembered that TradingView imposes a limit on the number of intra-bars (minor TF bars) that can be requested. This is usually about 100,000 bars.
// ------------------------
7. 🕘 Backtest Date Range 🕘
This group allows you to focus testing on a specific historical period.
* Limit Date Range: Enables date filtering.
* Start time: The date and time when the strategy will start analyzing and opening deals.
* End time: The date and time after which the strategy will stop opening new deals and complete testing.
// ------------------------
8. 🎨 Visualization 🎨
All the options responsible for the appearance and information content of the chart are collected here.
* Show PnL labels: Enables/disables the display of text labels with the result (profit/loss) after closing each trade.
* Statistics Table: Enables/disables the main dashboard with detailed statistics on the results of the backtest.
* Strategy Settings Table: Enables/disables an additional panel that summarizes all the key parameters of the current configuration.
* Monthly Profit Table: Enables/disables a table with a breakdown of percentage returns by month and year.
* Table settings: For each of the three tables, you can individually adjust the Text size and Table Position on the screen to position them as conveniently as possible.
* Decimal places: Defines how many decimal places will be displayed in numeric values in tables and on labels.
// ------------------------
9. ✉️ Webhook Settings ✉️
This group is intended for traders who want to automate trading on strategy signals using third-party services and exchanges (for example, 3Commas, WunderTrading, Cryptorobotics, Cryptohopper, Bitsgap, Binance, ByBit, OKX, Pionex, Bitget or proprietary solutions).
For each key event in the strategy, there is a separate switch and a text field:
* Webhook for Open: Enable and set a message for the webhook that will be sent when the base order is opened.
* Webhook for Averaging: A message sent when executing any insurance order.
* Webhook for Take Profit: A message sent when closing on take profit (including partial ones).
* Webhook for Stop-Loss: A message sent when a stop loss is closed.
You can insert a JSON code or any other message format that your service requires for automation into the text fields. The strategy supports special placeholders (for example, `{{strategy.order.alert_message}}`), which allow you to dynamically insert the necessary data into the message, such as the amount of USDT or the percentage of the deposit for entry, averaging and take profit orders.
Credit Spread Alpha SignalCredit Spread Alpha Signal: Complete Description
Introduction and Purpose
The Credit Spread Alpha Signal is a custom indicator developed for TradingView, designed to monitor the credit spread between High Yield (HY) bond yields and the 10-Year US Treasury yield (US10Y). This indicator serves as an advanced macroeconomic tool for traders and investors, helping to identify shifts in risk sentiment, monetary policy adjustments, or financial stress in the economy. It combines credit market data with statistical analysis to generate inverted buy and sell signals, where wider spreads (deteriorated conditions) are seen as buy opportunities (green), and tight spreads (risk-on) as sell opportunities (red).
The script is original, inspired by macroeconomic concepts, and visualizes data intuitively with histograms, background colors, and signal arrows. It is particularly useful for portfolio traders seeking confirmation signals or early warnings, integrating seamlessly into charts of stocks, bonds, or crypto assets.
Key Concepts
- HY Spread : Calculated as the difference between the High Yield Corporate Effective Yield (symbol: BAMLH0A0HYM2EY) and the US10Y Yield. Wider spreads indicate higher credit risk and economic deterioration (buy opportunity in the inverted logic). Tight spreads reflect market optimism (risk-on, sell opportunity).
- Inverted Signal Logic : Unlike traditional interpretation, here widening spreads (stress) trigger green and buy arrows (↑ below the chart), suggesting entry into long positions during panics. Compressing spreads trigger red and sell arrows (↓ above the chart), indicating exit during optimism peaks.
- Visual Highlights : Green for spread > +2.2σ (financial stress, buy); Red for spread < low threshold (risk-on, sell); Optional orange for recession risk (inverted curve + high spread, strong buy).
The indicator uses statistics like simple moving average (SMA) and standard deviation for dynamic thresholds, making it adaptable to different market periods.
How It Works: Internal Calculations
1. Data Sources : Uses `request.security` to fetch daily data ("D") from US10Y, US02Y (for inverted curve), and HY Yield.
2. Spread Calculation : `spread_hy = hy_yield - us10y`.
3. Statistics :
- Average (SMA) of the spread over the last `sma_length` days (default: 120).
- Standard deviation (stdev) over the same period.
- High threshold: `avg_spread_hy + std_mult * std_spread_hy` (default: multiplier 2.2).
- Low threshold: Editable value (default: 1.5%).
4. Conditions :
- High stress (green/buy): `spread_hy > high_threshold`.
- Compression (red/sell): `spread_hy < low_threshold`.
- Recession risk (orange/strong buy, optional): Inverted curve (`us10y < us2y`) + spread > `recession_spread_threshold`.
5. Crossings for Signals :
- Buy (green ↑ below): Crossover above high threshold (`ta.crossover`).
- Sell (red ↓ above): Crossunder below low threshold (`ta.crossunder`).
These calculations are processed bar by bar, ensuring real-time updates.
Visual Elements
- Histogram : Plots the spread as columns (`plot.style_columns`), dynamically colored: Light green (90% transparency) for stress/buy; Light red (90%) for compression/sell; Gray for neutral; Orange for recession.
- Reference Line : Horizontal red line at zero for benchmark.
- Background Coloring : Applies color to the main chart (overlay=true via force_overlay): Light green for buy, Light red for sell, Orange for recession, no color for neutral.
- Signal Arrows : ↑ Green below the bar for buy (widening_cross); ↓ Red above the bar for sell (compressed_cross).
- Floating Legend : Label in the lower panel explaining thresholds and conditions, dynamically updated with editable values.
Editable Settings (Inputs)
- SMA Period (days) : Default 120; adjusts the horizon for average and standard deviation.
- Standard Deviation Multiplier : Default 2.2; sets sensitivity of the high threshold (e.g., 2.2σ for moderate alerts).
- Low Threshold for Compression (%) : Default 1.5; level to detect risk-on/sell.
- Enable Recession Risk? : Default false; activates combined condition of inverted curve + high spread.
- Spread Threshold for Recession (%) : Default 2.0; level for recession (visible if enabled).
These inputs allow customization via the TradingView interface, without editing the code.
Integrated Alerts
The indicator includes alert conditions (`alertcondition`) for notifications in TradingView:
- "ALERT: HY Spread High": Spread exceeds threshold - financial stress (Buy).
- "ALERT: HY Spread Compressed": Spread compressed - risk-on conditions (Sell).
- "ALERT: HY Spread Widening (Buy)": Crossover above - buy opportunity in stress.
- "ALERT: HY Spread Compressed (Sell)": Crossunder below - sell opportunity in risk-on.
- "ALERT: Recession Risk (Strong Buy)": Inverted curve + high spread - high recession risk, consider buy (if enabled).
Set up alerts for email, SMS, or webhook notifications.
Usage Tips and Considerations
- Recommended Timeframe : Daily ("D"), but works on others; data is forced to daily for consistency.
- Practical Application : Add to charts of indices like SPY or QQQ to correlate with market moves. Test on historical periods (e.g., 2020 for widening, 2021 for compressing) to validate signals.
- Limitations : Relies on external data (US10Y, HY Yield), which may have delays; spreads are typically positive. Not financial advice – use with complementary analysis.
- Advanced Customization : Adjust thresholds for volatile markets; enable recession for more robust macro signals.
This indicator transforms credit data into actionable alpha, helping navigate economic cycles with visual precision. For support or modifications, refer to the source code or TradingView community.
Swing Averages & Next Swing Forecast Swing Averages & Next Swing Forecast
What it does:
Finds confirmed swing highs/lows, keeps only “significant” legs (default ≥ $0.10), then computes average up/down leg sizes and projects the next swing low and next swing high. Optionally runs calculations on a higher timeframe (HTF) while plotting on your current chart.
[RealEdgeFX] - EdgeMap ProWhat it does
RealEdgeFX EdgeMap Pro maps the daily institutional bias and then aligns intraday execution with a 1H Change-in-State of Delivery (CISD / ME) and its ME-aligned H1 fair-value gaps (FVGs).
It is designed to frame likely continuation/reversal zones, filter weak daily signals, and give a single, non-cluttered daily cue on any symbol and most timeframes.
How it works (high level)
• Daily Bias Engine (D): Uses the last closed day to classify bias (Buy/Sell/None). The classification blends:
• Body/Range filter (minimum body ratio),
• Inside/Outside-day + CLV (close-location value threshold),
• ATR breakout buffer (close beyond prior day’s extremes by an ATR-scaled margin),
• Weak sweep re-absorption (wick through prior extremes with small net re-entry).
• Optional override: a bias flip on confirmed rejection from an opposite FVG.
• A strength score (0–100) summarizes the quality (e.g., breakout > CLV > sweep, plus FVG context/rejection/override).
• CISD / ME (H1): On 1-hour closes, the tool detects an engulfing “change in delivery” against the previous run and plots the ME line at the prior run’s open. The ME invalidates if price closes through its protective extremes.
• ME-aligned H1 FVGs: After a new ME forms, only FVGs generated within the ME’s 1H window are tracked; they are auto-merged when overlapping and are invalidated if price closes through the gap in the opposite direction. You can choose to render only the FVGs aligned to the active ME side.
• Visual policy: One arrow per new daily session (Buy/Sell) with the strength label; ME line + label on ≤1H charts; a compact info table summarizes the last closed day’s components (bias, strength, CLV/ATR/sweep/FVG context, overrides, ME side & level).
All logic runs on confirmed bars; levels stay stable once their timeframe bar has closed.
Inputs & states
• Core [
• ATR Length / Breakout Buffer: tunes the daily breakout test.
• Sweep Weak Reabsorption: controls how small a re-entry qualifies as a sweep.
• Min Body / Range & CLV threshold: structure/position filters.
• Flip on opposite FVG rejection: enable/disable the override.
• CISD / ME (1H)
• Minimum bars in prior run and ignore micro-flip: robustness of the run segmentation.
• Line style/length & text offsets/colors for the ME line.
• ME FVGs (1H)
• Show/Hide, bars-ahead length, only-aligned toggle, fill/border styles, transparency.
• Arrows/Text
• History window (days), arrow size/colors, label size/colors.
• Signals & visuals
• Green/Buy / Blue-gray/Sell arrow when a new daily session starts and a bias exists.
• Strength label (%).
• ME line (BUY/SELL color-coded) and ME-aligned H1 FVG box.
• Info table with Daily Bias, Strength, CLV/ATR/Sweep, FVG context (inside/rejection), Overrides, and current ME side & level.
How to use
1. Timeframes : Works on any chart; ME/FVG visuals are intended for ≤ 1H charts (the daily bias still updates once per daily session on higher TFs).
2. Process :
• Start with the Daily Bias and Strength (yesterday’s close).
• If bias = Sell, prefer sell-side ME and ME-aligned H1 FVGs for entries; if price invalidates the ME or the FVG, stand down.
• If bias = Buy, mirror the logic on the buy side.
3. Risk : Consider ATR-scaled stops beyond ME/FVG invalidation and respect session/volatility constraints.
What makes it original
EdgeMap Pro integrates a daily bias model with intraday execution structure in a single, coherent framework:
• The Daily Bias Engine isn’t a mashup; it fuses body/position, ATR-scaled breakouts, and weak-sweep re-absorption into one decision, then optionally overrides on opposite-FVG rejection.
• The ME detector ties bias to validated 1H state changes and governs which FVGs are actionable, with auto-merge and close-through invalidation to avoid stale zones.
• The result is a clean, once-per-day cue plus precise H1 structure—no dashboard overload, no repaint on confirmed bars.
Terms and Conditions
Our charting tools are provided for informational and educational purposes only and do not constitute financial, investment, or trading advice. RealEdgeFX – EdgeMap Pro is not designed to predict market movements or to provide specific recommendations. Past performance is not indicative of future results and should not be relied upon for financial decisions.
By using our tools, the purchaser agrees that RealEdgeFX and the creator(s) are not responsible for any decisions made based on the information provided. The purchaser assumes full responsibility and risk for any actions taken and their consequences, including any financial losses that may occur from using these products. By purchasing, the customer acknowledges and accepts that RealEdgeFX and the creator(s) are not liable for any unwanted outcomes related to the development, sale, or use of these products. The purchaser also agrees to indemnify RealEdgeFX from any and all liability arising from the use.
Subscriptions, coupons, and cancellation. If the purchaser was invited through a Friends & Family program or uses a discount code, the discount applies only to the first purchase/first billing cycle of the RealEdgeFX – EdgeMap Pro subscription, unless otherwise stated in the offer. The purchaser is solely responsible for canceling — or requesting cancellation of — the subscription if they do not wish to continue after the discounted period and/or at full retail price. If the purchaser no longer wishes to use the product, they must unsubscribe from the membership service, where applicable.
Access and use. Access may be provided, for example, via TradingView invite and requires an active subscription. Access is personal and non-transferable; sharing, reselling, redistributing, copying, decompiling, or attempting to reverse engineer the code is prohibited. Access may be suspended or revoked in case of violations of these terms or platform policies.
Refund policy. We maintain a no reimbursement, no refund, and no chargeback policy. Once these Terms and Conditions are accepted prior to purchase, no refunds, returns, or chargebacks will be provided under any circumstances, to the maximum extent permitted by law.
By continuing to use these charting tools, the user acknowledges and agrees to these Terms and Conditions. These terms may be updated periodically.