OPEN-SOURCE SCRIPT
Confirmed Close MTPI SPX

CONFIRMED CLOSE MTPI SPX
WHAT THIS IS
This is a trend indicator for the S&P 500. It answers one question: is the
index in an uptrend or a downtrend right now?
It does that by running twelve separate trend indicators at once and taking a
vote. Each of the twelve looks at the chart in its own way and says either
"up" or "down". The score you see is simply the average of those twelve votes.
All twelve agreeing up gives +1.00. All twelve agreeing down gives -1.00. Six
against six gives 0.00.
Because twelve votes average out, the score can only land on thirteen values,
one sixth apart: -1.00, -0.83, -0.67 and so on up to +1.00.
This approach is usually called a Trend Probability Indicator, or TPI. The
point is that no single indicator is reliable on its own. Any one of them will
whipsaw you. A group of twelve disagreeing with each other is information, and
the score tells you how much of that group agrees.
WHY "CONFIRMED CLOSE"
A lot of indicators change their mind while the current candle is still
forming, then change back before it closes. That is called repainting and it
makes an indicator untradeable, because the signal you acted on may not be
there an hour later.
This one does not do that. While today's candle is still open, the indicator
shows you yesterday's confirmed reading. The state only changes when a daily
candle actually closes. What you see is what you could have traded.
On an index this matters more than it does on a 24 hour market. A US equity
session runs for six and a half hours and the index can travel a long way
inside one of them. A reading taken at 11am is a reading of an unfinished
candle. This script will not give you one.
HOW TO READ IT
On the price chart:
- Candles are painted cyan while the score is above zero and magenta while it
is below. This is the state, at a glance.
- A cyan triangle with the word BULLISH below it marks the candle where the
score turned positive. A magenta triangle with BEARISH above it marks the
turn down. These are the moments that matter.
- Two moving averages, a 12 period and a 21 period EMA, are drawn as a
reference. They are a crude version of the same question and they are there
so you can see how much smoother the twelve indicator version is.
- Bars are tinted amber where the twelve indicator score and the simple 12/21
cross disagree. Those are the bars where the crude version would have put
you on the wrong side.
In the separate pane below:
- The stepped line is the score, from -1.00 to +1.00, filled to the zero line
and coloured by state.
- Dotted lines at +0.5 and -0.5 give you a sense of how strong the agreement
is. A score of +1.00 is twelve out of twelve. A score of +0.17 is seven
against five, which is a trend barely holding together.
The dashboard, bottom right by default:
- The big number is the current score, with the state next to it.
- The bar beside it is a gauge. It fills outward from the middle, right and
cyan for bullish, left and magenta for bearish.
- The twelve indicators are listed in two columns, the six trend-following
ones on the left and the six oscillators on the right, each showing its own
vote. This is where you see WHY the score is what it is.
- "12/21 agree" is the share of days where the twelve indicator score and the
simple EMA cross pointed the same way, measured across all the history your
chart has loaded. Read it as a rough measure of how often the crude version
would have agreed with the careful one. It is measured against the raw cross
with no filtering, so treat it as an indication rather than a precise
statistic.
- "Regime" is how many days the current state has lasted. It turns amber below
eight days, because a trend that has not lasted eight days has a habit of
being noise.
A cyan and magenta pair was chosen on purpose rather than the usual green and
red. It separates on the blue and the red channel, so it stays readable with
red green colour blindness, and it tells this script apart from the others in
the set at a glance. If you would rather have green and red, there is a toggle
in the settings.
HOW TO USE IT
The simplest use is the one it was built for. When the score is above zero,
equities are in an uptrend and you hold them. When it is below zero, they are
not, and you do not. You act on the close, and you execute on the open of the
next session. Anything earlier is acting on a candle that has not finished
forming.
Set an alert if you do not want to watch it. The script exposes two alert
conditions, one for the turn up and one for the turn down, and both fire only
on a confirmed daily close.
Read the twelve rows when the score is near zero. A score of -0.67 that is
being held off the floor by two oscillators is a very different situation from
a -0.67 where the trend-following group is turning. The individual votes tell
you which one you are in.
THE WIDER SYSTEM THIS BELONGS TO
This indicator is one rung of a ladder. The idea is that you are always
holding the strongest available thing, and that the decision is made in steps
rather than all at once.
Step one. A TPI on the total crypto market cap. If it is positive, you stay in
crypto and you go to step two. If it is negative, you leave crypto and go to
step three.
Step two, only when crypto is bullish. An ETH/BTC ratio TPI decides which of
the two majors leads. From there a further layer of ratio TPIs compares mid
caps against whichever major won, and the ones that are outperforming get a
share of the book.
Step three, when crypto is bearish. A gold TPI. If gold is in an uptrend, that
is where the money sits.
Step four, when gold is not working either. This indicator. If equities are
trending up, that is the holding.
Step five, when nothing is trending. Cash, and a EUR/USD TPI decides whether
that cash is better held in euros or in dollars.
Each rung is its own TPI, built the same way: twelve indicators, one vote
each, tuned separately for that market. The ladder simply asks them in order.
This rung is the quiet one. In a long crypto bull market it never gets asked,
because the ladder stops at step one or two. It earns its place in the years
when crypto and gold are both dead and something still has to be held.
A SET, NOT A SINGLE SCRIPT
This is the fourth published piece of that set, after the total market cap, the
ETH/BTC ratio and gold. The remaining rung is built and running and will follow
as its own publication, reading the same way so you only have to learn the
layout once.
ABOUT THE SETTINGS
The twelve indicators and their periods are visible in the settings and in the
source. They were tuned for this specific market against a cleaned 12/21 EMA
reference on daily data from January 2023 onward, with regimes shorter than
eight days treated as noise and removed before the tuning was scored. The
symbol itself has daily history back to 2005 if you want to look further back.
Those numbers are right for the S&P 500. They are not automatically right for
anything else, and they are deliberately not the numbers the other scripts in
this set use. If you put this on another symbol, expect to retune. That is the
honest answer, and it is why each market in the set gets its own publication
rather than one script with a symbol dropdown.
Two of the twelve are read on a smoothed line rather than the raw one, which
is deliberate: the CCI is scored on its EMA 5 smoothing and the RSI on its
EMA 10. The Awesome Oscillator is scored on its raw line. Those choices are in
the code and commented.
HOW FAITHFUL THE REBUILD IS
Because seven of the twelve are rewritten from other people's published
formulas rather than called directly, the obvious question is whether they
behave the same. They do. Every one of the twelve votes was compared bar by bar
against the original indicator running on the same chart, across 5,365 daily
bars going back to May 2005. Zero disagreements on any of the twelve, and the
combined score matched on every single bar.
That check is worth repeating if you change a setting, and it is why each vote
is exposed as a hidden plot in the script rather than kept internal.
CREDIT WHERE IT IS DUE
Seven of the twelve components are reimplementations of open-source community
scripts, written from their published formulas so they could all live in one
indicator and be scored consistently. Full credit to the original authors:
- Gaussian Channel by DonovanWall
- Optimized Trend Tracker by KivancOzbilgic
- Awesome Oscillator v2 by KivancOzbilgic
- Hull Suite by InSilico
- SSL Channel by ErwinBeckers
- Coral Trend Indicator by LazyBear
- WaveTrend by LazyBear
The remaining five are standard: ALMA, CCI, RSI, Coppock Curve and the
Detrended Price Oscillator.
What is added here is the aggregation into a single score, the confirmed close
behaviour, the per indicator breakdown, the agreement measurement against the
reference, and the ladder logic this is built to serve.
LIMITATIONS AND A PLAIN WARNING
This is a trend indicator. It is late by design. It will not catch the exact
top or the exact bottom, and it is not supposed to. It will be wrong in a
sideways market, which is what the eight day regime warning is there to tell
you.
A negative reading does not mean the index is about to fall, and a positive one
does not mean it is about to rise. It reports what has already been happening.
Equities also carry something the other rungs do not: gaps. An index can close
on a confirmed uptrend and open several percent lower on news, and no daily
trend indicator will protect you from that. Size accordingly.
Nothing here is financial advice. It is a tool for reading a chart. Past
behaviour of any indicator tells you nothing reliable about the future. Do
your own work and size your positions so that being wrong is survivable.
WHAT THIS IS
This is a trend indicator for the S&P 500. It answers one question: is the
index in an uptrend or a downtrend right now?
It does that by running twelve separate trend indicators at once and taking a
vote. Each of the twelve looks at the chart in its own way and says either
"up" or "down". The score you see is simply the average of those twelve votes.
All twelve agreeing up gives +1.00. All twelve agreeing down gives -1.00. Six
against six gives 0.00.
Because twelve votes average out, the score can only land on thirteen values,
one sixth apart: -1.00, -0.83, -0.67 and so on up to +1.00.
This approach is usually called a Trend Probability Indicator, or TPI. The
point is that no single indicator is reliable on its own. Any one of them will
whipsaw you. A group of twelve disagreeing with each other is information, and
the score tells you how much of that group agrees.
WHY "CONFIRMED CLOSE"
A lot of indicators change their mind while the current candle is still
forming, then change back before it closes. That is called repainting and it
makes an indicator untradeable, because the signal you acted on may not be
there an hour later.
This one does not do that. While today's candle is still open, the indicator
shows you yesterday's confirmed reading. The state only changes when a daily
candle actually closes. What you see is what you could have traded.
On an index this matters more than it does on a 24 hour market. A US equity
session runs for six and a half hours and the index can travel a long way
inside one of them. A reading taken at 11am is a reading of an unfinished
candle. This script will not give you one.
HOW TO READ IT
On the price chart:
- Candles are painted cyan while the score is above zero and magenta while it
is below. This is the state, at a glance.
- A cyan triangle with the word BULLISH below it marks the candle where the
score turned positive. A magenta triangle with BEARISH above it marks the
turn down. These are the moments that matter.
- Two moving averages, a 12 period and a 21 period EMA, are drawn as a
reference. They are a crude version of the same question and they are there
so you can see how much smoother the twelve indicator version is.
- Bars are tinted amber where the twelve indicator score and the simple 12/21
cross disagree. Those are the bars where the crude version would have put
you on the wrong side.
In the separate pane below:
- The stepped line is the score, from -1.00 to +1.00, filled to the zero line
and coloured by state.
- Dotted lines at +0.5 and -0.5 give you a sense of how strong the agreement
is. A score of +1.00 is twelve out of twelve. A score of +0.17 is seven
against five, which is a trend barely holding together.
The dashboard, bottom right by default:
- The big number is the current score, with the state next to it.
- The bar beside it is a gauge. It fills outward from the middle, right and
cyan for bullish, left and magenta for bearish.
- The twelve indicators are listed in two columns, the six trend-following
ones on the left and the six oscillators on the right, each showing its own
vote. This is where you see WHY the score is what it is.
- "12/21 agree" is the share of days where the twelve indicator score and the
simple EMA cross pointed the same way, measured across all the history your
chart has loaded. Read it as a rough measure of how often the crude version
would have agreed with the careful one. It is measured against the raw cross
with no filtering, so treat it as an indication rather than a precise
statistic.
- "Regime" is how many days the current state has lasted. It turns amber below
eight days, because a trend that has not lasted eight days has a habit of
being noise.
A cyan and magenta pair was chosen on purpose rather than the usual green and
red. It separates on the blue and the red channel, so it stays readable with
red green colour blindness, and it tells this script apart from the others in
the set at a glance. If you would rather have green and red, there is a toggle
in the settings.
HOW TO USE IT
The simplest use is the one it was built for. When the score is above zero,
equities are in an uptrend and you hold them. When it is below zero, they are
not, and you do not. You act on the close, and you execute on the open of the
next session. Anything earlier is acting on a candle that has not finished
forming.
Set an alert if you do not want to watch it. The script exposes two alert
conditions, one for the turn up and one for the turn down, and both fire only
on a confirmed daily close.
Read the twelve rows when the score is near zero. A score of -0.67 that is
being held off the floor by two oscillators is a very different situation from
a -0.67 where the trend-following group is turning. The individual votes tell
you which one you are in.
THE WIDER SYSTEM THIS BELONGS TO
This indicator is one rung of a ladder. The idea is that you are always
holding the strongest available thing, and that the decision is made in steps
rather than all at once.
Step one. A TPI on the total crypto market cap. If it is positive, you stay in
crypto and you go to step two. If it is negative, you leave crypto and go to
step three.
Step two, only when crypto is bullish. An ETH/BTC ratio TPI decides which of
the two majors leads. From there a further layer of ratio TPIs compares mid
caps against whichever major won, and the ones that are outperforming get a
share of the book.
Step three, when crypto is bearish. A gold TPI. If gold is in an uptrend, that
is where the money sits.
Step four, when gold is not working either. This indicator. If equities are
trending up, that is the holding.
Step five, when nothing is trending. Cash, and a EUR/USD TPI decides whether
that cash is better held in euros or in dollars.
Each rung is its own TPI, built the same way: twelve indicators, one vote
each, tuned separately for that market. The ladder simply asks them in order.
This rung is the quiet one. In a long crypto bull market it never gets asked,
because the ladder stops at step one or two. It earns its place in the years
when crypto and gold are both dead and something still has to be held.
A SET, NOT A SINGLE SCRIPT
This is the fourth published piece of that set, after the total market cap, the
ETH/BTC ratio and gold. The remaining rung is built and running and will follow
as its own publication, reading the same way so you only have to learn the
layout once.
ABOUT THE SETTINGS
The twelve indicators and their periods are visible in the settings and in the
source. They were tuned for this specific market against a cleaned 12/21 EMA
reference on daily data from January 2023 onward, with regimes shorter than
eight days treated as noise and removed before the tuning was scored. The
symbol itself has daily history back to 2005 if you want to look further back.
Those numbers are right for the S&P 500. They are not automatically right for
anything else, and they are deliberately not the numbers the other scripts in
this set use. If you put this on another symbol, expect to retune. That is the
honest answer, and it is why each market in the set gets its own publication
rather than one script with a symbol dropdown.
Two of the twelve are read on a smoothed line rather than the raw one, which
is deliberate: the CCI is scored on its EMA 5 smoothing and the RSI on its
EMA 10. The Awesome Oscillator is scored on its raw line. Those choices are in
the code and commented.
HOW FAITHFUL THE REBUILD IS
Because seven of the twelve are rewritten from other people's published
formulas rather than called directly, the obvious question is whether they
behave the same. They do. Every one of the twelve votes was compared bar by bar
against the original indicator running on the same chart, across 5,365 daily
bars going back to May 2005. Zero disagreements on any of the twelve, and the
combined score matched on every single bar.
That check is worth repeating if you change a setting, and it is why each vote
is exposed as a hidden plot in the script rather than kept internal.
CREDIT WHERE IT IS DUE
Seven of the twelve components are reimplementations of open-source community
scripts, written from their published formulas so they could all live in one
indicator and be scored consistently. Full credit to the original authors:
- Gaussian Channel by DonovanWall
- Optimized Trend Tracker by KivancOzbilgic
- Awesome Oscillator v2 by KivancOzbilgic
- Hull Suite by InSilico
- SSL Channel by ErwinBeckers
- Coral Trend Indicator by LazyBear
- WaveTrend by LazyBear
The remaining five are standard: ALMA, CCI, RSI, Coppock Curve and the
Detrended Price Oscillator.
What is added here is the aggregation into a single score, the confirmed close
behaviour, the per indicator breakdown, the agreement measurement against the
reference, and the ladder logic this is built to serve.
LIMITATIONS AND A PLAIN WARNING
This is a trend indicator. It is late by design. It will not catch the exact
top or the exact bottom, and it is not supposed to. It will be wrong in a
sideways market, which is what the eight day regime warning is there to tell
you.
A negative reading does not mean the index is about to fall, and a positive one
does not mean it is about to rise. It reports what has already been happening.
Equities also carry something the other rungs do not: gaps. An index can close
on a confirmed uptrend and open several percent lower on news, and no daily
trend indicator will protect you from that. Size accordingly.
Nothing here is financial advice. It is a tool for reading a chart. Past
behaviour of any indicator tells you nothing reliable about the future. Do
your own work and size your positions so that being wrong is survivable.
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.
The Rotation Ladder: a five step trend system that decides what to hold, crypto, the leading major, gold, equities or cash. Method, backtest and the live signal, free and in the open. confirmedclose.com
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.
The Rotation Ladder: a five step trend system that decides what to hold, crypto, the leading major, gold, equities or cash. Method, backtest and the live signal, free and in the open. confirmedclose.com
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.