Nasan Market Phase ClassifierThe Nasan Market Phase Classifier indicator designed to classify market phases using volume, volatility (or momentum), and statistical analysis. Here's a summary of how it works and what it does:
🔍 Core Concept
This indicator classifies the market into four phases based on volume and ATR (or optionally momentum):
High Volume / High ATR or Momentum (HV/HATR): Strong Trend
Low Volume / High ATR or Momentum (LV/HATR): False Breakout / Exhaustion
High Volume / Low ATR or Momentum (HV/LATR): Consolidation
Low Volume / Low ATR or Momentum (LV/LATR): Stagnation
⚙️ Key Settings
Short-Term Length: Used for the active market phase.
Long-Term Length: Used as the expected/benchmark distribution.
Use Momentum: Replaces volatility (ATR) with momentum (custom ROC-based formula).
Use Fixed Alpha: Toggles adaptive vs. fixed weighting in scoring (this is based on variation of the volatility - standard deviation of true range).
📊 How It Works
Volatility or Momentum Scoring:
Uses ATR-based or Momentum-based score depending on the setting.
Applies weighing (alpha) which is based on variability of the volatility itself.
Market Phase Count:
Measures how often each of the 4 volume/volatility combinations occur in:
Short-term window (observed phase)
Long-term window (expected distribution)
Category Proportions:
Calculates percentage share of each category (e.g., % time in HV/HATR).
Plots these on chart to visually see market phase dominance (can be used for screening of pine screener).
Statistical Testing:
IQV (Index of Qualitative Variation): Measures phase diversity (0 = focused, 1 = mixed).
Chi-Squared Test: Compares current vs. historical phase distribution.
Z-Test: Tests if current phase dominance is statistically significant.
📋 Outputs
On-Chart Plots and Tabels:
Strong Trend, False Breakout/Exhaustion, Consolidation, Stagnation
Strength Quality Plot: Trend strength normalized by IQV.
Dynamic Table (Top Right):
Shows each phase’s proportion (the current phase cell is highlighted in yellow), IQV, Chi² value, and current dominant phase. The current candle classification (text) is in purple.
Highlights the dominant phase classification and color-codes significance (the cell highlighted in green highly confident about the classification, orange intermediate confidence and red low confidence). This color coding is not just based on statistical significance it is based on IQV which takes into account how spread the proportions are.
🧠 Interpretation
A dominant HV/HATR phase with low IQV and high Z-Score indicates a strong and statistically significant trend.
High IQV suggests uncertainty or mixed market behavior.
Chi² spike indicates a shift from historical behavior can be used to see is the market behavior changing by changing the long term length say to 252 and short term length to 21 this will tell if the short term behavior is different from the past 252 day behavior.
Marketphase
Trend Strength After Reversal
This indicator measures trend strength after the reversal.
It can catch early reversal based on engulfing candlestick pattern or just the regular reversal.
Every reversal have to be confirmed by a close above reversal pattern.
Trend strength is measured by counting subsequent closing confirming the reversal
Engulfing Reversal Market PhaseStay at the right side of the market.
This indicator detects bullish and bearish phase in the market based on recent reversal.
It is designed to help filter your trades.
Open only long trades if indicator shows green and open only short trades when indicator shows red.
This indicator will detect bullish and bearish engulfing reversal pattern on the chart.
Bullish engulfing occurs when current candle closes below the bars that created the high.
Bearish engulfing occurs when current candle closes below the bars that created the high.
The reversal pattern occurs not only on a trend change, but can be also be present as a trend continuation pattern or a breakout pattern.
The indicator is able to detect 3 candle patterns and multi candle patterns if detects inside bars in the pattern.
Blockunity Regime Monitoring (BRM)Efficiently analyze market conditions and detect overheating zones.
Regime Monitoring (BRM) is here to help you analyze the behavior of financial markets. The oscillator allows you to observe when an asset’s trend is likely to reverse. The trend is also given by the indicator, as is the phase the market is in (trending or congested). The BRM also provides the state of the Choppiness Index, indicating whether or not the asset is about to enter a more volatile phase.
The Idea
The goal is to provide the community with a comprehensive tool for tracking market conditions, with a visual approach to identifying overheating zones.
How to Use
This tool consists of 3 main components:
An oscillator, which we describe in detail below.
Bar color to transcribe oscillator information directly onto the graph. To activate Bar Color, make sure the first option is checked in the settings. You must also uncheck "Borders" and "Wick" in your Chart Settings.
A panel that summarizes the status of various indicator information.
Elements
The Regime Monitoring oscillator
The oscillator provides several information points. First, it gives the market trend of the asset:
Green: Bullish trend.
Red: Bearish trend.
Blue: Contested trend.
It then indicates areas of overheating, where it is considered statistically probable that we will see a change in trend dynamics. These moments are shown in yellow.
This market trend is also indicated in the table.
If you see that the oscillator is above or below these limits, but not yellow, this is because we use a Choppiness Index to filter this information.
The "Enable Choppiness Index Filter" is enabled by default in the settings. So, if the Chop is discharged (under 38.2), then the oscillator's overheating state is ignored.
You can see the difference in the images below, the first with the filter and the other without:
Market Phase
We use a Vertical Horizontal Filter (VHF) to define the market phase the asset is in. This phase can have two values:
Trending: Assets evolve within a trend.
Congestion: The asset is in a moment of congestion.
Chop State
Visualize the Choppiness Index, indicating whether an asset is gearing up to enter a phase of increased volatility. It can be:
Charged: Chop is considered to indicate to be entering a stable phase.
Neutral: Chop is neutral and does not provide any specific information.
Discharged: Chop is considered to indicate a continuation of the trend.
In addition, with the "Show Choppiness Index" option, you can plot the Chop on the oscillator:
Other Settings
You can also modify the standard Regime Monitoring parameters (Lookback, Smoothing, Limits), display or hide certain components, and change all the colors.
How it Works
Regime Monitoring's main oscillator is established as follows:
We calculate the percentage of times the closing price was higher than the opening price. This is then divided by a lookback period, which in this case defaults to 20. This calculation gives a probability of the current regime.
Local Model Kalman Market ModeIntroduction
Heyo guys, I made a new (repainting) indicator called Local Model Kalman Market Mode.
I created it, because I wanted a reliable market mode filter for a potential mean-reversion strategy (e. g. BB Scalping).
On the screenshot you can see an example of how to use it in a BB strategy.
E.g. you would enter long when you have bullish divergence, price is under lower BB, price is under PoC and this indicator here shows range-bound market phase.
You would exit long on cross of the middle band.
Description
The indicator attempts to model the underlying market using different local models (i.e., trending, range-bound, and choppy) and combines them using the T3 Six Pole Kalman Filter to generate an overall estimate of the market.
The Fisher Transform is applied on the price to reach a Gaussian distribution, which increases the accuracy of the indicator itself.
The script first defines state variables for each local model, which include trend direction, trend strength, upper and lower bounds of the range, volatility of the range, level of choppiness, and strength of noise.
Then, likelihood functions are defined for each local model based on the state variables.
Next, the script calculates weights for each local model based on their likelihoods and uses them to calculate state variables for the overall estimate.
Finally, the script combines the state variables using the T3 Six Pole Kalman Filter to generate the overall estimate of the market, which is plotted in blue.
Fundamental Knowledge
To understand the explanation of the indicator and the script, there are a few fundamental concepts that you need to know:
Market: A market is a place where buyers and sellers come together to exchange goods or services.
In the context of trading, the market refers to the exchange where financial instruments such as stocks, currencies, and commodities are bought and sold.
Local models: Local models are statistical models that attempt to capture the characteristics of a particular market regime.
For example, a trending market may have different characteristics than a range-bound market or a choppy market.
The indicator uses different local models to capture the different market regimes.
Trend direction and strength: The trend direction refers to the direction in which the market is moving, either up or down.
The trend strength refers to the magnitude of the trend and how likely it is to continue.
Range-bound market: A range-bound market is a market where prices are trading within a specific range, with a clear upper and lower bound.
Choppiness: Choppiness refers to the degree of irregularity in price movements, often seen in sideways or range-bound markets.
Volatility: Volatility refers to the degree of variation in the price of an asset over time. High volatility implies larger price swings, while low volatility implies smaller price swings.
Kalman filter: A Kalman filter is a mathematical algorithm used to estimate an unknown variable from a series of noisy measurements.
In the context of the indicator, the Kalman filter is used to generate an overall estimate of the market by combining the local models.
T3 Six Pole Kalman Filter: The T3 Six Pole Kalman Filter is a specific type of Kalman filter that is used to smooth and filter time-series data, such as the price data of a financial instrument.
Fisher Transform: The Fisher Transform is a mathematical formula used to transform any probability distribution into a Gaussian normal distribution. It is commonly used in technical analysis to transform non-Gaussian indicators into ones that are more suitable for statistical analysis.
By understanding these fundamental concepts, you should have a basic understanding of how the indicator works and how it generates an overall estimate of the market.
Usage
You can use this indicator on every timeframe.
Users can customize the parameters of the T3 Six Pole Kalman Filter (T3 length, alpha, beta, gamma, and delta) using input functions.
Try out different parameter combinations and use the one you like most.
Thank you for checking this out. Leave me a comment or boost the script, when you wanna support me! 👌
--
Credits to:
▪@HPotter - Fisher Transform
▪@loxx - T3
▪ChatGPT - Helped me to make the research for this indicator and helped to build the core algorithm.
Multicolor Bollinger Bands - Market PhasesHi everyone
Hope you're all doing well 😘
Today I feel gracious and decided to give to the community. And giving not only an indicator but also a trading method
This trading method shows how a convergence based on moving averages is tremendous
Multicolour Bollinger Bands indicator that indicates market phases.
It plots on the price chart, thanks to different color zones between the bands, a breakdown of the different phases that the price operates during a trend.
The different zones are identified as follows:
- red color zone: trend is bearish, price is below the 200 periods moving average
- orange color zone: price operate a technical rebound below the 200 periods moving average
- yellow color zone: (phase 1 which indicate a new bearish cycle)
- light green zone: (phase 2 which indicate a new bullish cycle)
- dark green zone: trend is bullish, price is above the 200 periods moving average
- grey color zone: calm phase of price
- dark blue color zone: price is consolidating in either bullish or bearish trend
- light blue zones: price will revert to a new opposite trend (either long or short new trend)
By identifying clearly the different market phases with the multicolor Bollinger bands, the market entries by either a the beginning of a new trend or just after a rebound or a consolidating phase is easier to spot on.
Trade well and trade safe
Dave