Divergences v2.3 [LTB][SPTG]Updated Divergences v2.3 by LTB to better handle stock symbols and lookback.
Regressions
Fibo & Gann Advanced Auto[CongTrader]🔍 Description:
"Fibo & Gann Advanced Auto by CongTrader" is a smart automatic indicator that combines Fibonacci Retracement & Extension levels with Gann Boxes and Fan lines, helping traders identify key support/resistance zones and potential turning points in the market.
This tool automatically detects recent swing highs/lows using pivots and overlays:
📏 Fibonacci Retracement & Extension (0.236 to 1.618)
🟪 Gann Box between 2 latest pivots
📐 Gann Fan Lines (1x1, 2x1, etc.)
🟢 Optional filtered Buy/Sell signals based on wave size and RSI
Designed for discretionary and technical traders who want a visual confirmation of price geometry and market structure.
📘 How to Use:
Apply to any chart & timeframe.
Adjust pivot sensitivity via “Pivot Length” input.
Look for confluence between Fib retracement/extension and Gann box edges for trade entries.
Gann fan lines help visualize trend angles or speed.
Combine with your own strategy for better confirmation (e.g., volume, candlestick pattern).
💡 Tip: Use in higher timeframes (H1, H4, D1) for cleaner and more reliable pivots.
🙏 Thanks:
Created with love and passion for the trading community by CongTrader.
If you find it helpful, please give a like or comment. Feedback is always appreciated!
⚠️ Disclaimer:
This script is for educational and informational purposes only.
It does not constitute financial advice and should not be used as a sole basis for trading decisions.
Always use proper risk management and perform your own analysis before entering any trade.
Trading involves risk, and past performance is not indicative of future results..#fibonacci #gann #gannbox #gannfan #elliottwave #marketstructure
#priceaction #autopivot #congtrader #tradingviewindicator
#technicalanalysis #tradingtools #forextrading #cryptoindicator
#tradingstrategy #tradingsetup #smartmoney #supportresistance
Meta-LR ForecastThis indicator builds a forward-looking projection from the current bar by combining twelve time-compressed “mini forecasts.” Each forecast is a linear-regression-based outlook whose contribution is adaptively scaled by trend strength (via ADX) and normalized to each timeframe’s own volatility (via that timeframe’s ATR). The result is a 12-segment polyline that starts at the current price and extends one bar at a time into the future (1× through 12× the chart’s timeframe). Alongside the plotted path, the script computes two summary measures:
* Per-TF Bias% — a directional efficiency × R² score for each micro-forecast, expressed as a percent.
* Meta Bias% — the same score, but applied to the final, accumulated 12-step path. It summarizes how coherent and directional the combined projection is.
This tool is an indicator, not a strategy. It does not place orders. Nothing here is trade advice; it is a visual, quantitative framework to help you assess directional bias and trend context across a ladder of timeframe multiples.
The core engine fits a simple least-squares line on a normalized price series for each small forecast horizon and extrapolates one bar forward. That “trend” forecast is paired with its mirror, an “anti-trend” forecast, constructed around the current normalized price. The model then blends between these two wings according to current trend strength as measured by ADX.
ADX is transformed into a weight (w) in using an adaptive band centered on the rolling mean (μ) with width derived from the standard deviation (σ) of ADX over a configurable lookback. When ADX is deeply below the lower band, the weight approaches -1, favoring anti-trend behavior. Inside the flat band, the weight is near zero, producing neutral behavior. Clearly above the upper band, the weight approaches +1, favoring a trend-following stance. The transitions between these regions are linear so the regime shift is smooth rather than abrupt.
You can shape how quickly the model commits to either wing using two exponents. One exponent controls how aggressively positive weights lean into the trend forecast; the other controls how aggressively negative weights lean into the anti-trend forecast. Raising these exponents makes the response more gradual; lowering them makes the shift more decisive. An optional switch can force full anti-trend behavior when ADX registers a deep-low condition far below the lower tail, if you prefer a categorical stance in very flat markets.
A key design choice is volatility normalization. Every micro-forecast is computed in ATR units of its own timeframe. The script fetches that timeframe’s ATR inside each security call and converts normalized outputs back to price with that exact ATR. This avoids scaling higher-timeframe effects by the chart ATR or by square-root time approximations. Using “ATR-true” for each timeframe keeps the cross-timeframe accumulation consistent and dimensionally correct.
Bias% is defined as directional efficiency multiplied by R², expressed as a percent. Directional efficiency captures how much net progress occurred relative to the total path length; R² captures how well the path aligns with a straight line. If price meanders without net progress, efficiency drops; if the variation is well-explained by a line, R² rises. Multiplying the two penalizes choppy, low-signal paths and rewards sustained, coherent motion.
The forward path is built by converting each per-timeframe Bias% into a small ATR-sized delta, then cumulatively adding those deltas to form a 12-step projection. This produces a polyline anchored at the current close and stepping forward one bar per timeframe multiple. Segment color flips by slope, allowing a quick read of the path’s direction and inflection.
Inputs you can tune include:
* Max Regression Length. Upper bound for each micro-forecast’s regression window. Larger values smooth the trend estimate at the cost of responsiveness; smaller values react faster but can add noise.
* Price Source. The price series analyzed (for example, close or typical price).
* ADX Length. Period used for the DMI/ADX calculation.
* ATR Length (normalization). Window used for ATR; this is applied per timeframe inside each security call.
* Band Lookback (for μ, σ). Lookback used to compute the adaptive ADX band statistics. Larger values stabilize the band; smaller values react more quickly.
* Flat half-width (σ). Width of the neutral band on both sides of μ. Wider flats spend more time neutral; narrower flats switch regimes more readily.
* Tail width beyond flat (σ). Distance from the flat band edge to the extreme trend/anti-trend zone. Larger tails create a longer ramp; smaller tails reach extremes sooner.
* Polyline Width. Visual thickness of the plotted segments.
* Negative Wing Aggression (anti-trend). Exponent shaping for negative weights; higher values soften the tilt into mean reversion.
* Positive Wing Aggression (trend). Exponent shaping for positive weights; lower values make trend commitment stronger and sooner.
* Force FULL Anti-Trend at Deep-Low ADX. Optional hard switch for extremely low ADX conditions.
On the chart you will see:
* A 12-segment forward polyline starting from the current close to bar\_index + 1 … +12, with green segments for up-steps and red for down-steps.
* A small label at the latest bar showing Meta Bias% when available, or “n/a” when insufficient data exists.
Interpreting the readouts:
* Trend-following contexts are characterized by ADX above the adaptive upper band, pushing w toward +1. The blended forecast leans toward the regression extrapolation. A strongly positive Meta Bias% in this environment suggests directional alignment across the ladder of timeframes.
* Mean-reversion contexts occur when ADX is well below the lower tail, pushing w toward -1 (or forcing anti-trend if enabled). After a sharp advance, a negative Meta Bias% may indicate the model projects pullback tendencies.
* Neutral contexts occur when ADX sits inside the flat band; w is near zero, the blended forecast remains close to current price, and Meta Bias% tends to hover near zero.
These are analytical cues, not rules. Always corroborate with your broader process, including market structure, time-of-day behavior, liquidity conditions, and risk limits.
Practical usage patterns include:
* Momentum confirmation. Combine a rising Meta Bias% with higher-timeframe structure (such as higher highs and higher lows) to validate continuation setups. Treat the 12th step’s distance as a coarse sense of potential room rather than as a target.
* Fade filtering. If you prefer fading extremes, require ADX to be near or below the lower ramp before acting on counter-moves, and avoid fades when ADX is decisively above the upper band.
* Position planning. Because per-step deltas are ATR-scaled, the path’s vertical extent can be mentally mapped to typical noise for the instrument, informing stop distance choices. The script itself does not compute orders or size.
* Multi-timeframe alignment. Each step corresponds to a clean multiple of your chart timeframe, so the polyline visualizes how successively larger windows bias price, all referenced to the current bar.
House-rules and repainting disclosures:
* Indicator, not strategy. The script does not execute, manage, or suggest orders. It displays computed paths and bias scores for analysis only.
* No performance claims. Past behavior of any measure, including Meta Bias%, does not guarantee future results. There are no assurances of profitability.
* Higher-timeframe updates. Values obtained via security for higher-timeframe series can update intrabar until the higher-timeframe bar closes. The forward path and Meta Bias% may change during formation of a higher-timeframe candle. If you need confirmed higher-timeframe inputs, consider reading the prior higher-timeframe value or acting only after the higher-timeframe close.
* Data sufficiency. The model requires enough history to compute ATR, ADX statistics, and regression windows. On very young charts or illiquid symbols, parts of the readout can be unavailable until sufficient data accumulates.
* Volatility regimes. ATR normalization helps compare across timeframes, but unusual volatility regimes can make the path look deceptively flat or exaggerated. Judge the vertical scale relative to your instrument’s typical ATR.
Tuning tips:
* Stability versus responsiveness. Increase Max Regression Length to steady the micro-forecasts but accept slower response. If you lower it, consider slightly increasing Band Lookback so regime boundaries are not too jumpy.
* Regime bands. Widen the flat half-width to spend more time neutral, which can reduce over-trading tendencies in chop. Shrink the tail width if you want the model to commit to extremes sooner, at the cost of more false swings.
* Wing shaping. If anti-trend behavior feels too abrupt at low ADX, raise the negative wing exponent. If you want trend bias to kick in more decisively at high ADX, lower the positive wing exponent. Small changes have large effects.
* Forced anti-trend. Enable the deep-low option only if you explicitly want a categorical “markets are flat, fade moves” policy. Many users prefer leaving it off to keep regime decisions continuous.
Troubleshooting:
* Nothing plots or the label shows “n/a.” Ensure the chart has enough history for the ADX band statistics, ATR, and the regression windows. Exotic or illiquid symbols with missing data may starve the higher-timeframe computations. Try a more liquid market or a higher timeframe.
* Path flickers or shifts during the bar. This is expected when any higher-timeframe input is still forming. Wait for the higher-timeframe close for fully confirmed behavior, or modify the code to read prior values from the higher timeframe.
* Polyline looks too flat or too steep. Check the chart’s vertical scale and recent ATR regime. Adjust Max Regression Length, the wing exponents, or the band widths to suit the instrument.
Integration ideas for manual workflows:
* Confluence checklist. Use Meta Bias% as one of several independent checks, alongside structure, session context, and event risk. Act only when multiple cues align.
* Stop and target thinking. Because deltas are ATR-scaled at each timeframe, benchmark your proposed stops and targets against the forward steps’ magnitude. Stops that are much tighter than the prevailing ATR often sit inside normal noise.
* Session context. Consider session hours and microstructure. The same ADX value can imply different tradeability in different sessions, particularly in index futures and FX.
This indicator deliberately avoids:
* Fixed thresholds for buy or sell decisions. Markets vary and fixed numbers invite overfitting. Decide what constitutes “high enough” Meta Bias% for your market and timeframe.
* Automatic risk sizing. Proper sizing depends on account parameters, instrument specifications, and personal risk tolerance. Keep that decision in your risk plan, not in a visual bias tool.
* Claims of edge. These measures summarize path geometry and trend context; they do not ensure a tradable edge on their own.
Summary of how to think about the output:
* The script builds a 12-step forward path by stacking linear-regression micro-forecasts across increasing multiples of the chart timeframe.
* Each micro-forecast is blended between trend and anti-trend using an adaptive ADX band with separate aggression controls for positive and negative regimes.
* All computations are done in ATR-true units for each timeframe before reconversion to price, ensuring dimensional consistency when accumulating steps.
* Bias% (per-timeframe and Meta) condenses directional efficiency and trend fidelity into a compact score.
* The output is designed to serve as an analytical overlay that helps assess whether conditions look trend-friendly, fade-friendly, or neutral, while acknowledging higher-timeframe update behavior and avoiding prescriptive trade rules.
Use this tool as one component within a disciplined process that includes independent confirmation, event awareness, and robust risk management.
Kaos CHoCH M15 – Confirm + BOS H4 Bias (no repinta)Marca choch en dirección del Bias de H4 para seguir con la tendencia.
Bitcoin Expectile Model [LuxAlgo]The Bitcoin Expectile Model is a novel approach to forecasting Bitcoin, inspired by the popular Bitcoin Quantile Model by PlanC. By fitting multiple Expectile regressions to the price, we highlight zones of corrections or accumulations throughout the Bitcoin price evolution.
While we strongly recommend using this model with the Bitcoin All Time History Index INDEX:BTCUSD on the 3 days or weekly timeframe using a logarithmic scale, this model can be applied to any asset using the daily timeframe or superior.
Please note that here on TradingView, this model was solely designed to be used on the Bitcoin 1W chart, however, it can be experimented on other assets or timeframes if of interest.
🔶 USAGE
The Bitcoin Expectile Model can be applied similarly to models used for Bitcoin, highlighting lower areas of possible accumulation (support) and higher areas that allow for the anticipation of potential corrections (resistance).
By default, this model fits 7 individual Expectiles Log-Log Regressions to the price, each with their respective expectile ( tau ) values (here multiplied by 100 for the user's convenience). Higher tau values will return a fit closer to the higher highs made by the price of the asset, while lower ones will return fits closer to the lower prices observed over time.
Each zone is color-coded and has a specific interpretation. The green zone is a buy zone for long-term investing, purple is an anomaly zone for market bottoms that over-extend, while red is considered the distribution zone.
The fits can be extrapolated, helping to chart a course for the possible evolution of Bitcoin prices. Users can select the end of the forecast as a date using the "Forecast End" setting.
While the model is made for Bitcoin using a log scale, other assets showing a tendency to have a trend evolving in a single direction can be used. See the chart above on QQQ weekly using a linear scale as an example.
The Start Date can also allow fitting the model more locally, rather than over a large range of prices. This can be useful to identify potential shorter-term support/resistance areas.
🔶 DETAILS
🔹 On Quantile and Expectile Regressions
Quantile and Expectile regressions are similar; both return extremities that can be used to locate and predict prices where tops/bottoms could be more likely to occur.
The main difference lies in what we are trying to minimize, which, for Quantile regression, is commonly known as Quantile loss (or pinball loss), and for Expectile regression, simply Expectile loss.
You may refer to external material to go more in-depth about these loss functions; however, while they are similar and involve weighting specific prices more than others relative to our parameter tau, Quantile regression involves minimizing a weighted mean absolute error, while Expectile regression minimizes a weighted squared error.
The squared error here allows us to compute Expectile regression more easily compared to Quantile regression, using Iteratively reweighted least squares. For Quantile regression, a more elaborate method is needed.
In terms of comparison, Quantile regression is more robust, and easier to interpret, with quantiles being related to specific probabilities involving the underlying cumulative distribution function of the dataset; on the other expectiles are harder to interpret.
🔹 Trimming & Alterations
It is common to observe certain models ignoring very early Bitcoin price ranges. By default, we start our fit at the date 2010-07-16 to align with existing models.
By default, the model uses the number of time units (days, weeks...etc) elapsed since the beginning of history + 1 (to avoid NaN with log) as independent variable, however the Bitcoin All Time History Index INDEX:BTCUSD do not include the genesis block, as such users can correct for this by enabling the "Correct for Genesis block" setting, which will add the amount of missed bars from the Genesis block to the start oh the chart history.
🔶 SETTINGS
Start Date: Starting interval of the dataset used for the fit.
Correct for genesis block: When enabled, offset the X axis by the number of bars between the Bitcoin genesis block time and the chart starting time.
🔹 Expectiles
Toggle: Enable fit for the specified expectile. Disabling one fit will make the script faster to compute.
Expectile: Expectile (tau) value multiplied by 100 used for the fit. Higher values will produce fits that are located near price tops.
🔹 Forecast
Forecast End: Time at which the forecast stops.
🔹 Model Fit
Iterations Number: Number of iterations performed during the reweighted least squares process, with lower values leading to less accurate fits, while higher values will take more time to compute.
ZigZag Volume Profile [ChartPrime]⯁ OVERVIEW
ZigZag Volume Profile combines swing structure with volume analytics by plotting a ZigZag of major price swings and overlaying a detailed volume profile around each swing. At the end of each swing, it highlights the Point of Control (POC) — the price level with the highest traded volume — and extends it forward to identify key areas of potential support or resistance.
⯁ KEY FEATURES
ZigZag Swing Detection:
Automatically detects swing highs and lows based on a user-defined length, creating clean visual segments of market structure.
These segments act as boundaries for volume profile calculations.
swingHigh = ta.highest(swingLength)
swingLow = ta.lowest(swingLength)
ZigZag Channel Visualization:
The ZigZag structure is connected with sloped lines, forming a visual “channel” of the price movement.
The ZigZag can optionally, scaled by ATR.
Volume Profile Around Each Swing:
For every completed swing (high to low or low to high), the indicator constructs a full volume profile using user-defined bin counts.
It scans volume across price levels in the swing and plots histogram-style bins using a gradient color to indicate volume magnitude.
Dynamic Bin Width and Slope Adjustment:
Bins are distributed across a vertical ATR-based range, and their width is adjusted based on the percentage of total swing volume.
The volume fill direction is adapted to the swing’s slope for visually aligned plotting.
POC Detection and Extension:
The highest volume bin in each swing is identified as the Point of Control (POC).
This level is plotted with a thicker line and extended horizontally into the future as a key reaction level.
Automatic POC Expiry on Price Interaction:
POC lines are continuously extended unless breached by price.
When price crosses the POC level, the extension is terminated — signaling that the level may have been absorbed.
Clean Volume Bin Visualization:
Bin colors range from green (low volume) to blue (higher volume), with the POC always marked in red by default for easy identification.
Volume percentages are optionally labeled at each bin level.
Flexible Swing Profile Parameters:
Users can control:
Number of volume bins
Bin width
Channel width (ATR factor)
Visibility of the swing channel or POC lines
Efficient Memory Handling:
Old POC lines and volume profiles are automatically removed from memory after a threshold to keep charts clean and performant.
⯁ USAGE
Use ZigZag swings to define market structure visually.
Analyze volume profile around each swing to understand where most trading activity occurred.
Use POC extensions as dynamic support/resistance zones for entries, stops, or take-profits.
Watch for price interaction with extended POC lines — breaks may suggest absorbed liquidity or breakout potential.
Use the ATR-based channel width to adapt profiles based on market volatility.
⯁ CONCLUSION
ZigZag Volume Profile offers a powerful fusion of structure and volume. By plotting detailed volume profiles over each price swing and extending the POC as actionable S/R levels, this tool provides deep insight into market participation zones — giving traders a tactical edge in both ranging and trending environments.
Market Extension Quantifier SniperIt's a combination of ATR, Moving Average, Bollinger Bands and RSI. And the idea is to find a very extended move which creates a probability that the market is due to a reversion.
🏆 UNMITIGATED LEVELS ACCUMULATIONPDH TO ATH RISK FREE
All the PDL have a buy limit which starts at 0.1 lots which will duplicate at the same time the capital incresases. All of the buy limits have TP in ATH for max reward.
Opaline Color ChangeONLY USE for serious full time trading strategy, or running away from Military/City.
Multi Kernel Regression with Alert.
Canonical Momenta Indicator [T1][T69]📌 Overview
The Canonical Momenta Indicator models trend pressure using a Lagrangian-based momentum engine combined with reflexivity theory to detect bursts in price movement influenced by herd behavior and volume acceleration.
🧠 Features
Lagrangian-based kinetic model combining velocity and acceleration
Reflexivity burst detection with directional scoring
Adaptive momentum-weighted output (adaptiveCMI)
Buy 🐋 / Sell 🐻 labels when reflexivity confirms direction
Fully parameterized for customization
⚙️ How to Use
This indicator helps traders:
Detect reflexive bursts in market activity driven by sharp price movement + volume spikes
Capture herd-driven directional moves early.
Gauge market pressure using a kinetic-potential energy model.
Suggested signals:
🐋 Reflexive Up: Strong bullish momentum spike confirmed by volume and positive lagrangian pressure
🐻 Reflexive Down: Strong bearish dump confirmed by volume and negative lagrangian burst
🔧 Configuration
MA Lookback Length - Smoothing for baseline price & energy calculation
Reflexivity Momentum Threshold - Price momentum trigger for burst detection
Reflexivity Lookback - Period over which bursts are counted
Reflexivity Window - Minimum burst sum to trigger signal label
Volume Spike Threshold - % above average volume to qualify as burst
📊 Behavior Description
The indicator computes a Lagrangian energy:
Kinetic Energy = (velocity² + 0.5 * acceleration²)
Potential Energy = deviation from moving average (distance²)
Lagrangian = Potential − Kinetic (higher = overextension)
Then, reflexive bursts are triggered when:
Price is rising or falling over short window (burstMvmnt)
Volume is above average by a user-defined multiple
Each bar gets a burst score:
+1 for up-burst
−1 for down-burst
0 otherwise
⚠️ Risk Profile Based on Lookback Settings
Risk Level | Description | Recommended Lookback
🟥 High | Extremely sensitive to bursts, prone to false signals | 7–10
🟨 Moderate | Balanced reflexivity with trend confirmation | 11–20
🟩 Low | Filters out most noise, slower to react | 21+
🧪 Advanced Tips
Combine with moving average slope for trend filtering
Use divergence between adaptiveCMI and price to detect exhaustion
Works well in crypto, commodities, and volatile assets
⚠️ Limitations
Sensitive to high volatility noise if volMult is too low
Designed for higher timeframes (1H, 4H, Daily) for reliability
Doesn’t confirm direction in sideways markets — pair with other filters
📝 Disclaimer
This tool is provided for educational and informational purposes. Always do your own backtesting and use proper risk management.
EUR/USD Multi-Layer Statistical Regression StrategyStrategy Overview
This advanced EUR/USD trading system employs a triple-layer linear regression framework with statistical validation and ensemble weighting. It combines short, medium, and long-term regression analyses to generate high-confidence directional signals while enforcing strict risk controls.
Core Components
Multi-Layer Regression Engine:
Parallel regression analysis across 3 customizable timeframes (short/medium/long)
Projects future price values using prediction horizons
Statistical significance filters (R-squared, correlation, slope thresholds)
Signal Validation System:
Lookback validation tests historical prediction accuracy
Ensemble weighting of layer signals (adjustable influence per timeframe)
Confidence scoring combining statistical strength, layer agreement, and validation accuracy
Risk Management:
Position sizing scaled by signal confidence (1%-100% of equity)
Daily loss circuit breaker (halts trading at user-defined threshold)
Forex-tailored execution (pip slippage, percentage-based commissions)
Visual Intelligence:
Real-time regression line plots (3 layered colors)
Projection markers for short-term forecasts
Background coloring for market bias indication
Comprehensive statistics dashboard (R-squared metrics, validation scores, P&L)
Key Parameters
Category Settings
Regression Short/Med/Long lengths (20/50/100 bars)
Statistics Min R² (0.65), Correlation (0.7), Slope (0.0001)
Validation 30-bar lookback, 10-bar projection
Risk Controls 50% position size, 12% daily loss limit, 75% confidence threshold
Trading Logic
Entries require:
Ensemble score > |0.5|
Confidence > threshold
Short & medium-term significance
Active daily loss limit not breached
Exits triggered by:
Opposite high-confidence signals
Daily loss limit violation (emergency exit)
The strategy blends quantitative finance techniques with practical trading safeguards, featuring a self-optimizing design where signal quality directly impacts position sizing. The visual dashboard provides real-time feedback on model performance and market conditions.
Linear Regression Log Channel with 3 Standard Deviations, AlertsThis indicator plots a logarithmic linear regression trendline starting from a user-defined date, along with ±1, ±2, and ±3 standard deviation bands. It is designed to help you visualize long-term price trends and statistically significant deviations.
Features:
• Log-scale linear regression line based on price since the selected start date
• Upper and lower bands at 1σ, 2σ, and 3σ, with the 3σ bands dashed for emphasis
• Optional filled channels between deviation bands
• Dynamic label showing:
• Distance from regression (in %)
• Distance in standard deviations (σ)
• Current price and regression value
• Estimated probability (assuming normal distribution) that the price continues moving further in its current direction
• Built-in alerts when price crosses the regression line or any of the deviation bands
This tool is useful for:
• Identifying mean-reversion setups or stretched trends
• Estimating likelihood of further directional movement
• Spotting statistically rare price conditions (e.g., >2σ or >3σ)
Flying Submarine SincOrange Glowing Flying Submarine at Area 51. For Call Puts. Safety in SpaceForce.
Market to NAV Premium Arbitrage Alpha IndicatorBitcoin treasury companies such as Microstrategy are known for trading at significant premiums. but how big exactly is the premium? And how can we measure it in real time?
I developed this quantitative tool to identify statistical mispricings between market capitalization and net asset value (NAV), specifically designed for arbitrage strategies and alpha generation in Bitcoin-holding companies, such as MicroStrategy or Sharplink Gaming, or SPACs used primarily to hold cryptocurrencies, Bitcoin ETFs, and other NAV-based instruments. It can probably also be used in certain spin-offs.
KEY FEATURES:
✅ Real-time Premium/Discount Calculation
• Automatically retrieves market cap data from TradingView
• Calculates precise NAV based on underlying asset holdings (for example Bitcoin)
• Formula: (Market Cap - NAV) / NAV × 100
✅ Statistical Analysis
• Historical percentile rankings (customizable lookback period)
• Standard deviation bands (2σ) for extreme value detection (close to these values might be seen as interesting points to short or go long)
• Smoothing period to reduce noise
✅ Multi-Source Market Cap Detection
• You can add the ticker of the NAV asset, but if necessary, you can also put it manually. Priority system: TradingView data → Calculated → Manual override
✅ Advanced NAV Modeling
• Basic NAV: Asset holdings + cash.
• Adjusted NAV: Includes software business value, debt, preferred shares. If the company has a lot of this kind of intrinsic value, put it in the "cash" field
• Support for any underlying asset (BTC, ETH, etc.)
TRADING APPLICATIONS:
🎯 Pairs Trading Signals
• Long/Short opportunities when premium reaches statistical extremes
• Mean reversion strategies based on historical ranges
• Risk-adjusted position sizing using percentile ranks
🎯 Arbitrage Detection
• Identifies when market pricing significantly deviates from fair value
• Quantifies the magnitude of mispricing for profit potential
• Historical context for timing entry/exit points
CONFIGURATION OPTIONS:
• Underlying Asset: Any symbol (default: COINBASE:BTCUSD) NEEDS MANUAL INPUT
• Asset Quantity: Precise holdings amount (for example, how much BTC does the company currently hold). NEEDS MANUAL INPUT
• Cash Holdings: Additional liquid assets. NEEDS MANUAL INPUT
• Market Cap Mode: Auto-detect, calculated, or manual
• Advanced Adjustments: Business value, debt, preferred shares
• Display Settings: Lookback period, smoothing, custom colors
IT CAN BE USED BY:
• Quantitative traders focused on statistical arbitrage
• Institutional investors monitoring NAV-based instruments
• Bitcoin ETF and MSTR traders seeking alpha generation
• Risk managers tracking premium/discount exposures
• Academic researchers studying market efficiency (as you can see, markets are not efficient 😉)
🧪 Yuri Garcia Smart Money Strategy FULL (Slope Divergence))📣 Yuri Garcia – Smart Money Strategy FULL
This is my private Smart Money Concept strategy, designed for my family and community to learn, trade, and grow sustainably.
🔑 How it works:
✅ Volume Cluster Zones: Automatically detects areas where strong buyers or sellers concentrate, acting as dynamic S/R levels.
✅ HTF Institutional Zones (4H): Higher timeframe trend filter ensures you’re always trading in the direction of major flows.
✅ Wick Pullback Filter: Confirms price rejects the zone, catching smart money traps and reversals.
✅ Cumulative Delta (CVD): Confirms whether buyers or sellers are truly in control.
✅ Slope-Based Divergence: Optional hidden divergence between price & CVD to spot reversals others miss.
✅ ATR Dynamic SL/TP: Adapts stop loss and take profit to live volatility with adjustable risk/reward.
🧩 Visual Markers Explained:
🟦 Blue X: Price inside HTF zone
🟨 Yellow X: Price inside Volume Cluster zone
🟧 Orange Circle: Wick pullback detected
🟥 Red Square: CVD confirms order flow strength
🔼 Aqua Triangle Up: Bullish slope divergence
🔽 Purple Triangle Down: Bearish slope divergence
🟢 Green Triangle Up: Final Long Entry confirmed
🔴 Red Triangle Down: Final Short Entry confirmed
⚡ Who is this for?
This strategy is best suited for traders who understand smart money concepts, order flow, and want an adaptive framework to trade major assets like BTC, Gold, SP500, NASDAQ, or FX pairs.
🔒 Important
Use responsibly, backtest extensively, and combine with solid risk management. This is for educational purposes only.
✨ Credits
Built with ❤️ by Yuri Garcia – dedicated to my family & community.
✅ How to use it
1️⃣ Add to chart
2️⃣ Adjust inputs for your asset & timeframe
3️⃣ Enable/disable slope divergence filter to match your style
4️⃣ Set your alerts with built-in conditions
20-Day SMA BIAS%20-day Bias is a commonly used indicator in technical analysis. It is used to measure the gap between the stock price and its 20-day moving average to determine whether the stock price deviates from the normal state and whether there is an overbought or oversold phenomenon.
How to calculate the 20-day deviation value:
The calculation formula of the deviation rate is: ((closing price of the day - 20-day moving average price) / 20-day moving average price) * 100%.
Interpretation of 20-day deviation value:
Positive deviation rate:
Indicates that the stock price is higher than the 20-day moving average, which means that the stock price is high and may face correction pressure.
Negative deviation rate:
Indicates that the stock price is lower than the 20-day moving average, which means that the stock price is low and there may be a rebound opportunity.
Absolute value of the deviation rate:
The larger the absolute value, the higher the deviation of the stock price, and the higher the degree of overbought or oversold.
Apply the deviation rate to determine the buying and selling opportunities:
Positive deviation rate is too large:
When the positive deviation rate of the stock price from the 20-day moving average is too large, and the stock price is already at a high level, this may be a sell signal.
Negative deviation rate is too large:
When the negative deviation rate of the stock price from the 20-day moving average is too large, and the stock price is already at a low level, this may be a buy signal.
Stock price fluctuates around the moving average:
Stock price usually fluctuates around the moving average and adjusts after over-rising or over-falling.
Practical operation suggestions:
The standards of the market and individual stocks are different:
When the positive and negative deviation rate of the market and the quarterly line is greater than 5%, there is a greater chance of correction; large-cap stocks are between 5% and 10%; small and medium-sized stocks may be above 15% to 20%.
Combined with other indicators:
The deviation rate is only one of the technical analysis indicators. It is recommended to combine it with other indicators, such as KD indicators, RSI, etc., to make a comprehensive judgment and improve accuracy.
Reference to historical experience:
You can refer to the situation where the deviation rate of the stock was too large in the past to determine whether the current deviation rate is also too large.
Summary:
The 20-day deviation value is an indicator to determine whether the stock price is overbought or oversold, which can help investors determine the timing of buying and selling, but it needs to be combined with other indicators and historical data, and adjusted according to market conditions.
Quantum Harmonic Oscillator Overlay🧪 Quantum Harmonic Oscillator Overlay
A visual model of price behavior using quantum harmonic oscillation principles
📜 Indicator Overview
The Quantum Harmonic Oscillator Overlay applies concepts from both classical physics (harmonic motion) and quantum mechanics (energy states) to model and visualize how price orbits around a central trend line. It overlays a Linear Regression line (representing the “mean position” or ground state of price) and calculates surrounding energy levels (σ-zones) akin to quantum shells that price can "jump" between.
This indicator is particularly useful for visualizing mean reversion, volatility compression/expansion, and momentum-driven price breakthroughs.
🧠 Core Concepts
Linear Regression Line (LSR): This is the calculated center of gravity or equilibrium path of price over a user-defined period. Think of it like the lowest energy state or central axis around which price vibrates.
Standard Deviation Zones (σ-levels):
1σ: The majority of normal price activity; within this range, price tends to fluctuate if in balance.
2σ: Indicates volatility or possible breakout pressure.
3σ: Represents extreme movement — a phase shift in energy, potentially leading to reversal or continuation with higher momentum.
Quantum Analogy: Just like in a quantum harmonic oscillator, particles (here, prices) move probabilistically between discrete energy states. The further the price moves from the center, the more "energy" (momentum, volume, volatility) is implied.
⚙️ Input Parameters
Setting Description
Linear Regression Length The number of bars used to calculate the regression trend (default 100). Affects the central path and responsiveness.
σ Multipliers (1σ, 2σ, 3σ) Determine how far each band is from the regression line. Adjusting these can highlight different price behaviors.
Show Energy Level Zones Toggle visibility of the colored bands around the regression line.
Show LSR Center Line Toggles visibility of the white Linear Regression line itself.
🎨 Visual Components
Color Zone Interpretation
✅ Green ±1σ Normal oscillation / mean reversion area. Ideal for range-bound strategies.
🟧 Orange ±2σ Warning zone; price may be gaining momentum or volatility.
🔴 Red ±3σ High-momentum state or anomaly. These regions may imply trend exhaustion, reversals, or breakouts.
White Line: The LSR — the average trajectory of the price movement.
Pink Dots: Appear when price exceeds Zone 3 (outside ±3σ) — a signal of extreme behavior or a possible regime shift.
📈 How to Use This Indicator
1. Detect Overextensions
When price touches or breaches the 3σ zone, it is likely overextended. This can be used to anticipate potential snapbacks or strong breakout trends.
2. Identify Mean Reversion Trades
If price exits the 2σ or 3σ zones and returns toward the center line, this signals a likely mean reversion setup.
3. Volatility Compression or Expansion
Flat zones between σ levels suggest calm markets; widening bands suggest expanding volatility.
4. Use with Confirmation Tools
Combine with momentum oscillators (MACD, RSI) or volume-based signals to confirm reversals or continuation outside Zone 3.
🔮 Philosophical Note
This indicator embodies the metaphor that the market behaves like a quantum oscillator — price particles exist in a probabilistic field and jump between discrete zones of volatility and energy. Tracking these transitions allows the trader to see price behavior as rhythmic, wave-like, and multidimensional rather than purely linear.
Asset Premium/Discount Monitor📊 Overview
The Asset Premium/Discount Monitor is a tool for analyzing the relative value between two correlated assets. It measures when one asset is trading at a premium or discount compared to its historical relationship with another asset, helping traders identify potential mean reversion opportunities, or pairs trading opportunities.
🎯 Use Cases
Perfect for analyzing:
NASDAQ:MSTR vs CRYPTO:BTCUSD - MicroStrategy's premium/discount to Bitcoin
NASDAQ:COIN vs BITSTAMP:BTCUSD - Coinbase's relative value to Bitcoin
NASDAQ:TSLA vs NASDAQ:QQQ - Tesla's premium to tech sector
Regional banks AMEX:KRE vs AMEX:XLF - Individual bank stocks vs financial sector
Any two correlated assets where relative value matters
Example of a trade: MSTR vs BTC - When indicator shows MSTR at 95% percentile (extreme premium): Short MSTR, Buy BTC. Then exit when the spread reverts to the mean, say 40-60% percentile.
🔧 How It Works
Core Calculation
Ratio Analysis: Calculates the price ratio between your asset and the correlated asset
Historical Baseline: Establishes the "normal" relationship using a 252-day moving average. You can change this.
Premium Measurement: Measures current deviation from historical average as a percentage
Statistical Context: Provides percentile rankings and standard deviation bands
The Math
Premium % = (Current Ratio / Historical Average Ratio - 1) × 100
🎨 Customization Options
Correlated Asset: Choose any symbol for comparison
Lookback Period: Adjust historical baseline (50-1000 days)
Smoothing: Reduce noise with moving average (1-50 days)
Visual Toggles: Show/hide bands and percentile lines
Color Themes: Customize premium/discount colors
📊 Interpretation Guide
Premium/Discount Reading
Positive %: Asset trading above historical relationship (premium)
Negative %: Asset trading below historical relationship (discount)
Near 0%: Asset at fair value relative to correlation
Percentile Ranking
90%+: Near recent highs - potential selling opportunity
10% and below: Near recent lows - potential buying opportunity
25-75%: Normal trading range
Signal Classifications
🔴 SELL PREMIUM: Asset expensive relative to recent range
🟡 Premium Rich: Moderately expensive, monitor for reversal
⚪ NEUTRAL: Fair value territory
🟡 Discount Opportunity: Moderately cheap, potential accumulation zone
🟢 BUY DISCOUNT: Asset cheap relative to recent range
🚨 Built-in Alerts
Extreme Premium Alert: Triggers when percentile > 95%
Extreme Discount Alert: Triggers when percentile < 5%
⚠️ Important Notes
Works best with highly correlated assets
Historical relationships can change - monitor correlation strength
Not investment advice - use as one factor in your analysis
Backtest thoroughly before implementing any strategy
🔄 Updates & Future Features
This indicator will be continuously improved based on user feedback. So... please give me your feedback!
Logistic Regression ICT FVG🚀 OVERVIEW
Welcome to the Logistic Regression Fair Value Gap (FVG) System — a next-gen trading tool that blends precision gap detection with machine learning intelligence.
Unlike traditional FVG indicators, this one evolves with each bar of price action, scoring and filtering gaps based on real market behavior.
🔧 CORE FEATURES
✨ Smart Gap Detection
Automatically identifies bullish and bearish Fair Value Gaps using volatility-aware candle logic.
📊 Probability-Based Filtering
Uses logistic regression to assign each gap a confidence score (0 to 1), showing only high-probability setups.
🔁 Real-Time Retest Tracking
Continuously watches how price interacts with each gap to determine if it deserves respect.
📈 Multi-Factor Assessment
Evaluates RSI, MACD, and body size at gap formation to build a full context snapshot.
🧠 Self-Learning Engine
The logistic regression model updates on each bar using gradient descent, refining its predictions over time.
📢 Built-In Alerts
Get instant alerts when a gap forms, gets retested, or breaks.
🎨 Custom Display Options
Control the color of bullish/bearish zones, and toggle on/off probability labels for cleaner charts.
🚩 WHAT MAKES IT DIFFERENT
This isn’t just another box-drawing indicator.
While others mark every imbalance, this system thinks before it draws — using statistical modeling to filter out noise and prioritize high-impact zones.
By learning from how price behaves around gaps (not just how they form), it helps you trade only what matters — not what clutters.
⚙️ HOW IT WORKS
1️⃣ Detection
FVGs are identified using ATR-based thresholds and sharp wick imbalances.
2️⃣ Behavior Monitoring
Every gap is tracked — and if respected enough times, it becomes part of the elite training set.
3️⃣ Context Capture
Each new FVG logs RSI, MACD, and body size to provide a feature-rich context for prediction.
4️⃣ Prediction (Logistic Regression)
The model predicts how likely the gap is to be respected and assigns it a probability score.
5️⃣ Classification & Alerts
Gaps above the threshold are plotted with score labels, and alerts trigger for entry/respect/break.
⚙️ CONFIGURATION PANEL
🔧 System Inputs
• Max Retests – How many times a gap must be respected to train the model
• Prediction Threshold – Minimum score to show a gap on the chart
• Learning Rate – Controls how fast the model adapts (default: 0.009)
• Max FVG Lifetime – Expiration duration for unused gaps
• Show Historic Gaps – Show/hide expired or invalidated gaps
🎨 Visual Options
• Bullish/Bearish Colors – Set gap colors to fit your chart style
• Confidence Labels – Show probability scores next to FVGs
• Alert Toggles – Enable alerts for:
– New FVG detected
– FVG respected (entry)
– FVG invalidated (break)
💡 WHY LOGISTIC REGRESSION?
Traditional FVG tools rely on candle shapes.
This system relies on probability — by training on RSI, MACD, and price behavior, it predicts whether a gap will act as a true liquidity zone.
Logistic regression lets the system continuously adapt using new data, making it more accurate the longer it runs.
That means smarter signals, fewer false positives, and a clearer view of where real opportunities lie.
Momentum Regression [BackQuant]Momentum Regression
The Momentum Regression is an advanced statistical indicator built to empower quants, strategists, and technically inclined traders with a robust visual and quantitative framework for analyzing momentum effects in financial markets. Unlike traditional momentum indicators that rely on raw price movements or moving averages, this tool leverages a volatility-adjusted linear regression model (y ~ x) to uncover and validate momentum behavior over a user-defined lookback window.
Purpose & Design Philosophy
Momentum is a core anomaly in quantitative finance — an effect where assets that have performed well (or poorly) continue to do so over short to medium-term horizons. However, this effect can be noisy, regime-dependent, and sometimes spurious.
The Momentum Regression is designed as a pre-strategy analytical tool to help you filter and verify whether statistically meaningful and tradable momentum exists in a given asset. Its architecture includes:
Volatility normalization to account for differences in scale and distribution.
Regression analysis to model the relationship between past and present standardized returns.
Deviation bands to highlight overbought/oversold zones around the predicted trendline.
Statistical summary tables to assess the reliability of the detected momentum.
Core Concepts and Calculations
The model uses the following:
Independent variable (x): The volatility-adjusted return over the chosen momentum period.
Dependent variable (y): The 1-bar lagged log return, also adjusted for volatility.
A simple linear regression is performed over a large lookback window (default: 1000 bars), which reveals the slope and intercept of the momentum line. These values are then used to construct:
A predicted momentum trendline across time.
Upper and lower deviation bands , representing ±n standard deviations of the regression residuals (errors).
These visual elements help traders judge how far current returns deviate from the modeled momentum trend, similar to Bollinger Bands but derived from a regression model rather than a moving average.
Key Metrics Provided
On each update, the indicator dynamically displays:
Momentum Slope (β₁): Indicates trend direction and strength. A higher absolute value implies a stronger effect.
Intercept (β₀): The predicted return when x = 0.
Pearson’s R: Correlation coefficient between x and y.
R² (Coefficient of Determination): Indicates how well the regression line explains the variance in y.
Standard Error of Residuals: Measures dispersion around the trendline.
t-Statistic of β₁: Used to evaluate statistical significance of the momentum slope.
These statistics are presented in a top-right summary table for immediate interpretation. A bottom-right signal table also summarizes key takeaways with visual indicators.
Features and Inputs
✅ Volatility-Adjusted Momentum : Reduces distortions from noisy price spikes.
✅ Custom Lookback Control : Set the number of bars to analyze regression.
✅ Extendable Trendlines : For continuous visualization into the future.
✅ Deviation Bands : Optional ±σ multipliers to detect abnormal price action.
✅ Contextual Tables : Help determine strength, direction, and significance of momentum.
✅ Separate Pane Design : Cleanly isolates statistical momentum from price chart.
How It Helps Traders
📉 Quantitative Strategy Validation:
Use the regression results to confirm whether a momentum-based strategy is worth pursuing on a specific asset or timeframe.
🔍 Regime Detection:
Track when momentum breaks down or reverses. Slope changes, drops in R², or weak t-stats can signal regime shifts.
📊 Trade Filtering:
Avoid false positives by entering trades only when momentum is both statistically significant and directionally favorable.
📈 Backtest Preparation:
Before running costly simulations, use this tool to pre-screen assets for exploitable return structures.
When to Use It
Before building or deploying a momentum strategy : Test if momentum exists and is statistically reliable.
During market transitions : Detect early signs of fading strength or reversal.
As part of an edge-stacking framework : Combine with other filters such as volatility compression, volume surges, or macro filters.
Conclusion
The Momentum Regression indicator offers a powerful fusion of statistical analysis and visual interpretation. By combining volatility-adjusted returns with real-time linear regression modeling, it helps quantify and qualify one of the most studied and traded anomalies in finance: momentum.
Navy Seal Trading - EdgarTrader📌 Navy Seal Trading – Asia, London, and NY Sessions
This indicator clearly displays the ranges of the Asia, London, and New York sessions, featuring:
✅ Full range visualization for each session
✅ Asia session high, low, and midline, with extended projection lines for precise reaction analysis
✅ Clean, minimalistic, and professional colors to keep your chart focused
🔷 Designed for the Navy Seal Trading community, focused on precision, discipline, and professional execution in the markets.
Use it to:
✔️ Mark liquidity zones
✔️ Identify Asia manipulation ranges
✔️ Prepare executions in London and NY with clear context
💡 Remember: Clarity in your zones gives you the confidence and discipline to execute like a true Navy Seal Trader.
Iceberg DetectorThis Pine-script indicator helps you spot potential “iceberg” order activity by highlighting bars where volume spikes well above its average while price movement remains unusually muted. It’s purely a heuristic—no true bid/ask or futures order‐flow data is used—so treat every signal as an invitation to investigate, not as a standalone buy/sell trigger.
How It Works • Volume vs. Volume-SMA: The script compares each bar’s total volume to an N-bar simple moving average. • Price Movement vs. Movement-SMA: It measures the bar’s percent change (|close–open|/open×100) against its own N-bar SMA. • Sensitivity Slider: From 1 (loose filter) to 10 (strict filter), you control how extreme the volume spike (and muted move) must be to fire a signal. • Pivot-Style Extremes Filter: Short signals only appear when price is at or very near a recent local high, and long signals only when price is at or very near a recent local low. This dramatically cuts down “noise” on lower timeframes—script execution halts on intraday charts below 1 H.
How to Use
Apply to an hourly (or higher) chart.
Tweak “Length” parameters for your preferred look-back on volume and movement SMAs.
Adjust “Sensitivity” from 1 (more signals, weaker divergences) up to 10 (very rare, extreme divergences).
Watch for red triangles above bars (Iceberg-Short) and green triangles below (Iceberg-Long).
Important Disclaimers • This is NOT a genuine order-flow or footprint tool—it only approximates delta by bar direction. • Always contextualize Short signals near the lower end of a range or support zone, and Long signals near the upper end of a range or resistance zone. • Use additional confirmation (price patterns, larger-timeframe pivots, traditional volume/price analysis) before risking real capital.
By combining volume spikes with muted price action at range extremes, you gain a fresh lens on where hidden large orders might be lurking—without needing a dedicated order-flow feed. Use it as an idea‐generator, not as gospel