OPEN-SOURCE SCRIPT
Markov Swing States v2 - Full Table

The indicator should be read as a probability dashboard by states, not as a classic "buy/sell" signal.
It does 3 things:
-classifies each day into a technical state;
-counts the history of how it has moved from one state to another;
-shows you if the current state has a favorable probability for bullish continuation.
S3 Breakout occurs when:
-price closes above the maximum of the last 20 days;
-volume is above the average volume;
-price is above EMA 9;
-EMA 9 is above EMA 21.
This is the most important state for aggressive entry.
S4 Bull Trend occurs when:
-price is above EMA 9;
-EMA 9 > EMA 21;
-price is above SMA 50;
-RSI is above 55.
This is the state of an already confirmed bullish trend. It is not necessarily the best entry, but it is a good state for maintaining the position.
S5 Healthy Pullback occurs when:
-price retests EMA 9 or EMA 21;
-closes above EMA;
-EMA 9 > EMA 21;
-price stays above SMA 50;
-RSI stays above 50.
This is the healthy pullback condition. It is not bearish. It means the price is cooling down after a rally.
S6 Distribution occurs when:
-price loses EMA 21;
-MACD histogram deteriorates.
This is the risk condition.
The table is the most important part.
Samples = This is the sample size.
P -> Bull = Shows the probability that the next day will be S4 Bull Trend.
P -> Pullback = Shows the probability that the stock will stay or enter a healthy pullback.
P -> Dist = Shows the probability of distribution. For long entries, you want this value to be small.
It does 3 things:
-classifies each day into a technical state;
-counts the history of how it has moved from one state to another;
-shows you if the current state has a favorable probability for bullish continuation.
S3 Breakout occurs when:
-price closes above the maximum of the last 20 days;
-volume is above the average volume;
-price is above EMA 9;
-EMA 9 is above EMA 21.
This is the most important state for aggressive entry.
S4 Bull Trend occurs when:
-price is above EMA 9;
-EMA 9 > EMA 21;
-price is above SMA 50;
-RSI is above 55.
This is the state of an already confirmed bullish trend. It is not necessarily the best entry, but it is a good state for maintaining the position.
S5 Healthy Pullback occurs when:
-price retests EMA 9 or EMA 21;
-closes above EMA;
-EMA 9 > EMA 21;
-price stays above SMA 50;
-RSI stays above 50.
This is the healthy pullback condition. It is not bearish. It means the price is cooling down after a rally.
S6 Distribution occurs when:
-price loses EMA 21;
-MACD histogram deteriorates.
This is the risk condition.
The table is the most important part.
Samples = This is the sample size.
P -> Bull = Shows the probability that the next day will be S4 Bull Trend.
P -> Pullback = Shows the probability that the stock will stay or enter a healthy pullback.
P -> Dist = Shows the probability of distribution. For long entries, you want this value to be small.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.