Price Action By ProfitAlgo.io Price Action Alerts combined with the BackEnd Order Matrix and TrendSync Tool Kit.
ProfitAlgo.io Price Action
A companion tool to the Backend Order Matrix and TrendSync, this indicator helps visualize trade direction with A/B/C/D retracement lines that align with fib retracement levels which can react as a BIG BOUNCE RETEST ENTRY, multi-timeframe support/resistance, and an RSI filter. It’s designed as a guide for bias confirmation, not a signal to enter every mark. Combine it with the Backend Order Matrix (for liquidity/stop-hunt zones) and TrendSync (for trend confirmation) to better spot where stop hunts become opportunities and price action aligns with higher-probability setups.
Price is shown bullish and the retracement lines are defined by the dotted lines. You may color the lines to your discretion to be able to quickly differentiate the different retracments lines on the chart aligning to Fib levels for possible early entries. Here you can anticipate for price to have a significant reaction with placing your stop loss being the Buy-Side Liquidity as show below. Though the BackEnd Order Matrix liquidity can be swept so keep in mind being more patient to wait for the liquidity sweep as the point entry can serve as another approach to minimize risk exposure.
Exiting at the SellSide Liquidity where price can have an reaction to the downside.
Vise Versa for bearish trend following retracement entires.
⚙️ Settings Guide – ProfitAlgo.io Price Action
Retracement Line (A/B/C/D) → Shows potential price action setups where price can have a strong reaction. Having Price above the lines- price can be shown to buy at these levels. If Price is below the lines and the trend is showing bearish the price can be shown to retest and sell at these levels.
Multi-Timeframe S/R → Plots higher-timeframe support and resistance levels for added context.
RSI Filter → Filters entries when RSI conditions are extreme, helping avoid false setups.
Top-Down Analysis (TDA) → Aligns lower-timeframe entries with higher-timeframe structure.
📌 Tip: The TrendSync's trend detection visual representation Together with Backend Order Matrix (for liquidity zones/stop hunts) helps Traders understand trend based trading with liquidity stop hunts which can be used as a entry model that does not happen as many times as the Price Action Tool does for early entries signals. If you would like to read more on how the The BackEnd Order Matrix and TrendSync Simulation Tool works. Feel free to read the articles below.
The How to Use The BackEnd Order Matrix?
The How to Use The TrendSync Simulation Tool?
趨勢分析
RSI Divergence + Hidden RSI Divergence + Hidden (TV-like pairing, final)
What it does
This indicator plots RSI and automatically detects both regular and hidden divergences by pairing RSI pivots with price pivots. It supports a TradingView-like loose pairing (within a user-defined bar tolerance) and a strict same-bar pairing. Detected signals are drawn with lines and optional labels on the RSI pane for quick visual verification.
Divergence logic
Regular Bullish (label: Bull)
Price makes a lower low while RSI makes a higher low → potential upward reversal.
Regular Bearish (label: Bear)
Price makes a higher high while RSI makes a lower high → potential downward reversal.
Hidden Bullish (label: H_Bull)
Price makes a higher low while RSI makes a lower low → trend-continuation bias upward.
Hidden Bearish (label: H_Bear)
Price makes a lower high while RSI makes a higher high → trend-continuation bias downward.
All conditions use pivot-to-pivot comparisons with optional equality tolerance for price and RSI to reduce false “equal” mismatches.
Pairing modes
TV-like
Pairs the latest price and RSI pivots if their pivot bars occur within ±tolBars.
A lightweight “pending” buffer allows pairing a newly detected pivot with a recent opposite pivot that arrived a few bars earlier/later (within tolerance).
Same Bar
Price and RSI pivots must occur on the exact same bar to form a pair.
Key inputs
RSI Source & Length: srcRsi, rsiLen (default 14). RSI line and reference levels (70/50/30) can be shown/hidden.
Pivot Window: leftBars, rightBars for both price and RSI pivots.
Pairing: pairMode = TV-like or Same Bar; tolBars for bar tolerance (TV-like only).
Price Pivot Basis: priceMode = High/Low (default) or Close.
Equality Tolerance:
allowEqual (use >=/<=),
priceEpsTks (ticks) for price equality slack,
rsiEps (points) for RSI equality slack.
Visibility: showRSI, showRegular, showHidden, showLabels.
Visuals
Lines (on RSI):
Regular Bearish: red
Regular Bullish: lime
Hidden Bearish: orange
Hidden Bullish: teal
Labels (optional): "Bear", "Bull", "H_Bear", "H_Bull" placed on the RSI series at the second pivot.
Alerts
Four alert conditions are provided and fire when the corresponding divergence is confirmed:
Bear (Regular)
Bull (Regular)
H_Bear (Hidden)
H_Bull (Hidden)
Notes & tips
Divergences are evaluated only when both price and RSI pivots exist and can be paired under the selected mode.
Pivot sensitivity: smaller leftBars/rightBars → earlier but noisier signals; larger values → fewer, more stable pivots.
Tolerance: If you miss valid setups because pivots land a few bars apart, use TV-like with a small tolBars (e.g., 1–2). If you prefer stricter confirmation, use Same Bar.
Equality slack: Use priceEpsTks and rsiEps to avoid rejecting near-equal highs/lows due to tiny differences.
Works on any symbol/timeframe; as with all divergence tools, treat signals as context—combine with trend, structure, and risk management.
ProfitAlgo.io TrendSync SimulationThe TrendSync Simulation is a gradient-based trend-following framework that helps traders quickly identify bullish vs bearish market structure while filtering out short-term noise.
Instead of relying on a single moving average or indicator, TrendSync builds a layered “trend cloud” in 3 different MODES, KUMO, PFA, HMA anchored against a reference band. These layers create a visual gradient that shifts with market direction.
When combined with its color-adaptive candles, you can turn off your candle setting colors within the chart settings of TradingView for the TrendSync color mapping which transforms raw price action into an easy-to-read flow map of institutional momentum.
📊 How It Works
Each layer creates a smooth gradient that shifts with trend direction:
Bullish trends form a rising, green-shaded cloud.
Bearish trends form a descending, red-shaded cloud.
Transitions appear as fading or compressing gradients, signaling potential reversals or consolidations.
Candles are also dynamically colored based on normalized momentum, allowing traders to see directional strength at a glance.
🔑 Key Features
✅ Gradient Cloud – A layered trend structure that visually shifts from bearish → bullish.
✅ Multiple Modes – Choose between KUMO, PFA, or HMA logic for responsiveness vs. smoothness.
✅ Dynamic Trend Candles – Bars adapt color based on momentum strength.
✅ Customizable Visualization – Adjust transparency, colors, and gradient strength to fit your chart style.
✅ Clarity of Direction – Highlights dominant flow while reducing noise from minor fluctuations.
⚙️ Settings Explained
Trend Method (KUMO / PFA / HMA): Controls the type of moving average used for the cloud.
Gradient Colors: Define the shading of bullish vs. bearish zones.
Transparency Controls: Adjust how strong or subtle the gradient cloud appears.
Lookback Length : Longer = smoother trend; shorter = more reactive.
💡 Use Cases
Identify trend bias quickly without switching between multiple indicators.
Confirm entries with liquidity or breakout strategies by aligning with the cloud.
Detect weakening or strengthening momentum via gradient compression.
Avoid trading against dominant higher time-frame flow with trend-colored candles .
⚡ Why It Matters
Markets often look chaotic on raw candlestick charts. TrendSync cuts through that noise by layering moving averages into a visual gradient, revealing institutional momentum in real time. Whether scalping, day trading, or swing trading, TrendSync provides a synchronized view of trend direction that adapts to different trading styles.
⚡ Paired with the Back End Order Matrix, TrendSync provides the clarity of direction after liquidity zones are exposed, creating a complete institutional-style framework inside TradingView.
EXAMPLE 1A
EXAMPLE 1B
EXAMPLE 1C
EXAMPLE 2A
PE Rating by The Noiseless TraderPE Rating by The Noiseless Trader
This script analyzes a symbol’s Price-to-Earnings (P/E) ratio, using Diluted EPS (TTM) fundamentals directly from TradingView.
The script calculates the Price-to-Earnings ratio (P/E) using Diluted EPS (TTM) fundamentals. It then identifies:
PE High → the highest valuation point over a 3-year historical range.
PE Low → the lowest valuation point over a 3-year historical range.
PE Median → the midpoint between the two extremes, offering a fair-value benchmark.
PE (Int) → an additional intermediate low to track more recent undervaluation points. This is calculated based on lowest valuation point over a 1-year historical range
These levels are plotted directly on the chart as horizontal references, with markers showing the exact bars/dates when the extremes occurred. Candles corresponding to those days are also highlighted for context.
Bars corresponding to these extremes are highlighted (red = PE High, green = PE Low).
How it helps
Provides a historical valuation framework that complements technical analysis. We look for long opportunity or base formation near the PE Low and be cautious when stocks tends to trade near High PE.
We do not short the stock at High PE infact be cautious with long trades.
Helps identify whether current price action is happening near overvalued or undervalued zones.
Adds a long-term perspective to support swing trading and investing decisions. If a stock is coming from Low PE to Median PE and along with that if we get entry based on Classical strategies like Darvas Box, or HH-HL based on Dow Theory.
Offers a simple visual map of how far the market has moved from “cheap” to “expensive.”
This tool is best suited for long-term investors and swing traders who want to merge fundamentals with technical setups.
This indicator is designed as an educational tool to illustrate how valuation metrics (like earnings multiples) can be viewed alongside price action, helping traders connect fundamental context with technical execution in real market conditions.
Linear Regression Trend Navigator [QuantAlgo]🟢 Overview
The Linear Regression Trend Navigator is a trend-following indicator that combines statistical regression analysis with adaptive volatility bands to identify and track dominant market trends. It employs linear regression mathematics to establish the underlying trend direction, while dynamically adjusting trend boundaries based on standard deviation calculations to filter market noise and maintain trend continuity. The result is a straightforward visual system where green indicates bullish conditions favoring buy/long positions, and red signals bearish conditions supporting sell/short trades.
🟢 How It Works
The indicator operates through a three-phase computational process that transforms raw price data into adaptive trend signals. In the first phase, it calculates a linear regression line over the specified period, establishing the mathematical best-fit line through recent price action to determine the underlying directional bias. This regression line serves as the foundation for trend analysis by smoothing out short-term price variations while preserving the essential directional characteristics.
The second phase constructs dynamic volatility boundaries by calculating the standard deviation of price movements over the defined period and applying a user-adjustable multiplier. These upper and lower bounds create a volatility-adjusted channel around the regression line, with wider bands during volatile periods and tighter bands during stable conditions. This adaptive boundary system operates entirely behind the scenes, ensuring the trend signal remains relevant across different market volatility regimes without cluttering the visual display.
In the final phase, the system generates a simple trend line that dynamically positions itself within the volatility boundaries. When price action pushes the regression line above the upper bound, the trend line adjusts to the upper boundary level. Conversely, when the regression line falls below the lower bound, the trend line moves to the lower boundary. The result is a single colored line that transitions between green (rising trend line = buy/long) and red (declining trend line = sell/short).
🟢 How to Use
Green Trend Line: Upward momentum indicating favorable conditions for long positions, buy signals, and bullish strategies
Red Trend Line: Downward momentum signaling optimal timing for short positions, sell signals, and bearish approaches
Rising Green Line: Accelerating bullish momentum with steepening angles indicating strengthening upward pressure and potential for trend continuation
Declining Red Line: Intensifying bearish momentum with increasing negative slopes suggesting persistent downward pressure and shorting opportunities
Flattening Trend Lines: Gradual reduction in slope regardless of color may indicate approaching consolidation or momentum exhaustion requiring position review
🟢 Pro Tips for Trading and Investing
→ Entry/Exit Timing: Trade exclusively on band color transitions rather than price patterns, as each color change represents a statistically-confirmed shift that has passed through volatility filtering, providing higher probability setups than traditional technical analysis.
→ Parameter Optimization for Asset Classes: Customize the linear regression period based on your trading style. For example, use 5-10 bars for day trading to capture short-term statistical shifts, 14-20 for swing trading to balance responsiveness with stability, and 25-50 for position trading to filter out medium-term noise.
→ Volatility Calibration Strategy: Adjust the standard deviation multiplier according to market volatility. For instance, increase to 2.0+ during high-volatility periods like earnings or news events to reduce false signals, decrease to 1.0-1.5 during stable market conditions to maintain sensitivity to genuine trends.
→ Cross-Timeframe Statistical Validation: Apply the indicator across multiple timeframes simultaneously, using higher timeframes for directional bias and lower timeframes for entry timing.
→ Alert-Based Systematic Trading: Use built-in alerts to eliminate discretionary decision-making and ensure you capture every statistically-significant trend change, particularly effective for traders who cannot monitor charts continuously.
→ Risk Allocation Based on Signal Strength: Increase position sizes during periods of strong directional movement while reducing exposure during frequent band color changes that indicate statistical uncertainty or ranging conditions.
Tape Pressure Proxy — Signals (CVD + Imbalance + VWAP/EMA) v1.1Tape reading: The stack approximates aggressor flow using CVD (cumulative signed volume) and a Z-score “imbalance” of that signed volume. This captures speed/side bias you’d look for on the tape.
Premarket Hi/Lo + Prior Day O/C LevelsPremarket Hi/Lo + Prior Day O/C (today only) shows four clear reference levels for the current regular trading session: the Premarket High and Premarket Low (taken from a user-defined premarket window, 04:00–09:30 by default) and Yesterday’s 09:30 Open and 15:59 Close (sourced from the 1-minute feed for accuracy). The premarket levels “lock” at the opening bell so they don’t move for the rest of the day. All four lines are displayed only during today’s regular hours to keep the chart focused. Small right-edge labels and an optional top-right mini-table show the exact values at a glance.
This indicator is designed to give immediate context without technical jargon. The premarket high/low summarize where price traveled before the bell; the prior-day open/close summarize where the last session began and ended. Checking whether price is above or below these markers helps you quickly judge strength or weakness and anticipate where price may pause, bounce, or break. Typical uses include watching for a clean break and hold above Premarket High (often bullish), a break and hold below Premarket Low (often bearish), drift back toward Prior Day Close after a gap (a common “magnet”), and flips around Prior Day Open that can lead to continuation.
Setup: Turn on Extended Hours in TradingView so premarket bars are visible (Chart Settings → Symbol → Extended Hours). Apply the indicator to any intraday timeframe. In Inputs, you can change the premarket window to match your market, adjust colors and line widths, and toggle the floating labels and the mini-table. Times use the chart’s exchange time (for US stocks, Eastern Time).
Notes and limits: Lines show only for today’s session (default 09:30–16:00). The script looks at the previous calendar day for “prior day,” so values may be empty after weekends or holidays when markets were closed. If your instrument uses different regular hours or you trade futures/crypto, adjust the premarket session in Inputs and—if needed—edit the regular-hours window in code to match. If your data source does not include premarket, the premarket lines will be blank.
Best practice: The first 15–30 minutes after the open are where these levels have the most impact. Reactions are more meaningful when a line aligns with another tool you use (e.g., VWAP or your opening range). If price does not react clearly at a line, avoid forcing a trade.
Continuous Partial Buying Signals v7.1🇬🇧 English Description: Continuous Partial Buying Signals v7.1
This indicator is built on a long-term accumulation philosophy , not a traditional buy-sell strategy. Its main purpose is to systematically increase your position in an asset you believe in by identifying significant price drops as buying opportunities. It is a tool designed for long-term investors who want to automate the "buy the dip" or "Dollar Cost Averaging (DCA)" mindset.
How It Works
The logic follows a simple but powerful cycle: Find a Peak -> Wait for a Drop -> Signal a Buy -> Wait for a New Peak.
1. Identifies a Significant Peak: Instead of reacting to minor price spikes, the indicator looks back over a user-defined period (e.g., the last 200 candles) to find the highest price. This stable peak (marked with an orange circle) becomes the reference point for the current cycle.
2. Waits for a Pullback: The indicator then calculates the percentage drop from this locked-in peak.
3. Generates Buy Signals: When the price drops by the percentages you define (e.g., -5% and -10%), it plots a "BUY" signal on the chart. It will only signal once per level within the same cycle.
4. Resets the Cycle: This is the key. If the price recovers and establishes a new significant peak higher than the previous one, the entire cycle resets. The new peak becomes the new reference, and the buy signals are re-armed, allowing the indicator to perpetually find new buying opportunities in a rising market.
How to Get the Most Out of This Indicator
* Timeframe: It is highly recommended to use this on higher timeframes (4H, Daily, Weekly) to align with its long-term accumulation philosophy.
* Peak Lookback Period:
* Higher values (200, 300): Create more stable and less frequent signals. Ideal for long-term, patient investors.
* Lower values (50, 100): More sensitive to recent price action, resulting in more frequent cycles.
* Drop Percentages: Adjust these based on the asset's volatility.
* Volatile assets (Crypto): Consider larger percentages like 10%, 20%.
* Less volatile assets (Stocks, Indices): Smaller percentages like 3%, 5%, 8% might be more appropriate.
This indicator is a tool for disciplined, emotion-free accumulation. It does not provide sell signals.
B3 – VIX + Breadth + SR + Projeção 14dA comprehensive technical analysis tool that combines volatility proxies (HV, ATR, BB Width, composite VolIndex), market breadth (internal and multi-timeframe), pivot-based support/resistance with strength and confluence, and a 14-day linear regression projection with confidence bands. Designed to provide a holistic view of trend, risk, and key price levels for swing and medium-term trading decisions.
Bionic Candlestick IndikatorBionic Candlestick Indicator for TradingViewOverviewThe Bionic Candlestick Indicator is a customizable Pine Script Version 6 indicator designed for TradingView. It visually highlights key candlestick patterns to identify bullish, bearish, and Doji signals, helping traders analyze market trends and potential reversals. The indicator offers flexible display options, allowing users to plot custom candlesticks or color the chart background based on detected patterns, with optimized performance for large charts.FeaturesCandlestick Patterns:Strong Bullish: Close = High and Close > Open (e.g., strong buying pressure).
Strong Bearish: Close = Low and Close < Open (e.g., strong selling pressure).
Bullish Pullback: Close > Open with a larger High-to-Close distance.
Bearish Pullback: Close < Open with a larger Low-to-Close distance.
Doji Patterns: Bullish Doji, Bearish Doji, Equilibrium Doji (Open = Close with balanced wicks), and Empty Doji (High = Low and Open = Close).
Customizable Colors: Choose colors for each pattern (e.g., yellow/green for bullish, blue/red for bearish, purple for Equilibrium Doji).
Display Options:Plot custom candlesticks over the chart or color the background.
Toggle visibility of specific patterns (bullish, bearish, Doji, Equilibrium).
Performance Optimization: Limits calculations to a user-defined number of bars (max_bars) to reduce lag on large charts.
How to UseAdd the Indicator:Copy the provided Pine Script code into TradingView’s Pine Editor.
Click “Add to Chart” to apply the indicator.
Adjust Visual Order:To ensure the indicator displays correctly, go to the indicator list in TradingView, click the gear icon next to “Bionic Candlestick Indikator,” and select “Visual Order > Bring to Front.”
If “Draw Above Chart” is enabled, hide the chart’s default candlesticks:Go to Chart Settings > Symbol > uncheck “Candles” to avoid overlap.
Configure Settings:Open the indicator’s settings and adjust the following:Bullish/Bearish/Doji/Equilibrium Signals: Enable or disable specific candlestick patterns.
Candlestick Colors: Select colors for each pattern (e.g., yellow, green, blue, red, purple, gray).
Draw Above Chart: Check to plot custom candlesticks; uncheck to color the chart background.
Maximum Bars to Calculate: Set to a value like 2000–5000 to limit calculations and improve performance (set to 0 for no limit).
Save the settings.
Interpretation:Bullish Signals (Yellow/Green): Indicate potential buying opportunities or upward momentum.
Bearish Signals (Blue/Red): Suggest selling pressure or downward momentum.
Doji Patterns (Dark Green/Dark Red/Purple/Gray): Highlight market indecision or potential reversals.
Combine with other indicators (e.g., RSI, moving averages) for confirmation.
Performance Tips:Set “Maximum Bars to Calculate” to a lower value (e.g., 2000) to reduce lag on charts with many bars.
Use TradingView’s Pine Profiler to identify performance bottlenecks.
Test on smaller timeframes or chart ranges to ensure smooth rendering.
NotesVisual Order: If the indicator only appears after clicking the chart, ensure it is set to “Bring to Front” in the visual order, and disable default candlesticks if plotting custom ones.
Performance: Lowering “Maximum Bars to Calculate” reduces computational load but may skip older signals. Adjust based on your chart size and needs.
Compatibility: The indicator uses Pine Script Version 6. If TradingView does not support Version 6, change @version=6 to @version=5 and retest.
Debugging: If issues persist, check for conflicts with other indicators or chart settings, and ensure the chart is refreshed.
This indicator is ideal for traders looking to visually identify key candlestick patterns with customizable options, optimized for performance on TradingView charts. For support or further customization, refer to TradingView’s documentation or community forums.
Blitz Model
The Blitz indicator is a comprehensive market structure analysis tool designed specifically for the 4-hour timeframe. It identifies and visualizes key market movements including sweeps, fair value gaps (FVGs), and session-based liquidity levels.
1) Key Features :
A) Market Structure Analysis :
i) Sweep Detection: Identifies bullish and bearish sweeps of previous highs/lows.
ii) Double Purge Recognition: Detects when both bullish and bearish sweeps occur on the same candle.
iii) Fair Value Gap (FVG) Visualization: Displays imbalance zones with customizable box colors.
iV) Session-Based Analysis: Tracks Asian and London session highs/lows.
B) Multi-Timeframe Confirmations :
i) Layer 2 Validation System: Incorporates H1 and M15 timeframe confirmations.
ii) H1 Sweep Confirmations: Validates 4H signals with hourly sweep patterns.
iii) M15 Analysis: Includes both sweep and FVG confirmations from 15-minute timeframe.
C) Key Level Integration :
i) Daily 0.5 Level: Plots the midpoint of previous day's range with customizable styling.
ii) Session Liquidity: Identifies sweeps of Asian and London session extremes.
ii) FVG Interaction: Detects when sweeps occur near fair value gaps.
D) Customization Options :
i) Label Styling: Full control over label size, style, and colors for all signal types.
ii) Double Purge Customization: Separate styling options for double purge signals.
iii) Line Customization: Adjustable daily 0.5 line appearance (style, color, width).
iv) Display Controls: Toggle visibility for FVGs, labels, and confirmation history.
2) Technical Specifications
A) Timeframe Requirements :
i) Primary Timeframe: 4H only (indicator will show error on other timeframes).
ii) Multi-Timeframe Data: Analyzes H1 and M15 for confirmations.
iii) Session Times: Configurable start/end times.
B) Signal Validation Criteria :
Sweeps are validated when they occur at one or more of the following conditions:
i) FVG Zones: Price interaction with identified fair value gaps.
ii) Daily Midpoint: Proximity to the 50% level of previous day's range.
iii) Session Levels: Sweeps of Asian (19:00-01:00 NY) or London (02:00-05:00 NY) extremes.
C) Layer 2 Confirmation System :
i) H1 Confirmations (H1S): Sweep patterns on 1-hour charts within the 4H candle formation.
ii) M15 Sweep (M15S): 15-minute sweep confirmations.
iii) M15 FVG (M15F): 15-minute fair value gap formations.
3) Usage Guidelines :
A) Setup Instructions :
i) Apply to 4-hour charts only.
ii) Configure session times based on your analysis preferences.
iii) Customize label appearance and colors to match your chart theme.
iv) Enable/disable features based on your trading style.
B) Signal Interpretation :
i) Green Labels: Bullish sweeps with validation criteria met.
ii) Red Labels: Bearish sweeps with validation criteria met.
iii) Purple Labels: Double purge scenarios (both directions swept).
iv) Checkmark (✓): Indicates Layer 2 multi-timeframe confirmation present.
v) For double purge interpretations :
- Low & High means recent purge (just previous candle)
- Low & High means medium term purge (8H prior)
- Low & High means longer term purge (12H + prior)
4) Compatibility :
Max Objects: Supports up to 500 boxes and labels simultaneously.
5) Support & Updates :
This indicator represents educational concepts in market structure analysis. Users should thoroughly test and understand all signals before considering any practical application.
Disclaimer :
Always practice proper risk management. This is for educational purposes only and is not a financial advice.
Time ZonesThis indicator plots Horizontal lines for specific time on the chart as per the time selected and then trade accordingly
Open Interest OverlayOpen Interest Overlay
Overview
This indicator displays Open Interest (OI) data directly on your price chart as an overlay, eliminating the need for separate panes while preserving authentic OI movement patterns. Perfect for traders who want to analyze OI correlations without sacrificing chart real estate.
Key Features
📊 Smart Price Scaling
• Automatically maps Open Interest values to fit within your chart's price range
• Preserves all directional movements, timing, and relative magnitude relationships
• Uses official TradingView Open Interest feed for accuracy
🎨 Full Customization
• Custom Colors: Choose your own colors for rising/falling OI (defaults: teal/red)
• Line Style: Toggle between step-line (traditional) or smooth line display
• Optional Fill: Shade area between OI line and mid-price for better visual reference
• Smoothing Options: Apply moving average smoothing to reduce noise
⚙️ Intelligent Settings
• Normalization Window: 300-bar lookback (customizable) for scaling calculations
• Auto Timeframe: Uses daily data for intraday charts on traditional assets, chart timeframe for crypto
• Real Value Display: Shows actual (unscaled) OI value on the last bar
How It Works
The indicator performs proportional mapping of Open Interest data:
1. Calculates OI range (high/low) over the lookback period
2. Maps this range to your chart's price range during the same period
3. Displays OI movements that maintain authentic patterns and timing
Perfect For
✅ Correlation Analysis - See how OI moves with price in real-time
✅ Divergence Spotting - Identify when OI and price trends diverge
✅ Clean Charts - No need for separate panes or window splitting
✅ Pattern Recognition - Spot OI building/declining during key price levels
✅ Cross-Market Analysis - View any symbol's OI overlay on your current chart (e.g., Bitcoin OI while viewing Ethereum prices)
What You Get vs Traditional OI Indicators
Advantages:
• Authentic OI movement patterns preserved
• Direct visual correlation with price action
• No chart real estate sacrifice
• Immediate trend and divergence recognition
Trade-offs:
• Shows relative OI changes rather than absolute values
• Scaling is relative to the selected lookback period
Ideal For
• Day traders monitoring intraday OI flow
• Swing traders analyzing OI trends with price movements
• Futures traders tracking institutional interest
• Anyone wanting clean, correlation-focused OI analysis
Compatible With
• Futures contracts with Open Interest data
• Any timeframe (auto-adjusts for optimal data)
• All TradingView-supported OI symbols
ICT Fractal HTF Candles [TFR]ICT HTF Fractal Candles
This indicator overlays higher timeframe (HTF) candles directly on your current chart for better multi-timeframe analysis. It plots up to the last 4 candles from a user-selected timeframe (5m, 15m, 1h, 4h, or 1D) with customizable body and border colors.
Features:
Displays the last 4 higher timeframe candles (open, high, low, close) on your current chart.
Customizable bullish, bearish, and inside close candle colors.
Optional midpoint wick lines (top and bottom) for precision reference, with extendable length for clarity.
Optional candle midpoint line for additional confluence.
Overlay mode allows you to see HTF structure without switching chart timeframes.
Timeframe label display so you always know which HTF is being plotted.
Offset control for shifting candle position.
Use Case:
This tool helps traders apply ICT concepts like PO3, midpoint reference levels, and multi-timeframe confirmation without constantly switching between charts. It’s particularly useful for identifying liquidity zones, midpoint reactions, and higher timeframe market structure while executing on a lower timeframe.
Z-Score Volume with CVD TrendZ-Score Volume & CVD Trend with Exhaustion Signals
This powerful, all-in-one indicator combines statistical volume analysis, Cumulative Volume Delta (CVD), and a custom clustering algorithm to provide a clear and dynamic view of market sentiment. It is designed to help traders identify the prevailing trend and spot potential reversals or trend exhaustion before they happen.
Important Note: This indicator is specifically designed and optimized for use during the Regular Trading Hours (RTH) New York session, which is typically characterized by high volume and volatility. Its signals may be less reliable in low-volume or overnight sessions.
Core Concepts
1. Volume Z-Score
The script first calculates a Z-score for volume, which measures how many standard deviations a bar's volume is from a moving average. This helps to identify statistically significant volume spikes that may signal institutional activity or a major shift in sentiment.
2. Cumulative Volume Delta (CVD)
CVD plots the net difference between buying and selling volume over time. A rising CVD indicates a surplus of buying pressure, while a falling CVD shows a surplus of selling pressure. This provides a clear look at the direction of momentum.
3. Custom Clustering
By combining the Volume Z-score and CVD delta, the script classifies each bar into one of six distinct "clusters." The purpose is to simplify complex data into actionable signals.
High Conviction Bullish: High Z-score volume with strong CVD buying.
High Conviction Bearish: High Z-score volume with strong CVD selling.
Effort vs. Result: High Z-score volume with no clear CVD bias, indicating indecision or a struggle between buyers and sellers.
Quiet Accumulation: Low volume with subtle CVD buying, suggesting passive accumulation.
Quiet Distribution: Low volume with subtle CVD selling, suggesting passive distribution.
Low Conviction/Noise: Low volume and low CVD, representing general market noise.
Trend and Exhaustion Logic
Trend Establishment: The indicator determines the overall trend (Bullish, Bearish, or Neutral) by analyzing the majority of recent clusters over a configurable lookback period.
A Bullish Trend is confirmed when a majority of recent bars are either "High Conviction Bullish" or "Quiet Accumulation."
A Bearish Trend is confirmed when a majority of recent bars are either "High Conviction Bearish" or "Quiet Distribution."
Trend Exhaustion: This is a key feature for identifying potential reversals. The script looks for a divergence between price action and CVD within a confirmed trend.
Bullish Exhaustion Signal: Occurs during a confirmed "Bullish Trend" when you see a bearish divergence (price makes a higher high, but CVD shows negative delta and a close lower than the open). This is a strong sign the uptrend may be running out of steam.
Bearish Exhaustion Signal: Occurs during a confirmed "Bearish Trend" when you see a bullish divergence (price makes a lower low, but CVD shows positive delta and a close higher than the open). This indicates the downtrend may be exhausted.
How to Interpret the Visuals
Volume Bars: Colored to match the cluster they belong to.
Background Color: Shows the overall trend (light green for bullish, light red for bearish).
Circle Markers (bottom): Green circles indicate a bullish trend, and red circles indicate a bearish trend.
Triangles and Circles (top): Represent the specific cluster of each bar.
Trend Exhaustion Markers: Triangles above/below the bar signal potential trend exhaustion.
Info Table: An optional table provides a real-time summary of all key metrics for the current bar.
Settings
Volume EMA Length: Adjusts the moving average used for the Volume Z-score calculation.
Z-Score Look Back: Defines the number of bars to use for the volume and CVD percentile calculation.
Lower/Upper Cluster Percentile: Use these to adjust the sensitivity of the clustering. Tighter ranges (e.g., 25/75) capture more data, while wider ranges (e.g., 10/90) will only signal truly extreme events.
Trend Lookback Bars: Controls how many recent bars are considered when determining the trend.
This script offers a comprehensive and easy-to-read way to integrate volume, momentum, and trend analysis into your trading.
Happy Trading!
Manipulation Ribbon [FxScripts]Manipulation Ribbon
Designed to detect areas of price manipulation by Market Makers vs areas where it is trading in a natural, price-driven state. By identifying zones of control and imbalance, the ribbon provides a clear visualization of where price is being held or artificially displaced, offering key insights into potential future direction.
Indicator Function
Unlike traditional oscillators, the Manipulation Ribbon plots a continuous line or ribbon, with no defined y-axis. The ribbon dynamically adapts to market conditions, allowing the user to spot potential manipulation and price containment vs natural price movement.
Calculation Methodology
The Manipulation Ribbon is derived exclusively from price action. The underlying algorithm evaluates where price is, where it should be and where it’s being held.
The resulting ribbon reflects these dynamics in real time, providing a visual framework for interpreting price behavior at a granular level.
Operational Use: Divergences
The primary use of the Manipulation Ribbon is to locate divergences between price and the ribbon.
There are two distinct types of divergence to look for:
Price Containment: Where the ribbon moves but price doesn’t. This can help identify zones where price is being held, often preceding sharp movements once control is released.
Price Manipulation: Where price moves but the ribbon doesn’t. This can help identify liquidity sweeps, often preceding swift reversals once the liquidity has been taken.
Analytical Scenarios
High Liquidity Sweep: Price forms a higher high while the ribbon forms a lower high. Indicates a liquidity sweep may be occurring at the highs and a potential bearish reversal may be imminent.
Low Liquidity Sweep: Price forms a lower low while the ribbon forms a higher low. Indicates a liquidity sweep may be occurring at the lows and a potential bullish reversal may be imminent.
Top Edge Hold: Upwards movement of the ribbon without price followthrough. Indicates price may be being held at the highs, suggesting Market Makers are artificially holding price down in order to create a top edge and potential bearish reversal.
Bottom Edge Hold: Downwards movement of the ribbon without price followthrough. Indicates price may be being held at the lows, suggesting Market Makers are artificially holding price up in order to create a bottom edge and potential bearish reversal.
Settings
Guides: Option to have dynamic guides applied to your chart. Customizable style, color and width.
Guide Lookback: Due to the ribbon having a non-standard y-axis scale, it’s not possible to plot standard interval guides. Due to technical limitations this value is not calculable automatically either. The upper and lower bounds of the guides are therefore calculated using a user-inputted lookback function. In order to ensure the guides use the correct y-axis on the chart, simply input the average number of bars in your current viewport using the ruler, the guides will automatically update to match this.
Line 1 / Band 1: Option to turn on/off Line 1 and Band 1 alongside updating color and linewidth. Line 1 and Band 1 use the current chart symbol as their source.
Line 2 / Band 2: Option to add a second line and/or band to the chart. Use this to compare any correlated instrument e.g. BTCUSDT and ETHUSDT (as visualized in the chart above) or other pairs such as XAUUSD/XAUEUR or ES/NQ. Due to differences in y-axis scaling it's advised to add this as an additional indicator on a new pane (as per chart above).
Inverse Line 2 / Band 2: Option to show/hide the inverse of Line 2 and Band 2. This is useful for comparing inversely correlated symbols e.g. EURUSD and USDCHF.
Performance and Optimization
Backtesting Results: The Manipulation Ribbon has undergone extensive backtesting across various instruments, timeframes and market conditions, demonstrating strong performance in identifying where price is out of sync with its natural state. User backtesting is strongly encouraged as it allows traders to gain familiarity with the ribbon using their preferred instruments and timeframes.
Optimization for Diverse Markets: The Manipulation Ribbon can be used on crypto, forex, indices, commodities and stocks. The Manipulation Ribbon's algorithmic foundation ensures consistent performance across a variety of instruments. The lack of complex settings makes it easy for the trader to set up and go.
Educational Resources and Support
Users of the Manipulation Ribbon benefit from comprehensive educational resources and full access to FxScripts Support. This ensures traders can maximize the potential of the Manipulation Ribbon and other tools in the Sigma Indicator Suite by learning best practices and gaining insights from an experienced team of traders.
Table Logic ExtractorTable Logic Extractor v2.0
Advanced multi-timeframe analysis with intelligent trade recommendations!
Overview:
This sophisticated indicator provides comprehensive market analysis through multiple technical indicators and timeframes. It combines EMA analysis, RSI momentum, MACD signals, Bollinger Bands, volume analysis, divergence detection, and intelligent trade recommendations with support/resistance distance calculations and trading style detection.
Key Features:
✅ Multi-Indicator Analysis - EMA, RSI, MACD, Bollinger Bands, Volume, ATR
✅ Multi-Timeframe Analysis - M1, M5, M15, M30 trend comparison
✅ Divergence Detection - Bullish and bearish divergence with strength calculation
✅ Support/Resistance Analysis - Distance calculations with Fibonacci levels
✅ Trading Style Detection - Trend, Range, Breakout, Scalping identification
✅ Intelligent Trade Signals - Style-based trade recommendations with confidence levels
✅ Risk Management - Stop Loss and Take Profit calculations
✅ Comprehensive Table - Real-time analysis with 14 different metrics
How It Works:
The indicator uses advanced analysis:
• Multi-Timeframe - M1, M5, M15, M30 trend analysis
• Style Detection - Automatic trading style identification
• S/R Analysis - Fibonacci-based support/resistance levels
• Weighted Scoring - EMA (2.0), RSI (1.5), MACD (1.5), BB (1.0), Volume (1.0)
• Intelligent Signals - Style-based trade recommendations
Trading Style Detection:
• TREND TRADING - Strong trend + aligned timeframes (Green)
• RANGE TRADING - Low volatility + sideways movement (Yellow)
• BREAKOUT TRADING - High volume + near levels (Orange)
• SCALPING - High volatility + quick moves (Red)
Information Table (14 Metrics):
Real-time display showing:
• ATR volatility with signal (HIGH/MED/LOW/NORMAL VOL)
• Divergence status with strength percentage
• S/R Distance with Fibonacci levels
• Stop Loss (2.0:1 ratio) and Take Profit 1 (1.5:1 ratio)
• Multi-Timeframe analysis (M1, M5, M15, M30)
• Scalping signals with confidence levels
• Current trend with strength percentage
• Intelligent trade recommendations
Trade Recommendations:
• TREND BUY/SELL - All timeframes aligned (High confidence)
• SHORT-TERM BUY/SELL - M5 signal only (Medium confidence)
• SCALPING BUY/SELL - M5 vs higher timeframes (Low confidence)
• WAIT - No clear signal (No confidence)
Support/Resistance Analysis:
• Fibonacci Levels: 23.6%, 38.2%, 50% retracements
• Distance Categories: Very Near (Red), Near (Orange), Medium (Yellow), Far (Green)
• ATR-based distance measurement
• Real-time proximity alerts
Scalping Detection:
Specialized signals based on:
• High volatility (ATR ratio > 1.5)
• Quick price moves (fast momentum)
• Volume confirmation (high volume spikes)
• RSI extremes (oversold/overbought)
Settings:
• EMA - Fast (9), Slow (21), Trend (50)
• RSI - Length (14), Overbought (70), Oversold (30)
• MACD - Fast (12), Slow (26), Signal (9)
• Bollinger Bands - Length (20), Multiplier (2.0)
• ATR - Length (14) for volatility measurement
• Volume Threshold - 1.5x average volume
• Divergence - Lookback (3), Threshold (0.5)
Best Practices:
🎯 Adapt strategy to detected trading style
📊 Use multi-timeframe analysis for confirmation
⚡ Monitor S/R distances for entry timing
🛡️ Always use calculated Stop Loss levels
🔍 Watch for divergence signals
📈 Follow intelligent trade recommendations
Pro Tips:
• Table provides all essential information in one place
• Trading style detection helps adapt your strategy
• S/R distance shows proximity to key levels
• Confidence levels indicate signal reliability
• Multi-timeframe alignment increases success rate
• Scalping signals work best in high volatility
Alerts:
• Trend Change Alert - "Trend changed across timeframes"
• Divergence Alert - "Divergence detected"
• Scalping Alert - "Scalping opportunity"
• Trade Signal Alert - "Trade recommendation available"
Version 2.0 Improvements:
• Advanced multi-timeframe analysis (M1, M5, M15, M30)
• Intelligent trading style detection
• Comprehensive support/resistance analysis
• Professional trade recommendations with confidence levels
• Scalping detection with specialized signals
• Risk management with calculated SL/TP levels
• 14-metric comprehensive information table
Created with ❤️ for the trading community
This indicator is free to use for both commercial and non-commercial purposes.
Trend Analyzer MACD EnhancedTrend Analyzer MACD Enhanced
Advanced trend analysis with MACD, RSI, Volume and Divergence detection!
Overview
This comprehensive indicator combines multiple technical analysis tools into one powerful visualization. It features dynamic background coloring, real-time signal strength calculation, and automatic divergence detection for complete market analysis.
Key Features
✅ Multi-Indicator Analysis- MACD, RSI, and Volume in one indicator
✅ Divergence Detection - Automatic bullish and bearish divergence identification
✅ Dynamic Background - Color-coded trend zones with smooth transitions
✅ Signal Strength - Weighted calculation showing overall market sentiment (0-100%)
✅ Trend Change Detection - Visual markers for trend reversals
✅ Information Table - Real-time status of all indicators
How It Works
The indicator calculates signal strength using weighted analysis:
- MACD (50%) - Primary trend momentum
- RSI (30%) - Overbought/oversold conditions
- Volume (20%) - Volume confirmation
Signal Strength Range: -100% to +100%
Visual Elements
Background Colors:
- 🟢 **Green** - Uptrend (intensity based on signal strength)
- 🔴 **Red** - Downtrend (intensity based on signal strength)
- ⚪ **Gray** - Neutral/sideways market
Trend Markers:
- 🔺 **Green Triangle Up** - Start of new uptrend
- 🔻 **Red Triangle Down** - Start of new downtrend
- 📏 **Vertical Lines** - Trend change confirmation
Information Table
Real-time display showing:
- Trend - Current trend state with color coding
- MACD - Direction and crossover status
- RSI - Level and overbought/oversold status
- Volume - Level and trend direction
- Divergence - Current divergence status
- Signal Strength - Overall percentage
Alerts
Built-in alerts for:
- Strong Buy/Sell Signals - High probability setups
- Divergence Signals - Early reversal warnings
Settings
MACD:Fast (12), Slow (26), Signal (9)
RSI:Length (14), Overbought (70), Oversold (30)
Volume:MA Length (20), Threshold (1.5x)
Display:Toggle RSI, Volume, and Table visibility
Best Practices
🎯 Works best in trending markets
📊 Use in separate window below main chart
⚡ Combine with price action analysis
🛡️ Always use proper risk management
Pro Tips
- Green background = Strong uptrend, Red background = Strong downtrend
- Signal strength > 50% = Very bullish, < -50% = Very bearish
- Watch for divergence signals for early reversal warnings
- Use the information table for quick market assessment
---
Created with ❤️ for the trading community
This indicator is free to use for both commercial and non-commercial purposes.
Market Dynamics Engine (Revention)// | An All-in-One Market Analysis Suite |
// | |
// | This script provides a holistic view of the market by unifying a |
// | dynamic trend engine, an advanced market structure analysis module,|
// | and a multi-oscillator confluence system for identifying |
// | potential exhaustion points. |
// | |
// | This professional-grade tool features an adaptive trend ribbon, |
// | predictive liquidity targets, and high-probability POI confluence |
// | markers for a complete analytical experience.
RT-Signal LiteRT-Signal Lite — Learning & Price-Action Companion (EN)
Protected script – source code is not visible. Educational tool for learning structured entries, filters and risk management.
What it is
RT-Signal Lite is a learning-first price-action indicator that helps you turn chart context into repeatable entries. It combines a score engine (trend, momentum, volume, divergences) with optional pattern/structure filters, a clear signal panel, and a visual TP/SL ladder in R-multiples.
How it helps you learn
• Practice exact entry logic (Cross/Pullback/Breakout with optional Retest).
• See why a setup is allowed or blocked (FVG/HTF proximity, ADX/DI, Volume Z, Liquidity sweep etc.).
• Train risk thinking with R-based TP ladder, BE/Trailing, “SL-Fishing” concept and a compact monthly performance table (educational only).
• Multi-TF RSI panel + simple market labels keep the big picture in view.
• Works great in Replay mode for bar-by-bar drills.
Quick start
Pick a supported timeframe (3/5/15/30/45/60/240/D by default; or add your own in Settings → Timeframe-Gate).
Choose an Entry Mode : CrossOnly / Pullback / Breakout (with ATR buffer) / Retest / Any.
Keep default risk presets (ATR or Structure SL, TP1 in R, step in R, optional BE/Trailing).
Read the Signal Box : direction, Entry/SL/SL-Fishing, TP1…TPn, status, VIX/VDAX state, score & confidence.
Use Trend Box for MTF RSI and a quick checklist (Breakout, Volume OK, Divergence, VIX allowed).
Train in Replay → journal your decisions.
Main features (Lite)
• Entry engine : SMA cross, EMA pullback bounce, prior HH/LL breakout with ATR buffer, optional strict Retest window; candlestick assists (Hammer/Shooting Star, Engulfing, Morning/Evening Star, Doji, Inside Bar, 3 Soldiers/Crows).
• Filters : ADX/DI thresholds (TF-aware), Volume (level & Z-score), RSI divergences (pivot-anchored), ATR/Close regime, FOMO-bar guard, Liquidity sweep window, Opposite Order-Block distance, FVG zone gating, HTF zone proximity, optional VIX/VDAX gate (auto picks VDAX for DAX).
• Structure : Support/Resistance lines, classical FVG (lifetime & mitigation), robust Order-Blocks with separate states and mitigation logic.
• Scanners : Triangle breakout (Lite).
• Risk & exits : Structure/ATR SL, SL-Fishing buffer, TP ladder in R (TP1…TPn), optional BE & Trailing after TP1, cooldown, max bars in trade.
• UI : Signal Box, Trend Box, local trade boxes/lines (entry/sl/tp), watermark, monthly performance table (one outcome per trade: highest TP or SL-Fishing; counted by exit/entry month – for learning only).
• Alerts : Alerts are available in PRO only.
• Privacy : Compiled & protected; source code is not visible.
Key inputs (short list)
Entry mode • Breakout ATR buffer • Retest window/strict • Pullback bounce •
Risk: min R:R, Structure/ATR SL, ATR multiplier, TP ladder, BE/Trail, Cooldown •
Filters: ADX/DI, Volume/Z, ATR regime, RSI limits, FVG/HTF gates, Liquidity sweep, Opp. OB distance •
Scanners: Triangle (Lite) • RSI-MTF toggles • Visuals (Signal/Trend boxes, SR, OB/FVG).
Markets & timeframes
Indices (US/DE), commodities, crypto, forex, stocks.
Works on the whitelisted/custom TFs (e.g., 3/5/15/30/45/60/240/D). Heikin-Ashi and some feeds may change results; volume-based filters need reliable volume.
Best practice (learning workflow)
• Start with 5m/15m/1h on liquid symbols.
• Train in Replay: define entry, see blockers, adjust rules, collect screenshots.
• Move to live observation (paper/sim) only after you can explain every entry/avoidance.
• Use strict risk: position sizing to SL, no over-optimization, no promises.
FAQ — “No signal?” (common blockers)
TF not allowed • Cooldown active • ADX/DI below threshold • VIX/VDAX gate off •
Retest not hit yet • FVG/HTF gate blocking • FOMO bar filtered • Min R:R to next level not met • Opposite OB too close • Liquidity sweep window not satisfied.
PRO upgrade
Adds alerts and extra scanners (Range/Channel/Double-Top/Bottom), more visualization and flexibility. Links are provided inside the script under Settings → Info .
Disclaimer
For educational purposes only. No financial advice. No performance guarantee. Always validate signals in context (structure, liquidity, volatility, news). You are fully responsible for your decisions and risk.
Liquidation/Doji CandlesLiquidation/Doji Candles
This indicator highlights candles with a body length smaller than 30% of the candle’s total range. These candles are displayed in orange, representing potential liquidation points or doji candles.
The idea behind this tool is to help traders spot moments of market indecision, where buying and selling pressure are in balance. Such conditions often hint at institutional liquidation events or possible retail-driven reversals.
You can fully customize the detection sensitivity by adjusting the percentage input. This allows you to tighten or loosen the condition depending on your trading style and market preference.
To support passive traders, the script also includes built-in alerts for:
• The formation of a new liquidation/doji candle.
• A close above its high (bullish engulfment).
• A close below its low (bearish engulfment).
These alerts make it easier to stay on top of potential market shifts without needing to constantly monitor the charts.
Bitcoin vs. Gold correlation with lagBTC vs Gold (Lag) + Correlation — multi-timeframe, publication notes
What it does
Plots Gold on the same chart as Bitcoin, with a configurable lead/lag.
Lets you choose how the series is displayed:
Gold shifted forward (+lag on chart) — shows gold ahead of BTC on the time axis (visual offset).
Gold aligned to BTC (gold lag) — standard alignment; gold is lagged for calculation and plotted in place.
BTC 200D Lag (BTC shifted forward) — visualizes BTC shifted forward (like popular “BTC 200D Lag” charts).
Computes Pearson correlations between BTC (no lag) and Gold (with lag) over multiple lookback windows equivalent to:
30d, 60d, 90d, 180d, 365d, 2y (730d), 3y (1095d), 5y (1825d).
Shows a table with the correlation values, automatically scaled to the current timeframe.
Why this is useful
A common macro claim is that BTC tends to follow Gold with a delay (e.g., ~200 trading days). This tool lets you:
Visually advance Gold (or BTC) to see that lead-lag relationship on the chart.
Quantify the relationship with rolling correlations.
Switch timeframes (D/W/M/…): everything automatically stays in sync.
Quick start
Open a BTC chart (any exchange).
Add the indicator.
Set Gold symbol (default TVC:GOLD; alternatives: OANDA:XAUUSD, COMEX:GC1!, etc.).
Choose Lag value and Lag unit (Days/Weeks/Months/Years/Bars).
Pick Visual Mode:
To mirror those “BTC 200D Lag” posts: choose “BTC 200D Lag (BTC shifted forward)” with 200 Days.
To view Gold 200D ahead of BTC: select “Gold shifted forward (+lag on chart)” with 200 Days.
Keep Rebase to 100 ON for an apples-to-apples visual scale. (You can move the study to the left price scale if needed.)
Inputs
Gold symbol: external series to pair with BTC.
Lag value: numeric value.
Lag unit: Days, Weeks, Months (≈30d), Years (≈365d), or direct Bars.
Visual mode:
Gold shifted forward (+lag on chart) → gold is offset to the right by the lag (visual only).
Gold aligned to BTC (gold lag) → standard plot (no visual offset); correlations still use lagged gold.
BTC 200D Lag (BTC shifted forward) → BTC is offset to the right by the lag (visual only).
Rebase to 100 (visual): rescales each series to 100 on its first valid bar for clearer comparison.
Show gold without lag (debug): optional reference line.
Show price tag for gold (lag): toggles the track price label.
Timeframe handling
The study uses the current chart timeframe for both BTC and Gold (timeframe.period).
Lag in time units (Days/Weeks/Months/Years) is internally converted to an integer number of bars of the active timeframe (using timeframe.in_seconds).
Example: on W (weekly), 200 days ≈ 29 bars.
On intraday timeframes, days are converted proportionally.
Correlation math
Correlation = ta.correlation(BTC, Gold_lagged, length_in_bars)
Lookback lengths are the bar-equivalents of 30/60/90/180/365/730/1095/1825 days in the active timeframe.
Important: correlations are computed on prices (not returns). If you prefer returns-based correlation (often more statistically robust), duplicate the script and replace price inputs with change(close) or ta.roc(close, 1).
Reading the table
Window: nominal day label (e.g., 30d, 1y, 5y).
Bars (TF): how many bars that window equals on the current timeframe.
Correlation: Pearson coefficient . Background tint shows intensity and sign.
Tips & caveats
Visual offsets (offset=) move series on screen only; they don’t affect the math. The math always uses BTC (no lag) × Gold (lagged).
With large lags on high timeframes, early bars will be na (normal). Scroll forward / reduce lag.
If your Gold feed doesn’t load, try an alternative symbol that your plan supports.
Rebase to 100 helps visibility when BTC ($100k) and Gold ($2k) share a scale.
Months/Years use 30/365-day approximations. For exact control, use Days or Bars.
Correlations on very short lengths or sparse data can be unstable; consider the longer windows for sturdier signals.
This is a visual/analytical tool, not a trading signal. Always apply independent risk management.
Suggested setups
Replicate “BTC 200D Lag” charts:
Visual Mode: BTC 200D Lag (BTC shifted forward)
Lag: 200 Days
Rebase: ON
Gold leads BTC (Gold ahead):
Visual Mode: Gold shifted forward (+lag on chart)
Lag: 200 Days
Rebase: ON
Compatibility: Pine v6, overlay study.
Best with: BTCUSD (any exchange) + a reliable Gold feed.
Author’s note: Lead-lag relationships are not stable over time; treat correlations as descriptive, not predictive.