Time-Decaying Percentile Oscillator [BackQuant]Time-Decaying Percentile Oscillator
1. Big-picture idea
Traditional percentile or stochastic oscillators treat every bar in the look-back window as equally important. That is fine when markets are slow, but if volatility regime changes quickly yesterday’s print should matter more than last month’s. The Time-Decaying Percentile Oscillator attempts to fix that blind spot by assigning an adjustable weight to every past price before it is ranked. The result is a percentile score that “breathes” with market tempo much faster to flag new extremes yet still smooth enough to ignore random noise.
2. What the script actually does
Build a weight curve
• You pick a look-back length (default 28 bars).
• You decide whether weights fall Linearly , Exponentially , by Power-law or Logarithmically .
• A decay factor (lower = faster fade) shapes how quickly the oldest price loses influence.
• The array is normalised so all weights still sum to 1.
Rank prices by weighted mass
• Every close in the window is paired with its weight.
• The pairs are sorted from low to high.
• The cumulative weight is walked until it equals your chosen percentile level (default 50 = median).
• That price becomes the Time-Decayed Percentile .
Find dispersion with robust statistics
• Instead of a fragile standard deviation the script measures weighted Median-Absolute-Deviation about the new percentile.
• You multiply that deviation by the Deviation Multiplier slider (default 1.0) to get a non-parametric volatility band.
Build an adaptive channel
• Upper band = percentile + (multiplier × deviation)
• Lower band = percentile – (multiplier × deviation)
Normalise into a 0-100 oscillator
• The current close is mapped inside that band:
0 = lower band, 50 = centre, 100 = upper band.
• If the channel squeezes, tiny moves still travel the full scale; if volatility explodes, it automatically widens.
Optional smoothing
• A second-stage moving average (EMA, SMA, DEMA, TEMA, etc.) tames the jitter.
• Length 22 EMA by default—change it to tune reaction speed.
Threshold logic
• Upper Threshold 70 and Lower Threshold 30 separate standard overbought/oversold states.
• Extreme bands 85 and 15 paint background heat when aggressive fade or breakout trades might trigger.
Divergence engine
• Looks back twenty bars.
• Flags Bullish divergence when price makes a lower low but oscillator refuses to confirm (value < 40).
• Flags Bearish divergence when price prints a higher high but oscillator stalls (value > 60).
3. Component walk-through
• Source – Any price series. Close by default, switch to typical price or custom OHLC4 for futures spreads.
• Look-back Period – How many bars to rank. Short = faster, long = slower.
• Base Percentile Level – 50 shows relative position around the median; set to 25 / 75 for quartile tracking or 90 / 10 for extreme tails.
• Deviation Multiplier – Higher values widen the dynamic channel, lowering whipsaw but delaying signals.
• Decay Settings
– Type decides the curve shape. Exponential (default 1.16) mimics EMA logic.
– Factor < 1 shrinks influence faster; > 1 spreads influence flatter.
– Toggle Enable Time Decay off to compare with classic equal-weight stochastic.
• Smoothing Block – Choose one of seven MA flavours plus length.
• Thresholds – Overbought / Oversold / Extreme levels. Push them out when working on very mean-reverting assets like FX; pull them in for trend monsters like crypto.
• Display toggles – Show or hide threshold lines, extreme filler zones, bar colouring, divergence labels.
• Colours – Bullish green, bearish red, neutral grey. Every gradient step is automatically blended to generate a heat map across the 0-100 range.
4. How to read the chart
• Oscillator creeping above 70 = market auctioning near the top of its adaptive range.
• Fast poke above 85 with no follow-through = exhaustion fade candidate.
• Slow grind that lives above 70 for many bars = valid bullish trend, not a fade.
• Cross back through 50 shows balance has shifted; treat it like a micro trend change.
• Divergence arrows add extra confidence when you already see two-bar reversal candles at range extremes.
• Background shading (semi-transparent red / green) warns of extreme states and throttles your position size.
5. Practical trading playbook
Mean-reversion scalps
1. Wait for oscillator to reach your desired OB/ OS levels
2. Check the slope of the smoothing MA—if it is flattening the squeeze is mature.
3. Look for a one- or two-bar reversal pattern.
4. Enter against the move; first target = midline 50, second target = opposite threshold.
5. Stop loss just beyond the extreme band.
Trend continuation pullbacks
1. Identify a clean directional trend on the price chart.
2. During the trend, TDP will oscillate between midline and extreme of that side.
3. Buy dips when oscillator hits OS levels, and the same for OB levels & shorting
4. Exit when oscillator re-tags the same-side extreme or prints divergence.
Volatility regime filter
• Use the Enable Time Decay switch as a regime test.
• If equal-weight oscillator and decayed oscillator diverge widely, market is entering a new volatility regime—tighten stops and trade smaller.
Divergence confirmation for other indicators
• Pair TDP divergence arrows with MACD histogram or RSI to filter false positives.
• The weighted nature means TDP often spots divergence a bar or two earlier than standard RSI.
Swing breakout strategy
1. During consolidation, band width compresses and oscillator oscillates around 50.
2. Watch for sudden expansion where oscillator blasts through extreme bands and stays pinned.
3. Enter with momentum in breakout direction; trail stop behind upper or lower band as it re-expands.
6. Customising decay mathematics
Linear – Each older bar loses the same fixed amount of influence. Intuitive and stable; good for slow swing charts.
Exponential – Influence halves every “decay factor” steps. Mirrors EMA thinking and is fastest to react.
Power-law – Mid-history bars keep more authority than exponential but oldest data still fades. Handy for commodities where seasonality matters.
Logarithmic – The gentlest curve; weight drops sharply at first then levels off. Mimics how traders remember dramatic moves for weeks but forget ordinary noise quickly.
Turn decay off to verify the tool’s added value; most users never switch back.
7. Alert catalogue
• TD Overbought / TD Oversold – Cross of regular thresholds.
• TD Extreme OB / OS – Breach of danger zones.
• TD Bullish / Bearish Divergence – High-probability reversal watch.
• TD Midline Cross – Momentum shift that often precedes a window where trend-following systems perform.
8. Visual hygiene tips
• If you already plot price on a dark background pick Bullish Color and Bearish Color default; change to pastel tones for light themes.
• Hide threshold lines after you memorise the zones to declutter scalping layouts.
• Overlay mode set to false so the oscillator lives in its own panel; keep height about 30 % of screen for best resolution.
9. Final notes
Time-Decaying Percentile Oscillator marries robust statistical ranking, adaptive dispersion and decay-aware weighting into a simple oscillator. It respects both recent order-flow shocks and historical context, offers granular control over responsiveness and ships with divergence and alert plumbing out of the box. Bolt it onto your price action framework, trend-following system or volatility mean-reversion playbook and see how much sooner it recognises genuine extremes compared to legacy oscillators.
Backtest thoroughly, experiment with decay curves on each asset class and remember: in trading, timing beats timidity but patience beats impulse. May this tool help you find that edge.
Trend
Ultimate Precision Buy/Sell with SL - Clean Labels FIXThis is a premium indicator designed for traders who demand accuracy, simplicity, and clean visual signals.
✅ Key Features:
📈 Precise Buy/Sell entries based on trend confirmation (EMA) and momentum (RSI)
🛡️ Automatic Stop Loss (SL) drawn for every trade, calculated from ATR
🔄 SL line dynamically moves with each new candle to reflect live action
❗ Only one active signal at a time – no clutter, no repaints
⏱ Optimized for 1H timeframe
💰 Best for Forex pairs, Gold (XAUUSD), Silver (XAGUSD), Platinum (XPTUSD)
🧠 How it works:
Buy Signal: When fast EMA > slow EMA & RSI crosses above 30
Sell Signal: When fast EMA < slow EMA & RSI crosses below 70
A single SL line is drawn per trade and remains until either:
Opposite signal appears, or
SL is hit
⚠️ No repainting. No noise. Just precision.
If you want to trade smart, clean and with confidence – this indicator is built for you.
Composite Trend Trader Module [BackQuant]Composite Trend Trader Module
Overview and Purpose
The Composite Trend Trader Module (CTM) is an invite-only Pine Script indicator designed to provide traders with a comprehensive tool for trend-following, dip-buying, and market strength assessment. By integrating multiple market data inputs—price momentum, volatility, volume, and statistical baselines—the CTM generates actionable outputs for trend identification, swing trade entries, and dip-buying opportunities. The indicator is intended for traders seeking a systematic approach to market analysis with customizable settings, while maintaining simplicity in its user interface. As a closed-source script, the underlying calculations remain proprietary, but this description outlines its functionality, features, and practical applications in trading.
Visual Components
The CTM provides the following visual elements on the chart:
• Signal Spine – A colored line (default 25-period weighted moving average) that reflects the dominant trend—green for bullish, red for bearish, and grey for neutral or transitional periods.
• Swing Triggers – Unicode markers ("𝕃" for long, "𝕊" for short) appear below or above bars when the trend shifts, signaling potential swing trade entries.
• Dip-Hunter Signals – Green arrows mark dip-buying opportunities, accompanied by faint green background highlights and forward-projecting entry lines for precise entry levels.
• Heat Meter – A horizontal strip at the bottom of the chart, graded from -50 (overheated) to +50 (deep dip), visually indicates the strength of dip conditions using a red-to-green gradient.
Core Features
The CTM comprises several components that work together to deliver a cohesive trading framework. Below is a detailed explanation of each, without disclosing proprietary calculations.
1. Universal Trend Tracking (UTT)
The UTT combines multiple momentum and statistical indicators into a single composite score ranging from -1 to +1. This score is derived from:
• Price-based momentum metrics.
• Volatility-adjusted thresholds.
• Statistical measures of price deviation and market structure.
When the UTT score exceeds +0.2, the market is considered in an actionable uptrend; below -0.2, a downtrend is identified. Values between these thresholds indicate a neutral or choppy market, helping traders avoid low-probability setups during consolidation.
2. Signal Spine
The signal spine is a 25-period weighted moving average of price, colored according to the UTT score (green for bullish, red for bearish, grey for neutral). This line serves as a visual anchor for tracking the prevailing trend and highlights regime changes in real time, enabling traders to align their strategies with market direction.
3. Swing Triggers (𝕃/𝕊)
Swing trade signals are generated when the UTT crosses the zero line, indicating a shift in market regime. A "𝕃" marker appears below the bar for a bullish crossover (potential long entry), and a "𝕊" marker appears above for a bearish crossover (potential short entry). These signals incorporate volatility-adaptive thresholds to minimize false triggers during low-volatility periods, improving reliability compared to traditional moving-average crossovers.
4. Dip-Hunter Engine
The Dip-Hunter subsystem identifies high-probability dip-buying opportunities by evaluating five conditions:
• Dip Magnitude – The price must have fallen by a user-defined percentage (default 2%) from a recent swing high, calculated over a specified lookback period (default 5 bars).
• Volume Burst – Current volume must exceed the average volume over a user-defined lookback (default 65 bars) by a specified multiplier (default 2x).
• Volatility Spike – The intraday range or Average True Range (ATR) must exceed a statistical baseline by a user-defined multiplier (default 1.5x).
• Structural Permission – Price must be below a fast Exponential Moving Average (EMA, default 20 periods), and the market structure must be bearish (fast EMA below slow EMA, default 50 periods).
• Trend Filter (Optional) – When enabled, dip signals are only generated if the UTT indicates a bullish trend, preventing trades against a bearish macro environment.
When these conditions align, the Dip-Hunter plots a green arrow, highlights the candle background, and draws a forward-projecting horizontal line at a user-selected price level (Low, Close, or calculated dip percentage).
5. Strength Score and Heat Meter
Each bar is assigned a strength score (0 to 5, or -50 to +50 when scaled for the heat meter) based on the following criteria:
• +1 for meeting the dip threshold.
• +1 for a volume spike.
• +1 for a volume momentum spike (based on rate-of-change).
• +1 for a confirmed volatility spike.
• +1 if price is below the fast EMA.
• +2 if the macro trend filter is bullish (when enabled).
The heat meter visualizes this score as a pointer on a red-to-green gradient strip, enabling traders to quickly assess the intensity of dip conditions and prioritize high-quality setups.
6. Entry-Line Generator
For each dip signal, the CTM draws a forward-projecting horizontal line to mark potential entry levels. Traders can configure:
• The price level for the line (Low, Close, or exact dip percentage).
• The duration of the line (default 100 bars).
• A minimum gap between signals (default 5 bars) to prevent overlapping lines during clustered events.
These lines serve as visual guides for setting limit orders or stop-loss levels.
7. Alerts
The CTM includes seven pre-configured alert conditions to support automated workflows:
• CTM Long/Short – Triggered on bullish or bearish UTT zero-line crossovers for swing trades.
• Market Overheated – Activates when the strength score falls below -40, indicating potential exhaustion.
• Close to Dip – Signals when the strength score reaches 0.6, suggesting an impending dip opportunity.
• Dip Confirmed – Fires on the first bar meeting all dip conditions.
• Dip Active – Triggers while dip conditions remain valid.
• Dip Fading – Activates when the strength score crosses below 0.5, indicating a weakening dip.
• Trend-Blocked – Alerts when dip conditions are met but blocked by the trend filter.
These alerts can be routed to brokers or trading bots for seamless execution.
"CPM Long Signal {{exchange}}:{{ticker}}")
"CPM Short Signal {{exchange}}:{{ticker}}")
"Market overheated {{ticker}}")
"Close to a dip {{ticker}}")
"Dip confirmed {{ticker}}")
"Dip active {{ticker}}")
"Dip strength fading {{ticker}}")
"Signal blocked by trend filter {{ticker}}")
User Controls
The CTM offers extensive customization to adapt to different trading styles and preferences:
• Signal Settings – Toggle the signal spine, composite score plot, swing triggers, and bar coloring. Adjust line width for visibility.
• Display Settings – Customize bullish, bearish, and neutral colors to match chart templates.
• Dip-Hunter Settings – Configure volume lookback, spike multipliers, EMA periods, volatility thresholds, dip percentage, and lookback bars.
• Trend Filter – Enable or disable the requirement for a bullish UTT before dip signals are generated.
• Strength & Meter – Toggle bar coloring based on the strength score, adjust the number of meter cells (default 60), and select meter position (e.g., bottom-center).
• Entry Settings – Control entry line visibility, length, and price source (Low, Close, or dip percentage).
Trading Applications
The CTM supports multiple trading strategies, each leveraging its outputs for specific market conditions:
• Trend-Ride Mode – Trade in the direction of the signal spine. Enter long positions on the first "𝕃" marker in a green (bullish) regime, and scale out when the UTT returns to grey (neutral). This is ideal for trend-following traders seeking to capture sustained moves, with the first signal in a new trend regime offering high statistical expectancy.
• Forced Dip Entries – Enable the trend filter and focus on dip signals (green arrows). Place limit orders at the entry line, set stops below the line, and target the midpoint of the prior value area (e.g., using support/resistance levels). This suits mean-reversion traders aiming to buy dips in bullish trends, with clear risk management via entry lines.
• Scalp Confirmation – Hide the signal spine and use bar coloring to identify short-term momentum. Green bars indicate broad buying pressure, while red bars warn against long scalps in oversold conditions. This is useful for intraday scalpers seeking confirmation of momentum before entering trades.
• Event Guardrails – Avoid trading when the heat meter is below -40 before major economic releases (e.g., FOMC, CPI), as spreads and slippage may widen. This enhances risk management by flagging high-risk periods during macroeconomic events.
• Multi-Timeframe Analysis – Apply the CTM on a daily timeframe in a secondary pane and a lower timeframe (e.g., hourly) on the primary chart. Trade only when both timeframes align (e.g., both in bullish regimes). This increases conviction for swing or position traders by confirming trend alignment across timeframes.
Frequently Asked Questions
• How does the CTM differ from a moving-average ribbon? The CTM integrates multiple momentum, volatility, and statistical indicators, using adaptive thresholds and proprietary calculations to respond faster to structural changes while filtering noise more effectively than traditional dual-EMA systems.
• Can the underlying formulas be accessed? No, the script is closed-source, and calculations are protected to preserve intellectual property. Users receive all outputs, alerts, and customizable parameters.
• Does the indicator repaint? No, all calculations use confirmed historical data without look-ahead bias. Entry lines are static from the signal bar.
• Which markets is it suitable for? The CTM is optimized for equities, futures, and cryptocurrencies. Adjust dip percentage and volume multipliers for low-liquidity markets.
• What about latency? The script uses efficient Pine Script functions and lightweight loops, ensuring minimal performance impact.
Limitations and Best Practices
• Market-Specific Tuning – Thinly traded markets may require adjustments to dip percentage and volume thresholds to avoid excessive signals.
• Complementary Tools – Combine the CTM with price action, support/resistance levels, or order flow analysis to confirm signals and avoid over-reliance on the indicator.
• Event Risk – Be cautious during high-impact news events, as volatility spikes may trigger signals that are quickly reversed.
• Trend Filter Use – Enabling the trend filter reduces false dip signals in bearish markets but may delay entries in rapidly reversing markets.
Conclusion
The Composite Trend Trader Module consolidates trend-following, dip-buying, and strength assessment into a single, customizable indicator. By providing clear visual cues, actionable alerts, and flexible settings, it equips traders with a robust framework for navigating various market conditions. While the proprietary calculations remain protected, the CTM’s outputs enable traders to make informed decisions, align strategies with market regimes, and manage risk effectively. Use it as a strategic tool alongside sound risk management and complementary analysis for optimal results.
Time-Price Velocity [QuantAlgo]🟢 Overview
The Time-Price Velocity indicator uses advanced velocity-based analysis to measure the rate of price change normalized against typical market movement, creating a dynamic momentum oscillator that identifies market acceleration patterns and momentum shifts. Unlike traditional momentum indicators that focus solely on price change magnitude, this indicator incorporates time-weighted displacement calculations and ATR normalization to create a sophisticated velocity measurement system that adapts to varying market volatility conditions.
This indicator displays a velocity signal line that oscillates around zero, with positive values indicating upward price velocity and negative values indicating downward price velocity. The signal incorporates acceleration background columns and statistical normalization to help traders identify momentum shifts and potential reversal or continuation opportunities across different timeframes and asset classes.
🟢 How It Works
The indicator's key insight lies in its time-price velocity calculation system, where velocity is measured using the fundamental physics formula:
velocity = priceChange / timeWeight
The system normalizes this raw velocity against typical price movement using Average True Range (ATR) to create market-adjusted readings:
normalizedVelocity = typicalMove > 0 ? velocity / typicalMove : 0
where "typicalMove = ta.atr(lookback)" provides the baseline for normal price movement over the specified lookback period.
The Time-Price Velocity indicator calculation combines multiple sophisticated components. First, it calculates acceleration as the change in velocity over time:
acceleration = normalizedVelocity - normalizedVelocity
Then, the signal generation applies EMA smoothing to reduce noise while preserving responsiveness:
signal = ta.ema(normalizedVelocity, smooth)
This creates a velocity-based momentum indicator that combines price displacement analysis with statistical normalization, providing traders with both directional signals and acceleration insights for enhanced market timing.
🟢 How to Use
1. Signal Interpretation and Threshold Zones
Positive Values (Above Zero): Time-price velocity indicating bullish momentum with upward price displacement relative to normalized baseline
Negative Values (Below Zero): Time-price velocity indicating bearish momentum with downward price displacement relative to normalized baseline
Zero Line Crosses: Velocity transitions between bullish and bearish regimes, indicating potential trend changes or momentum shifts
Upper Threshold Zone: Area above positive threshold (default 1.0) indicating strong bullish velocity and potential reversal point
Lower Threshold Zone: Area below negative threshold (default -1.0) indicating strong bearish velocity and potential reversal point
2. Acceleration Analysis and Visual Features
Acceleration Columns: Background histogram showing velocity acceleration (the rate of change of velocity), with green columns indicating accelerating velocity and red columns indicating decelerating velocity. The interpretation depends on trend context: red columns in downtrends indicate strengthening bearish momentum, while red columns in uptrends indicate weakening bullish momentum
Acceleration Column Height: The height of each column represents the magnitude of acceleration, with taller columns indicating stronger acceleration or deceleration forces
Bar Coloring: Optional price bar coloring matches velocity direction for immediate visual trend confirmation
Info Table: Real-time display of current velocity and acceleration values with trend arrows and change indicators
3. Additional Features:
Confirmed vs Live Data: Toggle between confirmed (closed) bar analysis for stable signals or current bar inclusion for real-time updates
Multi-timeframe Adaptability: Velocity normalization ensures consistent readings across different chart timeframes and asset volatilities
Alert System: Built-in alerts for threshold crossovers and direction changes
🟢 Examples with Preconfigured Settings
Default : Balanced configuration suitable for most timeframes and general trading applications, providing optimal balance between sensitivity and noise filtering for medium-term analysis.
Scalping : High sensitivity setup with shorter lookback period and reduced smoothing for ultra-short-term trades on 1-15 minute charts, optimized for capturing rapid momentum shifts and frequent trading opportunities.
Swing Trading : Extended lookback period with enhanced smoothing and higher threshold for multi-day positions, designed to filter market noise while capturing significant momentum moves on 1-4 hour and daily timeframes.
ALFA MMThe mm indicator is an ATR-based indicator. The bands formed by the ATR value and the Fibo numbers can be used as trailing stops to follow the trend. It also attempts to find target points experimentally using an ATR-based calculation. You can use the indicator for trend tracking, as a trailing stop, or to determine trade entry areas by combining price action information.
PSAR LRC [CRT Trader]
SAR (Stop and Reverse) is a technical indicator used in financial markets to track trends and identify potential reversal points.
The indicator plots SAR calculations at three different speeds as dot markers above or below the candlesticks. If all three dots are below, it is considered a bullish signal; if they are above, it is considered a bearish signal.
In addition to the indicator, a Linear Regression Channel has been added. These lines can provide information such as trend direction, support, resistance, and potential breakouts.
Custom Multiple SMAs (Trend Structure Visualizer)This indicator displays 16 consecutive Simple Moving Averages (SMAs), from SMA 8 to SMA 23, plotted simultaneously on the chart. Together, they form a color-coded SMA fan that allows you to clearly visualize the current market structure.
What you can observe in the chart:
– When the lines are flat and tightly clustered , the market is likely consolidating or moving sideways
– When the lines fan out and expand , a trend or directional momentum is building
– When the lines start converging or crossing again , it may indicate a trend pause or potential reversal
A 100-period EMA (yellow line) serves as a basic trend filter:
– Price above the EMA suggests an long-biased market
– Price below the EMA suggests a short-biased market
What makes this tool unique:
Unlike traditional single-SMA indicators, this tool also highlights phases when it's better to stay out of the market – such as during flat, unstructured sideways conditions.
Transitions from low activity to trending phases become clearly and early visible, without relying on additional signals or indicator noise.
The indicator works across all markets and timeframes and remains visually stable even during fast market movements. It is a visual decision-making tool and does not generate automatic signals or alerts.
Price Widget on ScreenSimple yet useful script, to see the PRICE/CHANGE of the chart you are on. I use it in my 6/8 charts screen, so you can see the graph and the price.
MERV: Market Entropy & Rhythm Visualizer [BullByte]The MERV (Market Entropy & Rhythm Visualizer) indicator analyzes market conditions by measuring entropy (randomness vs. trend), tradeability (volatility/momentum), and cyclical rhythm. It provides traders with an easy-to-read dashboard and oscillator to understand when markets are structured or choppy, and when trading conditions are optimal.
Purpose of the Indicator
MERV’s goal is to help traders identify different market regimes. It quantifies how structured or random recent price action is (entropy), how strong and volatile the movement is (tradeability), and whether a repeating cycle exists. By visualizing these together, MERV highlights trending vs. choppy environments and flags when conditions are favorable for entering trades. For example, a low entropy value means prices are following a clear trend line, whereas high entropy indicates a lot of noise or sideways action. The indicator’s combination of measures is original: it fuses statistical trend-fit (entropy), volatility trends (ATR and slope), and cycle analysis to give a comprehensive view of market behavior.
Why a Trader Should Use It
Traders often need to know when a market trend is reliable vs. when it is just noise. MERV helps in several ways: it shows when the market has a strong direction (low entropy, high tradeability) and when it’s ranging (high entropy). This can prevent entering trend-following strategies during choppy periods, or help catch breakouts early. The “Optimal Regime” marker (a star) highlights moments when entropy is very low and tradeability is very high, typically the best conditions for trend trades. By using MERV, a trader gains an empirical “go/no-go” signal based on price history, rather than guessing from price alone. It’s also adaptable: you can apply it to stocks, forex, crypto, etc., on any timeframe. For example, during a bullish phase of a stock, MERV will turn green (Trending Mode) and often show a star, signaling good follow-through. If the market later grinds sideways, MERV will shift to magenta (Choppy Mode), warning you that trend-following is now risky.
Why These Components Were Chosen
Market Entropy (via R²) : This measures how well recent prices fit a straight line. We compute a linear regression on the last len_entropy bars and calculate R². Entropy = 1 - R², so entropy is low when prices follow a trend (R² near 1) and high when price action is erratic (R² near 0). This single number captures trend strength vs noise.
Tradeability (ATR + Slope) : We combine two familiar measures: the Average True Range (ATR) (normalized by price) and the absolute slope of the regression line (scaled by ATR). Together they reflect how active and directional the market is. A high ATR or strong slope means big moves, making a trend more “tradeable.” We take a simple average of the normalized ATR and slope to get tradeability_raw. Then we convert it to a percentile rank over the lookback window so it’s stable between 0 and 1.
Percentile Ranks : To make entropy and tradeability values easy to interpret, we convert each to a 0–100 rank based on the past len_entropy periods. This turns raw metrics into a consistent scale. (For example, an entropy rank of 90 means current entropy is higher than 90% of recent values.) We then divide by 100 to plot them on a 0–1 scale.
Market Mode (Regime) : Based on those ranks, MERV classifies the market:
Trending (Green) : Low entropy rank (<40%) and high tradeability rank (>60%). This means the market is structurally trending with high activity.
Choppy (Magenta) : High entropy rank (>60%) and low tradeability rank (<40%). This is a mostly random, low-momentum market.
Neutral (Cyan) : All other cases. This covers mixed regimes not strongly trending or choppy.
The mode is shown as a colored bar at the bottom: green for trending, magenta for choppy, cyan for neutral.
Optimal Regime Signal : Separately, we mark an “optimal” condition when entropy_norm < 0.3 and tradeability > 0.7 (both normalized 0–1). When this is true, a ★ star appears on the bottom line. This star is colored white when truly optimal, gold when only tradeability is high (but entropy not quite low enough), and black when neither condition holds. This gives a quick visual cue for very favorable conditions.
What Makes MERV Stand Out
Holistic View : Unlike a single-oscillator, MERV combines trend, volatility, and cycle analysis in one tool. This multi-faceted approach is unique.
Visual Dashboard : The fixed on-chart dashboard (shown at your chosen corner) summarizes all metrics in bar/gauge form. Even a non-technical user can glance at it: more “█” blocks = a higher value, colors match the plots. This is more intuitive than raw numbers.
Adaptive Thresholds : Using percentile ranks means MERV auto-adjusts to each market’s character, rather than requiring fixed thresholds.
Cycle Insight : The rhythm plot adds information rarely found in indicators – it shows if there’s a repeating cycle (and its period in bars) and how strong it is. This can hint at natural bounce or reversal intervals.
Modern Look : The neon color scheme and glow effects make the lines easy to distinguish (blue/pink for entropy, green/orange for tradeability, etc.) and the filled area between them highlights when one dominates the other.
Recommended Timeframes
MERV can be applied to any timeframe, but it will be more reliable on higher timeframes. The default len_entropy = 50 and len_rhythm = 30 mean we use 30–50 bars of history, so on a daily chart that’s ~2–3 months of data; on a 1-hour chart it’s about 2–3 days. In practice:
Swing/Position traders might prefer Daily or 4H charts, where the calculations smooth out small noise. Entropy and cycles are more meaningful on longer trends.
Day trader s could use 15m or 1H charts if they adjust the inputs (e.g. shorter windows). This provides more sensitivity to intraday cycles.
Scalpers might find MERV too “slow” unless input lengths are set very low.
In summary, the indicator works anywhere, but the defaults are tuned for capturing medium-term trends. Users can adjust len_entropy and len_rhythm to match their chart’s volatility. The dashboard position can also be moved (top-left, bottom-right, etc.) so it doesn’t cover important chart areas.
How the Scoring/Logic Works (Step-by-Step)
Compute Entropy : A linear regression line is fit to the last len_entropy closes. We compute R² (goodness of fit). Entropy = 1 – R². So a strong straight-line trend gives low entropy; a flat/noisy set of points gives high entropy.
Compute Tradeability : We get ATR over len_entropy bars, normalize it by price (so it’s a fraction of price). We also calculate the regression slope (difference between the predicted close and last close). We scale |slope| by ATR to get a dimensionless measure. We average these (ATR% and slope%) to get tradeability_raw. This represents how big and directional price moves are.
Convert to Percentiles : Each new entropy and tradeability value is inserted into a rolling array of the last 50 values. We then compute the percentile rank of the current value in that array (0–100%) using a simple loop. This tells us where the current bar stands relative to history. We then divide by 100 to plot on .
Determine Modes and Signal : Based on these normalized metrics: if entropy < 0.4 and tradeability > 0.6 (40% and 60% thresholds), we set mode = Trending (1). If entropy > 0.6 and tradeability < 0.4, mode = Choppy (-1). Otherwise mode = Neutral (0). Separately, if entropy_norm < 0.3 and tradeability > 0.7, we set an optimal flag. These conditions trigger the colored mode bars and the star line.
Rhythm Detection : Every bar, if we have enough data, we take the last len_rhythm closes and compute the mean and standard deviation. Then for lags from 5 up to len_rhythm, we calculate a normalized autocorrelation coefficient. We track the lag that gives the maximum correlation (best match). This “best lag” divided by len_rhythm is plotted (a value between 0 and 1). Its color changes with the correlation strength. We also smooth the best correlation value over 5 bars to plot as “Cycle Strength” (also 0 to 1). This shows if there is a consistent cycle length in recent price action.
Heatmap (Optional) : The background color behind the oscillator panel can change with entropy. If “Neon Rainbow” style is on, low entropy is blue and high entropy is pink (via a custom color function), otherwise a classic green-to-red gradient can be used. This visually reinforces the entropy value.
Volume Regime (Dashboard Only) : We compute vol_norm = volume / sma(volume, len_entropy). If this is above 1.5, it’s considered high volume (neon orange); below 0.7 is low (blue); otherwise normal (green). The dashboard shows this as a bar gauge and percentage. This is for context only.
Oscillator Plot – How to Read It
The main panel (oscillator) has multiple colored lines on a 0–1 vertical scale, with horizontal markers at 0.2 (Low), 0.5 (Mid), and 0.8 (High). Here’s each element:
Entropy Line (Blue→Pink) : This line (and its glow) shows normalized entropy (0 = very low, 1 = very high). It is blue/green when entropy is low (strong trend) and pink/purple when entropy is high (choppy). A value near 0.0 (below 0.2 line) indicates a very well-defined trend. A value near 1.0 (above 0.8 line) means the market is very random. Watch for it dipping near 0: that suggests a strong trend has formed.
Tradeability Line (Green→Yellow) : This represents normalized tradeability. It is colored bright green when tradeability is low, transitioning to yellow as tradeability increases. Higher values (approaching 1) mean big moves and strong slopes. Typically in a market rally or crash, this line will rise. A crossing above ~0.7 often coincides with good trend strength.
Filled Area (Orange Shade) : The orange-ish fill between the entropy and tradeability lines highlights when one dominates the other. If the area is large, the two metrics diverge; if small, they are similar. This is mostly aesthetic but can catch the eye when the lines cross over or remain close.
Rhythm (Cycle) Line : This is plotted as (best_lag / len_rhythm). It indicates the relative period of the strongest cycle. For example, a value of 0.5 means the strongest cycle was about half the window length. The line’s color (green, orange, or pink) reflects how strong that cycle is (green = strong). If no clear cycle is found, this line may be flat or near zero.
Cycle Strength Line : Plotted on the same scale, this shows the autocorrelation strength (0–1). A high value (e.g. above 0.7, shown in green) means the cycle is very pronounced. Low values (pink) mean any cycle is weak and unreliable.
Mode Bars (Bottom) : Below the main oscillator, thick colored bars appear: a green bar means Trending Mode, magenta means Choppy Mode, and cyan means Neutral. These bars all have a fixed height (–0.1) and make it very easy to see the current regime.
Optimal Regime Line (Bottom) : Just below the mode bars is a thick horizontal line at –0.18. Its color indicates regime quality: White (★) means “Optimal Regime” (very low entropy and high tradeability). Gold (★) means not quite optimal (high tradeability but entropy not low enough). Black means neither condition. This star line quickly tells you when conditions are ideal (white star) or simply good (gold star).
Horizontal Guides : The dotted lines at 0.2 (Low), 0.5 (Mid), and 0.8 (High) serve as reference lines. For example, an entropy or tradeability reading above 0.8 is “High,” and below 0.2 is “Low,” as labeled on the chart. These help you gauge values at a glance.
Dashboard (Fixed Corner Panel)
MERV also includes a compact table (dashboard) that can be positioned in any corner. It summarizes key values each bar. Here is how to read its rows:
Entropy : Shows a bar of blocks (█ and ░). More █ blocks = higher entropy. It also gives a percentage (rounded). A full bar (10 blocks) with a high % means very chaotic market. The text is colored similarly (blue-green for low, pink for high).
Rhythm : Shows the best cycle period in bars (e.g. “15 bars”). If no calculation yet, it shows “n/a.” The text color matches the rhythm line.
Cycle Strength : Gives the cycle correlation as a percentage (smoothed, as shown on chart). Higher % (green) means a strong cycle.
Tradeability : Displays a 10-block gauge for tradeability. More blocks = more tradeable market. It also shows “gauge” text colored green→yellow accordingly.
Market Mode : Simply shows “Trending”, “Choppy”, or “Neutral” (cyan text) to match the mode bar color.
Volume Regime : Similar to tradeability, shows blocks for current volume vs. average. Above-average volume gives orange blocks, below-average gives blue blocks. A % value indicates current volume relative to average. This row helps see if volume is abnormally high or low.
Optimal Status (Large Row) : In bold, either “★ Optimal Regime” (white text) if the star condition is met, “★ High Tradeability” (gold text) if tradeability alone is high, or “— Not Optimal” (gray text) otherwise. This large row catches your eye when conditions are ripe.
In short, the dashboard turns the numeric state into an easy read: filled bars, colors, and text let you see current conditions without reading the plot. For instance, five blue blocks under Entropy and “25%” tells you entropy is low (good), and a row showing “Trending” in green confirms a trend state.
Real-Life Example
Example : Consider a daily chart of a trending stock (e.g. “AAPL, 1D”). During a strong uptrend, recent prices fit a clear upward line, so Entropy would be low (blue line near bottom, perhaps below the 0.2 line). Volatility and slope are high, so Tradeability is high (green-yellow line near top). In the dashboard, Entropy might show only 1–2 blocks (e.g. 10%) and Tradeability nearly full (e.g. 90%). The Market Mode bar turns green (Trending), and you might see a white ★ on the optimal line if conditions are very good. The Volume row might light orange if volume is above average during the rally. In contrast, imagine the same stock later in a tight range: Entropy will rise (pink line up, more blocks in dashboard), Tradeability falls (fewer blocks), and the Mode bar turns magenta (Choppy). No star appears in that case.
Consolidated Use Case : Suppose on XYZ stock the dashboard reads “Entropy: █░░░░░░░░ 20%”, “Tradeability: ██████████ 80%”, Mode = Trending (green), and “★ Optimal Regime.” This tells the trader that the market is in a strong, low-noise trend, and it might be a good time to follow the trend (with appropriate risk controls). If instead it reads “Entropy: ████████░░ 80%”, “Tradeability: ███▒▒▒▒▒▒ 30%”, Mode = Choppy (magenta), the trader knows the market is random and low-momentum—likely best to sit out until conditions improve.
Example: How It Looks in Action
Screenshot 1: Trending Market with High Tradeability (SOLUSD, 30m)
What it means:
The market is in a clear, strong trend with excellent conditions for trading. Both trend-following and active strategies are favored, supported by high tradeability and strong volume.
Screenshot 2: Optimal Regime, Strong Trend (ETHUSD, 1h)
What it means:
This is an ideal environment for trend trading. The market is highly organized, tradeability is excellent, and volume supports the move. This is when the indicator signals the highest probability for success.
Screenshot 3: Choppy Market with High Volume (BTC Perpetual, 5m)
What it means:
The market is highly random and choppy, despite a surge in volume. This is a high-risk, low-reward environment, avoid trend strategies, and be cautious even with mean-reversion or scalping.
Settings and Inputs
The script is fully open-source; here are key inputs the user can adjust:
Entropy Window (len_entropy) : Number of bars used for entropy and tradeability (default 50). Larger = smoother, more lag; smaller = more sensitivity.
Rhythm Window (len_rhythm ): Bars used for cycle detection (default 30). This limits the longest cycle we detect.
Dashboard Position : Choose any corner (Top Right default) so it doesn’t cover chart action.
Show Heatmap : Toggles the entropy background coloring on/off.
Heatmap Style : “Neon Rainbow” (colorful) or “Classic” (green→red).
Show Mode Bar : Turn the bottom mode bar on/off.
Show Dashboard : Turn the fixed table panel on/off.
Each setting has a tooltip explaining its effect. In the description we will mention typical settings (e.g. default window sizes) and that the user can move the dashboard corner as desired.
Oscillator Interpretation (Recap)
Lines : Blue/Pink = Entropy (low=trend, high=chop); Green/Yellow = Tradeability (low=quiet, high=volatile).
Fill : Orange tinted area between them (for visual emphasis).
Bars : Green=Trending, Magenta=Choppy, Cyan=Neutral (at bottom).
Star Line : White star = ideal conditions, Gold = good but not ideal.
Horizontal Guides : 0.2 and 0.8 lines mark low/high thresholds for each metric.
Using the chart, a coder or trader can see exactly what each output represents and make decisions accordingly.
Disclaimer
This indicator is provided as-is for educational and analytical purposes only. It does not guarantee any particular trading outcome. Past market patterns may not repeat in the future. Users should apply their own judgment and risk management; do not rely solely on this tool for trading decisions. Remember, TradingView scripts are tools for market analysis, not personalized financial advice. We encourage users to test and combine MERV with other analysis and to trade responsibly.
-BullByte
Volume Footprint Anomaly Scanner [PhenLabs]📊 PhenLabs - Volume Footprint Anomaly Scanner (VFAS)
Version: PineScript™ v6
📌 Description
The PhenLabs Volume Footprint Anomaly Scanner (VFAS) is an advanced Pine Script indicator designed to detect and highlight significant imbalances in buying and selling pressure within individual price bars. By analyzing a calculated "Delta" – the net difference between estimated buy and sell volume – and employing statistical Z-score analysis, VFAS pinpoints moments when buying or selling activity becomes unusually dominant. This script was created not in hopes of creating a "Buy and Sell" indicator but rather providing the user with a more in-depth insight into the intrabar volume delta and how it can fluctuate in unusual ways, leading to anomalies that can be capitalized on.
This indicator helps traders identify high-conviction points where strong market participants are active, signaling potential shifts in momentum or continuation of a trend. It aims to provide a clearer understanding of underlying market dynamics, allowing for more informed decision-making in various trading strategies, from identifying entry points to confirming trend strength.
🚀 Points of Innovation
● Z-Score for Delta Analysis : Utilizes statistical Z-scores to objectively identify statistically significant anomalies in buying/selling pressure, moving beyond simple, arbitrary thresholds.
● Dynamic Confidence Scoring : Assigns a multi-star confidence rating (1-4 stars) to each signal, factoring in high volume, trend alignment, and specific confirmation criteria, providing a nuanced view of signal strength.
● Integrated Trend Filtering : Offers an optional Exponential Moving Average (EMA)-based trend filter to ensure signals align with the broader market direction, reducing false positives in ranging markets.
● Strict Confirmation Logic : Implements specific confirmation criteria for higher-confidence signals, including price action and a time-based gap from previous signals, enhancing reliability.
● Intuitive Info Dashboard : Provides a real-time summary of market trend and the latest signal's direction and confidence directly on the chart, streamlining information access.
🔧 Core Components
● Core Delta Engine : Estimates the net buying/selling pressure (bar Delta) by analyzing price movement within each bar relative to volume. It also calculates average volume to identify bars with unusually high activity.
● Anomaly Detection (Z-Score) : Computes the Z-score for the current bar's Delta, indicating how many standard deviations it is from its recent average. This statistical measure is central to identifying significant anomalies.
● Trend Filter : Utilizes a dual Exponential Moving Average (EMA) cross-over system to define the prevailing market trend (uptrend, downtrend, or range), providing contextual awareness.
● Signal Processing & Confidence Algorithm : Evaluates anomaly conditions against trend filters and confirmation rules, then calculates a dynamic confidence score to produce actionable, contextualized signal information.
🔥 Key Features
● Advanced Delta Anomaly Detection : Pinpoints bars with exceptionally high buying or selling pressure, indicating potential institutional activity or strong market conviction.
● Multi-Factor Confidence Scoring : Each signal comes with a 1-4 star rating, clearly communicating its reliability based on high volume, trend alignment, and specific confirmation criteria.
● Optional Trend Alignment : Users can choose to filter signals, so only those aligned with the prevailing EMA-defined trend are displayed, enhancing signal quality.
● Interactive Signal Labels : Displays compact labels on the chart at anomaly points, offering detailed tooltips upon hover, including signal type, direction, confidence, and contextual information.
● Customizable Bar Colors : Visually highlights bars with Delta anomalies, providing an immediate visual cue for strong buying or selling activity.
● Real-time Info Dashboard : A clean, customizable dashboard shows the current market trend and details of the latest detected signal, keeping key information accessible at a glance.
● Configurable Alerts : Set up alerts for bullish or bearish Delta anomalies to receive real-time notifications when significant market pressure shifts occur.
🎨 Visualization
Signal Labels :
* Placed at the top/bottom of anomaly bars, showing a "📈" (bullish) or "📉" (bearish) icon.
* Tooltip: Hovering over a label reveals detailed information: Signal Type (e.g., "Delta Anomaly"), Direction, Confidence (e.g., "★★★☆"), and a descriptive explanation of the anomaly.
* Interpretation: Clearly marks actionable signals and provides deep insights without cluttering the chart, enabling quick assessment of signal strength and context.
● Info Dashboard :
* Located at the top-right of the chart, providing a clean summary.
* Displays: "PhenLabs - VFAS" header, "Market Trend" (Uptrend/Downtrend/Range with color-coded status), and "Direction | Conf." (showing the last signal's direction and star confidence).
* Optional "💡 Hover over signals for details" reminder.
* Interpretation: A concise, real-time summary of the market's pulse and the most recent high-conviction event, helping traders stay informed at a glance.
📖 Usage Guidelines
Setting Categories
⚙️ Core Delta & Volume Engine
● Minimum Volume Lookback (Bars)
○ Default: 9
○ Range: Integer (e.g., 5-50)
○ Description: Defines the number of preceding bars used to calculate the average volume and delta. Bars with volume below this average won't be considered for high-volume signals. A shorter lookback is more reactive to recent changes, while a longer one provides a smoother average.
📈 Anomaly Detection Settings
Delta Z-Score Anomaly Threshold
○ Default: 2.5
○ Range: Float (e.g., 1.0-5.0+)
○ Description: The number of standard deviations from the mean that a bar's delta must exceed to be considered a significant anomaly. A higher threshold means fewer, but potentially stronger, signals. A lower threshold will generate more signals, which might include less significant events. Experiment to find the optimal balance for your trading style.
🔬 Context Filters
Enable Trend Filter
○ Default: False
○ Range: Boolean (True/False)
○ Description: When enabled, signals will only be generated if they align with the current market trend as determined by the EMAs (e.g., only bullish signals in an uptrend, bearish in a downtrend). This helps to filter out counter-trend noise.
● Trend EMA Fast
○ Default: 50
○ Range: Integer (e.g., 10-100)
○ Description: The period for the faster Exponential Moving Average used in the trend filter. In combination with the slow EMA, it defines the trend direction.
● Trend EMA Slow
○ Default: 200
○ Range: Integer (e.g., 100-400)
○ Description: The period for the slower Exponential Moving Average used in the trend filter. The relationship between the fast and slow EMA determines if the market is in an uptrend (fast > slow) or downtrend (fast < slow).
🎨 Visual & UI Settings
● Show Info Dashboard
○ Default: True
○ Range: Boolean (True/False)
○ Description: Toggles the visibility of the dashboard on the chart, which provides a summary of market trend and the last detected signal.
● Show Dashboard Tooltip
○ Default: True
○ Range: Boolean (True/False)
○ Description: Toggles a reminder message in the dashboard to hover over signal labels for more detailed information.
● Show Delta Anomaly Bar Colors
○ Default: True
○ Range: Boolean (True/False)
○ Description: Enables or disables the coloring of bars based on their delta direction and whether they represent a significant anomaly.
● Show Signal Labels
○ Default: True
○ Range: Boolean (True/False)
○ Description: Controls the visibility of the “📈” or “📉” labels that appear on the chart when a delta anomaly signal is generated.
🔔 Alert Settings
Alert on Delta Anomaly
○ Default: True
○ Range: Boolean (True/False)
○ Description: When enabled, this setting allows you to set up alerts in TradingView that will trigger whenever a new bullish or bearish delta anomaly is detected.
✅ Best Use Cases
Early Trend Reversal / Continuation Detection: Identify strong surges of buying/selling pressure at key support/resistance levels that could indicate a reversal or the continuation of a strong move.
● Confirmation of Breakouts: Use high-confidence delta anomalies to confirm the validity of price breakouts, indicating strong conviction behind the move.
● Entry and Exit Points: Pinpoint precise entry opportunities when anomalies align with your trading strategy, or identify potential exhaustion signals for exiting trades.
● Scalping and Day Trading: The indicator’s sensitivity to intraday buying/selling imbalances makes it highly effective for short-term trading strategies.
● Market Sentiment Analysis: Gain a real-time understanding of underlying market sentiment by observing the prevalence and strength of bullish vs. bearish anomalies.
⚠️ Limitations
Estimated Delta: The script uses a simplified method to estimate delta based on bar close relative to its range, not actual order book or footprint data. While effective, it’s an approximation.
● Sensitivity to Z-Score Threshold: The effectiveness heavily relies on the `Delta Z-Score Anomaly Threshold`. Too low, and you’ll get many false positives; too high, and you might miss valid signals.
● Confirmation Criteria: The 4-star confidence level’s “confirmation” relies on specific subsequent bar conditions and previous confirmed signals, which might be too strict or specific for all contexts.
● Requires Context: While powerful, VFAS is best used in conjunction with other technical analysis tools and price action to form a comprehensive trading strategy. It is not a standalone “buy/sell” signal.
💡 What Makes This Unique
Statistical Rigor: The application of Z-score analysis to bar delta provides an objective, statistically-driven way to identify true anomalies, moving beyond arbitrary thresholds.
● Multi-Factor Confidence Scoring: The unique 1-4 star confidence system integrates multiple market dynamics (volume, trend alignment, specific follow-through) into a single, easy-to-interpret rating.
● User-Friendly Design: From the intuitive dashboard to the detailed signal tooltips, the indicator prioritizes clear and accessible information for traders of all experience levels.
🔬 How It Works
1. Bar Delta Calculation:
● The script first estimates the “buy volume” and “sell volume” for each bar. This is done by assuming that volume proportional to the distance from the low to the close represents buying, and volume proportional to the distance from the high to the close represents selling.
● How this contributes: This provides a proxy for the net buying or selling pressure (delta) within that specific price bar, even without access to actual footprint data.
2. Volume & Delta Z-Score Analysis:
● The average volume over a user-defined lookback period is calculated. Bars with volume less than twice this average are generally considered of lower interest.
● The Z-score for the calculated bar delta is computed. The Z-score measures how many standard deviations the current bar’s delta is from its average delta over the `Minimum Volume Lookback` period.
● How this contributes: A high positive Z-score indicates a bullish delta anomaly (significantly more buying than usual), while a high negative Z-score indicates a bearish delta anomaly (significantly more selling than usual). This identifies statistically unusual levels of pressure.
3. Trend Filtering (Optional):
● Two Exponential Moving Averages (Fast and Slow EMA) are used to determine the prevailing market trend. An uptrend is identified when the Fast EMA is above the Slow EMA, and a downtrend when the Fast EMA is below the Slow EMA.
● How this contributes: If enabled, the indicator will only display bullish delta anomalies during an uptrend and bearish delta anomalies during a downtrend, helping to confirm signals within the broader market context and avoid counter-trend signals.
4. Signal Generation & Confidence Scoring:
● When a delta Z-score exceeds the user-defined anomaly threshold, a signal is generated.
● This signal is then passed through a multi-factor confidence algorithm (`f_calculateConfidence`). It awards stars based on: high volume presence, alignment with the overall trend (if enabled), and a fourth star for very strong Z-scores (above 3.0) combined with specific follow-through candle patterns after a cooling-off period from a previous confirmed signal.
● How this contributes: Provides a qualitative rating (1-4 stars) for each anomaly, allowing traders to quickly assess the potential significance and reliability of the signal.
💡 Note:
The PhenLabs Volume Footprint Anomaly Scanner is a powerful analytical tool, but it’s crucial to understand that no indicator guarantees profit. Always backtest and forward-test the indicator settings on your chosen assets and timeframes. Consider integrating VFAS with your existing trading strategy, using its signals as confirmation for entries, exits, or trend bias. The Z-score threshold is highly customizable; lower values will yield more signals (including potential noise), while higher values will provide fewer but potentially higher-conviction signals. Adjust this parameter based on market volatility and your risk tolerance. Remember to combine statistical insights from VFAS with price action, support/resistance levels, and your overall market outlook for optimal results.
BTC PL Trend + Floor - Log PilotBTC Power Law Trend + Floor with forward projection.
Sky blue for the trend. Neon orange for the floor. Both project forward in dotted green.
Tracks Bitcoin’s long-term arc and structural support through time since Genesis.
SwingTrade ADX Strategy v6This is a swing trading strategy that combines VWAP (Volume Weighted Average Price), ADX (Average Directional Index) for trend strength, and volume ratios to generate long/short entry and exit signals. It's designed for daily charts but can be adapted.
#### Key Features:
- **Entries**: Based on VWAP crossovers, rising/falling delta (price deviation from VWAP), ADX trend confirmation, and volume ratios.
- **Exits**: Dynamic exits when VWAP delta reverses after a peak.
- **Filters**: Optional toggles for VWAP signals, ADX, and volume. Backtest date range for custom periods.
- **Visuals**: VWAP line, signal shapes/labels, and an info panel showing key metrics (VWAP Delta %, ADX, Volume Ratio).
- **Alerts**: Built-in alerts for buy/sell entries and exits.
#### How to Use:
1. Apply to your chart (e.g., stocks, forex, crypto).
2. Adjust parameters in the settings (e.g., ADX threshold, volume period).
3. Enable/disable indicators as needed.
4. Backtest using the date filters and review equity curve.
**Disclaimer**: This is for educational purposes only. Past performance is not indicative of future results. Not financial advice—trade at your own risk. Backtest thoroughly and use with proper risk management.
Feedback welcome! If you find it useful, give it a like.
GBPJPY Trendflow forexsebiPsychological Levels Indicator for GBP/JPY
This indicator marks key psychological price levels on the GBP/JPY chart. These are round-number price levels (such as 190.00, 191.00, 192.00, etc.) that often act as significant support and resistance due to their psychological impact on traders. These levels attract attention from both institutional and retail traders, leading to increased order flow and potential market reactions.
The indicator automatically draws major psychological levels (typically every 100 pips) and can optionally show minor levels (e.g., every 50 or 25 pips), helping traders identify key zones of interest with greater clarity.
Key Features:
Plots major psychological levels (e.g., 190.00, 191.00, 192.00)
Optional minor levels (e.g., 190.50, 190.25, etc.)
Compatible with all timeframes
Helps identify areas of support, resistance, and price reaction
Suitable for all trading styles: scalping, intraday, and swing trading
These levels serve as a visual guide for anticipating potential reversals, breakouts, or consolidations around high-probability zones.
The Visualized Trader (Fractal Timeframe)The **The Visualized Trader (Fractal Timeframe)** indicator for TradingView is a tool designed to help traders identify strong bullish or bearish trends by analyzing multiple technical indicators across two timeframes: the current chart timeframe and a user-selected higher timeframe. It visually displays trend alignment through arrows on the chart and a condition table in the top-right corner, making it easy to see when conditions align for potential trade opportunities.
### Key Features
1. **Multi-Indicator Analysis**: Combines five technical conditions to confirm trend direction:
- **Trend**: Based on the slope of the 50-period Simple Moving Average (SMA). Upward slope indicates bullish, downward indicates bearish.
- **Stochastic (Stoch)**: Uses Stochastic Oscillator (5, 3, 2) to measure momentum. Rising values suggest bullish momentum, falling values suggest bearish.
- **Momentum (Mom)**: Derived from the MACD fast line (5, 20, 30). Rising MACD line indicates bullish momentum, falling indicates bearish.
- **Dad**: Uses the MACD signal line. Rising signal line is bullish, falling is bearish.
- **Price Change (PC)**: Compares the current close to the previous close. Higher close is bullish, lower is bearish.
2. **Dual Timeframe Comparison**:
- Calculates the same five conditions on both the current timeframe and a user-selected higher timeframe (e.g., daily).
- Helps traders see if the trend on the higher timeframe aligns with the current chart, providing context for stronger trade decisions.
3. **Visual Signals**:
- **Arrows on Chart**:
- **Current Timeframe**: Blue upward arrows below bars for bullish alignment, red downward arrows above bars for bearish alignment.
- **Higher Timeframe**: Green upward triangles below bars for bullish alignment, orange downward triangles above bars for bearish alignment.
- Arrows appear only when all five conditions align (all bullish or all bearish), indicating strong trend potential.
4. **Condition Table**:
- Displays a table in the top-right corner with two rows:
- **Top Row**: Current timeframe conditions (Trend, Stoch, Mom, Dad, PC).
- **Bottom Row**: Higher timeframe conditions (labeled with "HTF").
- Each cell is color-coded: green for bullish, red for bearish.
- The table can be toggled on/off via input settings.
5. **User Input**:
- **Show Condition Boxes**: Toggle the table display (default: on).
- **Comparison Timeframe**: Choose the higher timeframe (e.g., "D" for daily, default setting).
### How It Works
- The indicator evaluates the five conditions on both timeframes.
- When all conditions are bullish (or bearish) on a given timeframe, it plots an arrow/triangle to signal a strong trend.
- The condition table provides a quick visual summary, allowing traders to compare the current and higher timeframe trends at a glance.
### Use Case
- **Purpose**: Helps traders confirm strong trend entries by ensuring multiple indicators align across two timeframes.
- **Example**: If you're trading on a 1-hour chart and see blue arrows with all green cells in the current timeframe row, plus green cells in the higher timeframe (e.g., daily) row, it suggests a strong bullish trend supported by both timeframes.
- **Benefit**: Reduces noise by focusing on aligned signals, helping traders avoid weak or conflicting setups.
### Settings
- Access the indicator settings in TradingView to:
- Enable/disable the condition table.
- Select a higher timeframe (e.g., 4H, D, W) for comparison.
### Notes
- Best used in trending markets; may produce fewer signals in choppy conditions.
- Combine with other analysis (e.g., support/resistance) for better decision-making.
- The higher timeframe signals (triangles) provide context, so prioritize trades where both timeframes align.
This indicator simplifies complex trend analysis into clear visual cues, making it ideal for traders seeking confirmation of strong momentum moves.
MA Table [RanaAlgo]The "MA Table " indicator is a comprehensive and visually appealing tool for tracking moving average signals in TradingView. Here's a short summary of its usefulness:
Key Features:
Dual MA Support:
Tracks both EMA (Exponential Moving Average) and SMA (Simple Moving Average) signals (10, 20, 30, 50, 100 periods).
Users can toggle visibility for EMA/SMA separately.
Clear Signal Visualization:
Displays Buy (▲) or Sell (▼) signals based on price position relative to each MA.
Color-coded (green for buy, red for sell) for quick interpretation.
Customizable Table Design:
Adjustable position (9 placement options), colors, text size, and border styling.
Alternating row colors improve readability.
Optional MA Plots:
Can display the actual MA lines on the chart for visual confirmation (with distinct colors/styles).
Usefulness:
Quick Overview: The table consolidates multiple MA signals in one place, saving time compared to checking each MA individually.
Trend Confirmation: Helps confirm trend strength when multiple MAs align (e.g., price above all MAs → strong uptrend).
Flexible: Suitable for both short-term (10-20 period) and long-term (50-100 period) traders.
Aesthetic: Professional design enhances chart clarity without clutter.
Ideal For:
Traders who rely on moving average crossovers or price-MA relationships.
Multi-timeframe analysis when combined with other tools.
Beginners learning MA strategies (clear visual feedback).
Multi-Timeframe Resonance v2.0📌 Multi-Timeframe Resonance System — Identify trend, range, and turning points at a glance
✨ Core Advantages:
🔹 Multi-timeframe resonance analysis: Detects trend direction and range across timeframes. Helps identify M tops, W bottoms, consolidation turning points, and trend switches.
🔹 Clear phase visualization: Highlights trend momentum (green) and consolidation zones (red).
🔹 Universally compatible: Works on stocks/ETFs, futures/commodities, forex, gold, crypto — parameter tuning is the only requirement.
🎯 Target Users:
✅ Traders needing fast structure analysis
✅ Trend-followers, swing traders, or range-arbitrageurs
✅ Multi-timeframe analysts & volume researchers
✅ Quant teams seeking stable signal output
📈 Market Structure Evolution Sequence:
**Same-Bear → Small Box Bull → Medium Box Bull → Large Box Bull → Same-Bull → Small Box Bear → Medium Box Bear → Large Box Bear → Same-Bear**
- “Same-Bear”/“Same-Bull”: full agreement among timeframes,strongest trend stages.
- “Small/Medium/Large Box”: represent increasing-level consolidations indicating trend emergence or turn.
🔍 By identifying the current structure phase, traders can determine if:
- The market is in the **early trend stage** (Same-Bull/Same-Bear)
- Or in a **trend shift period** (Bear→Bull or Bull→Bear)
- Or still **oscillating** (structures switching)
⚠️ **Practical Note:**
Although structure usually follows the sequence above, in strong or volatile moves it may:
- **Skip steps** (e.g., Same-Bear → Large Box Bull)
- **Switch rapidly** within a few candles
Traders should use volume, candle patterns, and higher-timeframe trends to confirm valid structure changes or avoid false breakouts.
📌 Execution Logic:
This indicator applies **multi-timeframe resonance** to capture **trend pullbacks**:
- Identifies trend direction via higher timeframes
- Uses pullback in shorter timeframe to signal entry
- Executes trend-following trades at pullback points
- Protects with structured stop-loss based on higher timeframe structure
🔒 This is a protected script. For access details, please see the Author’s Instructions.
📌 多周期共振识别系统 — 趋势、震荡与拐点,一目了然
✨ 核心优势:
🔹 多周期共振分析:同时检测多个周期的趋势方向与震荡结构,辅助识别 M 顶 / W 底 / 震荡拐点 / 趋势转换等关键信号。
🔹 趋势与震荡清晰可视:自动高亮趋势推进(绿色)与震荡盘整(红色)区域,一眼看清市场节奏。
🔹 全品种通用:适配股票 / ETF、期货 / 商品、外汇 / 黄金、加密货币等市场,仅需轻微参数微调。
🎯 适用人群:
✅ 需要快速识别图表结构的交易者
✅ 趋势跟随者、波段捕捉者、震荡套利者
✅ 热衷于多周期分析与量能行为研究的交易者
✅ 追求稳定信号输出的量化策略团队
📈 市场结构演变路径:
同空 → 小箱多 → 中箱多 → 大箱多 → 同多 → 小箱空 → 中箱空 → 大箱空 → 同空
“同空” / “同多”:表示多周期趋势完全一致,代表趋势最强阶段
“小箱 / 中箱 / 大箱”:代表不同级别的震荡结构,结构逐步递进,表示趋势正在酝酿或转向
🔍 通过识别当前所处的结构阶段,交易者可以判断:
当前是否处于趋势初期阶段(如同空 / 同多)
是否处于趋势转换区间(如由空转多或由多转空)
或仍处于震荡反复区间(结构频繁切换)
⚠️ 实战提醒:
虽然市场结构通常遵循上述顺序演化,但在强趋势或剧烈波动行情下,可能出现以下情况:
跳跃演化(如从“同空”直接进入“大箱多”阶段)
快速切换(几根K线内连续跳过多个结构)
因此,交易者应结合量能、K线形态及更高周期趋势,判断结构变化是否“有效”或为“假突破”。
📌 执行逻辑:
本指标通过多周期趋势共振确认,捕捉趋势中的回踩机会:
利用高阶周期判断趋势方向
在低阶周期的回踩位置作为进场信号
顺势交易,捕捉主趋势中的低吸 / 高抛机会
止损位置依据上位周期结构确认,明确清晰
🔒 本脚本为受控授权版本,如需获取使用权限,请参阅“作者说明”。
RSI Shift Zone [ChartPrime]OVERVIEW
RSI Shift Zone is a sentiment-shift detection tool that bridges momentum and price action. It plots dynamic channel zones directly on the price chart whenever the RSI crosses above or below critical thresholds (default: 70 for overbought, 30 for oversold). These plotted zones reveal where market sentiment likely flipped, helping traders pinpoint powerful support/resistance clusters and breakout opportunities in real time.
⯁ HOW IT WORKS
When the RSI crosses either the upper or lower level:
A new Shift Zone channel is instantly formed.
The channel’s boundaries anchor to the high and low of the candle at the moment of crossing.
A mid-line (average of high and low) is plotted for easy visual reference.
The channel remains visible on the chart for at least a user-defined minimum number of bars (default: 15) to ensure only meaningful shifts are highlighted.
The channel is color-coded to reflect bullish or bearish sentiment, adapting dynamically based on whether the RSI breached the upper or lower level. Labels with actual RSI values can also be shown inside the zone for added context.
⯁ KEY TECHNICAL DETAILS
Uses a standard RSI calculation (default length: 14).
Detects crossovers above the upper level (trend strength) and crossunders below the lower level (oversold exhaustion).
Applies the channel visually on the main chart , rather than only in the indicator pane — giving traders a precise map of where sentiment shifts have historically triggered price reactions.
Auto-clears the zone when the minimum bar length is satisfied and a new shift is detected.
⯁ USAGE
Traders can use these RSI Shift Zones as powerful tactical levels:
Treat the channel’s high/low boundaries as dynamic breakout lines — watch for candles closing beyond them to confirm fresh trend continuation.
Use the midline as an equilibrium reference for pullbacks within the zone.
Visual RSI value labels offer quick checks on whether the zone formed due to extreme overbought or oversold conditions.
CONCLUSION
RSI Shift Zone transforms a simple RSI threshold crossing into a meaningful structural tool by projecting sentiment flips directly onto the price chart. This empowers traders to see where momentum-based turning points occur and leverage those levels for breakout plays, reversals, or high-confidence support/resistance zones — all in one glance.
Fibonacci Sequence Moving Average [BackQuant]Fibonacci Sequence Moving Average with Adaptive Oscillator
1. Overview
The Fibonacci Sequence Moving Average indicator is a two‑part trading framework that combines a custom moving average built from the famous Fibonacci number set with a fully featured oscillator, normalisation engine and divergence suite. The moving average half delivers an adaptive trend line that respects natural market rhythms, while the oscillator half translates that trend information into a bounded momentum stream that is easy to read, easy to compare across assets and rich in confluence signals. Everything from weighting logic to colour palettes can be customised, so the tool comfortably fits scalpers zooming into one‑minute candles as well as position traders running multi‑month trend following campaigns.
2. Core Calculation
Fibonacci periods – The default length array is 5, 8, 13, 21, 34. A single multiplier input lets you scale the whole family up or down without breaking the golden‑ratio spacing. For example a multiplier of 3 yields 15, 24, 39, 63, 102.
Component averages – Each period is passed through Simple Moving Average logic to produce five baseline curves (ma1 through ma5).
Weighting methods – You decide how those five values are blended:
• Equal weighting treats every curve the same.
• Linear weighting applies factors 1‑to‑5 so the slowest curve counts five times as much as the fastest.
• Exponential weighting doubles each step for a fast‑reacting yet still smooth line.
• Fibonacci weighting multiplies each curve by its own period value, honouring the spirit of ratio mathematics.
Smoothing engine – The blended average is then smoothed a second time with your choice of SMA, EMA, DEMA, TEMA, RMA, WMA or HMA. A short smoothing length keeps the result lively, while longer lengths create institution‑grade glide paths that act like dynamic support and resistance.
3. Oscillator Construction
Once the smoothed Fib MA is in place, the script generates a raw oscillator value in one of three flavours:
• Distance – Percentage distance between price and the average. Great for mean‑reversion.
• Momentum – Percentage change of the average itself. Ideal for trend acceleration studies.
• Relative – Distance divided by Average True Range for volatility‑aware scaling.
That raw series is pushed through a look‑back normaliser that rescales every reading into a fixed −100 to +100 window. The normalisation window defaults to 100 bars but can be tightened for fast markets or expanded to capture long regimes.
4. Visual Layer
The oscillator line is gradient‑coloured from deep red through sky blue into bright green, so you can spot subtle momentum shifts with peripheral vision alone. There are four horizontal guide lines: Extreme Bear at −50, Bear Threshold at −20, Bull Threshold at +20 and Extreme Bull at +50. Soft fills above and below the thresholds reinforce the zones without cluttering the chart.
The smoothed Fib MA can be plotted directly on price for immediate trend context, and each of the five component averages can be revealed for educational or research purposes. Optional bar‑painting mirrors oscillator polarity, tinting candles green when momentum is bullish and red when momentum is bearish.
5. Divergence Detection
The script automatically looks for four classes of divergences between price pivots and oscillator pivots:
Regular Bullish, signalling a possible bottom when price prints a lower low but the oscillator prints a higher low.
Hidden Bullish, often a trend‑continuation cue when price makes a higher low while the oscillator slips to a lower low.
Regular Bearish, marking potential tops when price carves a higher high yet the oscillator steps down.
Hidden Bearish, hinting at ongoing downside when price posts a lower high while the oscillator pushes to a higher high.
Each event is tagged with an ℝ or ℍ label at the oscillator pivot, colour‑coded for clarity. Look‑back distances for left and right pivots are fully adjustable so you can fine‑tune sensitivity.
6. Alerts
Five ready‑to‑use alert conditions are included:
• Bullish when the oscillator crosses above +20.
• Bearish when it crosses below −20.
• Extreme Bullish when it pops above +50.
• Extreme Bearish when it dives below −50.
• Zero Cross for momentum inflection.
Attach any of these to TradingView notifications and stay updated without staring at charts.
7. Practical Applications
Swing trading trend filter – Plot the smoothed Fib MA on daily candles and only trade in its direction. Enter on oscillator retracements to the 0 line.
Intraday reversal scouting – On short‑term charts let Distance mode highlight overshoots beyond ±40, then fade those moves back to mean.
Volatility breakout timing – Use Relative mode during earnings season or crypto news cycles to spot momentum surges that adjust for changing ATR.
Divergence confirmation – Layer the oscillator beneath price structure to validate double bottoms, double tops and head‑and‑shoulders patterns.
8. Input Summary
• Source, Fibonacci multiplier, weighting method, smoothing length and type
• Oscillator calculation mode and normalisation look‑back
• Divergence look‑back settings and signal length
• Show or hide options for every visual element
• Full colour and line width customisation
9. Best Practices
Avoid using tiny multipliers on illiquid assets where the shortest Fibonacci window may drop under three bars. In strong trends reduce divergence sensitivity or you may see false counter‑trend flags. For portfolio scanning set oscillator to Momentum mode, hide thresholds and colour bars only, which turns the indicator into a heat‑map that quickly highlights leaders and laggards.
10. Final Notes
The Fibonacci Sequence Moving Average indicator seeks to fuse the mathematical elegance of the golden ratio with modern signal‑processing techniques. It is not a standalone trading system, rather a multi‑purpose information layer that shines when combined with market structure, volume analysis and disciplined risk management. Always test parameters on historical data, be mindful of slippage and remember that past performance is never a guarantee of future results. Trade wisely and enjoy the harmony of Fibonacci mathematics in your technical toolkit.
Weighted Multi-Mode Oscillator [BackQuant]Weighted Multi‑Mode Oscillator
1. What Is It?
The Weighted Multi‑Mode Oscillator (WMMO) is a next‑generation momentum tool that turns a dynamically‑weighted moving average into a 0‑100 bounded oscillator.
It lets you decide how each bar is weighted (by volume, volatility, momentum or a hybrid blend) and how the result is normalised (Percentile, Z‑Score or Min‑Max).
The outcome is a self‑adapting gauge that delivers crystal‑clear overbought / oversold zones, divergence clues and regime shifts on any market or timeframe.
2. How It Works
• Dynamic Weight Engine
▪ Volume – emphasises bars with exceptional participation.
▪ Volatility – inverse ATR weighting filters noisy spikes.
▪ Momentum – amplifies strong directional ROC bursts.
▪ Hybrid – equal‑weight blend of the three dimensions.
• Multi‑Mode Smoothing
Choose from 8 MA types (EMA, DEMA, HMA, LINREG, TEMA, RMA, SMA, WMA) plus a secondary smoothing factor to fine‑tune lag vs. responsiveness.
• Normalization Suite
▪ Percentile – rank vs. recent history (context aware).
▪ Z‑Score – standard deviations from mean (statistical extremes).
▪ Min‑Max – scale between rolling high/low (trend friendly).
3. Reading the Oscillator
Zone Default Level Interpretation
Bull > 80 Acceleration; momentum buyers in control
Neutral 20 – 80 Consolidation / no edge
Bear < 20 Exhaustion; sellers dominate
Gradient line/area automatically shades from bright green (strong bull) to deep red (strong bear).
Optional bar‑painting colours price bars the same way for rapid chart scanning.
4. Typical Use‑Cases
Trend Confirmation – Set Weight = Hybrid, Smoothing = EMA. Enter pullbacks only when WMMO > 50 and rising.
Mean Reversion – Weight = Volatility, reduce upper / lower bands to 70 / 30 and fade extremes.
Volume Pulse – Intraday futures: Weight = Volume to catch participation surges before breakout candles.
Divergence Spotting – Compare price highs/lows to WMMO peaks for early reversal clues.
5. Inputs & Styling
Calculation: Source, MA Length, MA Type, Smoothing
Weighting: Volume period & factor, Volatility length, Momentum period
Normalisation: Method, Look‑back, Upper / Lower thresholds
Display: Gradient fills, Threshold lines, Bar‑colouring toggle, Line width & colours
All thresholds, colours and fills are fully customisable inside the settings panel.
6. Built‑In Alerts
WMMO Long – oscillator crosses up through upper threshold.
WMMO Short – oscillator crosses down through lower threshold.
Attach them once and receive push / e‑mail notifications the moment momentum flips.
7. Best Practices
Percentile mode is self‑adaptive and works well across assets; Z‑Score excels in ranges; Min‑Max shines in persistent trends.
Very short MA lengths (< 10) may produce jitter; compensate with higher “Smoothing” or longer look‑backs.
Pair WMMO with structure‑based tools (S/R, trend lines) for higher‑probability trade confluence.
Disclaimer
This script is provided for educational purposes only. It is not financial advice. Always back‑test thoroughly and manage risk before trading live capital.
52SIGNAL RECIPE AMA Momentum Vector═══52SIGNAL RECIPE AMA Momentum Vector═══
◆ Overview
52SIGNAL RECIPE AMA Momentum Vector is an advanced technical indicator based on Adaptive Moving Average (AMA), integrating volume filtering and gradient zone visualization to provide comprehensive analysis of price trends and momentum.
It automatically adjusts to market conditions by calculating efficiency ratios, reducing noise while clearly capturing significant trends. The volume confirmation system helps traders identify high-probability entry and exit points with precision.
─────────────────────────────────────
◆ Key Features
• Adaptive Moving Average: Smart moving average that automatically adjusts based on market conditions
• Volume Filter Integration: Double-confirmation of important price movements through volume analysis
• Momentum Gradient Zones: Intuitive visualization of trend strength through color gradation
• Signal Confirmation System: Generation of high-reliability buy/sell signals by combining multiple factors
• Trend Direction Identification: Clear color distinction between bullish and bearish market conditions
• Automatic Adaptation: Intelligent design that self-adjusts to various market situations
─────────────────────────────────────
◆ Technical Foundation
■ AMA Calculation Principles
• Efficiency Ratio (ER): Measures how efficiently price moves in one direction
• Dynamic Smoothing Coefficient: Automatically adjusts faster or slower based on market conditions
• Adaptive Algorithm: Less sensitive during sideways markets, more responsive during trending markets
• Noise Reduction Function: Filters out meaningless price movements while capturing important signals
■ Momentum Vector Implementation
• Trend-Price Distance Calculation: Measures trend strength by the distance between AMA and current price
• Color Gradation: Visual system where color intensity changes proportionally to trend strength
• ATR-Based Adjustment: Automatically adjusts gradient zone width according to market volatility
• Directional Color Distinction: Intuitive display with blue/cyan for uptrends and red for downtrends
─────────────────────────────────────
◆ Practical Applications
■ Price Trend Interpretation
• Trend Direction Assessment:
▶ Price above AMA with blue gradation indicates ongoing bullish momentum
▶ Price below AMA with red gradation indicates ongoing bearish momentum
• Momentum Strength Verification:
▶ Deeper gradient colors mean stronger momentum and healthier trends
▶ Lighter gradient colors suggest weakening momentum and potential reversal
■ Trading Strategy Utilization
• Trend Following Strategy:
▶ Buy signal when price crosses above AMA with increased volume
▶ Sell signal when price crosses below AMA with increased volume
• Momentum Confirmation Trading:
▶ Deep gradation increases confidence in trend continuation for entry decisions
▶ Multiple consecutive candles staying on one side of AMA increases trend reliability
─────────────────────────────────────
◆ Advanced Configuration Options
■ Input Parameter Guide
• Fast Period (Default: 2)
▶ 1-2: Responds very quickly to price changes. Suitable for short-term trading.
▶ 3-5: Moderate response that reduces frequent signals.
▶ 6-10: Slower response but captures only more definitive trends.
• Slow Period (Default: 30)
▶ 20-25: AMA moves faster. Good for shorter timeframe trading.
▶ 26-35: Balanced speed suitable for most market conditions.
▶ 36-50: AMA moves slowly, smoothly following long-term trends.
• Efficiency Ratio Period (Default: 10)
▶ 5-8: Focuses more on recent price movements. Responds quickly to changes.
▶ 9-12: Balanced period suitable for most situations.
▶ 13-20: Considers longer-term price movements, ignoring temporary fluctuations.
• Volume Average Period (Default: 20)
▶ 10-15: Compares with the average volume of the last 10-15 days. More sensitive to changes.
▶ 16-25: Compares with the average volume of approximately the last month. Balanced setting.
▶ 26-50: Compares with long-term average volume, capturing only truly significant volume changes.
• Volume Threshold Multiplier (Default: 1.2)
▶ 1.0-1.1: Recognizes volume just 10% above average as valid.
▶ 1.2-1.5: Requires volume 20-50% higher than average (e.g., 1.2 means 120% of average).
▶ 1.6-2.0: Recognizes only very high volume at least 1.6 times (160%) above average.
■ Timeframe-Specific Recommended Settings
• Short Timeframes (5min-1hr):
Fast Period 2, Slow Period 20, Efficiency Ratio Period 8
→ Responds quickly to price changes, suitable for day trading.
• Medium Timeframes (4hr-daily):
Fast Period 2, Slow Period 30, Efficiency Ratio Period 10
→ Most balanced setting for general swing trading.
• Long Timeframes (daily-weekly):
Fast Period 2, Slow Period 40, Efficiency Ratio Period 14
→ Optimized for smoothly tracking longer trends.
■ Market-Specific Recommended Settings
• Stock Market:
Volume Threshold 1.2, Volume Average Period 20
→ Signal is valid when volume is 20% above average.
• Forex Market:
Volume Threshold 1.5, Efficiency Ratio Period 12
→ Forex requires higher volume to be meaningful and slightly longer efficiency measurement.
• Cryptocurrency Market:
Volume Threshold 1.3, Fast Period 2, Slow Period 25
→ Settings optimized for highly volatile cryptocurrencies.
─────────────────────────────────────
◆ Synergy with Other Indicators
• Moving Averages: Trend reliability increases when AMA and key moving averages point in the same direction
• RSI/Stochastic: Powerful reversal signals when AMA crossovers occur in overbought/oversold zones
• MACD: Signal probability greatly increases when MACD histogram direction changes coincide with AMA crossovers
• Bollinger Bands: Trend strength can be determined by AMA's position within Bollinger Bands
• Support/Resistance Levels: Success probability dramatically increases when AMA breakouts occur at key price levels
─────────────────────────────────────
◆ Conclusion
AMA Momentum Vector provides accurate price trend analysis by combining the advanced features of adaptive moving averages with momentum visualization technology.
It perfectly adapts to constantly changing market environments through its self-adjusting algorithm and generates highly reliable trading signals through its volume confirmation system.
Users can optimize the indicator for their trading style and market conditions with simple parameter adjustments, enabling effective trading decisions that comprehensively consider price direction, momentum strength, and volume confirmation.
─────────────────────────────────────
※ Disclaimer: Past performance does not guarantee future results. Always use appropriate risk management strategies.
═══52SIGNAL RECIPE AMA Momentum Vector═══
◆ 개요
52SIGNAL RECIPE AMA Momentum Vector는 적응형 이동평균(AMA)을 기반으로 한 고급 기술적 지표로, 볼륨 필터링과 그라데이션 존 시각화를 통합하여 가격 추세와 모멘텀을 종합적으로 분석합니다.
시장 효율성 비율을 자동으로 계산하여 시장 상황에 맞게 스스로 조정되며, 노이즈는 줄이고 중요한 추세는 선명하게 포착합니다. 또한 볼륨 확인 시스템을 통해 높은 확률의 매매 시점을 정확하게 식별할 수 있도록 도와줍니다.
─────────────────────────────────────
◆ 주요 특징
• 적응형 이동평균: 시장 상황에 따라 자동으로 조정되는 스마트한 이동평균선
• 볼륨 필터 통합: 중요한 가격 움직임을 볼륨으로 한번 더 확인
• 모멘텀 그라데이션 존: 색상 그라데이션으로 추세의 강도를 직관적으로 시각화
• 신호 확인 시스템: 여러 요소를 종합하여 신뢰도 높은 매수/매도 신호 생성
• 추세 방향 식별: 상승세와 하락세를 색상으로 명확하게 구분
• 자동 적응 기능: 다양한 시장 상황에 알아서 맞춰지는 지능형 설계
─────────────────────────────────────
◆ 기술적 기반
■ AMA 계산 원리
• 효율성 비율 (ER): 가격이 얼마나 효율적으로 한 방향으로 움직이는지 측정
• 동적 평활화 계수: 시장 상황에 따라 빠르거나 느리게 자동 조절되는 계수
• 적응형 알고리즘: 횡보장에서는 둔감하게, 추세장에서는 민감하게 반응
• 노이즈 감소 기능: 무의미한 가격 움직임은 걸러내고 중요한 신호만 포착
■ 모멘텀 벡터 구현
• 추세-가격 거리 계산: AMA와 현재 가격 사이의 거리로 추세 강도 측정
• 색상 그라데이션: 추세 강도에 비례하여 색상 농도가 변하는 시각화 시스템
• ATR 기반 조정: 시장 변동성에 맞춰 그라데이션 영역 너비 자동 조절
• 방향성 색상 구분: 상승세는 파란색/청록색, 하락세는 빨간색으로 직관적 표시
─────────────────────────────────────
◆ 실용적 응용
■ 가격 추세 해석
• 추세 방향 판단:
▶ 가격이 AMA 위에 있고 파란색 그라데이션이 보이면 상승 모멘텀 진행 중
▶ 가격이 AMA 아래에 있고 빨간색 그라데이션이 보이면 하락 모멘텀 진행 중
• 모멘텀 강도 확인:
▶ 그라데이션 색상이 진할수록 모멘텀이 강하고 추세가 건강함을 의미
▶ 그라데이션 색상이 옅을수록 모멘텀이 약해지고 있으며 반전 가능성 시사
■ 트레이딩 전략 활용
• 추세 추종 전략:
▶ 가격이 AMA를 상향 돌파하고 볼륨이 증가하면 매수 신호
▶ 가격이 AMA를 하향 돌파하고 볼륨이 증가하면 매도 신호
• 모멘텀 확인 트레이딩:
▶ 진한 그라데이션은 추세 지속 가능성이 높음을 의미하므로 진입 확신 강화
▶ 여러 캔들이 연속해서 AMA 한쪽에 머물면 추세의 신뢰도가 높아짐
─────────────────────────────────────
◆ 고급 설정 옵션
■ 인풋 파라미터 가이드
• 빠른 기간 (Fast Period) (기본값: 2)
▶ 1-2: 가격 변화에 매우 빠르게 반응합니다. 단기 거래에 적합합니다.
▶ 3-5: 적당히 반응하여 잦은 신호를 줄여줍니다.
▶ 6-10: 반응이 느리지만 더 확실한 추세만 포착합니다.
• 느린 기간 (Slow Period) (기본값: 30)
▶ 20-25: AMA가 더 빠르게 움직입니다. 짧은 시간 거래에 좋습니다.
▶ 26-35: 균형 잡힌 속도로 대부분의 시장 상황에 적합합니다.
▶ 36-50: AMA가 천천히 움직여 장기 추세를 부드럽게 따라갑니다.
• 효율성 비율 기간 (Efficiency Ratio Period) (기본값: 10)
▶ 5-8: 최근 가격 움직임에 더 집중합니다. 변화에 빠르게 반응합니다.
▶ 9-12: 균형 잡힌 기간으로 대부분의 상황에 적합합니다.
▶ 13-20: 더 긴 기간의 가격 움직임을 고려하여 일시적인 변동을 무시합니다.
• 볼륨 평균 기간 (Volume Average Period) (기본값: 20)
▶ 10-15: 최근 10-15일의 평균 볼륨과 비교합니다. 변화에 민감합니다.
▶ 16-25: 지난 약 한 달간의 평균 볼륨과 비교합니다. 균형 잡힌 설정입니다.
▶ 26-50: 장기 평균 볼륨과 비교하여 정말 큰 볼륨 변화만 포착합니다.
• 볼륨 임계값 승수 (Volume Threshold Multiplier) (기본값: 1.2)
▶ 1.0-1.1: 평균보다 약 10% 정도만 높아도 유효한 볼륨으로 인정합니다.
▶ 1.2-1.5: 평균보다 20~50% 높은 볼륨을 요구합니다(예: 1.2는 평균의 120%).
▶ 1.6-2.0: 평균의 최소 1.6배(160%) 이상 되는 매우 높은 볼륨만 인정합니다.
■ 타임프레임별 추천 설정
• 짧은 시간 차트 (5분-1시간):
빠른 기간 2, 느린 기간 20, 효율성 비율 기간 8
→ 가격 변화에 빠르게 반응하며 단타에 적합합니다.
• 중기 차트 (4시간-일봉):
빠른 기간 2, 느린 기간 30, 효율성 비율 기간 10
→ 일반적인 스윙 트레이딩에 가장 균형 잡힌 설정입니다.
• 장기 차트 (일봉-주봉):
빠른 기간 2, 느린 기간 40, 효율성 비율 기간 14
→ 더 긴 추세를 매끄럽게 추적하는 데 최적화되었습니다.
■ 시장별 추천 설정
• 주식 시장:
볼륨 임계값 1.2, 볼륨 평균 기간 20
→ 평균보다 20% 많은 볼륨이 있을 때 신호가 유효합니다.
• 외환 시장:
볼륨 임계값 1.5, 효율성 비율 기간 12
→ 외환은 볼륨이 더 높아야 의미가 있으며, 약간 더 긴 효율성 측정이 필요합니다.
• 암호화폐 시장:
볼륨 임계값 1.3, 빠른 기간 2, 느린 기간 25
→ 변동성이 큰 암호화폐에 최적화된 설정입니다.
─────────────────────────────────────
◆ 다른 지표와의 시너지
• 이동평균선: AMA와 주요 이동평균선이 같은 방향을 가리킬 때 추세 신뢰도 상승
• RSI/스토캐스틱: 과매수/과매도 구간에서 AMA 교차 발생 시 강력한 반전 신호
• MACD: MACD 히스토그램 방향 변화와 AMA 교차가 일치하면 신호 확률 대폭 증가
• 볼린저 밴드: AMA가 볼린저 밴드 내에서 어떤 위치에 있는지로 추세 강도 판단
• 지지/저항 레벨: 중요 가격대에서 AMA 돌파 시 성공 확률이 크게 증가
─────────────────────────────────────
◆ 결론
AMA Momentum Vector는 적응형 이동평균의 고급 기능과 모멘텀 시각화 기술을 결합하여 정확한 가격 추세 분석을 제공합니다.
자체 조정 알고리즘으로 시시각각 변하는 시장 환경에 완벽하게 적응하며, 볼륨 확인 시스템을 통해 신뢰도 높은 매매 신호를 생성합니다.
사용자는 간단한 파라미터 조정으로 자신의 거래 스타일과 시장 상황에 맞게 지표를 최적화할 수 있어, 가격 방향, 모멘텀 강도, 볼륨 확인을 종합적으로 고려한 효과적인 거래 결정을 내릴 수 있습니다.
─────────────────────────────────────
※ 면책 조항: 과거 성과가 미래 결과를 보장하지 않습니다. 항상 적절한 리스크 관리 전략을 사용하세요.
Directional Market Efficiency [QuantAlgo]🟢 Overview
The Directional Market Efficiency indicator is an advanced trend analysis tool that measures how efficiently price moves in a given direction relative to the total price movement over a specified period. Unlike traditional momentum oscillators that only measure price change magnitude, this indicator combines efficiency measurement with directional bias to provide a comprehensive view of market behavior ranging from -1 (perfectly efficient downward movement) to +1 (perfectly efficient upward movement).
The indicator transforms the classic Efficiency Ratio concept by incorporating directional bias, creating a normalized oscillator that simultaneously reveals trend strength, direction, and market regime (trending vs. ranging). This dual-purpose functionality helps traders and investors identify high-probability trend continuation opportunities while filtering out choppy, inefficient price movements that often lead to false signals and whipsaws.
🟢 How It Works
The indicator employs a sophisticated two-step calculation process that first measures pure efficiency, then applies directional weighting to create the final signal. The efficiency calculation compares the absolute net price change over a lookback period to the sum of all individual bar-to-bar price movements during that same period. This ratio reveals how much of the total price movement contributed to actual progress in a specific direction.
The directional component applies the mathematical sign of the net price change (positive for upward movement, negative for downward movement) to the efficiency ratio, creating values between -1 and +1. The resulting Directional Efficiency is then smoothed using an Exponential Moving Average to reduce noise while maintaining responsiveness. Additionally, the system incorporates a configurable threshold level that distinguishes between trending markets (high efficiency) and ranging markets (low efficiency), enabling regime-based analysis and strategy adaptation.
🟢 How to Use
1. Signal Interpretation and Market Regime Analysis
Positive Territory (Above Zero): Indicates efficient upward price movement with bullish directional bias and favorable conditions for long positions
Negative Territory (Below Zero): Signals efficient downward price movement with bearish directional bias and favorable conditions for short positions
High Absolute Values (±0.4 to ±1.0): Represent highly efficient trending conditions with strong directional conviction and reduced noise
Low Absolute Values (±0.1 to ±0.3): Suggest ranging or consolidating markets with inefficient price movement and increased whipsaw risk
Zero Line Crosses: Mark critical directional shifts and provide primary entry/exit signals for trend-following strategies
2. Threshold-Based Market Regime Classification
Above Threshold (Trending Markets): When efficiency exceeds the threshold level, markets are classified as trending, favoring momentum strategies
Below Threshold (Ranging Markets): When efficiency falls below the threshold, markets are classified as ranging, favoring mean reversion approaches
3. Preset Configurations for Different Trading Styles
Default
Universally applicable configuration optimized for medium-term analysis across multiple timeframes and asset classes, providing balanced sensitivity and noise filtering.
Scalping
Highly responsive setup for ultra-short-term trades with increased sensitivity to quick efficiency changes. Best suited for 1-15 minute charts and rapid-fire trading approaches.
Swing Trading
Designed for multi-day position holding with enhanced noise filtering and focus on sustained efficiency trends. Optimal for 1-4 hour and daily timeframe analysis.
🟢 Pro Tips for Trading and Investing
→ Trend Continuation Filter: Enter long positions when Directional Efficiency crosses above zero in trending markets (above threshold) and short positions when crossing below zero, ensuring alignment with efficient price movement.
→ Range Trading Optimization: In ranging markets (below threshold), take profits on extreme readings and enter mean reversion trades when efficiency approaches zero from either direction.
→ Multi-Timeframe Confluence: Combine higher timeframe trend direction with lower timeframe efficiency signals for optimal entry timing.
→ Risk Management Enhancement: Reduce position sizes or avoid new entries when efficiency readings are weak (near zero), as these conditions indicate higher probability of choppy, unpredictable price movement.
→ Signal Strength Assessment: Prioritize trades with high absolute efficiency values (±0.4 or higher) as these represent the most reliable directional moves with reduced likelihood of immediate reversal.
→ Regime Transition Trading: Watch for efficiency threshold breaks combined with directional changes as these often mark significant trend initiation or termination points requiring strategic position adjustments.
→ Alert Integration: Utilize the built-in alert system for real time notifications of zero-line crosses, threshold breaks, and regime changes to maintain constant market awareness without continuous chart monitoring.
Candle close on high time frameOVERVIEW
This indicator plots persistent closing levels of higher time frame candles (H1, H4, and Daily) on the active intraday chart in real time. Unlike similar tools, it offers granular control over line projection length, fully independent toggles per timeframe, and a built-in mechanism that automatically limits the total number of historical levels to avoid chart clutter and performance issues.
CONCEPTS
Key levels from higher time frames often act as areas where price reacts or consolidates. By projecting each candle's exact closing price forward as a horizontal reference, traders can quickly identify dynamic support and resistance zones relevant to the current price action. This indicator enables seamless multi-timeframe analysis without the need to manually switch chart intervals or re-draw lines.
FEATURES
Independent Time Frame Selection: Enable or disable H1, H4, and Daily levels individually to tailor the analysis.
Custom Extension Length: Each timeframe's closing level can be projected forward for a user-defined number of bars.
Performance Optimization: The script maintains an internal limit (default: 100) on the number of active lines. When this threshold is exceeded, the oldest lines are removed automatically.
Visual Differentiation: Colors for each timeframe are fully customizable, enabling immediate recognition of level origin.
Immediate Update: New levels appear as soon as a higher timeframe candle closes, ensuring real-time reference.
USAGE
From the indicator inputs, select which timeframes you want to track.
Adjust the extension lengths to fit your trading style and time horizon.
Customize the line colors for clarity and personal preference.
Use these projected levels as part of your confluence criteria for entries, exits, or stop placement.
Combine with trend indicators or price action tools to enhance your multi-timeframe strategy.
ORIGINALITY AND ADDED VALUE
While similar scripts exist that plot higher timeframe levels, this implementation differs in:
Its efficient automatic cleanup of old lines to preserve chart performance.
The independent extension and color settings per timeframe.
Immediate reaction to new candle closes without repainting.
Simplicity of use combined with precise customization.
This combination makes it a practical and flexible tool for traders who rely on clear HTF level visualization without manual drawing or the limitations of built-in TradingView tools.
LICENSE
This script is published open-source under the Mozilla Public License 2.0.
Kase Convergence Divergence [BackQuant]Kase Convergence Divergence
The Kase Convergence Divergence is a sophisticated oscillator designed to measure directional market strength through the lens of volatility-adjusted log return structures. Inspired by Cynthia Kase’s work on statistical momentum and price projection ranges, this unique indicator offers a hybrid framework that merges signal processing, multi-length sweep logic, and adaptive smoothing techniques.
Unlike traditional momentum oscillators like MACD or RSI, which rely on static moving average differences, KCD introduces a dual-process system combining:
Kase-style statistical range projection (via log returns and volatility),
A sweeping loop of lookback lengths for robustness,
First and second derivative modes to capture both velocity and acceleration of price movement.
Core Logic & Computation
The KCD calculation is centered on two volatility-normalized transforms:
KSDI Up: Measures how far the current high has moved relative to a past low, normalized by return volatility.
KSDI Down: Measures how far the current low has moved relative to a past high, also normalized.
For every length in a user-defined sweep range (e.g., 25–35), both KSDI_up and KSDI_dn are computed, and their maximum values across the loop are retained. The difference between these two max values produces the raw signal:
KPO (Kase Projection Oscillator): Measures directional skew.
KCD (Kase Convergence Divergence): Defined as KPO – MA(KPO) — similar in spirit to MACD but structurally different.
Users can choose to visualize either the first derivative (KPO) , or the second derivative (KCD) , depending on market conditions or strategy style.
Key Features
✅ Multi-Length Sweep Logic: Improves signal reliability by aggregating statistical range projections across a set of lookbacks.
✅ Advanced Smoothing Modes: Supports DEMA, HMA, TEMA, LINREG, WMA and more for dynamic adaptation.
✅ Dual Derivative Modes: Choose between speed (first derivative) or smoothness (second derivative) to fit your trading regime.
✅ Color-Encoded Signal Bands: Heatmap-style oscillator coloring enhances visual feedback on trend strength.
✅ Candlestick Painting: Optional bar coloring makes it easy to spot trend shifts on the main chart.
✅ Adaptive Fill Zones: Green and red fills between the oscillator and zero line help distinguish bullish and bearish regimes at a glance.
Practical Applications
📈 Trend Confirmation: Use KCD as a secondary confirmation layer after breakout or pullback entries.
📉 Momentum Shifts: Crossover and crossunder of the zero line highlight potential regime changes.
📊 Strategy Filters: Incorporate into algos to avoid trendless or mean-reverting environments.
🧪 Derivative Switching: Flip between KPO and KCD modes depending on whether you want to measure acceleration or deceleration of price flow.
Alerts & Signals
Two built-in alerts help you catch regime shifts in real time:
Long Signal: Triggered when the selected oscillator crosses above zero.
Short Signal: Triggered when it crosses below zero.
These events can be used to generate entries, exits, or trend validation cues in multi-layer systems.
Conclusion
The Kase Convergence Divergence goes beyond traditional oscillators by offering a volatility-normalized, derivative-aware signal engine with enhanced visual dynamics. Its sweeping architecture and dynamic fill logic make it especially powerful for identifying trending environments, filtering chop, and adding statistical rigor to your trading toolkit.
Whether you’re a discretionary trader seeking precision, or a quant looking to model more robust return structures, KCD offers a creative yet analytically grounded solution.