OPEN-SOURCE SCRIPT
Diupdate Confirmed Close MTPI GOLD

WHAT THIS IS
This is a trend indicator for gold. It answers one question: is gold 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 is the average of those votes. All twelve agreeing up gives +1.00, all twelve agreeing down gives -1.00, and a six against six split 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. What holds up is the question of how much of the group agrees, and that is what the score measures.
WHY THIS PARTICULAR GOLD CHART
It is tuned on a tokenised gold contract that trades around the clock rather than on a spot gold chart with market hours. That is deliberate. This indicator is one rung of a ladder whose other rungs are crypto, and crypto closes at midnight UTC every day of the week. A gold chart that shuts at the weekend would put the rungs on different clocks and make the daily decision ambiguous two days out of seven.
If you prefer a conventional gold chart, the twelve will still compute, but the periods were fitted to this one. Expect to retune.
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.
HOW TO READ IT
Gold means the uptrend, steel blue means the downtrend. Warm against cool rather than green against red, so it stays readable for the most common forms of colour blindness. There is a green and red palette in the settings if you prefer it.
On the price chart:
- Candles are painted gold while the score is above zero and steel blue while it is below. This is the state, at a glance.
- A gold triangle with the word BULLISH below it marks the candle where the score turned positive. A steel blue 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 purple 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 gold for the uptrend, left and blue for the downtrend.
- 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.
HOW TO USE IT
On its own it tells you whether gold is trending. Positive and it is, negative and it is not. You act on the close, and you execute on the open of the next candle. Anything earlier is acting on a candle that has not finished forming.
What it does not tell you is when to ask the question. In the system this belongs to, gold is a fallback rather than a holding you go looking for. It gets asked only once crypto has turned down, and it gets answered before equities and cash.
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.17 that is being held up by two oscillators is a very different situation from a +0.17 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 excluding stablecoins. 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 major leads, and a further layer of ratio TPIs hands a share of the book to whichever mid caps are outperforming it.
Step three, and this is where this indicator sits. Gold. If gold is trending up, that is where the money sits while crypto is off.
Step four, when gold is not working either. An index TPI on the S&P 500. If equities are trending, 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.
A SET, NOT A SINGLE SCRIPT
This is the third published piece of that set, after the total crypto market cap and the ETH/BTC ratio. The remaining rungs are built and running and will follow as separate publications, each one an indicator for its own market, all 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 gold 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. This contract has daily history back to March 2022, which is as far as the chart goes.
Two components differ from the market cap script. The Follow Line is here, and the Detrended Price Oscillator replaces the Fisher Transform.
The Follow Line is worth understanding, because it is the one component that cannot be read the obvious way. It is a ratchet: in an uptrend it can only step up, in a downtrend it can only step down, and in between it sits perfectly flat for weeks. Asking whether it rose today is meaningless on most days. The vote is the direction of its LAST change, walked backwards until the value differs. If the script cannot find a change because the chart has not loaded enough history, it refuses to vote rather than guessing, which is why the score can be blank at the very left edge.
Three of the twelve are read on a smoothed line rather than the raw one, which is deliberate: the CCI is scored on its EMA 7 smoothing and the RSI on its EMA 9. The Awesome Oscillator is scored on its raw line, not its signal line. Those choices are in the code and commented.
Those numbers are right for gold. They are not automatically right for anything else. If you put this on another symbol, expect to retune. That is why each market in the set gets its own publication rather than one script with a symbol dropdown.
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, and you can check it yourself: put the twelve original indicators on this chart with the settings listed in the source and compare.
That is what was done here. Every daily bar the contract has, 1,651 of them going back to March 2022, was loaded, and every one of the twelve votes was compared bar by bar against the original indicator running on the same chart. On the 1,559 bars where all twelve originals were reporting, there were zero disagreements on any of them, and the combined score matched on every one.
The score also reproduces the daily record of the live system this belongs to, exactly, for 626 consecutive days. That part you cannot verify from here, so take it for what it is worth. The bar by bar check above is the one that stands on its own.
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
- Follow Line Indicator by Dreadblitz
- 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 gold is about to fall, and a positive one does not mean it is about to rise. It reports what has already been happening. Gold can also be trending up while everything else is too, in which case this rung never gets asked.
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.
This is a trend indicator for gold. It answers one question: is gold 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 is the average of those votes. All twelve agreeing up gives +1.00, all twelve agreeing down gives -1.00, and a six against six split 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. What holds up is the question of how much of the group agrees, and that is what the score measures.
WHY THIS PARTICULAR GOLD CHART
It is tuned on a tokenised gold contract that trades around the clock rather than on a spot gold chart with market hours. That is deliberate. This indicator is one rung of a ladder whose other rungs are crypto, and crypto closes at midnight UTC every day of the week. A gold chart that shuts at the weekend would put the rungs on different clocks and make the daily decision ambiguous two days out of seven.
If you prefer a conventional gold chart, the twelve will still compute, but the periods were fitted to this one. Expect to retune.
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.
HOW TO READ IT
Gold means the uptrend, steel blue means the downtrend. Warm against cool rather than green against red, so it stays readable for the most common forms of colour blindness. There is a green and red palette in the settings if you prefer it.
On the price chart:
- Candles are painted gold while the score is above zero and steel blue while it is below. This is the state, at a glance.
- A gold triangle with the word BULLISH below it marks the candle where the score turned positive. A steel blue 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 purple 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 gold for the uptrend, left and blue for the downtrend.
- 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.
HOW TO USE IT
On its own it tells you whether gold is trending. Positive and it is, negative and it is not. You act on the close, and you execute on the open of the next candle. Anything earlier is acting on a candle that has not finished forming.
What it does not tell you is when to ask the question. In the system this belongs to, gold is a fallback rather than a holding you go looking for. It gets asked only once crypto has turned down, and it gets answered before equities and cash.
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.17 that is being held up by two oscillators is a very different situation from a +0.17 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 excluding stablecoins. 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 major leads, and a further layer of ratio TPIs hands a share of the book to whichever mid caps are outperforming it.
Step three, and this is where this indicator sits. Gold. If gold is trending up, that is where the money sits while crypto is off.
Step four, when gold is not working either. An index TPI on the S&P 500. If equities are trending, 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.
A SET, NOT A SINGLE SCRIPT
This is the third published piece of that set, after the total crypto market cap and the ETH/BTC ratio. The remaining rungs are built and running and will follow as separate publications, each one an indicator for its own market, all 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 gold 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. This contract has daily history back to March 2022, which is as far as the chart goes.
Two components differ from the market cap script. The Follow Line is here, and the Detrended Price Oscillator replaces the Fisher Transform.
The Follow Line is worth understanding, because it is the one component that cannot be read the obvious way. It is a ratchet: in an uptrend it can only step up, in a downtrend it can only step down, and in between it sits perfectly flat for weeks. Asking whether it rose today is meaningless on most days. The vote is the direction of its LAST change, walked backwards until the value differs. If the script cannot find a change because the chart has not loaded enough history, it refuses to vote rather than guessing, which is why the score can be blank at the very left edge.
Three of the twelve are read on a smoothed line rather than the raw one, which is deliberate: the CCI is scored on its EMA 7 smoothing and the RSI on its EMA 9. The Awesome Oscillator is scored on its raw line, not its signal line. Those choices are in the code and commented.
Those numbers are right for gold. They are not automatically right for anything else. If you put this on another symbol, expect to retune. That is why each market in the set gets its own publication rather than one script with a symbol dropdown.
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, and you can check it yourself: put the twelve original indicators on this chart with the settings listed in the source and compare.
That is what was done here. Every daily bar the contract has, 1,651 of them going back to March 2022, was loaded, and every one of the twelve votes was compared bar by bar against the original indicator running on the same chart. On the 1,559 bars where all twelve originals were reporting, there were zero disagreements on any of them, and the combined score matched on every one.
The score also reproduces the daily record of the live system this belongs to, exactly, for 626 consecutive days. That part you cannot verify from here, so take it for what it is worth. The bar by bar check above is the one that stands on its own.
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
- Follow Line Indicator by Dreadblitz
- 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 gold is about to fall, and a positive one does not mean it is about to rise. It reports what has already been happening. Gold can also be trending up while everything else is too, in which case this rung never gets asked.
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.
Catatan Rilis
Chart image replaced with a clean one. Added a source comment noting that OTT is tuned on EMA for this market, because DEMA mode does not match this implementation. No calculation changed.Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
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
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
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
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.