Candlestick analysis
Trapped Traders [ScorsoneEnterprises]This indicator identifies and visualizes trapped traders - market participants caught on the wrong side of price movements with significant volume imbalances. By analyzing volume delta at specific price levels, it reveals where traders are likely experiencing unrealized losses and may be forced to exit their positions.
The point of this tool is to identify where the liquidity in a trend may be.
var lowerTimeframe = switch
useCustomTimeframeInput => lowerTimeframeInput
timeframe.isseconds => "1S"
timeframe.isintraday => "1"
timeframe.isdaily => "5"
=> "60"
= ta.requestVolumeDelta(lowerTimeframe)
price_quantity = map.new()
is_red_candle = close < open
is_green_candle = close > open
for i=0 to lkb-1 by 1
current_vol = price_quantity.get(close)
new_vol = na(current_vol) ? lastVolume : current_vol + lastVolume
price_quantity.put(close, new_vol)
if is_green_candle and new_vol < 0
price_quantity.put(close, new_vol)
else if is_red_candle and new_vol > 0
price_quantity.put(close, new_vol)
We see in this snippet, the lastVolume variable is the most recent volume delta we can receive from the lower timeframe, we keep updating the price level we're keeping track of with that lastVolume from the lower timeframe.
This is the bulk of the concept as this level and size gives us the idea of how many traders were on the wrong side of the trend, and acting as liquidity for the profitable entries. The more, the stronger.
There are 3 ways to visualize this. A basic label, that will display the size and if positive or negative next to the bar, a gradient line that goes 10 bars to the future to be used as a support or resistance line that includes the quantity, and a bubble chart with the quantity. The larger the quantity, the bigger the bubble.
We see in this example on NYMEX:CL1! that there are lines plotted throughout this price action that price interacts with in meaningful way. There are consistently many levels for us.
Here on CME_MINI:ES1! we see the labels on the chart, and the size set to large. It is the same concept just another way to view it.
This chart of CME_MINI:RTY1! shows the bubble chart visualization. It is a way to view it that is pretty non invasive on the chart.
Every timeframe is supported including daily, weekly, and monthly.
The included settings are the display style, like mentioned above. If the user would like to see the volume numbers on the chart. The text size along with the transparency percentage. Following that is the settings for which lower timeframe to calculate the volume delta on. Finally, if you would like to see your inputs in the status line.
No indicator is 100% accurate, use "Trapped Traders" along with your own discretion.
BB KC Triangle SignalsBased on Trader Oracle's engulfing candle off Bolinger Band.
I added keltner channels as well. So this prints a symbol ( I use triangles) over the engulfing candle at or near the bolinger band/ keltner channel. Don't have to have the bands printed on the screen for them to work. Seems to work on renko too.
High Timeframe Candle Overlay (Configurable)HTF Candle Overlay — Read Higher Timeframe on Lower Timeframe Charts
What it does
This indicator draws each selected Higher-Timeframe (HTF) candle directly on your lower-timeframe (LTF) chart. It shows a translucent range box (HTF high–low) and an inner body box (HTF open–close), so you can track how the bigger candle is forming while you analyze lower-timeframe structure, liquidity sweeps, and intrabar reactions.
Why it’s helpful
• See where the current HTF candle opened, where price sits inside its body, and how far wicks extend—without leaving your LTF chart.
• Combine HTF context (e.g., 1H/4H) with LTF execution (e.g., 1m–15m) to spot confluence, S/R flips, and failed breaks faster.
• The overlay is locked to the price scale and anchored by bar index, so it pans/zooms exactly with your chart (no drifting while dragging).
⸻
How it works (under the hood)
• Fetches HTF OHLC via request.security.
• When a new HTF bar starts, the previous HTF boxes are frozen at the true close.
• The current HTF bar updates intrabar (so you see live formation) and is clamped to the correct span.
• Horizontal anchoring uses bar index, and a hidden price plot binds the script to the main price scale for stable zoom/pan behavior.
⸻
Inputs
• High Timeframe (HTF): Default 1H (set any TF you like).
• Show High–Low Box: On/off.
• Show Body Box (Open–Close): On/off.
• Opacity for range/body boxes.
• Bull/Bear Colors and Outline + Width.
• Max HTF Candles to Keep: Auto-deletes older boxes to maintain performance.
⸻
Usage tips
• Popular combos: view 1H or 4H candles while trading 1–15m charts.
• Turn off the range box if you only want a clean HTF body overlay.
• Pair with your session/structure tools; this indicator is visual context only (no signals or alerts).
⸻
Notes & limitations
• Non-repainting for closed HTF bars: once an HTF candle closes, its boxes are fixed. The current/in-progress HTF bar updates until it closes (expected live behavior).
• Data alignment depends on your symbol’s feed and session settings. Heikin Ashi/renko/etc. may not match classic OHLC.
• Heavy history + many boxes can affect performance; reduce “Max HTF Candles to Keep” if needed.
⸻
Disclaimer
This script is for education and charting visualization only. It does not provide financial advice, trade signals, or performance guarantees. Always do your own research and manage risk.
Chart Patterns – [AlphaGroup.Live]
# 📈 Chart Patterns Indicator –
Stop guessing. This tool hunts down the **10 most powerful price action patterns** and prints them on your chart exactly where they happen — once. No spam. No noise.
### Patterns Detected:
- Ascending / Descending / Symmetrical Triangles
- Rising & Falling Wedges
- Bull & Bear Flags
- Bull & Bear Pennants
- Double Tops & Bottoms
- Head & Shoulders / Inverse Head & Shoulders
### Why Traders Use It:
- **Clean execution**: Labels appear once, exactly where the structure forms.
- **No clutter**: Lines are capped, anchored, and never stretch across your entire chart.
- **Control**: Adjustable lookback, label spacing, and style.
### How to Apply:
- Catch continuation setups before the breakout.
- Identify reversal structures before the crowd.
- Train your eyes to see what institutions use to move billions.
⚡ Want more?
Get **100 battle-tested trading strategies**:
👉 (alphagroup.live)
This isn’t theory. It’s structure recognition at scale. Use it — or keep drawing lines by hand and falling behind.
FVG Zones – shrink on fill (bull/bear)Detects classic 3-candle FVGs (ICT definition).
Draws zones as boxes that extend to the right.
On each bar close:
Checks overlap with the current candle.
Shrinks the zone when price wicks into it (bullish: top moves down; bearish: bottom moves up).
Deletes the zone once it’s completely filled/closed.
Inputs: bullish/bearish zone color, border color, and max number of visible FVGs.
Possible extensions:
Multi-timeframe FVGs (e.g. H1 FVGs shown on M5).
Separate limits for bullish and bearish zones.
Alerts for new FVG, partial fill, or closed FVG.
Option “Body only” (ignore wicks when detecting overlap).
Minimum FVG size filter (ticks/ATR).
Shooting Star & Hammer mod.Indicator for identifying hammer and shooting stars in a modified version;
The body is larger than the classic version.
You can modify the size of the drill bits if you're looking for a specific pattern.
Use in conjunction with your analysis and/or other charting tools.
Bearish Breakaway Dual Session-FVGInspired by the FVG Concept:
This indicator is built on the Fair Value Gap (FVG) concept, with a focus on Consolidated FVG. Unlike traditional FVGs, this version only works within a defined session (e.g., ETH 18:00–17:00 or RTH 09:30–16:00).
See the Figure below as an example:
Bearish consolidated FVG & Bearish breakaway candle
Begins when a new intraday high is printed. After that, the indicator searches for the 1st bearish breakaway candle, which must have its high below the low of the intraday high candle. Any candles in between are part of the consolidated FVG zone. Once the 1st breakaway forms, the indicator will shades the candle’s range (high to low). Then it will use this candle as an anchor to search for the 2nd, 3rd, etc. breakaways until the session ends.
Session Reset: Occurs at session close.
Repaint Behavior:
If a new intraday (or intra-session) high forms, earlier breakaway patterns are wiped, and the system restarts from the new low.
Counter:
A session-based counter at the top of the chart displays how many bullish consolidated FVGs have formed.
Settings
• Session Setup:
Choose ETH, RTH, or custom session. The indicator is designed for CME futures in New York timezone, but can be adjusted for other markets.
If nothing appears on your chart, check if you loaded it during an inactive session (e.g., weekend/Friday night).
• Max Zones to Show:
Default = 3 (recommended). You can increase, but 3 zones are usually most useful.
• Timeframe:
Best on 1m, 5m, or 15m. (If session range is big, try higher time frame)
Usage:
See this figure as an example
1. Avoid Trading in Wrong Direction
• No Bearish breakaway = No Short trade.
• Prevents the temptation to countertrade in strong uptrends.
2. Catch the Trend Reversal
• When a bearish breakaway appears after an intraday high, it signals a potential reversal.
• You will need adjust position sizing, watch out liquidity hunt, and place stop loss.
• Best entries of your preferred choices: (this is your own trading edge)
Retest
Breakout
Engulf
MA cross over
Whatever your favorite approach
• Reversal signal is the strongest when price stays within/below the breakaway candle’s
range. Weak if it breaks above.
3. Higher Timeframe Confirmation
• 1m can give false reversals if new lows keep forming.
• 5m often provides cleaner signals and avoids premature reversals.
Summary
This indicator offers 3 main advantages:
1. Prevents wrong-direction trades.
2. Confirms trend entry after reversal signals.
3. Filters false positives using higher timeframes.
Failed example:
Usually happen if you are countering a strong trend too early and using 1m time frame
Last Mention:
The indicator is only used for bearish side trading.
Previous Candle High/Low (Global Rays)Previous Candle High/Low (Global Rays, Corrected)
This indicator tracks the high and low of the most recently closed candle and projects them forward as global horizontal rays.
Features:
✅ Automatically updates the levels once a candle fully closes.
✅ Draws persistent lines at the previous candle’s high (green) and low (red), extending them into the future.
✅ Highlights real-time breakouts:
✅ Includes built-in alert conditions for both breakout events.
How to Use:
Use the levels as reference points for breakout trades, liquidity sweeps, or stop hunts.
Alerts can help you catch moves without needing to constantly watch the chart.
Works on any timeframe and symbol.
Master Candle# Master Candle Indicator
## Overview
The Master Candle Indicator identifies and highlights significant price consolidation patterns where multiple candles trade within the high-low range of a single "master" candle. This technical analysis tool helps traders spot potential breakout zones and key support/resistance levels.
## What is a Master Candle?
A Master Candle is a candlestick that contains 4 or more subsequent candles completely within its high-low range. These formations often indicate:
- Market consolidation phases
- Potential breakout areas
- Strong support and resistance levels
- Areas of price compression before significant moves
## Features
✅ **Automatic Detection**: Scans historical data to identify Master Candle patterns
✅ **Visual Highlighting**: Draws colored boxes around detected Master Candles
✅ **Customizable Parameters**: Adjust minimum candles required (2-20)
✅ **Candle Counter**: Shows exact number of candles contained within each Master Candle
✅ **Performance Optimized**: Efficient lookback system with memory management
✅ **Clean Interface**: Non-intrusive visual design that doesn't clutter charts
## How to Use
1. Add the indicator to your chart
2. Adjust the "Minimum candles inside" parameter (default: 4)
3. Set the lookback period for historical scanning (default: 50)
4. Master Candles will be automatically highlighted with colored boxes
5. Use these levels as potential support/resistance zones for your trading strategy
## Settings
- **Minimum candles inside**: Set how many candles must be contained (2-20)
- **Lookback period**: How far back to scan for patterns (10-200 bars)
## Educational Purpose
This indicator is designed for educational and analysis purposes. It helps traders:
- Understand market consolidation patterns
- Identify potential breakout zones
- Recognize key support and resistance areas
- Improve market structure analysis skills
## Technical Details
- Compatible with all timeframes
- Works on any trading instrument
- Optimized for performance with automatic memory management
- Uses historical data analysis for pattern detection
## Important Notes
- This indicator is for educational and analytical purposes only
- Past patterns do not guarantee future results
- Always combine with other analysis tools
- Practice proper risk management in your trading
- Not financial advice - for educational use only
Pr0fit Circle 0rbThis indicator automatically plots dynamic support and resistance zones on the chart using swing highs and swing lows. The levels are drawn as dotted lines that extend into the future, making it easy to identify key areas where price may react.
Сила быков и медведейThe indicator is based on the idea that the buyer's strength is represented on the chart as the distance from the bar's minimum to the close, and the seller's strength as the distance from the bar's maximum to the close.
The indicator finds the difference between the buyer's and seller's strength for each bar, and then the arithmetic mean for the given period.
If the indicator value is above 0, then the buyer was stronger than the seller over the given period.
If the indicator value is below 0, then the seller was stronger than the buyer over the given period.
Advanced Price Ranges ICTThis indicator automatically divides price into fixed ranges (configurable in points or pips) and plots important reference levels such as the high, low, 50% midpoint, and 25%/75% quarters. It is designed to help traders visualize structured price movement, spot confluence zones, and frame their trading bias around clean range-based levels.
🔹 Key Features
Custom Range Size: Define ranges in points (e.g., 100, 50, 25, 10) or in Forex pips.
Forex Mode: Automatically adapts pip size (0.0001 or 0.01 for JPY pairs).
Dynamic Anchoring: Price ranges automatically align to the current price, snapping into blocks.
Multiple Ranges: Option to extend visualization above and below the current active block for a complete grid.
Level Types:
High / Low of the range
50% midpoint
25% and 75% quarters
Custom Styling: Adjustable line colors and widths for each level type.
Labels: Optional right-edge labels showing level type and exact price.
Alerts: Built-in alerts for when price crosses the range high, low, or 50% midpoint.
🔹 Use Cases
Quickly map out 100/50/25/10 point structures like Zeussy’s advanced price range method.
Identify key reaction levels where liquidity is often built or swept.
Support ICT-style concepts like range-based bias, fair value gaps, and liquidity pools.
Works for indices, futures, crypto, and forex.
🔹 Customization
Range increments can be set to any size (default 100).
Toggle which levels are shown (High/Low, Midpoint, Quarters).
Adjustable line widths, colors, and label visibility.
Extend ranges above and below for broader market context.
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)")
Berlin High/Low bis 15:30dayHigh := na(dayHigh) ? high : math.max(dayHigh, high)
dayLow := na(dayLow) ? low : math.min(dayLow, low)
Dove Capital Liquidity Expansion Map — Weekly 250‑pip Bands (v6)The Best Market Maker Liqudation zone Trap. Trade The highs and lows and make some money
Sabina's TRAMA Crossover MTF📊 Sabina's TRAMA Crossover MTF
Trend Regularity Adaptive Moving Average (TRAMA) is a dynamic smoothing algorithm that adjusts based on trend consistency. Unlike traditional moving averages like EMA or SMA, TRAMA speeds up in strong trends and slows down during consolidation, reducing noise and lag.
This script plots two TRAMA lines (short and long) and dynamically colors them based on crossover direction:
🟢 Green: Bullish crossover (short TRAMA crosses above long TRAMA)
🔴 Red: Bearish crossover (short TRAMA crosses below long TRAMA)
✅ Multi-Timeframe Enabled
You can run the indicator on your current chart while calculating TRAMA from any higher or lower timeframe. This gives you flexibility to track trend strength across different contexts.
Use cases:
Trend-following entries with adaptive confirmation
Scalping with higher-timeframe filters
Visual clarity of market regime (consolidation vs expansion)
BTC vs USDT Dominance + Info//@version=5
indicator("BTC vs USDT Dominance + Info", overlay=false)
// Ambil data BTCUSDT (Bybit)
btc = request.security("BYBIT:BTCUSDT", timeframe.period, close)
// Ambil data USDT Dominance (USDT.D)
usdtDom = request.security("CRYPTOCAP:USDT.D", timeframe.period, close)
// Normalisasi biar skalanya sama
btcNorm = (btc - ta.lowest(btc, 200)) / (ta.highest(btc, 200) - ta.lowest(btc, 200)) * 100
usdtNorm = (usdtDom - ta.lowest(usdtDom, 200)) / (ta.highest(usdtDom, 200) - ta.lowest(usdtDom, 200)) * 100
// Plot garis
plot(btcNorm, color=color.green, title="BTC (Normalized)", linewidth=2)
plot(usdtNorm, color=color.red, title="USDT Dominance (Normalized)", linewidth=2)
// Deteksi arah candle terakhir
btcUp = ta.change(btc) > 0
btcDown = ta.change(btc) < 0
// Label info otomatis
if btcUp
label.new(bar_index, btcNorm, "BTC Naik → USDT Dominance Turun",
color=color.green, textcolor=color.white, style=label.style_label_up)
if btcDown
label.new(bar_index, btcNorm, "BTC Turun → USDT Dominance Naik",
color=color.red, textcolor=color.white, style=label.style_label_down)
X D HL MitigationDesigned to track and project prior day high and low levels into the current trading session. It provides traders with reference points for potential support and resistance without being distorted by the unfinished intraday range of the active day.
Key Features
Prior-Day Anchoring
At the start of each new trading day, the indicator captures the previous day’s high and low.
Current-day developing highs and lows are ignored, ensuring only completed data drives level creation.
Dynamic Extensions
Each high and low level is extended forward intraday until price action mitigates (touches or crosses) the level.
When mitigated, the line is automatically “frozen” at the bar of contact and restyled to a new color.
This makes it easy to distinguish which historical levels remain active versus which have already been resolved by price.
End-of-Day Housekeeping
Optional setting allows all mitigated lines to be automatically removed at the end of each trading day, keeping charts uncluttered and focused only on active levels.
Trading Applications
Support & Resistance Mapping: Prior-day highs and lows are commonly watched areas where liquidity pools form and price often reacts.
Breakout & Reversal Signals: Monitoring if and when price mitigates these levels can help confirm breakouts or identify potential reversals.
Intraday Focus: By excluding developing highs and lows of the current session, the indicator emphasizes only proven, market-validated levels.
Intraday Option BuyIt's a clear Intraday option buying indicator where Chikou, the lagging span if geometrically synched with line chart can give clear view on trending/ momentum period.
SMC Yardımcısı - TR (Optimize v2.1)BOS (Break of Structure)
Labels when price closes above/below a previous swing high/low.
Shows continuation of the current trend.
CHOCH (Change of Character)
Appears when trend direction shifts (from bullish to bearish or vice versa).
Marks possible market reversals.
FVG (Fair Value Gap)
Highlights price imbalance zones (3-candle gaps).
These are often areas where price later returns to “fill” liquidity.
OTE (Optimal Trade Entry, 62–79% retracement)
Uses the last swing high and swing low.
Draws the Fibonacci retracement zone (62–79%), considered a common institutional entry area.
BSL (Buy Side Liquidity – Equal Highs)
Detects equal highs and plots them as liquidity pools.
Shows where buy-side liquidity/stop hunts may occur.
SSL (Sell Side Liquidity – Equal Lows)
Detects equal lows and plots them.
Indicates sell-side liquidity levels.
Inducement / Liquidity Sweep
If price wicks above BSL or below SSL but closes back inside, a “sweep” label is shown.BOS (Break of Structure – Yapı Kırılımı)
BTC vs USDT Dominance + Info//@version=5
indicator("BTC vs USDT Dominance + Info", overlay=false)
// Ambil data BTCUSDT (Bybit)
btc = request.security("BYBIT:BTCUSDT", timeframe.period, close)
// Ambil data USDT Dominance (USDT.D)
usdtDom = request.security("CRYPTOCAP:USDT.D", timeframe.period, close)
// Normalisasi biar skalanya sama
btcNorm = (btc - ta.lowest(btc, 200)) / (ta.highest(btc, 200) - ta.lowest(btc, 200)) * 100
usdtNorm = (usdtDom - ta.lowest(usdtDom, 200)) / (ta.highest(usdtDom, 200) - ta.lowest(usdtDom, 200)) * 100
// Plot garis
plot(btcNorm, color=color.green, title="BTC (Normalized)", linewidth=2)
plot(usdtNorm, color=color.red, title="USDT Dominance (Normalized)", linewidth=2)
// Deteksi arah candle terakhir
btcUp = ta.change(btc) > 0
btcDown = ta.change(btc) < 0
// Label info otomatis
if btcUp
label.new(bar_index, btcNorm, "BTC Naik → USDT Dominance Turun",
color=color.green, textcolor=color.white, style=label.style_label_up)
if btcDown
label.new(bar_index, btcNorm, "BTC Turun → USDT Dominance Naik",
color=color.red, textcolor=color.white, style=label.style_label_down)
Rolling Correlation BTC vs Hedge AssetsRolling Correlation BTC vs Hedge Assets
Overview
This indicator calculates and plots the rolling correlation between Bitcoin (BTC) returns and several key hedge assets:
• XAUUSD (Gold)
• EURUSD (proxy for DXY, U.S. Dollar Index)
• VIX (Volatility Index)
• TLT (20y U.S. Treasury Bonds ETF)
By monitoring these dynamic correlations, traders can identify whether BTC is moving in sync with risk assets or decoupling as a hedge, and adjust their trading strategy accordingly.
How it works
1. Computes returns for BTC and each asset using percentage change.
2. Uses the rolling correlation function (ta.correlation) over a configurable window length (default = 12 bars).
3. Plots each correlation as a separate colored line (Gold = Yellow, EURUSD = Blue, VIX = Red, TLT = Green).
4. Adds threshold levels at +0.3 and -0.3 to help classify correlation regimes.
How to use it
• High positive correlation (> +0.3): BTC is moving together with the asset (risk-on behavior).
• Near zero (-0.3 to +0.3): BTC is showing little to no correlation — neutral/independent moves.
• Negative correlation (< -0.3): BTC is moving in the opposite direction — potential hedge opportunity.
Practical strategies:
• Watch BTC vs VIX: a spike in volatility (VIX ↑) usually coincides with BTC selling pressure.
• Track BTC vs EURUSD: stronger USD often puts downside pressure on BTC.
• Observe BTC vs Gold: during “flight to safety” events, gold rises while BTC weakens.
• Monitor BTC vs TLT: rising yields (falling TLT) often align with BTC weakness.
Inputs
• Window Length (bars): Number of bars used to calculate rolling correlations (default = 12).
• Comparison Timeframe: Default = 5m. Can be changed to align with your intraday or swing trading style.
Notes
• Works best on intraday charts (1m, 5m, 15m) for scalping and short-term setups.
• Use correlations as context, not standalone signals — combine with volume, VWAP, and price action.
• Correlations are dynamic; they can switch regimes quickly during macro events (CPI, NFP, FOMC).
This tool is designed for traders who want to manage risk exposure by monitoring whether BTC is behaving as a risk-on asset or hedge, and to exploit opportunities during decoupling phases.