Volumetric Tensegrity🧮 Volumetric Tensegrity unifies two of the Leading Indicator suite's critical engines — ZVOL ( volume anomaly detection ) and OBVX ( directional conviction ). Originally designed as a structural economizer for traders navigating strict indicator limits (e.g. < 10 slots per chart), it was forced to evolve beyond that constraint simply to fulfill it, albeit with a difference. The fatal flaw of traditional fusion, where two metrics are blended mathematically, is that they lose scale integrity (i.e. meaning). VTense encodes optical tensegrity to scale the amplitude of the ZVOL histogram and the slope of the OBVX spread independently, so that expansion and direction may coexist without either dominating the frame.
🧬 Tensegrity , by definition, is an intelligent design principle where elements in compression are suspended within a network of continuous tension, forming a stable, self-supporting structure . Originally conceived in esoteric biomorphology (c.f. Da Vinci, Snelson, Casteneda), tensegrity balances force through opposition, not rigidity. Applied to financial markets, Volumetric Tensegrity captures this same principle: price compresses, volume expands, conviction builds or fades — yet structure holds through the interplay. The result is not a prediction engine, but a pressure field — one that visualizes where structure might bend, break, or rebound based on how volume breathes.
🗜️ Rather than layering multiple indicators and consuming precious chart space, VTense frees up room for complementary overlays like momentum mapping, liquidity tiers, or volatility phase detection — making it ideal for modular traders operating in tight technical real estate.
🧠 Core Logic - VTense separates and preserves two essential structural forces:
• ZVOL Histogram : A Z-score-based expansion map that measures current volume deviation from its historical average. It reveals buildup zones, dormant stretches, and breakout pressure — regardless of price behavior.
• OBVX Spread : A directional conviction curve that tracks the difference between On-Balance Volume and its volume-weighted fast trend. It shows whether the crowd is leaning in (accumulation/distribution) or backing off.
🔊 ZVOL controls the amplitude of the histogram, while OBVX controls the curvature and slope of the spread. Without sacrificing breathing behavior or analytical depth, VTense provides a compact yet dynamic lens to track both expansion pressure and directional bias within a single footprint.
🌊 Volumetric Tensegrity forecasts breakout readiness, trend fatigue, and compression zones by measuring the volatility within volume . Unlike traditional tools that track volatility of price, this indicator reveals when effort becomes unstable — signaling inflection points before price reacts. Designed to decode rhythm shifts at the volume level, it operates as a pre-ignition scanner that thrives on low-timeframe charts (15m and under) while scaling effectively to 1H for validation.
🪖 From Generals to Scouts
👀 When used jointly, ZVOL + OBVX act as the general : deep-field analysts confirming stress, commitment, or exhaustion. VTense , by contrast, functions as a scout — capturing subtle buildup and alignment before structure fully reveals itself. The indicator aims to be a literal vanguard, establishing a position that can be confirmed or flexibly abandoned when the higher authority arrives to evaluate.
🥂 Use the ZVOL + OBVX pair when :
• You need independent axis control and manual dissection
• You’re building long-form confluence setups
• You have more indicator slots than you need
🔎 Use VTense when :
• You need compact clarity across multiple instruments
• You’re prioritizing confluence _detection_ over granular separation
• You’re building efficient multi-layered systems under slot constraints
🏗️ Structural Behavior and Interpretation
🫁 Z VOL Respiration Histogram : Structural Effort vs Baseline
🔵 Compression Coil – volume volatility is low and stable; the market is coiling
🟢 Steady Rhythm – volume is healthy but unremarkable; balanced participation
🟡 Passive/Absorbed Effort – expansion failing to manifest; watch for reversal
🟠 Clean Expansion – actionable volatility rise backed by structure
🔴 Volatile Blowout – chaos, climax; likely end-phase or fakeout
⚖️ ZVOL Respiration measures how hard the crowd is pressing — not just that volume is rising, but how statistically abnormal the surge is. Because it is rescaled proportionally to OBVX, the amplitude of the histogram reflects structural urgency without overwhelming the visual field.
🖐️ OBVX Spread : Real-Time Directional Conviction Behind Price Moves
🔑 The curvature of the spread reveals not just directional bias but crowd temp o: sharp slopes = urgent transitions; gradual slopes = building structural shifts. Curvature is key: sharp OBVX slope = urgency; gentle arcs = controlled drift or indecision.
• Green Rising : Accumulation — upward pressure from real buyers
• Red Falling : Distribution — sell pressure, downward slope
• Flat Curves : Transitional → uncertainty, microstructure digestion
🎭 Synchronized vs Divergent Behavior
⏱️ Synchronized (high-confluence) : often precedes structural breakouts, with internal conviction clearly visible before price resolves.
• ZVOL expands (yellow/orange/red) and OBVX climbs steeply green = strong bullish pressure
• ZVOL expands while OBVX steepens red = growing sell-side intent
🪤 Divergent (conflict tension) : flags potential traps, fakeouts, and liquidity sweeps.
• ZVOL expands sharply, but OBVX flattens or opposes → reactive expansion without crowd commitment
⛔️ Latent Drift + Structural Holding Patterns : tensegrity in action — the market holds tension without directional release.
• ZVOL compresses (blue) + OBVX meanders near zero → structure is resting, building up energy
• After prolonged drift, expect violent asymmetry when balance finally breaks
📚 Phase Interpretation: Dynamic Structural Read
• 1️⃣ Quiet Coil : Histogram flat, OBVX flat → no urgency
• 2️⃣ Initial Pulse : Yellow bars, OBVX slope builds → actionable tension
• 3️⃣ Structural Breath : Synchronized expansion and slope → directional commitment
• 4️⃣ Disagreement : Spike in ZVOL, flattening OBVX → exhaustion risk or false signal
💡 Suggested Use
• Run on 15m charts for breakout anticipation and 1H for validation
• Pair with ZVOL + OBVX to confirm crowd conviction behind the tension phase
• Use as a rhythm filter for the suite's trend indicators (e.g., RDI , SUPeR TReND 2.718 , et. al.)
• Ideal during low-volume regimes to detect pressure buildup before triggers
🧏🏻 Volumetric Tensegrity doesn’t signal. It breathes , and listens to pressure shifts before they speak in price. As a scout, it lets you see structural posture before signals align — helping you front-run resolution with clarity, not prediction.
Timeframe
AlgoRanger Trend Dashboard Panel//@version=5
indicator(" AlgoRanger Trend Dashboard Panel", overlay = true, max_lines_count = 500, max_labels_count = 500)
// === EMA Settings ===
group_ema = "📊 EMA Settings"
fastLen = input.int(10, minval = 1, title = "Fast EMA Length", group = group_ema)
slowLen = input.int(50, minval = 1, title = "Slow EMA Length", group = group_ema)
// === Timeframe Settings ===
group_tf = "🕒 Timeframes"
tf_1m = input.timeframe("1", title = "1 Minutes", group = group_tf)
tf_5m = input.timeframe("5", title = "5 Minutes", group = group_tf)
tf_15m = input.timeframe("15", title = "15 Minutes", group = group_tf)
tf_1h = input.timeframe("60", title = "1 Hour", group = group_tf)
tf_4h = input.timeframe("240", title = "4 Hours", group = group_tf)
tf_1d = input.timeframe("D", title = "1 Day", group = group_tf)
// === Trend Detection Function ===
getTrend(_tf) =>
fast = request.security(syminfo.tickerid, _tf, ta.ema(close, fastLen))
slow = request.security(syminfo.tickerid, _tf, ta.ema(close, slowLen))
fast > slow ? "🟢 UP" : fast < slow ? "🔴 DOWN" : "⚪ NEUTRAL"
// === Retrieve Trend Values ===
trend1 = getTrend(tf_1m)
trend5 = getTrend(tf_5m)
trend15 = getTrend(tf_15m)
trend1h = getTrend(tf_1h)
trend4h = getTrend(tf_4h)
trend1d = getTrend(tf_1d)
// === Dashboard Settings ===
group_dash = "📍 Dashboard Settings"
x_pos = input.int(10, title="X Offset", group=group_dash)
y_pos = input.int(20, title="Y Offset", group=group_dash)
fontSize = input.int(14, minval=10, maxval=30, title="Font Size", group=group_dash)
bgColor = input.color(color.new(#454336, 70), title="Panel Background", group=group_dash)
textColor = input.color(color.white, title="Text Color", group=group_dash)
// === Create Text with str.format() ===
dashboardText = str.format(" AlgoRanger Trend Dashboard 1M: {0} 5M : {1} 15M : {2} 1H : {3} 4H : {4} 1D : {5}", trend1, trend5, trend15, trend1h, trend4h, trend1d)
// === Draw the Dashboard Label ===
var label trendPanel = label.new(x = bar_index + x_pos, y = high + y_pos,
text = dashboardText, style = label.style_label_left,
textcolor = textColor, size = size.normal, color = bgColor)
label.set_xy(trendPanel, bar_index + x_pos, high + y_pos)
label.set_text(trendPanel, dashboardText)
label.set_textcolor(trendPanel, textColor)
label.set_size(trendPanel, fontSize >= 20 ? size.large : fontSize >= 14 ? size.normal : size.small)
label.set_color(trendPanel, bgColor)
Trend Following Bundle [ActiveQuants]The Trend Following Bundle indicator is a comprehensive toolkit designed to equip traders with a suite of essential technical analysis tools focused on identifying , confirming , and capitalizing on market trends . By bundling popular indicators like Moving Averages , MACD , Supertrend , ADX , ATR , OBV , and the Choppiness Index into a single script, it streamlines chart analysis and enhances strategy development.
This bundle operates on the principle that combining signals from multiple, complementary indicators provides a more robust view of market trends than relying on a single tool. It integrates:
Trend Direction: Moving Averages, Supertrend.
Momentum: MACD.
Trend Strength: ADX.
Volume Pressure: On Balance Volume (OBV).
Volatility: Average True Range (ATR).
Market Condition Filter: Choppiness Index (Trend vs. Range).
By allowing users to selectively enable, customize, and view these indicators (potentially across different timeframes), the bundle facilitates nuanced and layered trend analysis.
█ KEY FEATURES
All-in-One Convenience: Access multiple core trend-following indicators within a single TradingView script slot.
Modular Design: Easily toggle each individual indicator (MAs, MACD, Supertrend, etc.) On or Off via the settings menu to customize your chart view.
Extensive Customization: Fine-tune parameters (lengths, sources, MA types, colors, etc.) for every included indicator to match your trading style and the specific asset.
Multi-Timeframe (MTF) Capability: Configure each indicator component to analyze data from a different timeframe than the chart's, allowing for higher-level trend context.
Integrated Alerts: Pre-built alert conditions for key events like Moving Average crossovers , MACD signals , Supertrend flips , and Choppiness Index threshold crosses . Easily set up alerts through TradingView's alert system.
When configuring your alerts in TradingView, pay close attention to the trigger option:
- Setting it to " Only Once " will trigger the alert the first time the condition is met, which might happen during an unclosed bar (intra-bar). This alert instance will then cease.
- Setting it to " Once Per Bar Close " will trigger the alert only after a bar closes if the condition was met on that finalized bar. This ensures signals are based on confirmed data and allows the alert to potentially trigger again on subsequent closing bars if the condition persists or reoccurs. Use this option for signals based on confirmed, closed-bar data.
MA Smoothing & Bands (Optional): Apply secondary smoothing or Bollinger Bands directly to the Fast and Slow Moving Averages for advanced analysis.
█ USER INPUTS
Fast MA:
On/Off: Enables/Disables the Fast Moving Average plot and related smoothing/bands.
Type: Selects the primary calculation type (SMA, EMA, SMMA (RMA), WMA, VWMA). Default: EMA.
Source: Input data for the MA calculation (e.g., close, open, hl2). Default: close.
Length: Lookback period for the primary MA calculation. Default: 9.
Color: Sets the color of the primary Fast MA line. Default: Yellow.
Line Width: Sets the thickness of the primary Fast MA line. Default: 2.
Smoothing Type: Selects secondary smoothing type applied to the primary MA (e.g., None, SMA, EMA) or adds Bollinger Bands (SMA + Bollinger Bands). Default: None.
Smoothing Length: Lookback period for the secondary smoothing MA or the basis MA for Bollinger Bands. Relevant only if Smoothing Type is not " None ". Default: 10.
BB StdDev: Standard deviation multiplier for Bollinger Bands. Relevant only if Smoothing Type is " SMA + Bollinger Bands ". Default: 2.0.
Timeframe: Sets a specific timeframe for the MA calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close before plotting, preventing repainting. Default: true.
Slow MA:
On/Off: Enables/Disables the Slow Moving Average plot and related smoothing/bands.
Type: Selects the primary calculation type (SMA, EMA, SMMA (RMA), WMA, VWMA). Default: EMA.
Source: Input data for the MA calculation (e.g., close, open, hl2). Default: close.
Length: Lookback period for the primary MA calculation. Default: 9.
Color: Sets the color of the primary Slow MA line. Default: Yellow.
Line Width: Sets the thickness of the primary Slow MA line. Default: 2.
Smoothing Type: Selects secondary smoothing type applied to the primary MA (e.g., None, SMA, EMA) or adds Bollinger Bands (SMA + Bollinger Bands). Default: None.
Smoothing Length: Lookback period for the secondary smoothing MA or the basis MA for Bollinger Bands. Relevant only if Smoothing Type is not " None ". Default: 10.
BB StdDev: Standard deviation multiplier for Bollinger Bands. Relevant only if Smoothing Type is " SMA + Bollinger Bands ". Default: 2.0.
Timeframe: Sets a specific timeframe for the MA calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close before plotting, preventing repainting. Default: true.
MACD:
On/Off: Enables/Disables the MACD plots (MACD line, Signal line, Histogram).
Fast Length: Lookback period for the fast MA in MACD calculation. Default: 12.
Slow Length: Lookback period for the slow MA in MACD calculation. Default: 26.
Source: Input data for the MACD MAs. Default: close.
Signal Smoothing: Lookback period for the Signal Line MA. Default: 9.
Oscillator MA Type: Calculation type for Fast and Slow MAs (SMA, EMA). Default: EMA.
Signal Line MA Type: Calculation type for Signal Line MA (SMA, EMA). Default: EMA.
MACD Color: Color of the MACD line. Default: #2962FF.
MACD Signal Color: Color of the Signal line. Default: #FF6D00.
Timeframe: Sets a specific timeframe for the MACD calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close. Default: true.
On Balance Volume (OBV):
On/Off: Enables/Disables the OBV plot and its related MAs/Bands.
Type (MA Smoothing): Selects MA type for smoothing OBV (None, SMA, EMA, etc.) or SMA + Bollinger Bands. Default: None.
Length (MA Smoothing): Lookback period for the OBV smoothing MA. Default: 14.
BB StdDev: Standard deviation multiplier for Bollinger Bands if selected. Default: 2.0.
Color: Color of the main OBV line. Default: #2962FF.
Timeframe: Sets a specific timeframe for the OBV calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close. Default: true.
ADX:
On/Off: Enables/Disables the ADX plot.
ADX Smoothing: Lookback period for the ADX smoothing component. Default: 14.
DI Length: Lookback period for the Directional Movement (+DI/-DI) calculation. Default: 14.
Color: Color of the ADX line. Default: Red.
Timeframe: Sets a specific timeframe for the ADX calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close. Default: true.
ATR:
On/Off: Enables/Disables the ATR plot.
Length: Lookback period for the ATR calculation. Default: 14.
Smoothing: Selects the calculation type for ATR (SMMA (RMA), SMA, EMA, WMA). Default: SMMA (RMA).
Color: Color of the ATR line. Default: #B71C1C.
Timeframe: Sets a specific timeframe for the ATR calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close. Default: true.
Supertrend:
On/Off: Enables/Disables the Supertrend plot and background fill.
ATR Length: Lookback period for the ATR calculation within Supertrend. Default: 10.
Factor: Multiplier for the ATR value used to calculate the Supertrend bands. Default: 3.0.
Up Trend Color: Color for the Supertrend line and background during an uptrend. Default: Green.
Down Trend Color: Color for the Supertrend line and background during a downtrend. Default: Red.
Timeframe: Sets a specific timeframe for the Supertrend calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close. Default: true.
Choppiness Index:
On/Off: Enables/Disables the Choppiness Index plot and bands.
Length: Lookback period for the Choppiness Index calculation. Default: 14.
Offset: Shifts the plot left or right. Default: 0.
Color: Color of the Choppiness Index line. Default: #2962FF.
Timeframe: Sets a specific timeframe for the CI calculation. Default: Chart.
Wait TF Close: If a timeframe is set, waits for that timeframe's bar to close. Default: true.
█ STRATEGY EXAMPLES
The following strategy examples are provided for illustrative and educational purposes only to demonstrate how indicators within this bundle could be combined. They do not constitute financial advice or trading recommendations. Always conduct your own thorough research and backtesting before implementing any trading strategy.
Here are a few ways the indicators in this bundle can be combined:
1. MA Crossover with Multi-Factor Confirmation
Goal: Enter trends early with confirmation from momentum and trend strength, while filtering out choppy conditions.
Setup: Enable Fast MA (e.g., 9 EMA), Slow MA (e.g., 50 EMA), MACD, ADX, and Choppiness Index.
Entry (Long):
- Price > Slow MA (Establishes broader uptrend context).
- Fast MA crosses above Slow MA OR Price crosses above Fast MA.
- MACD Histogram > 0 (Confirms bullish momentum).
- ADX > 20 or 25 (Indicates sufficient trend strength).
- Choppiness Index < 61.8 (Filters out excessively choppy markets).
Entry (Short): Reverse logic (except for ADX and Choppiness Index).
Management: Consider using the Supertrend or an ATR multiple for stop-loss placement.
Image showing a chart with 2:1 long and short trades, highlighting a candle disqualified for a long entry due to ADX below 20.
2. Supertrend Breakout Strategy
Goal: Use Supertrend for primary signals and stops, confirming with volume and trend strength.
Setup: Enable Supertrend, Slow MA, ADX, and OBV.
Entry (Long):
- Supertrend line turns green and price closes above it.
- Price > Slow MA (Optional filter for alignment with larger trend).
- ADX is rising or above 20 (Confirms trending conditions).
- OBV is generally rising or breaks a recent resistance level (Confirms volume supporting the move).
Entry (Short): Reverse logic (except for ADX and OBV).
Management: Initial stop-loss placed just below the green Supertrend line (for longs) or above the red line (for shorts). Trail stop as Supertrend moves.
Image showing a chart with a 2:1 long trade, one candle disqualified for a short entry, and another disqualified for a long entry.
3. Trend Continuation Pullbacks
Goal: Enter established trends during pullbacks to value areas defined by MAs or Supertrend.
Setup: Enable Slow MA, Fast MA (or Supertrend), MACD, and ADX.
Entry (Long):
- Price is consistently above the Slow MA (Strong uptrend established).
- ADX > 25 (Confirms strong trend).
- Price pulls back towards the Fast MA or the green Supertrend line.
- MACD Histogram was decreasing during the pullback but turns positive again OR MACD line crosses above Signal line near the MA/Supertrend level (Indicates momentum resuming).
Entry (Short): Reverse logic (except for ADX) during a confirmed downtrend.
Management: Stop-loss below the recent swing low or the Slow MA/Supertrend level.
Image showing a chart with 2:1 long and short trades, where price pulls back to the fast MA and the MACD histogram changes color, indicating shifts in momentum during the pullbacks.
█ CONCLUSION
The Trend Following Bundle offers a powerful and flexible solution for traders focused on trend-based strategies. By consolidating essential indicators into one script with deep customization, multi-timeframe analysis, and built-in alerts, it simplifies the analytical workflow and allows for the development of robust, multi-conditional trading systems. Whether used for confirming entries, identifying trend strength, managing risk, or filtering market conditions, this bundle provides a versatile foundation for technical analysis.
█ IMPORTANT NOTES
⚠ Parameter Tuning: Indicator settings (lengths, factors, thresholds) are not one-size-fits-all. Adjust them based on the asset being traded, its typical volatility, and the timeframe you are analyzing for optimal performance. Backtesting is crucial .
⚠ Multi-Timeframe Use: Using the Timeframe input allows for powerful analysis but be mindful of potential lag, especially if Wait TF Close is disabled. Signals based on higher timeframes will update only when that higher timeframe bar closes (if Wait TF Close is enabled).
⚠ Confirmation is Key: While the bundle provides many tools, avoid relying on a single indicator's signal. Use combinations to build confluence and increase the probability of successful trades.
⚠ Chart Clarity: With many indicators available, only enable those relevant to your current strategy to avoid overwhelming your chart. Use the On/Off toggles frequently.
⚠ Confirmed Bars Only: Like most TradingView indicators, signals and plots are finalized on the close of the bar. Be cautious acting on intra-bar signals which may change before the bar closes.
█ RISK DISCLAIMER
Trading involves substantial risk of loss and is not suitable for every investor. The Trend Following Bundle indicator provides technical analysis tools for educational and informational purposes only; it does not constitute financial advice or a recommendation to buy or sell any asset. Indicator signals identify potential patterns based on historical data but do not guarantee future price movements or profitability. Always conduct your own thorough analysis, use multiple sources of information, and implement robust risk management practices before making any trading decisions. Past performance is not indicative of future results.
📊 Happy trading! 🚀
SynchroTrend Oscillator (STO) [PhenLabs]📊 SynchroTrend Oscillator
Version: PineScript™ v5
📌 Description
The SynchroTrend Oscillator (STO) is a multi-timeframe synchronization tool that combines trend information from three distinct timeframes into a single, easy-to-interpret oscillator ranging from -100 to +100.
This indicator solves the common problem of having to analyze multiple timeframe charts separately by consolidating trend direction and strength across different time horizons. The STO helps traders identify when markets are truly synchronized across timeframes, potentially indicating stronger trend conditions and higher probability trading opportunities.
Using either Moving Average crossovers or RSI analysis as the trend definition metric, the STO provides a comprehensive view of market structure that adapts to various trading strategies and market conditions.
🚀 Points of Innovation
Triple-timeframe synchronization in a single view eliminates chart switching
Dual trend detection methods (MA vs Price or RSI) for flexibility across different markets
Dynamic color intensity that automatically increases with signal strength
Scaled oscillator format (-100 to +100) for intuitive trend strength interpretation
Customizable signal thresholds to match your risk tolerance and trading style
Visual alerts when markets reach full synchronization states
🔧 Core Components
Trend Scoring System: Calculates a binary score (+1, -1, or 0) for each timeframe based on selected metrics, providing clear trend direction
Multi-Timeframe Synchronization: Combines and scales trend scores from all three timeframes into a single oscillator
Dynamic Visualization: Adjusts color transparency based on signal strength, creating an intuitive visual guide
Threshold System: Provides customizable levels for identifying potentially significant trading opportunities
🔥 Key Features
Triple Timeframe Analysis: Synchronizes three user-defined timeframes (default: 60min, 15min, 5min) into one view
Dual Trend Detection Methods: Choose between Moving Average vs Price or RSI-based trend determination
Adjustable Signal Smoothing: Apply EMA, SMA, or no smoothing to the oscillator output for your preferred signal responsiveness
Dynamic Color Intensity: Colors become more vibrant as signal strength increases, helping identify strongest setups
Customizable Thresholds: Set your own buy/sell threshold levels to match your trading strategy
Comprehensive Alerts: Six different alert conditions for crossing thresholds, zero line, and full synchronization states
🎨 Visualization
Oscillator Line: The main line showing the synchronized trend value from -100 to +100
Dynamic Fill: Area between oscillator and zero line changes transparency based on signal strength
Threshold Lines: Optional dotted lines indicating buy/sell thresholds for visual reference
Color Coding: Green for bullish synchronization, red for bearish synchronization
📖 Usage Guidelines
Timeframe Settings
Timeframe 1: Default: 60 (1 hour) - Primary higher timeframe for trend definition
Timeframe 2: Default: 15 (15 minutes) - Intermediate timeframe for trend definition
Timeframe 3: Default: 5 (5 minutes) - Lower timeframe for trend definition
Trend Calculation Settings
Trend Definition Metric: Default: “MA vs Price” - Method used to determine trend on each timeframe
MA Type: Default: EMA - Moving Average type when using MA vs Price method
MA Length: Default: 21 - Moving Average period when using MA vs Price method
RSI Length: Default: 14 - RSI period when using RSI method
RSI Source: Default: close - Price data source for RSI calculation
Oscillator Settings
Smoothing Type: Default: SMA - Applies smoothing to the final oscillator
Smoothing Length: Default: 5 - Period for the smoothing function
Visual & Threshold Settings
Up/Down Colors: Customize colors for bullish and bearish signals
Transparency Range: Control how transparency changes with signal strength
Line Width: Adjust oscillator line thickness
Buy/Sell Thresholds: Set levels for potential entry/exit signals
✅ Best Use Cases
Trend confirmation across multiple timeframes
Finding high-probability entry points when all timeframes align
Early detection of potential trend reversals
Filtering trade signals from other indicators
Market structure analysis
Identifying potential divergences between timeframes
⚠️ Limitations
Like all indicators, can produce false signals during choppy or ranging markets
Works best in trending market conditions
Should not be used in isolation for trading decisions
Past performance is not indicative of future results
May require different settings for different markets or instruments
💡 What Makes This Unique
Combines three timeframes in a single visualization without requiring multiple chart windows
Dynamic transparency feature that automatically emphasizes stronger signals
Flexible trend definition methods suitable for different market conditions
Visual system that makes multi-timeframe analysis intuitive and accessible
🔬 How It Works
1. Trend Evaluation:
For each timeframe, the indicator calculates a trend score (+1, -1, or 0) using either:
MA vs Price: Comparing close price to a moving average
RSI: Determining if RSI is above or below 50
2. Score Aggregation:
The three trend scores are combined and then scaled to a range of -100 to +100
A value of +100 indicates all timeframes show bullish conditions
A value of -100 indicates all timeframes show bearish conditions
Values in between indicate varying degrees of alignment
3. Signal Processing:
The raw oscillator value can be smoothed using EMA, SMA, or left unsmoothed
The final value determines line color, fill color, and transparency settings
Threshold levels are applied to identify potential trading opportunities
💡 Note:
The SynchroTrend Oscillator is most effective when used as part of a comprehensive trading strategy that includes proper risk management techniques. For best results, consider using the oscillator in conjunction with support/resistance levels, price action analysis, and other complementary indicators that align with your trading style.
AIWAY - Consensus AI MTF Analysis
HOW-TO:
AIWAY – Consensus AI MTF Analysis
Overview
A versatile tool designed for all traders across Forex, Indices, Commodities, Stocks, and Cryptocurrencies. It employs a multi-timeframe analysis framework, integrating a suite of technical indicators with an AI-driven weighting system to deliver actionable market insights.
How It Works
Analyzes data across user-configurable timeframes, ranging from 5 minutes to 1 week (e.g., 5m, 10m, 15m, 30m, 60m, 120m, 240m, 480m, 1D, 1W). It calculates signals from a comprehensive set of technical indicators, including:
• Moving Averages (MA): Supports SMA, EMA, WMA, DEMA, and TEMA to identify trend direction.
• Stochastic RSI: Assesses momentum and overbought/oversold conditions.
• Relative Strength Index (RSI): Evaluates price strength for potential reversals.
• MACD: Tracks trend momentum via fast and slow EMA crossovers.
• Divergence Detection: Identifies price-RSI discrepancies for reversal signals.
• SMA Cross: Monitors 50-period and 200-period SMA crossovers for trend shifts.
• On-Balance Volume (OBV): Confirms trends through volume flow analysis.
• Ichimoku Cloud: Provides trend and support/resistance insights.
• Supertrend: Determines trend direction using ATR-based calculations.
These signals are aggregated into three scores:
• Short-Term Score: Derived from shorter timeframes (e.g., 5m to 240m), ideal for day trading.
• Medium-Term Score: Based on mid-range timeframes (e.g., 360m to 1D), suited for swing trading.
• Long-Term Score: Calculated from longer timeframes (e.g., 2D to 1W), tailored for position trading.
Consensus Score:
• -100 to -30: Strong bearish bias (consider shorts/exit longs).
• -30 to +30: Neutral/consolidation (reduce position size).
• +30 to +100: Strong bullish bias (consider longs/exit shorts).
The aggregation process leverages AI-optimized weights, which are dynamically adjusted to enhance signal reliability based on current market conditions.
AI Module: Functionality and Impact
The AI module is the cornerstone of adaptability, utilizing reinforcement learning to optimize indicator performance. Key features include:
• Dynamic Weight Adjustment: Each indicator (e.g., MA, RSI, MACD) is assigned a weight (0.1 to 5.0), which is updated based on its ability to predict the next closing price. This is achieved through a linear regression model using the past 200 closing prices.
• Volatility-Adaptive Learning Rate: The learning rate scales with market volatility, calculated as the daily Average True Range (ATR) divided by the daily close price. This ensures the indicator remains responsive in both trending and choppy markets.
• Mutation for Exploration: If a term score (short, medium, or long) fails to improve, weights are mutated by a factor influenced by the learning rate, introducing variability to discover better configurations.
• Predictive Feedback Loop: The module compares predicted closes to actual closes, rewarding or penalizing weights to prioritize indicators that perform well under current conditions.
This AI-driven approach enhances the indicator’s robustness, as it continuously adapts to market dynamics, potentially reducing false signals and improving decision-making compared to static indicator setups.
Reading and Interpreting the Data
Output table is structured as follows:
• Columns: Include the timeframe and signals for each indicator (e.g., MA Signal, Stochastic RSI, RSI Signal, MACD, Divergence, SMA Cross, OBV, Ichimoku, Supertrend).
• Rows: Represent each selected timeframe, displaying the corresponding indicator signals or values.
• AI Consensus Scores: Shown at the table’s top for short-term, medium-term, and long-term analyses, expressed as numerical values (e.g., 45.67).
• Scale Visualization: A separate table maps these scores onto a -100 to 100 scale, divided into 20 segments. A marker (◉) indicates the score’s position, with colors transitioning from bearish (red) to bullish (green).
Color Coding:
• Green: Bullish signals (e.g., price above MA, RSI > 50).
• Red: Bearish signals (e.g., price below MA, RSI < 50).
• Gray: Neutral signals (e.g., MACD histogram near zero).
• Special Cases: Overbought (red) for Stochastic RSI/RSI > 70; oversold (green) for values < 30.
Traders can interpret the data by focusing on the consensus scores and scale to assess overall market sentiment. For example, a medium-term score of +60 in the bullish region suggests strong upward momentum over days, while the table’s indicator signals provide detailed context for confirmation.
Benefits for Traders Across Assets
AIWAY provides significant advantages for traders across all markets:
• Multi-Timeframe Perspective: Enables traders to identify trend alignments (e.g., bullish signals across 4H and 1D) or divergences (e.g., short-term bullish, long-term bearish), catering to day, swing, and position trading strategies.
• Replaces 9+ standalone indicators with one AI-optimized workflow.
• Identifies divergences across timeframes most humans miss (e.g., hourly bullish + weekly bearish = caution).
• AI-Enhanced Accuracy: The adaptive weighting system prioritizes reliable indicators, potentially reducing noise and improving signal quality in volatile or trending markets.
• Universal Applicability: The use of standard technical indicators ensures compatibility with Forex, Indices, Commodities, Stocks, and Crypto, making it versatile for diverse portfolios.
• Visual Clarity: The color-coded table and scale allow traders to quickly assess market conditions, facilitating rapid decision-making under time constraints.
• Timeframe-Specific Insights: Short-term scores support intraday trading, medium-term scores aid swing trading, and long-term scores guide long-term investments.
Practical Applications
• Trend Confirmation: A bullish MA and Supertrend on the 4H timeframe, paired with a positive medium-term score, may confirm an uptrend for swing traders.
• Reversal Detection: Divergence signals alongside oversold Stochastic RSI on lower timeframes can highlight potential reversals for day traders.
• Cross-Asset Trading: Traders can apply indicator to Crypto for short-term volatility plays or to Stocks for long-term trend analysis, leveraging its universal design.
Usage on TradingView
To use AIWAY on TradingView:
1. Search for “AIWAY – Consensus AI MTF Analysis” in the indicator library and add it to your chart.
2. Set the chart to the 4-hour timeframe to view the table and consensus scores.
3. Use the table and scale to assess market sentiment, cross-referencing with price action for confirmation.
AIWAY – Consensus AI MTF Analysis is a powerful tool for traders seeking a comprehensive, AI-enhanced approach to market analysis. Its multi-timeframe framework, adaptive AI module, and clear visual output make it an invaluable asset for navigating Forex, Indices, Commodities, Stocks, and Crypto markets. By providing actionable insights across short, medium, and long terms, AIWAY empowers traders to make informed decisions with confidence.
Disclaimer
The AIWAY indicator is likely for educational purposes only and not investment advice. Trading with it seems to involve high risk, with potential for total loss. Past performance probably does not predict future results; use at your own risk.
Triad Macro Gauge__________________________________________________________________________________
Introduction
__________________________________________________________________________________
The Triad Macro Gauge (TMG) is designed to provide traders with a comprehensive view of the macroeconomic environment impacting financial markets. By synthesizing three critical market signals— VIX (volatility) , Credit Spreads (credit risk) , and the Stocks/Bonds Ratio (SPY/TLT) —this indicator offers a probabilistic assessment of market sentiment, helping traders identify bullish or bearish macro conditions.
Holistic Macro Analysis: Combines three distinct macroeconomic indicators for multi-dimensional insights.
Customization & Flexibility: Adjust weights, thresholds, lookback periods, and visualization styles.
Visual Clarity: Dynamic table, color-coded plots, and anomaly markers for quick interpretation.
Fully Consistent Scores: Identical values across all timeframes (4H, daily, weekly).
Actionable Signals: Clear bull/bear thresholds and volatility spike detection.
Optimized for timeframes ranging from 4 hour to 1 week , the TMG equips swing traders and long-term investors with a robust tool to navigate macroeconomic trends.
__________________________________________________________________________________
Key Indicators
__________________________________________________________________________________
VIX (CBOE:VIX): Measures market volatility (negatively weighted for bearish signals).
Credit Spreads (FRED:BAMLH0A0HYM2EY): Tracks high-yield bond spreads (negatively weighted).
Stocks/Bonds Ratio (SPY/TLT): Evaluates equity sentiment relative to treasuries (positively weighted).
__________________________________________________________________________________
Originality and Purpose
__________________________________________________________________________________
The TMG stands out by combining VIX, Credit Spreads, and SPY/TLT into a single, cohesive indicator. Its unique strength lies in its fully consistent scores across all timeframes, a critical feature for multi-timeframe analysis.
Purpose: To empower traders with a clear, actionable tool to:
Assess macro conditions
Spot market extremes
Anticipate reversals
__________________________________________________________________________________
How It Works
__________________________________________________________________________________
VIX Z-Score: Measures volatility deviations (inverted for bearish signals).
Credit Z-Score: Tracks credit spread deviations (inverted for bearish signals).
Ratio Z-Score: Assesses SPY/TLT strength (positively weighted for bullish signals).
TMG Score: Weighted composite of z-scores (bullish > +0.30, bearish < -0.30).
Anomaly Detection: Identifies extreme volatility spikes (z-score > 3.0).
All calculations are performed using daily data, ensuring that scores remain consistent across all chart timeframes.
__________________________________________________________________________________
Visualization & Interpretation
__________________________________________________________________________________
The script visualizes data through:
A dynamic table displaying TMG Score , VIX Z, Credit Z, Ratio Z, and Anomaly status, with color gradients (green for positive, red for negative, gray for neutral/N/A).
A plotted TMG Score in Area, Histogram, or Line mode , with adaptive opacity for clarity.
Bull/Bear thresholds as horizontal lines (+0.30/-0.30) to signal market conditions.
Anomaly markers (orange circles) for volatility spikes.
Crossover signals (triangles) for bull/bear threshold crossings.
The table provides an immediate snapshot of macro conditions, while the plot offers a visual trend analysis. All values are consistent across timeframes, simplifying multi-timeframe analysis.
__________________________________________________________________________________
Script Parameters
__________________________________________________________________________________
Extensive customization options:
Symbol Selection: Customize VIX, Credit Spreads, SPY, TLT symbols
Core Parameters: Adjust lookback periods, weights, smoothing
Anomaly Detection: Enable/disable with custom thresholds
Visual Style: Choose display modes and colors
__________________________________________________________________________________
Conclusion
__________________________________________________________________________________
The Triad Macro Gauge by Ox_kali is a cutting-edge tool for analyzing macroeconomic trends. By integrating VIX, Credit Spreads, and SPY/TLT, TMG provides traders with a clear, consistent, and actionable gauge of market sentiment.
Recommended for: Swing traders and long-term investors seeking to navigate macro-driven markets.
__________________________________________________________________________________
Credit & Inspiration
__________________________________________________________________________________
Special thanks to Caleb Franzen for his pioneering work on macroeconomic indicator blends – his research directly inspired the core framework of this tool.
__________________________________________________________________________________
Notes & Disclaimer
__________________________________________________________________________________
This is the initial public release (v2.5.9). Future updates may include additional features based on user feedback.
Please note that the Triad Macro Gauge is not a guarantee of future market performance and should be used with proper risk management. Past performance is not indicative of future results.
RSI MTF CorrelationRSI MTF Correlation
This indicator detects unusual movement between RSI values on the current timeframe and a higher timeframe (multi-timeframe), generating volatility alerts or identifying potential market phase shifts.
Applying for FX:XAUUSD and BINANCE:BTCUSD.P
How To Read Data
How To Use
When RSI volatility across multiple timeframes behaves abnormally, bar colors shift from gray to orange, blue, or purple, indicating increasing levels of volatility.
Once volatility returns to a normal state (gray), it may signal a potential reversal trade opportunity.
Alert is available in the indicator.
How to Trade
Set alerts using the built-in functions of this indicator, or monitor the chart manually.
When abnormal RSI volatility occurs, bar colors will shift from gray to orange, blue, or purple, reflecting increasing levels of volatility.
Wait until a green or red bar appears to trigger a trade:
Green bar: signals a potential buy setup
Red bar: signals a potential sell setup
Stop-Loss (SL): place below the nearest swing low (for buy) or above the nearest swing high (for sell), typically 20–30 pips.
Take-Profit (TP): follow a Risk-to-Reward ratio of 1:1, 1:2, or ideally 1:5 or higher depending on market structure.
Breakeven adjustment is optional and can be applied according to your trading style and market conditions.
Notice:
Follow the higher timeframe trend for more reliable signals.
Strictly adhere to risk and money management principles.
If you experience 2–3 consecutive stop-losses, this may indicate a trend shift or an unclear market condition. In such cases, wait for a new trend to form before re-entering.
How It Works
Under normal market conditions, RSI movements across different timeframes show a relatively correlated pattern.
When this correlation breaks (abnormal RSI volatility), it often signals a possible trend shift in the lower timeframe.
To preserve the dominant trend, the higher timeframe typically pulls the lower one back in line, resulting in sharp V-shaped price movements (flash dumps/pumps).
This behavior helps us identify and isolate abnormal corrections, enabling high-probability trade setups.
However, in some cases, a genuine trend reversal in the lower timeframe can be strong enough to impact the higher timeframe. This may lead to invalidation of trade setups (i.e., stop-loss hits).
We acknowledge this risk and manage it through R:R (risk-to-reward) ratio strategies and robust capital management.
Happy trading ❤️.
ATR & Session & Pivot & Note – MultiTF Utility**ATR & Session & Pivot – MultiTF Utility**
**Description**:This versatile indicator is designed for technical analysis in Forex, Crypto, Gold, and Silver markets. It displays ATR (Average True Range) values across multiple timeframes (Current, 1m, 5m, 15m, 1H, 4H, 1D, 1W) with TP/SL levels, alongside Pivot Point analysis (minor and major), Structure Lines, and Trading Session Boxes.
**Features:**
- **Multi-Timeframe ATR Table:** Shows ATR values for various timeframes with customizable table position (top/middle/bottom, left/center/right) and decimal precision.
- **Custom Text Colors:** Distinct colors for 5m (red), 1H (blue), My ATR (green), and LQ Close (purple).
- **Pivot Points:** Identifies minor pivots (HH, LH, LL, HL) with 9 left and 4 right bars, and major pivots with 18 left and 9 right bars.
- **Structure Lines:** Displays lines connecting pivots with adjustable style and width.
- **Session Boxes:** Highlights New York, London, Tokyo, and Sydney sessions (Tehran timezone +3:30) with customizable background transparency and day-of-week labels.
- **Special Calculations:** Includes My ATR, ATI, SCEP, LQ Close, Min LQ, Max LQ, My CL, and Min Reward.
**How to Use:**
1. Add the indicator to your chart.
2. Customize table position, colors, decimal precision, and enable/disable sessions or pivots via settings.
3. Use ATR values for setting TP/SL levels and leverage pivots and session boxes to identify key market levels.
**Settings:**
- **Table Position & Style:** Adjust table placement and font size.
- **ATR Options:** Enable/disable specific timeframes or special calculations.
- **Sessions:** Toggle visibility of trading sessions and adjust transparency.
- **Pivots:** Enable/disable minor/major pivots and set bar counts.
- **Structure Lines:** Activate lines and customize color, width, and style.
**Ideal For**:Traders seeking a comprehensive tool for ATR analysis, pivot identification, and session-based trading across multiple timeframes.
**Note:** Tailor the settings to align with your trading strategy and market for optimal results.
Aurora Flow Oscillator [QuantAlgo]The Aurora Flow Oscillator is an advanced momentum-based technical indicator designed to identify market direction, momentum shifts, and potential reversal zones using adaptive filtering techniques. It visualizes price momentum through a dynamic oscillator that quantifies trend strength and direction, helping traders and investors recognize momentum shifts and trading opportunities across various timeframes and asset class.
🟢 Technical Foundation
The Aurora Flow Oscillator employs a sophisticated mathematical approach with adaptive momentum filtering to analyze market conditions, including:
Price-Based Momentum Calculation: Calculates logarithmic price changes to measure the rate and magnitude of market movement
Adaptive Momentum Filtering: Applies an advanced filtering algorithm to smooth momentum calculations while preserving important signals
Acceleration Analysis: Incorporates momentum acceleration to identify shifts in market direction before they become obvious
Signal Normalization: Automatically scales the oscillator output to a range between -100 and 100 for consistent interpretation across different market conditions
The indicator processes price data through multiple filtering stages, applying mathematical principles including exponential smoothing with adaptive coefficients. This creates an oscillator that dynamically adjusts to market volatility while maintaining responsiveness to genuine trend changes.
🟢 Key Features & Signals
1. Momentum Flow and Extreme Zone Identification
The oscillator presents market momentum through an intuitive visual display that clearly indicates both direction and strength:
Above Zero: Indicates positive momentum and potential bullish conditions
Below Zero: Indicates negative momentum and potential bearish conditions
Slope Direction: The angle and direction of the oscillator provide immediate insight into momentum strength
Zero Line Crossings: Signal potential trend changes and new directional momentum
The indicator also identifies potential overbought and oversold market conditions through extreme zone markings:
Upper Zone (>50): Indicates strong bullish momentum that may be approaching exhaustion
Lower Zone (<-50): Indicates strong bearish momentum that may be approaching exhaustion
Extreme Boundaries (±95): Mark potentially unsustainable momentum levels where reversals become increasingly likely
These zones are displayed with gradient intensity that increases as the oscillator moves toward extremes, helping traders and investors:
→ Identify potential reversal zones
→ Determine appropriate entry and exit points
→ Gauge overall market sentiment strength
2. Customizable Trading Style Presets
The Aurora Flow Oscillator offers pre-configured settings for different trading approaches:
Default (80,150): Balanced configuration suitable for most trading and investing situations.
Scalping (5,80): Highly responsive settings for ultra-short-term trades. Generates frequent signals and catches quick price movements. Best for 1-15min charts when making many trades per day.
Day Trading (8,120): Optimized for intraday movements with faster response than default settings while maintaining reasonable signal quality. Ideal for 5-60min or 4h-12h timeframes.
Swing Trading (10,200): Designed for multi-day positions with stronger noise filtering. Focuses on capturing larger price swings while avoiding minor fluctuations. Works best on 1-4h and daily charts.
Position Trading (14,250): For longer-term position traders/investors seeking significant market trends. Reduces false signals by heavily filtering market noise. Ideal for daily or even weekly charts.
Trend Following (16,300): Maximum smoothing that prioritizes established directional movements over short-term fluctuations. Best used on daily and weekly charts, but can also be used for lower timeframe trading.
Countertrend (7,100): Tuned to detect potential reversals and exhaustion points in trends. More sensitive to momentum shifts than other presets. Effective on 15min-4h charts, as well as daily and weekly charts.
Each preset automatically adjusts internal parameters for optimal performance in the selected trading context, providing flexibility across different market approaches without requiring complex manual configuration.
🟢 Practical Usage Tips
1/ Trend Analysis and Interpretation
→ Direction Assessment: Evaluate the oscillator's position relative to zero to determine underlying momentum bias
→ Momentum Strength: Measure the oscillator's distance from zero within the -100 to +100 range to quantify momentum magnitude
→ Trend Consistency: Monitor the oscillator's path for sustained directional movement without frequent zero-line crossings
→ Reversal Detection: Watch for oscillator divergence from price and deceleration of movement when approaching extreme zones
2/ Signal Generation Strategies
Depending on your trading approach, multiple signal strategies can be employed:
Trend Following Signals:
Enter long positions when the oscillator crosses above zero
Enter short positions when the oscillator crosses below zero
Add to positions on pullbacks while maintaining the overall trend direction
Countertrend Signals:
Look for potential reversals when the oscillator reaches extreme zones (±95)
Enter contrary positions when momentum shows signs of exhaustion
Use oscillator divergence with price as additional confirmation
Momentum Shift Signals:
Enter positions when oscillator changes direction after establishing a trend
Exit positions when oscillator direction reverses against your position
Scale position size based on oscillator strength percentage
3/ Timeframe Optimization
The indicator can be effectively applied across different timeframes with these considerations:
Lower Timeframes (1-15min):
Use Scalping or Day Trading presets
Focus on quick momentum shifts and zero-line crossings
Be cautious of noise in extreme market conditions
Medium Timeframes (30min-4h):
Use Default or Swing Trading presets
Look for established trends and potential reversal zones
Combine with support/resistance analysis for entry/exit precision
Higher Timeframes (Daily+):
Use Position Trading or Trend Following presets
Focus on major trend identification and long-term positioning
Use extreme zones for position management rather than immediate reversals
🟢 Pro Tips
Price Momentum Period:
→ Lower values (5-7) increase sensitivity to minor price fluctuations but capture more market noise
→ Higher values (10-16) emphasize sustained momentum shifts at the cost of delayed response
→ Adjust based on your timeframe (lower for shorter timeframes, higher for longer timeframes)
Oscillator Filter Period:
→ Lower values (80-120) produce more frequent directional changes and earlier response to momentum shifts
→ Higher values (200-300) filter out shorter-term fluctuations to highlight dominant market cycles
→ Match to your typical holding period (shorter holding time = lower filter values)
Multi-Timeframe Analysis:
→ Compare oscillator readings across different timeframes for confluence
→ Look for alignment between higher and lower timeframe signals
→ Use higher timeframe for trend direction, lower for earlier entries
Volatility-Adaptive Trading:
→ Use oscillator strength to adjust position sizing (stronger = larger)
→ Consider reducing exposure when oscillator reaches extreme zones
→ Implement tighter stops during periods of oscillator acceleration
Combination Strategies:
→ Pair with volume indicators for confirmation of momentum shifts
→ Use with support/resistance levels for strategic entry and exit points
→ Combine with volatility indicators for comprehensive market context
Money Flow Pulse💸 In markets where volatility is cheap and structure is noisy, what matters most isn’t just the move — it’s the effort behind it. Money Flow Pulse (MFP) offers a compact, color-coded readout of real-time conviction by scoring volume-weighted price action on a five-tier scale. It doesn’t try to predict reversals or validate trends. Instead, it reveals the quality of the move in progress: is it fading , driving , exhausting , or hollow ?
🎨 MFP draws from the traditional Money Flow Index (MFI), a volume-enhanced momentum oscillator, but transforms it into a modular “pressure readout” that fits seamlessly into any structural overlay. Rather than oscillating between extremes with little interpretive guidance, MFP discretizes the flow into clean, color-coded regimes ranging from strong inflow (+2) to strong outflow (–2). The result is a responsive diagnostic layer that complements, rather than competes with, tools like ATR and/or On-Balance Volume.
5️⃣ MFP uses a normalized MFI value smoothed over 13 periods and classified into a 5-tier readout of Volume-Driven Conviction :
🍆 Exhaustion Inflow — usually a top or blowoff; not strength, but overdrive (+2)
🥝 Active Inflow — supportive of trend continuation (+1)
🍋 Neutral — chop, coil, or fakeouts (0)
🍑 Selling Intent — weakening structure, possible fade setups (-1)
🍆 Exhaustion Outflow — often signals forced selling or accumulation traps (-2)
🎭 These tiers are not arbitrary. Each one is tuned to reflect real capital behavior across timeframes. For instance, while +1 may support continuation, +2 often precedes exhaustion — especially on the lower timeframes. Similarly, a –1 reading during a pullback suggests sell-side pressure is building, but a shift to –2 may mean capitulation is already underway. The difference between the two can define whether a move is tradable continuation or strategic exhaustion .
🌊 The MFI ROC (Rate of Change) feature can be toggled to become a volatility-aware pulse monitor beneath the derived MFI tier. Instead of scoring direction or structure, ROC reveals how fast conviction is changing — not just where it’s headed, but how hard it's accelerating or decaying. It measures the raw Δ between the current and previous MFI values, exposing bursts of energy, fading pressure, or transitional churn .
🎢 Visually, ROC appears as a low-opacity area fill, anchored to a shared lemon-yellow zero line. When the green swell rises, buying pressure is accelerating; when the red drops, flow is actively deteriorating. A subtle bump may signal early interest — while a steep wave hints at an emotional overreaction. The ROC value itself provides numeric insight alongside the raw MFI score. A reading of +3.50 implies strong upside momentum in the flow — often supporting trend ignition. A score of –6.00 suggests rapid deceleration or full exhaustion — often preceding reversals or failed breakouts.
・ MFI shows you where the flow is
・ ROC tells you how it’s behaving
😎 This blend reveals not just structure or intent — but also urgency . And in flow-based trading, urgency often precedes outcome.
🧩 Divergence isn’t delay — it’s disagreement . One of the most revealing features of MFP is how it exposes momentum dissonance — situations where price and flow part ways. These divergences often front-run pivots , traps , or velocity stalls . Unlike RSI-style divergence, which whispers of exhaustion, MFI divergence signals a breakdown in conviction. The structure may extend — but the effort isn’t there.
・ Price ▲ MFI ▼ → Effortless Markup : Often signals distribution or a grind into liquidity. Without rising MFI, the rally lacks true flow participation — a warning of fragility.
・ Price ▼ MFI ▲ → Absorption or Early Accumulation : Price breaks down, but money keeps flowing in — a hidden bid. Watch for MFI tier shifts or ROC bursts to confirm a reversal.
🏄♂️ These moments don’t require signal overlays or setup hunting. MFP narrates the imbalance. When price breaks structure but flow does not — or vice versa — you’re not seeing trend, you’re seeing disagreement, and that's where edge begins.
💤 MFP is especially effective on intraday charts where volume dislocations matter most. On the 1H or 15m chart, it helps distinguish between breakouts with conviction versus those lacking flow. On higher timeframes, its resolution softens — it becomes more of a drift indicator than a trigger device. That’s by design: MFP prioritizes pulse, not position. It’s not the fire, it’s the heat.
📎 Use MFP in confluence with structural overlays to validate price behavior. A ribbon expansion with rising MFP is real. A compression breakout without +1 flow is "fishy". Watch how MFP behaves near key zones like anchored VWAP, MAs or accumulation pivots. When MFP rises into a +2 and fails to sustain, the reversal isn’t just technical — it’s flow-based.
🪟 MFP doesn’t speak loudly, but it never whispers without reason. It’s the pulse check before action — the breath of the move before the breakout. While it stays visually minimal on the chart, the true power is in the often overlooked Data Window, where traders can read and interpret the score in real time. Once internalized, these values give structure-aware traders a framework for conviction, continuation, or caution.
🛜 MFP doesn’t chase momentum — it confirms conviction. And in markets defined by noise, that signal isn’t just helpful — it’s foundational.
CSCMultiTimeframeToolsLibrary "CSCMultiTimeframeTools"
Calculates instant higher timeframe values for higher timeframe analysis with zero lag.
getAdjustedLookback(current_tf_minutes, higher_tf_minutes, length)
Calculate adjusted lookback period for higher timeframe conversion.
Parameters:
current_tf_minutes (int) : Current chart timeframe in minutes (e.g., 5 for 5m).
higher_tf_minutes (int) : Target higher timeframe in minutes (e.g., 15 for 15m).
length (int) : Base length value (e.g., 14 for RSI/MFI).
Returns: Adjusted lookback period (length × multiplier).
Purpose and Benefits of the TimeframeTools Library
This library is designed to solve a critical pain point for traders who rely on higher timeframe (HTF) indicator values while analyzing lower timeframe (LTF) charts. Traditional methods require waiting for multiple candles to close—for example, to see a 1-hour RSI on a 5-minute chart, you’d need 12 closed candles (5m × 12 = 60m) before the value updates. This lag means missed opportunities, delayed signals, and inefficient decision-making.
Why Traders Need This
Whether you’re scalping (5M/15M) or swing trading (1H/4H), this library bridges the gap between timeframes, giving you HTF context in real time—so you can act faster, with confidence.
How This Library Eliminates the Waiting Game
By dynamically calculating the adjusted lookback period, the library allows:
Real-time HTF values on LTF charts – No waiting for candle closes.
Accurate conversions – A 14-period RSI on a 1-hour chart translates to 168 periods (14 × 12) on a 5-minute chart, ensuring mathematical precision.
Flexible application – Works with common indicators like RSI, MFI, CCI, and moving averages (though confirmations should be done before publishing under your own secondary use).
Key Advantages Over Manual Methods
Speed: Instantly reflects HTF values without waiting for candle resolutions.
Adaptability: Adjusts automatically if the user changes timeframes or lengths.
Consistency: Removes human error in manual period calculations.
Limitations to Note
Not a magic bullet – While it solves the lag issue, traders should still:
Validate signals with price action or additional confirmations.
Be mindful of extreme lookback lengths (e.g., a 200-period daily SMA on a 1-minute chart requires 28,800 periods, which may strain performance).
HTF Candle Overlay with Probability
Visualize Higher Timeframe Candles with Predictive Insights
This tool reconstructs higher-timeframe (HTF) candles using 1-minute bars and overlays them directly on your chart. It includes:
Wick + Body rendering for grouped HTF candles (e.g. 10m, 15m, etc.)
A dynamic label showing the probability of the current HTF candle closing bullish
Real-time updates and smart fading based on candle progress
Configurable colors for fills, outlines, and labels
🔧 Customizable Options:
Candle size (e.g. 10m, 15m)
Body fill and border color
Wick fill and border color
Label text/background color
Whether you're a scalper watching larger structure or a PA trader looking for confluence, this overlay gives you predictive insight where it matters: on the candle that's still forming.
Trend Trading IndicatorThis trend trading indicator uses multiple different custom formulas to identify market trends as well as identify when the market is moving sideways. It has a master trend that will show you the trend using the color of the candles and then there are multiple different types of entry and confluence signals that will appear as different chart shapes above or below the candles to inform you about when to enter a trade and how strong the trend is so you know whether to hold a position longer or get out. There is also a panel at the bottom of the chart that shows you the trend strength for 5 different timeframes so you can easily identify the short and long term trends and scan through charts quickly to find markets with the strongest trends.
The indicator can be customized to fit your trading style by adjusting the timeframes for the master trend, which timeframes affect signals, turning on or off the various entry & confluence signals, turning on or off ranging market filters and more. It can be adjusted to react quickly for intraday trading or use long timeframes for swing trading or only trading when the market is in a strong long term trend.
The indicator also has a built in trend direction value that can be sent to other indicators to be used as a trend filter as well by setting the source value on an external indicator to use the trend direction value from this indicator. This is useful for preventing signals from coming in on other indicators when they go against the trend that this indicator has identified according to the settings it is configured with.
How To Use This Indicator Properly
This indicator is designed to only give signals when the market is trending and filter out the sideways price action for you. Due to this, depending on the timeframe settings you use, there may be extended periods where there are no signals because the market is going sideways. You can adjust your timeframe settings to react faster or slower by lowering the timeframes used and turning off some of the higher timeframes or use all of the timeframes available and only get signals when the market is in a strong long term trend for the safest trades.
The indicator uses a master trend that needs to show a trend before any other confluence signals can come in. The master trend will show up by coloring the candles blue when the trend is bullish or orange when the trend is bearish according to the settings you have chosen. When the market is not trending, the candles will be colored grey. This helps to keep you out of trades when the market is going sideways. You will only be able to see the master trend by using the colored candles though, so make sure to turn the chart’s candle coloring off so it doesn’t override the indicator candle coloring.
Once a trend has been established, then other signals will begin to show up if the trend is strong and various parameters are met. The indicator includes the following types of signals:
Master Trend Signals
Strong Trend Buy & Sell Signals
Pullback During Strong Trend Signals
Strong All Timeframe Trend Signals
Trend Strength Score Signals
The indicator also has multiple filters you can use to customize the master trend to allow more or less signals to come in. The more filters you have on, the better and more likely the signals are to be winners because it will only give signals when there are very strong trends on all timeframes. If you want a lot of signals for intraday scalping, you can turn off most of the filters and just use lower timeframes for the master trend settings. The following filters can be used to customize the trend parameters:
Signals Only Allowed In Direction Of Timeframes 4 & 5
Trend Of Timeframe #1 Used For Master Trend Signals
Trend Of Timeframe #2 Used For Master Trend Signals
Trend Of Timeframe #3 Used For Master Trend Signals
Trend Of Timeframe #4 Used For Master Trend Signals
Trend Of Timeframe #5 Used For Master Trend Signals
No Master Trend Signals If This Timeframe Is Ranging - #1
No Master Trend Signals If This Timeframe Is Ranging - #2
No Master Trend Signals If This Timeframe Is Ranging - #3
Make sure to keep all trend timeframes in order from 1-5 for best results, even if they are turned off. The indicator is programmed to compare each timeframe to the next one, so keeping the timeframes in order will give you proper calculations. For example: timeframes 1-5 should be 15, 60, 240, 1D, 1W or 240, 1D, 1W, 1M, 3M and so on.
The indicator has alerts for bullish and bearish versions of each type of signal so you can get notified when a chart is trending strongly.
Market Hours Available To Use The Indicator On
The indicator works on stocks, crypto, forex and futures markets and other markets that have the same hours, you just need to select the hours that the market you are trading has in the main indicator settings to get the correct signals. There are options for stock hours(6.5 hours a day, 5 days per week), futures/forex hours(23 hours a day, 5 days per week) and crypto hours(24 hours a day, 7 days per week). Just select the correct option in the dropdown menu and the indicator will calculate based on those hours.
Master Trend Settings
The master trend is calculated using Timeframes 1-5, the setting for whether to use timeframes 1-5 for signals, ranging market filters 1-3 and only allow signals in the direction of timeframes 4 & 5. These settings will affect how the overall trend is calculated, which has to be trending in order for any confluence signals to come in.
Set timeframe 1 to a higher timeframe than your chart is set to. For example if you trade the 1 minute or 5 minute chart, timeframe #1 needs to be set to something higher than your chart so 15, 60 or 240. Then set timeframes 2-5 to be one timeframe higher than the previous one. So if timeframe 1 is 60, then timeframe 2 should be 240 and so on. Make sure to do this even if you do not turn on each timeframe to be used for master trend signals as the higher timeframes will still affect the confluence signals.
Turn on or off the toggle for each timeframe if you want the master trend to use. Keeping just lower timeframes on will give more signals for short term trends and leaving all of the timeframes on will only give signals when all of the timeframes are trending. I recommend keeping timeframes 1 & 2 on at the very least and then turning on or off timeframes 3-5 based on how many signals you want and how strong you want the trend to be in order for signals to be given.
Ranging Market Filters
The indicator has parameters to detect if the market is ranging or moving sideways on each timeframe and will show this by coloring the trend strength score in the bottom panel grey for that timeframe. When the market is ranging, it is best to not trade because there is no established trend. Use these filters to increase the probability of the master trend and confluence trend signals being correct and moving in the direction of the trend.
If you turn on the ranging market filters, you will not get any signals if the market is detected as ranging on any of the timeframes you have turned on for the ranging market filters.
You can use 1, 2 or all 3 ranging market filters to dial in the indicator to your preference. Make sure to backtest it and look at historical data to see how this will affect the indicator and choose what settings work best for your style of trading.
Signals Only Allowed In Direction Of Timeframes 4 & 5
If you only want to make sure you are trading in the direction of the long term trend, turn this setting on. It will prevent the indicator from giving any signals that are not in the same direction as the long term trends and increase your probability for winning trades.
This setting allows you to quickly filter out any noise that you will get from lower timeframe trends that are not in the same direction as the long term trends and helps to ensure you stick to the overall trend. Markets will usually make much faster and larger moves in the direction of the overall trend and have high resistance, choppy moves when going in the opposite direction, so this will help you avoid getting into those trades even if you don’t have timeframes 4 & 5 turned on in the master trend timeframe settings.
Strong Buy & Sell Signals
When the master trend detects a trending market and the trend is strong on all 5 timeframes, the indicator will show crosses on the chart meaning these are great entry points to get into the market with positions in the direction of the trend. There are 3 levels of these signals and will show as small crosses, medium crosses and large crosses. The larger the cross is, the stronger the trend is and is more likely to continue the trend.
Use these strong buy & sell signal crosses as entry points and place your stop loss at the most recent major pivot. Then trail your stop loss with the trade to lock in profits.
Pullbacks During Strong Trend Signals
When there is a strong trend on timeframes 3-5 and a pullback on timeframes 1 & 2, then move back in the direction of the higher timeframe trend, this will fire a signal to enter a trade in the direction of the trend. These are excellent entries since the market has pulled back, allowing you to have a good entry with low potential drawdown.
These signals will appear as label tag or price tag looking signals. Use these for your entries and then place a stop loss just beyond the most recent major pivot and trail your stop loss as the trade moves in your favor to lock in profits.
Strong All Timeframe Trend Signals
When the trend is strong on all timeframes that you have set to use for master trend signals, the indicator will show circles/dots on the chart above or below the candles. There is also a second type of strong trend calculation that it uses that will detect a strong trend in a slightly different way and that formula will paint a background color on the chart as extra confluence. When the background color and dots show up at the same time, that means both formulas are showing strong trends.
Use these dots and background coloring to confirm your position and continue to hold it for more gains. Strong trends typically continue in the same direction so use these signals as extra confluence to hold your position and stay in the trade.
Trend Strength Score Signals
Each timeframe will have a trend strength score calculated. If you turn the visuals on in the master trend timeframe settings, they will show up as an oscillator in the bottom panel. It will show red for bearish trends and green for bullish trends and grey when the market is ranging. It will also show a label next to each timeframe telling you the score out of the maximum score for that timeframe.
Pay attention to these as they will give you a very quick way to read the long term and short term trends. When all timeframes are trending strongly, the background will paint red or green to notify you of strong trends that you can trade.
When the long term trends agree, but short term trends are going against the long term, look for the short term trends to reverse and use those areas as entry positions for longer trades in the direction of the overall trend. Doing this really helps to identify possible reversals and keep you from getting into those types of trades too early.
Timeframes The Indicator Can Be Used On
The indicator is setup to be used on the following chart timeframes: 15 seconds, 30 seconds, 1 minute, 2 minute, 3 minute, 5 minute, 10 minute, 15 minute, 30 minute, 1 hour, 2 hour, 4 hour, 6 hour, 8 hour, 12 hour and 1 day charts.
If your chart is set to a different timeframe than the ones listed above, it will not calculate properly, so make sure your chart is on the correct timeframe.
Markets The Indicator Can Be Used On
The indicator has 3 modes for various market hours. The type of market doesn’t matter, what matters is how many hours that market is open for. Almost all markets fall under 3 types of opening hours so we have provided the ability for the indicator to calculate correctly on all 3 types of market hours. The hours it can use are: stocks(6.5 hours per day, 5 days per week), crypto(24 hours per day, 7 days per week) and futures/forex(23 hours per day, 5 days per week).
You will need to update this setting from the dropdown at the top of the indicator settings to match the chart that you are on for it to calculate correctly.
Filtering Other Indicators Using The Trend Direction Of This Indicator
The indicator has a built in trend direction value that can be sent to other indicators and used as a filter. By setting an input.source() value on other indicators that are on the same chart as this indicator, you can set that indicator to do or not do whatever you want when this trend indicator shows a trend or not.
The name of the source you can use on your external indicator is called Trend Direction To Send To External Indicators. The values it sends are as follows: 0 when there is no master trend direction, 1 when the master trend is bullish and -1 when the master trend is bearish.
By using this source, you can prevent other indicators from giving sell signals during up trends, prevent other indicators from giving buy signals during down trends and prevent other indicators from giving any signals when the market is ranging or not showing an established trend.
Alerts Available To Use
The indicator has alerts for bullish versions as well as bearish versions of each type of signal available. Use these alerts to notify you of strong trends on markets that you may not have the charts up for at all times but still want to trade.
Multi-Timeframe Trend Analysis [BigBeluga]Multi-Timeframe Trend Analysis
A powerful trend-following dashboard designed to help traders monitor and compare trend direction across multiple higher timeframes. By analyzing EMA conditions from five customizable timeframes, this tool gives a clear visual breakdown of short- to long-term trend alignment.
🔵Key Features:
Multi-Timeframe EMA Dashboard:
➣ Displays a table in the top-right corner showing trend direction across 5 user-defined timeframes.
➣ Each row shows whether ema is rising or falling its corresponding EMA for that timeframe.
➣ Green arrows (🢁) indicate uptrends, purple arrows (🢃) signal downtrends.
Custom Timeframe Selection:
➣ Traders can input any 5 timeframes (e.g., 1h, 2h, 3h, etc.) with individual EMA lengths for flexible trend mapping.
➣ The tool auto-adjusts to match and align external timeframe EMAs to the current chart for seamless overlay.
Dynamic Chart Arrows:
➣ On-chart arrows mark when EMA rising or falling EMAs from the current chart timeframe.
➣ Each EMA arrows has a unique transparency level—shorter EMA arrows are more transparent, longer EMA arrows are more vivid. (Hover Mouse over the arrow to see which EMAs it is)
Gradient EMA Plotting:
➣ All five EMAs are plotted with gradually increasing opacity.
➣ Gradient fills between EMAs enhance visual structure, making it easier to track convergence/divergence.
🔵Usage:
Trend Confirmation: Use the dashboard to confirm multi-timeframe trend alignment before entering trades.
Entry Filtering: Avoid countertrend trades by spotting when higher timeframes disagree with the current one.
Momentum Insight: Track the transition of arrows from lighter to stronger opacity to visualize trend shifts over time.
Scalping or Swinging: Customize timeframes depending on your strategy—from intraday scalps to longer-term swings.
Multi-Timeframe Trend Analysis is the ultimate visual companion for traders who want clarity on how price behaves across multiple time horizons. With its smart EMA mapping and dashboard feedback, it keeps you aligned with dominant trend directions and transition zones at all times.
TTM Squeeze Momentum MTF [Cometreon]TTM Squeeze Momentum MTF combines the core logic of both the Squeeze Momentum by LazyBear and the TTM Squeeze by John Carter into a single, unified indicator. It offers a complete system to analyze the phase, direction, and strength of market movements.
Unlike the original versions, this indicator allows you to choose how to calculate the trend, select from 15 different types of moving averages, customize every parameter, and adapt the visual style to your trading preferences.
If you are looking for a powerful, flexible and highly configurable tool, this is the perfect choice for you.
🔷 New Features and Improvements
🟩 Unified System: Trend Detection + Visual Style
You can decide which logic to use for the trend via the "Show TTM Squeeze Trend" input:
✅ Enabled → Trend calculated using TTM Squeeze
❌ Disabled → Trend based on Squeeze Momentum
You can also customize the visual style of the indicator:
✅ Enable "Show Histogram" for a visual mode using Histogram, Area, or Column
❌ Disable it to display the classic LazyBear-style line
Everything updates automatically and dynamically based on your selection.
🟩 Full Customization
Every base parameter of the original indicator is now fully configurable: lengths, sources, moving average types, and more.
You can finally adapt the squeeze logic to your strategy — not the other way around.
🟩 Multi-MA Engine
Choose from 15 different Moving Averages for each part of the calculation:
SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
RMA (Smoothed Moving Average)
HMA (Hull Moving Average)
JMA (Jurik Moving Average)
DEMA (Double Exponential Moving Average)
TEMA (Triple Exponential Moving Average)
LSMA (Least Squares Moving Average)
VWMA (Volume-Weighted Moving Average)
SMMA (Smoothed Moving Average)
KAMA (Kaufman’s Adaptive Moving Average)
ALMA (Arnaud Legoux Moving Average)
FRAMA (Fractal Adaptive Moving Average)
VIDYA (Variable Index Dynamic Average)
🟩 Dynamic Signal Line
Apply a moving average to the momentum for real-time cross signals, with full control over its length and type.
🟩 Multi-Timeframe & Multi-Ticker Support
You're no longer limited to the chart's current timeframe or ticker. Apply the squeeze to any symbol or timeframe without repainting.
🔷 Technical Details and Customizable Inputs
This indicator offers a fully modular structure with configurable parameters for every component:
1️⃣ Squeeze Momentum Settings – Choose the source, length, and type of moving average used to calculate the base momentum.
2️⃣ Trend Mode Selector – Toggle "Show TTM Squeeze Trend" to select the trend logic displayed on the chart:
✅ Enabled – Shows the trend based on TTM Squeeze (Bollinger Bands inside/outside Keltner Channel)
❌ Disabled – Displays the trend based on Squeeze Momentum logic
🔁 The moving average type for the Keltner Channel is handled automatically, so you don't need to select it manually, even if the custom input is disabled.
3️⃣ Signal Line – Toggle the Signal Line on the Squeeze Momentum. Select its length and MA type to generate visual cross signals.
4️⃣ Bollinger Bands – Configure the length, multiplier, source, and MA type used in the bands.
5️⃣ Keltner Channel – Adjust the length, multiplier, source, and MA type. You can also enable or disable the True Range option.
6️⃣ Advanced MA Parameters – Customize the parameters for advanced MAs (JMA, ALMA, FRAMA, VIDYA), including Phase, Power, Offset, Sigma, and Shift values.
7️⃣ Ticker & Input Source – Select the ticker and manage inputs for alternative chart types like Renko, Kagi, Line Break, and Point & Figure.
8️⃣ Style Settings – Choose how the squeeze is displayed:
Enable "Show Histogram" for Histogram, Area, or Column style
Disable it to show the classic LazyBear-style line
Use Reverse Color to invert line colors
Toggle Show Label to highlight Signal Line cross signals
Customize trend colors to suit your preferences
9️⃣ Multi-Timeframe Options - Timeframe – Use the squeeze on higher timeframes for stronger confirmation
🔟 Wait for Timeframe Closes -
✅ Enabled – Prevents multiple signals within the same candle
❌ Disabled – Displays the indicator smoothly without delay
🔧 Default Settings Reference
To replicate the default settings of the original indicators as they appear when first applied to the chart, use the following configurations:
🟩 TTM Squeeze (John Carter Style)
Squeeze
Length: 20
MA Type: SMA
Show TTM Squeeze Trend: Enabled
Bollinger Bands
Length: 20
Multiplier: 2.0
MA Type: SMA
Keltner Channel
Length: 20
Multiplier: 1.0
Use True Range: ON
MA Type: EMA
Style
Show Histogram: Enabled
Reverse Color: Enabled
🟩 Squeeze Momentum (LazyBear Style)
Squeeze
Length: 10
MA Type: SMA
Show TTM Squeeze Trend: Disabled
Bollinger Bands
Length: 20
Multiplier: 1.5
MA Type: SMA
Keltner Channel
Length: 10
Multiplier: 1.5
Use True Range: ON
MA Type: SMA
Style
Show Histogram: Disabled
Reverse Color: Disabled
⚠️ These values are intended as a starting point. The Cometreon indicator lets you fully customize every input to fit your trading style.
🔷 How to Use Squeeze Momentum Pro
🔍 Identifying Trends
Squeeze Momentum Pro supports two different methods for identifying the trend visually, each based on a distinct logic:
Squeeze Momentum Trend (LazyBear-style):
Displays 3 states based on the position of the Bollinger Bands relative to the Keltner Channel:
🔵 Blue = No Squeeze (BB outside KC and KC outside BB)
⚪️ White = Squeeze Active (BB fully inside KC)
⚫️ Gray = Neutral state (none of the above)
TTM Squeeze Trend (John Carter-style):
Calculates the difference in width between the Bollinger Bands and the Keltner Channel:
🟩 Green = BB width is greater than KC → potential expansion phase
🟥 Red = BB are tighter than KC → possible compression or pre-breakout
📈 Interpreting Signals
Depending on the active configuration, the indicator can provide various signals, including:
Trend color → Reflects the current compression/expansion state (based on selected mode)
Momentum value (above or below 0) → May indicate directional pressure
Signal Line cross → Can highlight momentum shifts
Color change in the momentum → May suggest a potential trend reversal
🛠 Integration with Other Tools
Squeeze Momentum Pro works well alongside other indicators to strengthen market context:
✅ Volume Profile / OBV – Helps confirm accumulation or distribution during squeezes
✅ RSI – Useful to detect divergence between momentum and price
✅ Moving Averages – Ideal for defining primary trend direction and filtering signals
☄️ If you find this indicator useful, leave a Boost to support its development!
Every piece of feedback helps improve the tool and deliver an even better trading experience.
🔥 Share your ideas or feature requests in the comments!
Open Price on Selected TimeframeIndicator Name: Open Price on Selected Timeframe
Short Title: Open Price mtf
Type: Technical Indicator
Description:
Open Price on Selected Timeframe is an indicator that displays the Open price of a specific timeframe on your chart, with the ability to dynamically change the color of the open price line based on the change between the current candle's open and the previous candle's open.
Selectable Timeframes: You can choose the timeframe you wish to monitor the Open price of candles, ranging from M1, M5, M15, H1, H4 to D1, and more.
Dynamic Color Change: The Open price line changes to green when the open price of the current candle is higher than the open price of the previous candle, and to red when the open price of the current candle is lower than the open price of the previous candle. This helps users quickly identify trends and market changes.
Features:
Easy Timeframe Selection: Instead of editing the code, users can select the desired timeframe from the TradingView interface via a dropdown.
Dynamic Color Change: The color of the Open price line changes automatically based on whether the open price of the current candle is higher or lower than the previous candle.
Easily Track Open Price Levels: The indicator plots a horizontal line at the Open price of the selected timeframe, making it easy for users to track this important price level.
How to Use:
Select the Timeframe: Users can choose the timeframe they want to track the Open price of the candles.
Interpret the Color Signal: When the open price of the current candle is higher than the open price of the previous candle, the Open price line is colored green, signaling an uptrend. When the open price of the current candle is lower than the open price of the previous candle, the Open price line turns red, signaling a downtrend.
Observe the Open Price Levels: The indicator will draw a horizontal line at the Open price level of the selected timeframe, allowing users to easily monitor this important price.
Benefits:
Enhanced Technical Analysis: The indicator allows you to quickly identify trends and market changes, making it easier to make trading decisions.
User-Friendly: No need to modify the code; simply select your preferred timeframe to start using the indicator.
Disclaimer:
This indicator is not a complete trading signal. It only provides information about the Open price and related trends. Users should combine it with other technical analysis tools to make more informed trading decisions.
Summary:
Open Price on Selected Timeframe is a simple yet powerful indicator that helps you track the Open price on various timeframes with the ability to change colors dynamically, providing a visual representation of the market's trend.
Enhanced Fuzzy SMA Analyzer (Multi-Output Proxy) [FibonacciFlux]EFzSMA: Decode Trend Quality, Conviction & Risk Beyond Simple Averages
Stop Relying on Lagging Averages Alone. Gain a Multi-Dimensional Edge.
The Challenge: Simple Moving Averages (SMAs) tell you where the price was , but they fail to capture the true quality, conviction, and sustainability of a trend. Relying solely on price crossing an average often leads to chasing weak moves, getting caught in choppy markets, or missing critical signs of trend exhaustion. Advanced traders need a more sophisticated lens to navigate complex market dynamics.
The Solution: Enhanced Fuzzy SMA Analyzer (EFzSMA)
EFzSMA is engineered to address these limitations head-on. It moves beyond simple price-average comparisons by employing a sophisticated Fuzzy Inference System (FIS) that intelligently integrates multiple critical market factors:
Price deviation from the SMA ( adaptively normalized for market volatility)
Momentum (Rate of Change - ROC)
Market Sentiment/Overheat (Relative Strength Index - RSI)
Market Volatility Context (Average True Range - ATR, optional)
Volume Dynamics (Volume relative to its MA, optional)
Instead of just a line on a chart, EFzSMA delivers a multi-dimensional assessment designed to give you deeper insights and a quantifiable edge.
Why EFzSMA? Gain Deeper Market Insights
EFzSMA empowers you to make more informed decisions by providing insights that simple averages cannot:
Assess True Trend Quality, Not Just Location: Is the price above the SMA simply because of a temporary spike, or is it supported by strong momentum, confirming volume, and stable volatility? EFzSMA's core fuzzyTrendScore (-1 to +1) evaluates the health of the trend, helping you distinguish robust moves from noise.
Quantify Signal Conviction: How reliable is the current trend signal? The Conviction Proxy (0 to 1) measures the internal consistency among the different market factors analyzed by the FIS. High conviction suggests factors are aligned, boosting confidence in the trend signal. Low conviction warns of conflicting signals, uncertainty, or potential consolidation – acting as a powerful filter against chasing weak moves.
// Simplified Concept: Conviction reflects agreement vs. conflict among fuzzy inputs
bullStrength = strength_SB + strength_WB
bearStrength = strength_SBe + strength_WBe
dominantStrength = max(bullStrength, bearStrength)
conflictingStrength = min(bullStrength, bearStrength) + strength_N
convictionProxy := (dominantStrength - conflictingStrength) / (dominantStrength + conflictingStrength + 1e-10)
// Modifiers (Volatility/Volume) applied...
Anticipate Potential Reversals: Trends don't last forever. The Reversal Risk Proxy (0 to 1) synthesizes multiple warning signs – like extreme RSI readings, surging volatility, or diverging volume – into a single, actionable metric. High reversal risk flags conditions often associated with trend exhaustion, providing early warnings to protect profits or consider counter-trend opportunities.
Adapt to Changing Market Regimes: Markets shift between high and low volatility. EFzSMA's unique Adaptive Deviation Normalization adjusts how it perceives price deviations based on recent market behavior (percentile rank). This ensures more consistent analysis whether the market is quiet or chaotic.
// Core Idea: Normalize deviation by recent volatility (percentile)
diff_abs_percentile = ta.percentile_linear_interpolation(abs(raw_diff), normLookback, percRank) + 1e-10
normalized_diff := raw_diff / diff_abs_percentile
// Fuzzy sets for 'normalized_diff' are thus adaptive to volatility
Integrate Complexity, Output Clarity: EFzSMA distills complex, multi-factor analysis into clear, interpretable outputs, helping you cut through market noise and focus on what truly matters for your decision-making process.
Interpreting the Multi-Dimensional Output
The true power of EFzSMA lies in analyzing its outputs together:
A high Trend Score (+0.8) is significant, but its reliability is amplified by high Conviction (0.9) and low Reversal Risk (0.2) . This indicates a strong, well-supported trend.
Conversely, the same high Trend Score (+0.8) coupled with low Conviction (0.3) and high Reversal Risk (0.7) signals caution – the trend might look strong superficially, but internal factors suggest weakness or impending exhaustion.
Use these combined insights to:
Filter Entry Signals: Require minimum Trend Score and Conviction levels.
Manage Risk: Consider reducing exposure or tightening stops when Reversal Risk climbs significantly, especially if Conviction drops.
Time Exits: Use rising Reversal Risk and falling Conviction as potential signals to take profits.
Identify Regime Shifts: Monitor how the relationship between the outputs changes over time.
Core Technology (Briefly)
EFzSMA leverages a Mamdani-style Fuzzy Inference System. Crisp inputs (normalized deviation, ROC, RSI, ATR%, Vol Ratio) are mapped to linguistic fuzzy sets ("Low", "High", "Positive", etc.). A rules engine evaluates combinations (e.g., "IF Deviation is LargePositive AND Momentum is StrongPositive THEN Trend is StrongBullish"). Modifiers based on Volatility and Volume context adjust rule strengths. Finally, the system aggregates these and defuzzifies them into the Trend Score, Conviction Proxy, and Reversal Risk Proxy. The key is the system's ability to handle ambiguity and combine multiple, potentially conflicting factors in a nuanced way, much like human expert reasoning.
Customization
While designed with robust defaults, EFzSMA offers granular control:
Adjust SMA, ROC, RSI, ATR, Volume MA lengths.
Fine-tune Normalization parameters (lookback, percentile). Note: Fuzzy set definitions for deviation are tuned for the normalized range.
Configure Volatility and Volume thresholds for fuzzy sets. Tuning these is crucial for specific assets/timeframes.
Toggle visual elements (Proxies, BG Color, Risk Shapes, Volatility-based Transparency).
Recommended Use & Caveats
EFzSMA is a sophisticated analytical tool, not a standalone "buy/sell" signal generator.
Use it to complement your existing strategy and analysis.
Always validate signals with price action, market structure, and other confirming factors.
Thorough backtesting and forward testing are essential to understand its behavior and tune parameters for your specific instruments and timeframes.
Fuzzy logic parameters (membership functions, rules) are based on general heuristics and may require optimization for specific market niches.
Disclaimer
Trading involves substantial risk. EFzSMA is provided for informational and analytical purposes only and does not constitute financial advice. No guarantee of profit is made or implied. Past performance is not indicative of future results. Use rigorous risk management practices.
MTF TRIX Divergence Pro: Hidden & Regular Pattern DetectionTRIX Divergence Pro: Multi-Timeframe Analysis with Hidden & Regular Pattern Detection
📊 This TRIX indicator with extended features enables you to analyze price action across multiple timeframes with divergence detection capabilities.
🔍 Multi-Timeframe Analysis
View TRIX simultaneously across three timeframes:
• Current Timeframe - For primary analysis
• Higher Timeframe - To identify the overall market trend
• Lower Timeframe - For precise entry timing
🔮 Divergence Detection
This indicator identifies four types of divergences:
• Regular Bullish Divergence (Yellow) ⬆️
Price makes lower lows but TRIX makes higher lows
Indication: Potential end of downtrend
• Regular Bearish Divergence (Blue) ⬇️
Price makes higher highs but TRIX makes lower highs
Indication: Potential end of uptrend
• Hidden Bullish Divergence (Green) ↗️
Price makes higher lows but TRIX makes lower lows
Indication: Potential buying opportunity during price correction
• Hidden Bearish Divergence (Red) ↘️
Price makes lower highs but TRIX makes higher highs
Indication: Potential selling opportunity during temporary price recovery
⚙️ Advanced Features
• Smart scoring system to filter out weak signals
• Customizable timeframe display (current, higher, lower, or all)
• Divergence detection on TRIX signal line
• Option to show only the last divergence to reduce chart clutter
• Adjustable divergence line thickness and style
• Minimum price and oscillator deviation filters to reduce noise
📈 Trading Strategies
“Trend Surfing” Strategy 🌊
• Use higher timeframe TRIX to identify the main trend
• Wait for a price correction in the trend direction
• Look for hidden divergence on the current timeframe
• Enter when price may resume in the main trend direction
“Trend Reversal Hunter” Strategy 🔄
• Identify regular divergence on the current timeframe
• Confirm it with regular divergence on the higher timeframe
• Wait for TRIX to cross its signal line
• Consider a counter-trend position with proper risk management
⚡ Recommended Settings
Balanced Profile 🔋
• TRIX Length: 17
• Signal Length: 14
• Pivot Period: 5
• TRIX Display: CURRENT+UPPER
• TRIX Divergence: CURRENT+UPPER
• Min Bars Between Divs: 10
• Min Div Strength: 1.5
• Use Scoring System: yes
• Min Score: 3.5
Trend Following Profile 🧭
• TRIX Length: 21
• Signal Length: 17
• Pivot Period: 6
• TRIX Display: CURRENT+UPPER
• TRIX Divergence: CURRENT+UPPER
• Min Bars Between Divs: 8
• Min Div Strength: 1.2
• Use Scoring System: yes
• Min Score: 3.0
Scalping Profile 🔍
• TRIX Length: 9
• Signal Length: 6
• Pivot Period: 3
• TRIX Display: CURRENT+LOWER
• TRIX Divergence: CURRENT+LOWER
• Min Bars Between Divs: 5
• Min Div Strength: 0.8
• Use Scoring System: no
• Last Divergence: yes
💡 Practical Tips
• “Stacked” divergences across multiple timeframes may provide stronger potential signals
• Consider using hidden divergences for trend trades and regular divergences for reversals
• When TRIX crosses zero in the higher timeframe, it may suggest a significant trend change
• Thicker divergence lines = potentially stronger signals (automatically displayed)
• In choppy markets, increase the minimum divergence strength to help filter out false signals
• Always combine indicator signals with other forms of analysis and confirmation
⚠️ Risk Disclaimer
Trading involves risk. This indicator provides analysis tools but cannot guarantee profitable trades. Past performance is not indicative of future results. Users should combine this indicator with proper risk management and their own analysis. Financial markets lack certainty, and each user is responsible for their trading decisions.
Trade responsibly.
DUN Lines IndicatorThe DUN Lines indicator detects, filters and plots price imbalances (aka fair value gaps or fvgs/ifvgs). It is unique in the fact that it uses five timeframes and filters out overlapping, lower timeframe imbalances and fvgs below a user-definable size threshold.
Simply set your detection timeframes, colors and thresholds then set your chart to your preferred entry timeframe. When imbalances are mitigated, the FVG/IFVG is removed from the chart.
The indicator's default colors are my preferred ones for differentiating between timeframes, but these are easily changed. A single color with various levels of transparency to indicate timeframe strength is another approach that works nicely.
High and Low in a Given Date/Time RangeThis Pine Script v5 indicator plots horizontal lines at both the highest and lowest price levels reached within a user-defined date/time range.
Description:
Inputs:
The user specifies a start and an end date/time by providing the year, month, day, hour, and minute for each. These inputs are converted into timestamps based on the chart’s timezone.
How It Works:
Timestamp Conversion: The script converts the provided start and end dates/times into timestamps using the chart’s timezone.
Bar Check: It examines every bar and checks if the bar’s timestamp falls between the start and end timestamps.
Price Updates:
If a bar’s time is within the specified range, the indicator updates the highest price if the current bar's high exceeds the previously recorded high, and it updates the lowest price if the current bar's low is lower than the previously recorded low.
Drawing Lines:
A red horizontal line is drawn at the highest price, and a green horizontal line is drawn at the lowest price. Both lines start from the first bar in the range and extend dynamically to the current bar, updating as new high or low values are reached.
End of Range: Once a bar's time exceeds the end timestamp, the lines stop updating.
This tool offers a clear and straightforward way to monitor key price levels during a defined period without any extra fluff.
Multi-Timeframe RPM Gauges with Custom Timeframes by DiGetIntroducing the **Multi-Timeframe RPM Gauges with Custom Timeframes + RSI Combos (mod) by DiGet** – a cutting-edge TradingView indicator meticulously crafted to revolutionize your market analysis.
Imagine having a dynamic dashboard right on your chart that consolidates the power of nine essential technical indicators—RSI, CCI, Stochastic, Williams %R, EMA crossover, Bollinger Bands, ATR, MACD, and Ichimoku Cloud—across multiple timeframes. This indicator not only displays each indicator’s score through an intuitive gauge system but also computes a combined metric to provide you with an at-a-glance understanding of market momentum and potential trend shifts.
**Key Features:**
- **Multi-Timeframe Insight:**
Configure up to four custom timeframes (e.g., 1, 5, 15, 60 minutes) to capture both short-term fluctuations and long-term trends, ensuring you never miss critical market moves.
- **Comprehensive Signal Suite:**
Benefit from a harmonious blend of signals. Whether you rely on momentum indicators like RSI and CCI, volatility measures like Bollinger Bands and ATR, or trend confirmations via EMA, MACD, and Ichimoku, every metric is normalized into actionable percentages.
- **Dynamic, Color-Coded Gauge Display:**
A built-in table presents all your data in a clear, color-coded format—green for bullish, red for bearish, and gray for neutral conditions. This visual representation allows you to quickly gauge market sentiment without sifting through complex charts.
- **Customizable Layout:**
Tailor your experience by toggling individual table columns. Whether you want to focus solely on RSI or dive deep into combined metrics like RSI & CCI or RSI & MACD, the choice is yours.
- **Optimized Utility Functions:**
Proprietary functions standardize indicator values into percentage scores, making it simpler than ever to compare different signals and spot opportunities in real time.
- **User-Friendly Interface:**
Designed for both beginners and seasoned traders, the straightforward input settings let you easily adjust technical parameters and timeframes to suit your personal trading strategy.
This indicator is not just a tool—it’s your new trading companion. It equips you with a multi-dimensional view of the market, enabling faster, more informed decision-making. Whether you’re scanning across various assets or drilling down on a single chart, the Multi-Timeframe RPM Gauges empower you to interpret market data with unprecedented clarity.
Add this indicator to your TradingView chart today and experience a smarter, more efficient way to navigate the markets. Join the community of traders who have elevated their analysis—and be ready to receive countless thanks as you transform your trading strategy!
real_time_candlesIntroduction
The Real-Time Candles Library provides comprehensive tools for creating, manipulating, and visualizing custom timeframe candles in Pine Script. Unlike standard indicators that only update at bar close, this library enables real-time visualization of price action and indicators within the current bar, offering traders unprecedented insight into market dynamics as they unfold.
This library addresses a fundamental limitation in traditional technical analysis: the inability to see how indicators evolve between bar closes. By implementing sophisticated real-time data processing techniques, traders can now observe indicator movements, divergences, and trend changes as they develop, potentially identifying trading opportunities much earlier than with conventional approaches.
Key Features
The library supports two primary candle generation approaches:
Chart-Time Candles: Generate real-time OHLC data for any variable (like RSI, MACD, etc.) while maintaining synchronization with chart bars.
Custom Timeframe (CTF) Candles: Create candles with custom time intervals or tick counts completely independent of the chart's native timeframe.
Both approaches support traditional candlestick and Heikin-Ashi visualization styles, with options for moving average overlays to smooth the data.
Configuration Requirements
For optimal performance with this library:
Set max_bars_back = 5000 in your script settings
When using CTF drawing functions, set max_lines_count = 500, max_boxes_count = 500, and max_labels_count = 500
These settings ensure that you will be able to draw correctly and will avoid any runtime errors.
Usage Examples
Basic Chart-Time Candle Visualization
// Create real-time candles for RSI
float rsi = ta.rsi(close, 14)
Candle rsi_candle = candle_series(rsi, CandleType.candlestick)
// Plot the candles using Pine's built-in function
plotcandle(rsi_candle.Open, rsi_candle.High, rsi_candle.Low, rsi_candle.Close,
"RSI Candles", rsi_candle.candle_color, rsi_candle.candle_color)
Multiple Access Patterns
The library provides three ways to access candle data, accommodating different programming styles:
// 1. Array-based access for collection operations
Candle candles = candle_array(source)
// 2. Object-oriented access for single entity manipulation
Candle candle = candle_series(source)
float value = candle.source(Source.HLC3)
// 3. Tuple-based access for functional programming styles
= candle_tuple(source)
Custom Timeframe Examples
// Create 20-second candles with EMA overlay
plot_ctf_candles(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 20,
timezone = -5,
tied_open = true,
ema_period = 9,
enable_ema = true
)
// Create tick-based candles (new candle every 15 ticks)
plot_ctf_tick_candles(
source = close,
candle_type = CandleType.heikin_ashi,
number_of_ticks = 15,
timezone = -5,
tied_open = true
)
Advanced Usage with Custom Visualization
// Get custom timeframe candles without automatic plotting
CandleCTF my_candles = ctf_candles_array(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 30
)
// Apply custom logic to the candles
float ema_values = my_candles.ctf_ema(14)
// Draw candles and EMA using time-based coordinates
my_candles.draw_ctf_candles_time()
ema_values.draw_ctf_line_time(line_color = #FF6D00)
Library Components
Data Types
Candle: Structure representing chart-time candles with OHLC, polarity, and visualization properties
CandleCTF: Extended candle structure with additional time metadata for custom timeframes
TickData: Structure for individual price updates with time deltas
Enumerations
CandleType: Specifies visualization style (candlestick or Heikin-Ashi)
Source: Defines price components for calculations (Open, High, Low, Close, HL2, etc.)
SampleType: Sets sampling method (Time-based or Tick-based)
Core Functions
get_tick(): Captures current price as a tick data point
candle_array(): Creates an array of candles from price updates
candle_series(): Provides a single candle based on latest data
candle_tuple(): Returns OHLC values as a tuple
ctf_candles_array(): Creates custom timeframe candles without rendering
Visualization Functions
source(): Extracts specific price components from candles
candle_ctf_to_float(): Converts candle data to float arrays
ctf_ema(): Calculates exponential moving averages for candle arrays
draw_ctf_candles_time(): Renders candles using time coordinates
draw_ctf_candles_index(): Renders candles using bar index coordinates
draw_ctf_line_time(): Renders lines using time coordinates
draw_ctf_line_index(): Renders lines using bar index coordinates
Technical Implementation Notes
This library leverages Pine Script's varip variables for state management, creating a sophisticated real-time data processing system. The implementation includes:
Efficient tick capturing: Samples price at every execution, maintaining temporal tracking with time deltas
Smart state management: Uses a hybrid approach with mutable updates at index 0 and historical preservation at index 1+
Temporal synchronization: Manages two time domains (chart time and custom timeframe)
The tooltip implementation provides crucial temporal context for custom timeframe visualizations, allowing users to understand exactly when each candle formed regardless of chart timeframe.
Limitations
Custom timeframe candles cannot be backtested due to Pine Script's limitations with historical tick data
Real-time visualization is only available during live chart updates
Maximum history is constrained by Pine Script's array size limits
Applications
Indicator visualization: See how RSI, MACD, or other indicators evolve in real-time
Volume analysis: Create custom volume profiles independent of chart timeframe
Scalping strategies: Identify short-term patterns with precisely defined time windows
Volatility measurement: Track price movement characteristics within bars
Custom signal generation: Create entry/exit signals based on custom timeframe patterns
Conclusion
The Real-Time Candles Library bridges the gap between traditional technical analysis (based on discrete OHLC bars) and the continuous nature of market movement. By making indicators more responsive to real-time price action, it gives traders a significant edge in timing and decision-making, particularly in fast-moving markets where waiting for bar close could mean missing important opportunities.
Whether you're building custom indicators, researching price patterns, or developing trading strategies, this library provides the foundation for sophisticated real-time analysis in Pine Script.
Implementation Details & Advanced Guide
Core Implementation Concepts
The Real-Time Candles Library implements a sophisticated event-driven architecture within Pine Script's constraints. At its heart, the library creates what's essentially a reactive programming framework handling continuous data streams.
Tick Processing System
The foundation of the library is the get_tick() function, which captures price updates as they occur:
export get_tick(series float source = close, series float na_replace = na)=>
varip float price = na
varip int series_index = -1
varip int old_time = 0
varip int new_time = na
varip float time_delta = 0
// ...
This function:
Samples the current price
Calculates time elapsed since last update
Maintains a sequential index to track updates
The resulting TickData structure serves as the fundamental building block for all candle generation.
State Management Architecture
The library employs a sophisticated state management system using varip variables, which persist across executions within the same bar. This creates a hybrid programming paradigm that's different from standard Pine Script's bar-by-bar model.
For chart-time candles, the core state transition logic is:
// Real-time update of current candle
candle_data := Candle.new(Open, High, Low, Close, polarity, series_index, candle_color)
candles.set(0, candle_data)
// When a new bar starts, preserve the previous candle
if clear_state
candles.insert(1, candle_data)
price.clear()
// Reset state for new candle
Open := Close
price.push(Open)
series_index += 1
This pattern of updating index 0 in real-time while inserting completed candles at index 1 creates an elegant solution for maintaining both current state and historical data.
Custom Timeframe Implementation
The custom timeframe system manages its own time boundaries independent of chart bars:
bool clear_state = switch settings.sample_type
SampleType.Ticks => cumulative_series_idx >= settings.number_of_ticks
SampleType.Time => cumulative_time_delta >= settings.number_of_seconds
This dual-clock system synchronizes two time domains:
Pine's execution clock (bar-by-bar processing)
The custom timeframe clock (tick or time-based)
The library carefully handles temporal discontinuities, ensuring candle formation remains accurate despite irregular tick arrival or market gaps.
Advanced Usage Techniques
1. Creating Custom Indicators with Real-Time Candles
To develop indicators that process real-time data within the current bar:
// Get real-time candles for your data
Candle rsi_candles = candle_array(ta.rsi(close, 14))
// Calculate indicator values based on candle properties
float signal = ta.ema(rsi_candles.first().source(Source.Close), 9)
// Detect patterns that occur within the bar
bool divergence = close > close and rsi_candles.first().Close < rsi_candles.get(1).Close
2. Working with Custom Timeframes and Plotting
For maximum flexibility when visualizing custom timeframe data:
// Create custom timeframe candles
CandleCTF volume_candles = ctf_candles_array(
source = volume,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 60
)
// Convert specific candle properties to float arrays
float volume_closes = volume_candles.candle_ctf_to_float(Source.Close)
// Calculate derived values
float volume_ema = volume_candles.ctf_ema(14)
// Create custom visualization
volume_candles.draw_ctf_candles_time()
volume_ema.draw_ctf_line_time(line_color = color.orange)
3. Creating Hybrid Timeframe Analysis
One powerful application is comparing indicators across multiple timeframes:
// Standard chart timeframe RSI
float chart_rsi = ta.rsi(close, 14)
// Custom 5-second timeframe RSI
CandleCTF ctf_candles = ctf_candles_array(
source = close,
candle_type = CandleType.candlestick,
sample_type = SampleType.Time,
number_of_seconds = 5
)
float fast_rsi_array = ctf_candles.candle_ctf_to_float(Source.Close)
float fast_rsi = fast_rsi_array.first()
// Generate signals based on divergence between timeframes
bool entry_signal = chart_rsi < 30 and fast_rsi > fast_rsi_array.get(1)
Final Notes
This library represents an advanced implementation of real-time data processing within Pine Script's constraints. By creating a reactive programming framework for handling continuous data streams, it enables sophisticated analysis typically only available in dedicated trading platforms.
The design principles employed—including state management, temporal processing, and object-oriented architecture—can serve as patterns for other advanced Pine Script development beyond this specific application.
------------------------
Library "real_time_candles"
A comprehensive library for creating real-time candles with customizable timeframes and sampling methods.
Supports both chart-time and custom-time candles with options for candlestick and Heikin-Ashi visualization.
Allows for tick-based or time-based sampling with moving average overlay capabilities.
get_tick(source, na_replace)
Captures the current price as a tick data point
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
na_replace (float) : Optional - Value to use when source is na
Returns: TickData structure containing price, time since last update, and sequential index
candle_array(source, candle_type, sync_start, bullish_color, bearish_color)
Creates an array of candles based on price updates
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
sync_start (simple bool) : Optional - Whether to synchronize with the start of a new bar
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Array of Candle objects ordered with most recent at index 0
candle_series(source, candle_type, wait_for_sync, bullish_color, bearish_color)
Provides a single candle based on the latest price data
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
wait_for_sync (simple bool) : Optional - Whether to wait for a new bar before starting
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: A single Candle object representing the current state
candle_tuple(source, candle_type, wait_for_sync, bullish_color, bearish_color)
Provides candle data as a tuple of OHLC values
Parameters:
source (float) : Optional - Price source to sample (defaults to close)
candle_type (simple CandleType) : Optional - Type of candle chart to create (candlestick or Heikin-Ashi)
wait_for_sync (simple bool) : Optional - Whether to wait for a new bar before starting
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Tuple representing current candle values
method source(self, source, na_replace)
Extracts a specific price component from a Candle
Namespace types: Candle
Parameters:
self (Candle)
source (series Source) : Type of price data to extract (Open, High, Low, Close, or composite values)
na_replace (float) : Optional - Value to use when source value is na
Returns: The requested price value from the candle
method source(self, source)
Extracts a specific price component from a CandleCTF
Namespace types: CandleCTF
Parameters:
self (CandleCTF)
source (simple Source) : Type of price data to extract (Open, High, Low, Close, or composite values)
Returns: The requested price value from the candle as a varip
method candle_ctf_to_float(self, source)
Converts a specific price component from each CandleCTF to a float array
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
Returns: Array of float values extracted from the candles, ordered with most recent at index 0
method ctf_ema(self, ema_period)
Calculates an Exponential Moving Average for a CandleCTF array
Namespace types: array
Parameters:
self (array)
ema_period (simple float) : Period for the EMA calculation
Returns: Array of float values representing the EMA of the candle data, ordered with most recent at index 0
method draw_ctf_candles_time(self, sample_type, number_of_ticks, number_of_seconds, timezone)
Renders custom timeframe candles using bar time coordinates
Namespace types: array
Parameters:
self (array)
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks), used for tooltips
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks), used for tooltips
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time), used for tooltips
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12), used for tooltips
Returns: void - Renders candles on the chart using time-based x-coordinates
method draw_ctf_candles_index(self, sample_type, number_of_ticks, number_of_seconds, timezone)
Renders custom timeframe candles using bar index coordinates
Namespace types: array
Parameters:
self (array)
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks), used for tooltips
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks), used for tooltips
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time), used for tooltips
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12), used for tooltips
Returns: void - Renders candles on the chart using index-based x-coordinates
method draw_ctf_line_time(self, source, line_size, line_color)
Renders a line representing a price component from the candles using time coordinates
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
line_size (simple int) : Optional - Width of the line
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using time-based x-coordinates
method draw_ctf_line_time(self, line_size, line_color)
Renders a line from a varip float array using time coordinates
Namespace types: array
Parameters:
self (array)
line_size (simple int) : Optional - Width of the line, defaults to 2
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using time-based x-coordinates
method draw_ctf_line_index(self, source, line_size, line_color)
Renders a line representing a price component from the candles using index coordinates
Namespace types: array
Parameters:
self (array)
source (simple Source) : Optional - Type of price data to extract (defaults to Close)
line_size (simple int) : Optional - Width of the line
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using index-based x-coordinates
method draw_ctf_line_index(self, line_size, line_color)
Renders a line from a varip float array using index coordinates
Namespace types: array
Parameters:
self (array)
line_size (simple int) : Optional - Width of the line, defaults to 2
line_color (simple color) : Optional - Color of the line
Returns: void - Renders a connected line on the chart using index-based x-coordinates
plot_ctf_tick_candles(source, candle_type, number_of_ticks, timezone, tied_open, ema_period, bullish_color, bearish_color, line_width, ema_color, use_time_indexing)
Plots tick-based candles with moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_ticks (simple int) : Number of ticks per candle
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
ema_period (simple float) : Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with EMA overlay
plot_ctf_tick_candles(source, candle_type, number_of_ticks, timezone, tied_open, bullish_color, bearish_color, use_time_indexing)
Plots tick-based candles without moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_ticks (simple int) : Number of ticks per candle
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart without moving average
plot_ctf_time_candles(source, candle_type, number_of_seconds, timezone, tied_open, ema_period, bullish_color, bearish_color, line_width, ema_color, use_time_indexing)
Plots time-based candles with moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_seconds (simple float) : Time duration per candle in seconds
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
ema_period (simple float) : Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with EMA overlay
plot_ctf_time_candles(source, candle_type, number_of_seconds, timezone, tied_open, bullish_color, bearish_color, use_time_indexing)
Plots time-based candles without moving average
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to display
number_of_seconds (simple float) : Time duration per candle in seconds
timezone (simple int) : Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart without moving average
plot_ctf_candles(source, candle_type, sample_type, number_of_ticks, number_of_seconds, timezone, tied_open, ema_period, bullish_color, bearish_color, enable_ema, line_width, ema_color, use_time_indexing)
Unified function for plotting candles with comprehensive options
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Optional - Type of candle chart to display
sample_type (simple SampleType) : Optional - Method for sampling data (Time or Ticks)
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks)
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time)
timezone (simple int) : Optional - Timezone offset from UTC (-12 to +12)
tied_open (simple bool) : Optional - Whether to tie open price to close of previous candle
ema_period (simple float) : Optional - Period for the exponential moving average
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
enable_ema (bool) : Optional - Whether to display the EMA overlay
line_width (simple int) : Optional - Width of the moving average line, defaults to 2
ema_color (color) : Optional - Color of the moving average line
use_time_indexing (simple bool) : Optional - When true the function will plot with xloc.time, when false it will plot using xloc.bar_index
Returns: void - Creates visual candle chart with optional EMA overlay
ctf_candles_array(source, candle_type, sample_type, number_of_ticks, number_of_seconds, tied_open, bullish_color, bearish_color)
Creates an array of custom timeframe candles without rendering them
Parameters:
source (float) : Input price source to sample
candle_type (simple CandleType) : Type of candle chart to create (candlestick or Heikin-Ashi)
sample_type (simple SampleType) : Method for sampling data (Time or Ticks)
number_of_ticks (simple int) : Optional - Number of ticks per candle (used when sample_type is Ticks)
number_of_seconds (simple float) : Optional - Time duration per candle in seconds (used when sample_type is Time)
tied_open (simple bool) : Optional - Whether to tie open price to close of previous candle
bullish_color (color) : Optional - Color for bullish candles
bearish_color (color) : Optional - Color for bearish candles
Returns: Array of CandleCTF objects ordered with most recent at index 0
Candle
Structure representing a complete candle with price data and display properties
Fields:
Open (series float) : Opening price of the candle
High (series float) : Highest price of the candle
Low (series float) : Lowest price of the candle
Close (series float) : Closing price of the candle
polarity (series bool) : Boolean indicating if candle is bullish (true) or bearish (false)
series_index (series int) : Sequential index identifying the candle in the series
candle_color (series color) : Color to use when rendering the candle
ready (series bool) : Boolean indicating if candle data is valid and ready for use
TickData
Structure for storing individual price updates
Fields:
price (series float) : The price value at this tick
time_delta (series float) : Time elapsed since the previous tick in milliseconds
series_index (series int) : Sequential index identifying this tick
CandleCTF
Structure representing a custom timeframe candle with additional time metadata
Fields:
Open (series float) : Opening price of the candle
High (series float) : Highest price of the candle
Low (series float) : Lowest price of the candle
Close (series float) : Closing price of the candle
polarity (series bool) : Boolean indicating if candle is bullish (true) or bearish (false)
series_index (series int) : Sequential index identifying the candle in the series
open_time (series int) : Timestamp marking when the candle was opened (in Unix time)
time_delta (series float) : Duration of the candle in milliseconds
candle_color (series color) : Color to use when rendering the candle
Clean OHLC Lines | BaksPlots clean, non-repainting OHLC lines from higher timeframes onto your chart. Ideal for tracking key price levels (open, high, low, close) with precision and minimal clutter.
Core Functionality
Clean OHLC Lines = Historical Levels + Non-Repainting Logic
• Uses lookahead=on to anchor historical lines, ensuring no repainting.
• Displays OHLC lines for customizable timeframes (15min to Monthly).
• Optional candlestick boxes for visual context.
Key Features
• Multi-Timeframe OHLC:
Plot lines from 15min, 30min, 1H, 4H, Daily, Weekly, or Monthly timeframes.
• Non-Repainting Logic:
Historical lines remain static and never recalculate.
• Customizable Styles:
Adjust colors, line widths (1px-4px), and transparency for high/low/open/close lines.
• Candle Display:
Toggle candlestick boxes with bull/bear colors and adjustable borders.
• Past Lines Limit:
Control how many historical lines are displayed (1-500 bars).
User Inputs
• Timeframe:
Select the OHLC timeframe (e.g., "D" for daily).
• # Past Lines:
Limit historical lines to avoid overcrowding (default: 10).
• H/L Mode:
Draw high/low lines from the current or previous period.
• O/C Mode:
Anchor open/close lines to today’s open or yesterday’s close.
• Line Styles:
Customize colors, transparency, and styles (solid/dotted/dashed).
• Candle Display:
Toggle boxes/wicks and adjust bull/bear colors.
Important Notes
⚠️ Alignment:
• Monthly/weekly timeframes use fixed approximations (30d/7d).
• For accuracy, ensure your chart’s timeframe ≤ the selected OHLC timeframe (e.g., use 1H chart for daily lines).
⚠️ Performance:
• Reduce # Past Lines on low-end devices for smoother performance.
Risk Disclaimer
Trading involves risk. OHLC lines reflect historical price levels and do not predict future behavior. Use with other tools and risk management.
Open-Source Notice
This script is open-source under the Mozilla Public License 2.0. Modify or improve it freely, but republishing must follow TradingView’s House Rules.
📈 Happy trading!