PROTECTED SOURCE SCRIPT
BTC Macro Regime & Stoch RSI Signal

This script is designed for traders who want to combine macro context with precise momentum timing on Bitcoin.
Instead of looking at isolated indicators, it aggregates several independent data streams into a single bias score and then uses a stochastic RSI engine to time entries and exits.
The goal is simple:
Filter the market into long / neutral / short regimes,
Only act when momentum aligns with the current regime,
Avoid overtrading in noisy or highly leveraged conditions.
What the indicator does (conceptually)
The script builds an internal “macro + momentum score” for BTC by combining:
Cycle / valuation regime
Tracks where BTC sits in the broader cycle (discount vs overheating) and whether conditions are favorable for medium-term upside or downside.
Network & miner trend regime
Monitors the health and trend of network activity / miners to detect stress, capitulation and recovery phases.
Derivatives / leverage regime
Looks at futures positioning to identify when leverage is excessive or has been flushed out, acting as a risk filter rather than a standalone entry trigger.
Price momentum (Stochastic RSI)
Uses a Stochastic RSI engine on price to capture short-term swings and turning points, especially at extremes.
All of this is compressed into a single score between −1 and +1, where:
Values near +1 indicate a supportive macro environment with bullish momentum,
Values near −1 indicate a risk-off / bearish environment,
Values around 0 indicate indecision or transition.
The exact construction, weights and thresholds are handled internally by the script.
Signals & visuals
The indicator provides:
A Total Score line:
Above a configurable upper level → long bias
Below a configurable lower level → short bias
In between → neutral / low conviction
Background shading:
Green tint when the regime favors long setups
Red tint when the regime favors short setups
Stochastic RSI panel:
K and D lines plotted on a 0–100 scale
The 0–10 zone is highlighted in green (deep oversold)
The 90–100 zone is highlighted in red (deep overbought)
Extreme cross markers:
A green marker when Stoch RSI crosses up in the lower extreme zone
A red marker when Stoch RSI crosses down in the upper extreme zone
Entry / exit markers (optional visual guide):
Long entry markers appear when:
The macro score is in long-bias territory, and
Stoch RSI confirms an upward cross from oversold conditions.
Short entry markers appear when:
The macro score is in short-bias territory, and
Stoch RSI confirms a downward cross from overbought conditions.
Exit markers appear when momentum flips against the active bias or the macro score degrades.
These markers are guides, not mechanical trading rules.
How to use it
Typical workflow:
Start with the Total Score
Use it as a regime filter:
Only look for longs when the score shows a sustained positive bias.
Only look for shorts when the score shows a sustained negative bias.
Then look at Stoch RSI
Use it to time pullbacks and reversals within the current bias:
In a long bias → favor bullish crosses from low levels.
In a short bias → favor bearish crosses from high levels.
Respect leverage conditions
When the internal risk engine flags crowded leverage, treat signals more conservatively:
Reduce size,
Tighten risk,
Or skip trades entirely if conditions look unstable.
This script is not meant to create a high-frequency scalping system. It is a context + timing framework for swing and positional trades on BTC.
Timeframes
The macro components are designed with higher-timeframe logic in mind.
Recommended:
Use 1D as the primary perspective for the bias,
Optionally refine entries on 4H if you want more precise timing.
Important notes & disclaimer
This tool is specifically tuned for Bitcoin, not for altcoins.
The internal logic, data processing and weighting are intentionally abstracted to keep the focus on the final score and signals rather than on raw formulas.
As with any indicator, it can produce false signals and whipsaws, especially during violent news events or regime shifts.
This is not financial advice. Always combine the script with your own analysis, sound risk management and position sizing. Use at your own risk.
Instead of looking at isolated indicators, it aggregates several independent data streams into a single bias score and then uses a stochastic RSI engine to time entries and exits.
The goal is simple:
Filter the market into long / neutral / short regimes,
Only act when momentum aligns with the current regime,
Avoid overtrading in noisy or highly leveraged conditions.
What the indicator does (conceptually)
The script builds an internal “macro + momentum score” for BTC by combining:
Cycle / valuation regime
Tracks where BTC sits in the broader cycle (discount vs overheating) and whether conditions are favorable for medium-term upside or downside.
Network & miner trend regime
Monitors the health and trend of network activity / miners to detect stress, capitulation and recovery phases.
Derivatives / leverage regime
Looks at futures positioning to identify when leverage is excessive or has been flushed out, acting as a risk filter rather than a standalone entry trigger.
Price momentum (Stochastic RSI)
Uses a Stochastic RSI engine on price to capture short-term swings and turning points, especially at extremes.
All of this is compressed into a single score between −1 and +1, where:
Values near +1 indicate a supportive macro environment with bullish momentum,
Values near −1 indicate a risk-off / bearish environment,
Values around 0 indicate indecision or transition.
The exact construction, weights and thresholds are handled internally by the script.
Signals & visuals
The indicator provides:
A Total Score line:
Above a configurable upper level → long bias
Below a configurable lower level → short bias
In between → neutral / low conviction
Background shading:
Green tint when the regime favors long setups
Red tint when the regime favors short setups
Stochastic RSI panel:
K and D lines plotted on a 0–100 scale
The 0–10 zone is highlighted in green (deep oversold)
The 90–100 zone is highlighted in red (deep overbought)
Extreme cross markers:
A green marker when Stoch RSI crosses up in the lower extreme zone
A red marker when Stoch RSI crosses down in the upper extreme zone
Entry / exit markers (optional visual guide):
Long entry markers appear when:
The macro score is in long-bias territory, and
Stoch RSI confirms an upward cross from oversold conditions.
Short entry markers appear when:
The macro score is in short-bias territory, and
Stoch RSI confirms a downward cross from overbought conditions.
Exit markers appear when momentum flips against the active bias or the macro score degrades.
These markers are guides, not mechanical trading rules.
How to use it
Typical workflow:
Start with the Total Score
Use it as a regime filter:
Only look for longs when the score shows a sustained positive bias.
Only look for shorts when the score shows a sustained negative bias.
Then look at Stoch RSI
Use it to time pullbacks and reversals within the current bias:
In a long bias → favor bullish crosses from low levels.
In a short bias → favor bearish crosses from high levels.
Respect leverage conditions
When the internal risk engine flags crowded leverage, treat signals more conservatively:
Reduce size,
Tighten risk,
Or skip trades entirely if conditions look unstable.
This script is not meant to create a high-frequency scalping system. It is a context + timing framework for swing and positional trades on BTC.
Timeframes
The macro components are designed with higher-timeframe logic in mind.
Recommended:
Use 1D as the primary perspective for the bias,
Optionally refine entries on 4H if you want more precise timing.
Important notes & disclaimer
This tool is specifically tuned for Bitcoin, not for altcoins.
The internal logic, data processing and weighting are intentionally abstracted to keep the focus on the final score and signals rather than on raw formulas.
As with any indicator, it can produce false signals and whipsaws, especially during violent news events or regime shifts.
This is not financial advice. Always combine the script with your own analysis, sound risk management and position sizing. Use at your own risk.
Script protegido
Este script se publica como código cerrado. No obstante, puede utilizarlo libremente y sin ninguna limitación. Obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script protegido
Este script se publica como código cerrado. No obstante, puede utilizarlo libremente y sin ninguna limitación. Obtenga más información aquí.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.