Algorithmic Regime Classifier - Lovable Chart**Join our Discord community for further discussion, updates, and help:**
discord.gg
---
### **Algorithmic Regime Classifier (Market Regime Scanner Pro)**
The **Algorithmic Regime Classifier** is a comprehensive, all-in-one market intelligence system designed to remove the noise from your charts. By combining volatility, momentum, volume, and multi-timeframe analysis, this indicator identifies the specific "Regime" the market is currently in—helping you trade *with* the flow rather than against it.
From detecting "Master Pattern" squeezes to identifying institutional order blocks and volume spikes, this tool acts as your automated trading analyst.
---
### **🌟 Key Features**
#### **1. Market Regime Detection (The Core Engine)**
The indicator automatically classifies price action into clear color-coded phases, removing analysis paralysis:
* **🔵 Contraction (Blue):** The "Squeeze." Volatility is low, and energy is building. *Strategy: Wait for the breakout.*
* **🟨 Expansion (Yellow):** The "Breakout." Volatility is expanding rapidly from a squeeze.
* **🟩 Strong Uptrend (Green):** Confirmed bullish trend with volume and ADX support.
* **🟥 Strong Downtrend (Red):** Confirmed bearish trend with volume and ADX support.
* **⬜ Normal/Weak Range:** Low probability choppy zones.
#### **2. 🤖 AI Smart Companion**
A unique text-based assistant located on your chart that interprets all data points in real-time. It provides:
* **Current Status:** (e.g., "MASTER PATTERN: CONTRACTION")
* **Actionable Advice:** (e.g., *"Value building in progress. STAY FLAT."* or *"Institutional Entry Detected! Trail stops."*)
* **Visual Confidence:** Changes color based on the strength of the setup (Green for Go, Purple for Trap, Blue for Wait).
#### **3. Multi-Timeframe (MTF) Bias Dashboard**
Don't trade in a vacuum. The pro dashboard analyzes **Trend, Money Flow, Momentum, Volume, and Volatility** across timeframes ranging from **1 minute to Monthly**.
* **Confluence Check:** Calculates a composite score to tell you if "Buyers are in Control" or if there are "Mixed Signals."
* **Anchoring:** Checks higher timeframes to ensure you aren't scalping against a massive trend.
#### **4. Smart Money Concepts (SMC) & Structure**
* **Order Blocks:** Automatically plots Bullish and Bearish order blocks based on consolidation and volume breakouts. Includes mitigation logic (blocks disappear when price tests them).
* **Support & Resistance:** Dynamic pivot-based S/R levels that track when zones are tested and broken.
#### **5. Quant Delta Volume Bubbles**
Detects hidden institutional activity using statistical Z-Scores.
* **Momentum Events:** Large aggressive buying/selling.
* **Absorption:** Passive limit orders absorbing aggressive market orders (often marks reversals).
* **Ghost Lines:** Visualizes where large liquidity entered the market, acting as future defense levels.
#### **6. VIX Exhaustion Signals**
Uses a calculated "Fear Index" (Williams Vix Fix) combined with Bollinger Bands to identify market bottoms and top-exhaustion points.
* **Signals:** High-contrast arrows and labels indicating potential reversals when price is overextended.
---
### **🛠️ How to Trade This System**
**The "Master Pattern" Strategy:**
1. **Wait for Blue (Contraction):** Look for the blue background and "Squeeze" signals. This indicates energy storage.
2. **Await the Breakout:** Watch for the transition to **Yellow (Expansion)** or **Green/Red (Trend)**.
3. **Confirm with AI & MTF:** Check the AI Companion text. If it says "IGNITION" and the MTF Dashboard shows alignment (e.g., Buyers in Control), enter the trade.
4. **Target:** Use the generated Support/Resistance lines or Order Blocks as take-profit targets.
---
### **Settings & Customization**
* **Regime Sensitivity:** Adjust the Contraction/Expansion factors to fit your asset's volatility.
* **Dashboard Positioning:** Move the AI Companion and MTF tables to any corner of the screen to fit your layout.
* **Visuals:** Toggle specific features (Order Blocks, Bubbles, S/R) on or off to keep your chart clean.
---
**Disclaimer:**
*This indicator is for educational and analytical purposes only. Past performance does not guarantee future results. Always manage your risk.*
Forecasting
Apex Wallet - Lorentzian Classification: Adaptive Signal SuiteOverview The Apex Wallet Lorentzian Classification is a high-performance signal engine that utilizes an adaptive multi-feature approach to identify high-probability entry points. It synthesizes five distinct technical features—RSI, CCI, ADX, MFI, and ROC—to calculate a weighted trend bias.
Dynamic Adaptation The core strength of this indicator is its ability to automatically recalibrate its internal periods based on your selected Trading Mode.
Scalping: Uses ultra-fast periods (e.g., RSI 7, ADX 10) for quick reaction on 1m to 5m charts.
Day-Trading: Balanced settings (e.g., RSI 14, ADX 14) optimized for 15m to 1h timeframes.
Swing-Trading: Smooth, long-term filters (e.g., RSI 21, ADX 20) to capture major market shifts.
Logic & Signal Flow
Feature Extraction: The script calculates five momentum and volatility features using the current close price.
Signal Summation: Each feature contributes to a global signal score based on established technical thresholds.
EMA Smoothing: The raw signal is processed through an EMA filter to eliminate market noise and false breakouts.
Execution: Clear BUY and SELL labels are printed directly on the chart when the smoothed score crosses specific conviction levels.
Key Features:
Zero-Configuration: No need to manually adjust lengths; simply pick your trading style.
Clean Visuals: High-fidelity labels (BUY/SELL) with integrated alert conditions for automation.
Prop-Firm Ready: Ideal for traders needing fast confirmation for high-conviction trades.
LINHFX Bull Bear DivergenceBull Bear Divergence is a momentum-based indicator designed to analyze bullish and bearish strength and identify divergence between price action and market momentum.
It helps traders detect:
Bullish divergence (potential upside reversal)
Bearish divergence (potential downside reversal)
Shifts in buying and selling pressure
This indicator is ideal for Price Action, Smart Money Concept (SMC), intraday and swing trading, and works across multiple timeframes and markets such as Forex, Gold, Crypto, and Indices.
Best used in combination with market structure, key levels, and risk manageme
LinhFX Bull Bear Divergence 2.0 Bull Bear Divergence is a momentum-based indicator designed to analyze bullish and bearish strength and identify divergence between price action and market momentum.
It helps traders detect:
Bullish divergence (potential upside reversal)
Bearish divergence (potential downside reversal)
Shifts in buying and selling pressure
This indicator is ideal for Price Action, Smart Money Concept (SMC), intraday and swing trading, and works across multiple timeframes and markets such as Forex, Gold, Crypto, and Indices.
Best used in combination with market structure, key levels, and risk manageme
Custom Daily POC with Date LabelsThis indicator provides a clear view of today's control levels in relation to the point of control from previous days, revealing where the big whales are navigating and manipulating the market.
It's a simple yet genius tool...
Advanced kNN Target Price and TimeDeliver Target Price, Target Price probability and time to reach.
Machine Learning Based.
Eccodax Robust k-NN Machine Learning LorentzianHere is the complete, final, corrected, and clean code, already including:
✅ Fixed shadowing of the variable d
✅ No compilation warnings
✅ No temporal leaks
✅ Target = real future return
✅ Robust Lorentzian distance
✅ Correct Matrix structure
✅ Consistent feature engineering
✅ Min-Max normalization
✅ Weighted k-NN inference
✅ Correct price reconstruction
1. What this code is
It is a predictive indicator based on classic Machine Learning (k-Nearest Neighbors), fully implemented in PineScript v6, designed to:
Learn historical market patterns
Compare the current state with similar past states
Estimate the expected future price movement
Reconstruct a projected price consistent with the current level
It is not an oscillator, it is not a traditional technical indicator, and it does not react only to the immediate past.
2. What the Model Learns (Supervised Learning)
2.1 Features (Input Variables)
The model uses three dimensions of information, all normalized by Z-score:
Return
Measures the percentage change in price
Captures the immediate momentum of the market
Momentum (ROC)
Measures acceleration or deceleration of the movement
Differentiates trends from consolidations
Volatility
Measures the degree of market uncertainty
Adjusts the weight of strong movements vs. noise
These three variables form a market state vector.
2.2 Normalization (Z-Score)
Each feature is converted to:
Mean ≈ 0
Standard deviation ≈ 1
This ensures that:
No variable dominates the distance
The statistical comparison is valid
The model is stable in different price regimes
2.3 Target (Predicted Variable)
The model does not predict absolute price. It learns:
Observed future return after forecastBars
That is:
Learns movement, not level
Eliminates historical bias
Avoids predictions inconsistent with the current price
3. How the model makes the prediction
3.1 Search for similar patterns (k-NN)
For each current candle, the model:
Analyzes the last lookback candles
Calculates the Euclidean distance between the current state and each past state
Selects the k most similar states
Observes what happened after them
3.2 Inference
The predicted return is calculated as:
Weighted average of the future returns of the neighbors
Weights inversely proportional to the distance
More similar states → greater influence.
4. Price Reconstruction (Key Information)
From the predicted return, the model reconstructs:
Predicted Price = Current Close × (1 + Predicted Return)
Predicted Price = Current Close × (1 + Predicted Return)
This ensures that:
The forecast respects the current market level
The output is visually interpretable
There is no regression to past regimes
5. Relevant Information the Indicator Delivers
5.1 Predicted Price (Green Line)
What it is: Estimated price after forecastBars.
How to use:
Above the current price → bullish bias
Below → bearish bias
Large distance → expectation of strong movement
5.2 Predicted Return (Implicit)
Even though not plotted directly, it is the most important information in the model.
Positive → expectation of appreciation
Negative → expectation of decline
Negative → expectation of decline
Near zero → sideways market
5.3 Directional Classification (optional)
The model also acts as a binary classifier:
High if expected return > 0
Low if expected return < 0
This is used as:
Noise filter
Trend confirmation
False signal reduction
5.4 Implicit statistical context
The indicator carries information that is not visual, but is fundamental:
Market regime (trending vs. sideways)
Statistical similarity with the past
Relative confidence (via distance from neighbors)
6. What this indicator does NOT do
It is important to align expectations:
❌ Does not predict exogenous events
❌ Does not anticipate gaps
❌ Does not work well on illiquid assets
❌ Does not extrapolate long trends
k-NN replicates patterns, does not create scenarios Unprecedented.
7. Where this model works best
Markets with repetitive structure
Medium timeframes (5m – 1D)
Liquid assets
Environments with alternating regimes
8. How to use it in practice (professional recommendation)
Ideal use:
k-NN direction → bias
Technical indicator → timing
Risk management → execution
Never use it in isolation for entry.
9. Executive summary
This code delivers:
A functional supervised ML model in Pine
Prediction consistent with the current price
Statistical market direction
Reduction of historical bias
Solid foundation for quantitative strategies
Eccodax Advanced kNN Lorentziano Matrix1. What this code is
It is a predictive indicator based on classic Machine Learning (k-Nearest Neighbors), fully implemented in PineScript v6, designed to:
Learn historical market patterns
Compare the current state with similar past states
Estimate the expected future price movement
Reconstruct a projected price consistent with the current level
It is not an oscillator, it is not a traditional technical indicator, and it does not react only to the immediate past.
2. What the Model Learns (Supervised Learning)
2.1 Features (Input Variables)
The model uses three dimensions of information, all normalized by Z-score:
Return
Measures the percentage change in price
Captures the immediate momentum of the market
Momentum (ROC)
Measures acceleration or deceleration of the movement
Differentiates trends from consolidations
Volatility
Measures the degree of market uncertainty
Adjusts the weight of strong movements vs. noise
These three variables form a market state vector.
2.2 Normalization (Z-Score)
Each feature is converted to:
Mean ≈ 0
Standard deviation ≈ 1
This ensures that:
No variable dominates the distance
The statistical comparison is valid
The model is stable in different price regimes
2.3 Target (Predicted Variable)
The model does not predict absolute price. It learns:
Observed future return after forecastBars
That is:
Learns movement, not level
Eliminates historical bias
Avoids predictions inconsistent with the current price
3. How the model makes the prediction
3.1 Search for similar patterns (k-NN)
For each current candle, the model:
Analyzes the last lookback candles
Calculates the Euclidean distance between the current state and each past state
Selects the k most similar states
Observes what happened after them
3.2 Inference
The predicted return is calculated as:
Weighted average of the future returns of the neighbors
Weights inversely proportional to the distance
More similar states → greater influence.
4. Price Reconstruction (Key Information)
From the predicted return, the model reconstructs:
Predicted Price = Current Close × (1 + Predicted Return)
Predicted Price = Current Close × (1 + Predicted Return)
This ensures that:
The forecast respects the current market level
The output is visually interpretable
There is no regression to past regimes
5. Relevant Information the Indicator Delivers
5.1 Predicted Price (Green Line)
What it is: Estimated price after forecastBars.
How to use:
Above the current price → bullish bias
Below → bearish bias
Large distance → expectation of strong movement
5.2 Predicted Return (Implicit)
Even though not plotted directly, it is the most important information in the model.
Positive → expectation of appreciation
Negative → expectation of decline
Negative → expectation of decline
Near zero → sideways market
5.3 Directional Classification (optional)
The model also acts as a binary classifier:
High if expected return > 0
Low if expected return < 0
This is used as:
Noise filter
Trend confirmation
False signal reduction
5.4 Implicit statistical context
The indicator carries information that is not visual, but is fundamental:
Market regime (trending vs. sideways)
Statistical similarity with the past
Relative confidence (via distance from neighbors)
6. What this indicator does NOT do
It is important to align expectations:
❌ Does not predict exogenous events
❌ Does not anticipate gaps
❌ Does not work well on illiquid assets
❌ Does not extrapolate long trends
k-NN replicates patterns, does not create scenarios Unprecedented.
7. Where this model works best
Markets with repetitive structure
Medium timeframes (5m – 1D)
Liquid assets
Environments with alternating regimes
8. How to use it in practice (professional recommendation)
Ideal use:
k-NN direction → bias
Technical indicator → timing
Risk management → execution
Never use it in isolation for entry.
9. Executive summary
This code delivers:
A functional supervised ML model in Pine
Prediction consistent with the current price
Statistical market direction
Reduction of historical bias
Solid foundation for quantitative strategies
Relevant information provided by this code
1. Forecasted price (line)
Statistical projection consistent with the current level
Based on similar historical patterns
2. Implicit direction
Return > 0 → bullish bias
Return < 0 → bearish bias
3. Structural robustness
Lower sensitivity to outliers
Lower scale bias
Better adaptation to different regimes
This refactored version introduces significant improvements based on modern quantitative Machine Learning practices (similar to those found in jdehorty's "Lorentzian Classification" indicator):
Lorentzian Distance: Replaces the Euclidean distance (which is affected by noise and outliers) with Lorentzian Distance, which is much more robust for financial markets.
Matrix Structure: Uses the matrix object in Pine V6 to manage training data more efficiently and cleanly than loose arrays.
Feature Engineering (WaveTrend & RSI): Replaces simple Momentum with normalized indicators (RSI, WaveTrend, CCI, ADX), better capturing market dynamics.
Min-Max Normalization: Features are normalized on a 0-100 scale so that indicators with different magnitudes do not distort the distance calculation.
Inverse Distance Weighting: Instead of a simple average, the nearest neighbors (most similar) have greater weight in the prediction.
VSA 2.0ENG
VSA 2.0 is a next-generation Volume Spread Analysis based on tick volume and price behavior, stripped of classical rules and indicators.
It focuses on context, effort vs result, and institutional intent, filtering retail noise to read what smart money is doing, not what textbooks say.
Follow me on YOUTUBE and Telegram!
BehindTheScalper
ETH&BTCThis script is a streamlined trend-following strategy designed specifically for major crypto pairs like ETH and BTC.
It eliminates the noise by using a hardcoded, "black box" logic that combines Price Action with Trend Momentum. Instead of relying on lagging indicators alone, it analyzes market structure, volume flows, and directional strength to identify high-probability entry points.
Minimalist Integrated Trading[WuYaa]图表出现信号后看大时间框架趋势是否一致
例:15分钟出现信号,看1小时或4小时趋势是否与15分钟框架一致
After a signal appears on the chart, check whether the trend on a larger timeframe is consistent.
For example: if a signal appears on the 15-minute chart, check whether the trend on the 1-hour or 4-hour chart is consistent with the 15-minute timeframe.
SPY / DIA Divergence Z-Score (30s Optimized)SPY / DIA Divergence Z-Score (30s Optimized) is a short-term relative strength indicator designed for opening-range mean reversion trading.
This script measures normalized return divergence between SPY and DIA, converts it into a Z-score, and highlights statistically extreme conditions where short-term reversion is more likely to occur.
Key characteristics:
Optimized specifically for the 30-second timeframe
Uses EMA-smoothed returns to reduce microstructure noise
Focuses on divergence and reversion, not trend-following
Includes a session filter targeting the early NYSE open
Designed as a decision-support tool, not an automated strategy
Intended use:
Best used between 9:32–9:45 ET
Works best when combined with VWAP and price action
Signals indicate potential exhaustion and reversion zones, not guaranteed entries
Important notes:
No trade entries or exits are provided
No repainting
Not financial advice
Meant for discretionary traders who understand execution risk on lower timeframes
This indicator is most effective when used with disciplined risk management and strict time-of-day constraints.
How to Use:
Apply the indicator to a 30-second chart (designed for 30s only)
Trade only during the early NYSE session (approx. 9:32–9:45 ET)
Watch for Z-Score extremes beyond the upper or lower thresholds
Look for stalling behavior (loss of momentum) at extreme readings
Use in confluence with VWAP and price action for confirmation
Signals highlight potential mean-reversion zones, not automatic entries
Use tight risk management and avoid overtrading
Disclaimer:
This script is provided for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or trade signals. Past performance is not indicative of future results. Use at your own risk.
Gold Premium Histogram
Compares Altins1 to gram gold in turkish lira to see the deviation and suggesting when to arbitrage
Altcoins Buy&Sell 1h tw: stoova0This strategy is designed for Altcoins on the 1H timeframe. It includes hardcoded filters based on specific user requirements. To set an alert, simply open the chart, select the indicator, and choose 'Any alert() function call' from the options.
BTC Buy&Sell 1h tw: stoova0Twitter: stoova0
This works exclusively on the BTC 1h chart. It is recommended to use the OKX exchange chart (specifically BtcUsdt.p) for analysis and trading. To set an alert, simply open the chart, select the indicator, and choose 'Any alert() function call' from the options.
reddddicatorStrategy: Sell 0dte TVC:SPX credit spreads beyond the upper and lower levels.
Time frame: 15min
Session-Anchored Volatility Expansion Bands
reddddicator is a session-aware volatility expansion framework designed to model next-session price dispersion using a multi-day realized range aggregation with custom normalization.
The indicator does not rely on ATR, ADR, standard deviation bands, or moving-average–based volatility estimators. Instead, it derives projected price boundaries from completed daily range realizations , selectively anchored to the most recent fully confirmed daily close based on session state.
Conceptual Methodology (High-Level)
The model samples a fixed window of completed daily high-low ranges.
These ranges are aggregated and normalized using a non-standard divisor , intentionally reducing sensitivity to single-day volatility spikes.
The resulting expansion value is anchored to the last confirmed daily settlement , dynamically determined based on whether the current trading session is open or closed.
Symmetric forward-projected upper and lower volatility bands are plotted and extended into the next session.
This approach is designed to reflect realized volatility expansion tendencies , rather than implied volatility or trend continuation.
Analytical Purpose
The projected bands function as statistical excursion boundaries, intended to identify areas where price extension risk asymmetrically increases.
The indicator is particularly suited for:
Short-duration options frameworks (e.g., TVC:SPX 0DTE credit spreads)
Mean-reversion and volatility exhaustion studies
Contextual risk placement rather than directional forecasting
reddddicator does not generate trade signals and should be used as a volatility reference layer, in conjunction with the user’s own execution logic and risk controls.
Timeframe & Instrument Scope
Calculations are derived from daily market data
Display is optimized for intraday charting
Most effective on liquid index products (e.g., SP:SPX SPX), but adaptable to other instruments
This script does not reproduce ATR, ADR, Bollinger Bands, or any publicly available volatility indicator. While it uses daily range data as an input, the aggregation, normalization, and session-aware anchoring logic are custom implementations developed by the author and are not derived from open-source TradingView scripts or educational materials.
Disclaimer
This indicator is provided for educational and analytical purposes only. It does not constitute financial advice, trade recommendations, or investment guidance. Past behavior of volatility or price expansion does not guarantee future outcomes. Users are solely responsible for their trading decisions, position sizing, and risk management.
BTC RiskThe BTC Risk Metric is a normalized market-cycle indicator designed to quantify how risky Bitcoin is to buy or hold at any point in time relative to its own historical behaviour.
It measures how far price has deviated from its long-term trend by calculating the logarithmic distance between Bitcoin’s price and a long-duration moving average (a 377-day simple moving average), then scales that distance by time to account for Bitcoin’s exponential growth.
This raw value is tracked against its historical extremes and normalized into a 0–1 range, where values near zero correspond to deep, low-risk accumulation zones typically seen around major cycle bottoms, and values near one correspond to high-risk conditions historically associated with late-cycle tops. Rather than predicting price, the metric provides a relative, regime-aware framework for assessing risk across cycles, allowing different market phases to be compared on a consistent scale.
Monte Carlo Option Forecast [Lite]Turn your chart into a Quantitative Trading Terminal.
Forget linear predictions. The market is driven by probability. Montecarlo Option Forecast leverages 2,000+ Monte Carlo simulations to model future price paths, assess volatility, and calculate the "fair" mathematical value of options directly on your chart.
This tool doesn't just tell you where the price might go—it visualizes the probability distribution (The Fan) and the most likely deterministic path (The Neon Line) to help you find a mathematical edge.
🔥 Key Features
1. 🧠 Smart Simulation Engine
3 Calculation Modes:
Historical (Raw): For trending assets (uses past returns).
Stationary (Flat): For ranging markets (random walk).
Ensemble: A balanced 50/50 mix.
Neon Line: A dynamic forecast line that visualizes the projected path based on your settings.
2. 🧲 Magnet Mechanics (Mean Reversion)
Markets tend to return to the mean. Adjust the Magnet Strength to simulate trends decaying or prices pulling back to fair value over time.
3. 📊 Option Desk (ATM Edition)
An embedded terminal that calculates theoretical option values (Call/Put) based on your simulations.
MC vs. Black-Scholes: Compares your custom Monte Carlo valuation against standard models to find edge.
Kelly Criterion: Suggests position sizing based on probability.
Smart Markers: ⌖ (Spot Price) and ★ (Forecast Target).
Note: This Lite edition is optimized for At-The-Money (ATM) analysis. Deep OTM strikes and wide steps are available in the PRO version.
4. 🏆 The Judge (Backtester)
The script constantly "judges" itself by running backtests on past data. It displays honest accuracy stats (Win Rate, Error %, Drift) to help you calibrate the model.
BTC Trend Forecast (Trend-Follow + Reversal)This indicator should only be used on Bitcoin. Be careful if you use it for other coins. I suggest looking at the 1-hour candlestick chart.
Top / Bottom Indicator v69Built in TA uses multiple signals to predict tops and bottoms based on a high confidence score. Longer runs followed by retracements that signify a reversal are also indicated. Buy and sell signals are displayed and best to use "on candle close" to confirmation. Designed for day trading on auto trading with automatic alerts at 2:50 CST to close out all open positions.
SOL HTF Fib levelsJust marked the HTF fib levels on SOL, best asset to trade, don't use it for other assets
Multi-Timeframe Stochastic RSI (Daily + Weekly)View the Daily and Weekly Stochastic RSI together on any timeframe to see how they oscillate






















