CapitalFlowsResearch: Sensitivity BandsCapitalFlowsResearch: Sensitivity Bands — Expected-Move Projection from Cross-Asset Beta
CapitalFlowsResearch: Sensitivity Bands builds on the idea of cross-asset sensitivity by turning beta into a set of projected price boundaries around the prior day’s close. Instead of showing beta as a standalone number, this tool translates it into real price levels that represent the expected magnitude of movement—up or down—given a typical shock in a chosen market driver.
The script measures how strongly the price asset has been responding to moves in the driver over a rolling window, then uses that relationship to calculate a dynamic “band width.” That width is applied symmetrically around the previous daily close to create two horizontal bands: an upper range and a lower range. These lines update intraday, offering a real-time sense of whether current price action is unfolding within normal sensitivity limits or pushing into statistically unusual territory.
Traders can choose how the driver’s changes are interpreted (basis points, absolute moves, or percent changes), and optionally replace the rolling band with a running mean to emphasise longer-term structural sensitivity. The resulting overlay acts much like an expected-move model—similar in spirit to options-derived ranges, but powered by beta dynamics rather than implied volatility.
In practice, Sensitivity Bands serves as a clean framework for contextualising market movement:
Inside the bands: price behaviour aligns with typical cross-asset sensitivity.
Touching a band: movement is strong but still consistent with historical response.
Breaking a band: indicates a regime shift, a driver disconnect, or unusually high momentum.
All of this is achieved without exposing the underlying beta calculations or normalisation logic.
Cycles
CapitalFlowsResearch: Sensitivity AnalysisCapitalFlowsResearch: Sensitivity Analysis — Driver–Price Beta Gauge
CapitalFlowsResearch: Sensitivity Analysis is built to answer a very specific macro question:
“How sensitive is this price to moves in that driver, right now?”
The indicator compares bar-to-bar changes in a chosen “price” asset with a chosen “driver” (such as an equity index, yield, or cross-asset benchmark), and from that relationship derives a rolling measure of effective beta. That beta is then converted into a “band width” value, representing how much the price typically moves for a standardised shock in the driver, under current conditions.
You can choose whether the driver’s moves are treated in basis points, absolute terms, or percent changes, and optionally smooth the resulting band with a configurable moving average to emphasise structural shifts over noise. The two plotted lines—current band width and its moving average—form a simple yet powerful gauge of how tightly the price is currently “geared” to the driver.
In practice, this makes Sensitivity Analysis a compact tool for:
Tracking when a contract becomes more or less responsive to a key macro factor.
Comparing sensitivity across instruments or timeframes.
Framing expected move scenarios (“if the driver does X, this should roughly do Y”).
All of this is done without exposing the detailed beta or volatility math inside the script.
CapitalFlowsResearch: Returns Regime MapCapitalFlowsResearch: Returns Regime Map — Two-Asset Behaviour & Correlation Lens
CapitalFlowsResearch: Returns Regime Map is a two-asset regime overlay that shows how a primary market and a linked macro series are really moving together over short rolling windows. Instead of just eyeballing two separate charts, the tool classifies each bar into one of four states based on the combined direction of recent returns:
Up / Up
Up / Down
Down / Up
Down / Down
These states are calculated from aggregated, windowed returns (using configurable return definitions for each asset), then painted directly onto the price chart as background regimes. On top of that, the indicator monitors the correlation of the same return streams and can optionally tint periods where correlation sits within a user-defined “low-correlation” band—highlighting moments when the usual relationship between the two series is weak, unstable, or breaking down.
In practice, this turns the chart into a compact co-movement map: you can see at a glance whether price and rates (or any two chosen markets) are trending together, diverging in a meaningful way, or moving in choppy, low-conviction fashion. It’s especially powerful for macro traders who need to frame trades in terms of “risk asset vs. rates,” “index vs. volatility,” or similar pairs—while keeping the actual construction details of the regime logic abstracted.
CapitalFlowsRsearch: YC RegimeCapitalFlowsResearch: YC Regime — Yield Curve Regime Histogram
CapitalFlowsResearch: YC Regime takes the same six-regime yield curve framework (bull/bear steepeners, bull/bear flatteners, and their twist variants) and presents it as a dedicated histogram panel. Instead of colouring the background of a price chart, this indicator plots the 2s–10s (or chosen pair) spread as a column series and tints each bar according to the active curve regime, with an overlaid white line to show the raw spread path through time.
By comparing how the spread itself is evolving against the regime classification, traders can see not just what the curve is doing (steepening vs flattening), but also how those moves are building, stalling, or reversing over the chosen lookback. An optional legend explains each regime and the colour mapping, making it easy to standardise interpretation across instruments and timeframes. In practice, this panel functions as a compact “yield curve dashboard” you can stack under risk assets, helping align trades with the prevailing rates environment without exposing the underlying regime logic.
CapitalFlowsResearch: YC Regime (Shading)CapitalFlowsResearch: YC Regime (Shading) — Yield Curve Environment Overlay
CapitalFlowsResearch: YC Regime (Shading) turns the yield curve into a live, colour-coded market backdrop, classifying the curve into six intuitive regimes: bull steepener, bear steepener, steepener twist, bull flattener, bear flattener, and flattener twist. Instead of staring at raw spreads or multiple rate charts, you get a simple visual answer to: “What kind of curve move am I trading in right now?”
The script compares a short-dated and long-dated yield and tracks how both the spread and the individual legs have evolved over a chosen lookback window. From that, it tags each bar with the dominant curve regime and paints either the background or the candles accordingly, so regime changes are immediately obvious on any price chart you overlay it on. An optional on-chart legend summarises the regime definitions and colour scheme, making it easy to interpret at a glance and consistent across instruments and timeframes.
In practice, this overlay acts as a rates context layer for everything else you trade—equities, FX, credit, commodities—helping you link price action back to whether the curve is bull-steepening, bear-flattening, or twisting in ways that often line up with shifts in macro narrative, policy expectations, and risk appetite, all without exposing the underlying classification logic.
The Floyd Sniper indicator1. tren; uses 200 EMA to decide bullish or bearish zone.
2. momentum; uses the 21EMA to confirm direction..
3. RSI filter; long only when oversold, Short only went overbought.
4. Signals; Prince long only when trend + momentum + RSI all Agree.
5. Background tent; green for long setups. red for short setups.
Altcoin Relative Macro StrengthAltcoin Relative Macro Strength
Overview
The Altcoin Relative Macro Strength indicator measures the altcoin market's price performance relative to global macroeconomic conditions. By comparing TOTAL3ES (total altcoin market capitalization excluding Bitcoin, Ethereum and stable coins) against a composite macro trend, the indicator identifies periods of relative overvaluation and undervaluation.
Methodology
Global Macro Trend Calculation:
The macro trend synthesizes three primary components:
- ISM PMI – A proxy for the business cycle phase
- Global Liquidity – An aggregate measure of major central bank balance sheets and broad money supply
- IWM (Russell 2000) – Small-cap equity exposure, reflecting risk-on/risk-off market sentiment
Global Liquidity is calculated as:
Fed Balance Sheet - Reverse Repo - Treasury General Account + U.S. M2 + China M2
The final Global Macro Trend is:
ISM PMI × Global Liquidity × IWM
Theoretical Framework:
The global macro trend integrates liquidity expansion/contraction with business cycle dynamics and small-cap equity performance. The inclusion of IWM reflects altcoins' tendency to behave as high-beta risk assets, exhibiting sensitivity similar to small-cap equities. This composite exhibits strong directional correlation with altcoin market movements, capturing the risk-on/risk-off dynamics that drive altcoin performance.
Interpretation
Primary Signal:
The histogram displays the rolling percentage change of TOTAL3ES relative to the global macro trend (default: 21-period average). Positive divergence indicates altcoins are outperforming macro conditions; negative divergence suggests underperformance relative to the underlying economic and risk environment.
Data Tables:
Alts/Macro Change – Percentage deviation of the altcoin market's average value from the Global Macro Trend's average over the specified period
Macro Trend – Directional assessment of the macro trend based on slope and trend agreement:
🔵 BULLISH ▲ – Positive slope with upward trend
⚪ NEUTRAL → – Slope and trend direction disagree
🟣 BEARISH ▼ – Negative slope with downward trend
Macro Slope – Percentage rate of change in the global macro trend
Altcoin Valuation – Relative valuation category based on TOTAL3/Macro deviation:
🟢 Extreme Discount / Deep Discount / Discount
🟡 Fair Value
🔴 Premium / Large Premium / Extreme Premium
TOTAL3ES Mcap – Current total altcoin market capitalization (in billions)
Visual Components:
📊 Histogram: Alts/Macro Change
🟢 Green = Positive deviation (altcoins outperforming)
🔴 Red = Negative deviation (altcoins underperforming)
📈 Macro Slope Line
Color-coded to match trend assessment
Scaled for visibility (adjustable in settings)
Application
This indicator is designed to identify mean reversion opportunities by highlighting periods when the altcoin market materially diverges from fundamental macro and risk conditions. Extreme positive values may indicate overvaluation; extreme negative values may signal undervaluation relative to the prevailing economic and risk appetite backdrop.
Strategy Considerations:
- Identify extremes: Look for periods when the histogram reaches elevated positive or negative levels
- Assess valuation: Use the Altcoin Valuation reading to gauge relative over/undervaluation
Confirm with risk sentiment: Check whether macro conditions and risk appetite support or contradict current price levels
- Mean reversion: Consider that significant deviations from trend historically tend to revert
Note: This indicator identifies relative valuation based on macro conditions and risk sentiment—it does not predict price direction or timing.
Settings
Lookback Period – 21 bars (default) – Number of bars for calculating rolling averages
Macro Slope Scale – 3.0 (default) – Multiplier for macro slope line visibility
SPX Cumulative AD Line IndicatorThe Other ADLines online are trash. Use this one.
This indicator, written in Pine Script version 6, is designed to track market breadth for the S&P 500 by constructing and analyzing a cumulative Advance-Decline (AD) Line. It begins by allowing the user to set two parameters: a smoothing length for the AD line itself and a moving-average length (defaulted to 50 weeks) that will later be applied to the smoothed line. These inputs let traders tailor the sensitivity of the indicator to their preferred timeframe and trading style.
To build the AD line, the script pulls real-time S&P 500 index prices as well as the number of advancing and declining stocks using dedicated market breadth tickers. It calculates the daily AD difference by subtracting declines from advances, a classic method for measuring participation across the index. This difference is fed into a cumulative calculation, which produces a running total that tracks whether market participation is strengthening or weakening over time.
The cumulative AD line is then smoothed with a simple moving average based on the user’s specified smoothing length. At the same time, the script dynamically converts the 50-week moving-average period into an equivalent value for whatever chart timeframe is being used—intraday, daily, weekly, or monthly. This ensures that the moving average of the AD line reflects a consistent long-term trend regardless of the chart’s resolution.
Next, the smoothed AD line is compared to its converted 50-week moving average to determine the market’s directional bias. When the AD line rises above its long-term average, the script labels the environment as bullish; when it falls below, it flags a bearish environment. It also detects crossovers between the two lines, generating discrete buy signals when the AD line crosses upward and sell signals when it crosses downward.
Finally, the indicator visualizes all elements on the chart: the smoothed AD line, its long-term moving average, a zero reference line, and the buy/sell markers. It also colors the line and background to reflect bullish or bearish conditions, making shifts in market breadth easy to spot at a glance. This provides traders with a comprehensive breadth-based tool for identifying trend strength and potential reversals in the S&P 500.
Composite Market Momentum Indicator//@version=5
indicator("Composite Market Momentum Indicator", shorttitle="CMMI", overlay=false)
// Define Inputs
lenRSI = input.int(14, title="RSI Length")
lenMom = input.int(9, title="Momentum Length")
lenShortRSI = input.int(3, title="Short RSI Length")
lenShortRSISma = input.int(3, title="Short RSI SMA Length")
lenSMA1 = input.int(9, title="Composite SMA 1 Length")
lenSMA2 = input.int(34, title="Composite SMA 2 Length")
// Step 1: Create a 9-period momentum indicator of the 14-period RSI
rsiValue = ta.rsi(close, lenRSI)
momRSI = ta.mom(rsiValue, lenMom)
// Step 2: Create a 3-period RSI and a 3-period SMA of that RSI
shortRSI = ta.rsi(close, lenShortRSI)
shortRSISmoothed = ta.sma(shortRSI, lenShortRSISma)
// Step 3: Add Step 1 and Step 2 together to create the Composite Index
compositeIndex = momRSI + shortRSISmoothed
// Step 4: Create two simple moving averages of the Composite Index
sma1 = ta.sma(compositeIndex, lenSMA1)
sma2 = ta.sma(compositeIndex, lenSMA2)
// Step 5: Plot the composite index and its two simple moving averages
plot(compositeIndex, title="Composite Index", color=color.new(#f7cf05, 0), linewidth=2)
plot(sma1, title="SMA 13", color=color.new(#f32121, 0), linewidth=1, style=plot.style_line)
plot(sma2, title="SMA 33", color=color.new(#105eef, 0), linewidth=1, style=plot.style_line)
// Add horizontal lines for reference
hline(0, "Zero Line", color.new(color.gray, 50))
XAUUSD Liquidity Sweep + Engulfing (4H/2H/15m)Key Features in This Script:
4H Bias (Trend): We use RSI on 4H to determine if the market is in a bullish or bearish trend.
2H Setup: When price sweeps below previous lows or above previous highs (liquidity sweep), we confirm it with RSI and an engulfing candle.
15m Entry: After the liquidity sweep is confirmed on the 15m chart, we check for a bullish engulfing (for buys) or bearish engulfing (for sells) with RSI confirmation.
How to Use It:
Add the Script: Copy-paste the code above into TradingView’s Pine Editor.
Apply it to the 15-minute chart for XAUUSD (Gold).
Alerts: Set up alerts when a Buy or Sell signal appears based on the conditions.
Alerts Example:
When a liquidity sweep and RSI flip happens with an engulfing candle, TradingView will notify you, helping you enter at the right time.
🚀 Next Steps:
Try it out and let me know how the alerts and signals are working for you.
If you'd like to add custom stop-loss or take-profit calculations, or include Fibonacci levels, let me know!
BTC Fear & Greed Incremental StrategyIMPORTANT: READ SETUP GUIDE BELOW OR IT WON'T WORK
# BTC Fear & Greed Incremental Strategy — TradeMaster AI (Pure BTC Stack)
## Strategy Overview
This advanced Bitcoin accumulation strategy is designed for long-term hodlers who want to systematically take profits during greed cycles and accumulate during fear periods, while preserving their core BTC position. Unlike traditional strategies that start with cash, this approach begins with a specified BTC allocation, making it perfect for existing Bitcoin holders who want to optimize their stack management.
## Key Features
### 🎯 **Pure BTC Stack Mode**
- Start with any amount of BTC (configurable)
- Strategy manages your existing stack, not new purchases
- Perfect for hodlers who want to optimize without timing markets
### 📊 **Fear & Greed Integration**
- Uses market sentiment data to drive buy/sell decisions
- Configurable thresholds for greed (selling) and fear (buying) triggers
- Automatic validation to ensure proper 0-100 scale data source
### 🐂 **Bull Year Optimization**
- Smart quarterly selling during bull market years (2017, 2021, 2025)
- Q1: 1% sells, Q2: 2% sells, Q3/Q4: 5% sells (configurable)
- **NO SELLING** during non-bull years - pure accumulation mode
- Preserves BTC during early bull phases, maximizes profits at peaks
### 🐻 **Bear Market Intelligence**
- Multi-regime detection: Bull, Early Bear, Deep Bear, Early Bull
- Different buying strategies based on market conditions
- Enhanced buying during deep bear markets with configurable multipliers
- Visual regime backgrounds for easy market condition identification
### 🛡️ **Risk Management**
- Minimum BTC allocation floor (prevents selling entire stack)
- Configurable position sizing for all trades
- Multiple safety checks and validation
### 📈 **Advanced Visualization**
- Clean 0-100 scale with 2 decimal precision
- Three main indicators: BTC Allocation %, Fear & Greed Index, BTC Holdings
- Real-time portfolio tracking with cash position display
- Enhanced info table showing all key metrics
## How to Use
### **Step 1: Setup**
1. Add the strategy to your BTC/USD chart (daily timeframe recommended)
2. **CRITICAL**: In settings, change the "Fear & Greed Source" from "close" to a proper 0-100 Fear & Greed indicator
---------------
I recommend Crypto Fear & Greed Index by TIA_Technology indicator
When selecting source with this indicator, look for "Crypto Fear and Greed Index:Index"
---------------
3. Set your "Starting BTC Quantity" to match your actual holdings
4. Configure your preferred "Start Date" (when you want the strategy to begin)
### **Step 2: Configure Bull Year Logic**
- Enable "Bull Year Logic" (default: enabled)
- Adjust quarterly sell percentages:
- Q1 (Jan-Mar): 1% (conservative early bull)
- Q2 (Apr-Jun): 2% (moderate mid bull)
- Q3/Q4 (Jul-Dec): 5% (aggressive peak targeting)
- Add future bull years to the list as needed
### **Step 3: Fine-tune Thresholds**
- **Greed Threshold**: 80 (sell when F&G > 80)
- **Fear Threshold**: 20 (buy when F&G < 20 in bull markets)
- **Deep Bear Fear Threshold**: 25 (enhanced buying in bear markets)
- Adjust based on your risk tolerance
### **Step 4: Risk Management**
- Set "Minimum BTC Allocation %" (default 20%) - prevents selling entire stack
- Configure sell/buy percentages based on your position size
- Enable bear market filters for enhanced timing
### **Step 5: Monitor Performance**
- **Orange Line**: Your BTC allocation percentage (target: fluctuate between 20-100%)
- **Blue Line**: Actual BTC holdings (should preserve core position)
- **Pink Line**: Fear & Greed Index (drives all decisions)
- **Table**: Real-time portfolio metrics including cash position
## Reading the Indicators
### **BTC Allocation Percentage (Orange Line)**
- **100%**: All portfolio in BTC, no cash available for buying
- **80%**: 80% BTC, 20% cash ready for fear buying
- **20%**: Minimum allocation, maximum cash position
### **Trading Signals**
- **Green Buy Signals**: Appear during fear periods with available cash
- **Red Sell Signals**: Appear during greed periods in bull years only
- **No Signals**: Either allocation limits reached or non-bull year
## Strategy Logic
### **Bull Years (2017, 2021, 2025)**
- Q1: Conservative 1% sells (preserve stack for later)
- Q2: Moderate 2% sells (gradual profit taking)
- Q3/Q4: Aggressive 5% sells (peak targeting)
- Fear buying active (accumulate on dips)
### **Non-Bull Years**
- **Zero selling** - pure accumulation mode
- Enhanced fear buying during bear markets
- Focus on rebuilding stack for next bull cycle
## Important Notes
- **This is not financial advice** - backtest thoroughly before use
- Designed for **long-term holders** (4+ year cycles)
- **Requires proper Fear & Greed data source** - validate in settings
- Best used on **daily timeframe** for major trend following
- **Cash calculations**: Use allocation % and BTC holdings to calculate available cash: `Cash = (Total Portfolio × (1 - Allocation%/100))`
## Risk Disclaimer
This strategy involves active trading and position management. Past performance does not guarantee future results. Always do your own research and never invest more than you can afford to lose. The strategy is designed for educational purposes and long-term Bitcoin accumulation thesis.
---
*Developed by Sol_Crypto for the Bitcoin community. Happy stacking! 🚀*
Baba-pro EMA Break Sniper This indicator is designed to provide high-precision entries based on the interaction between EMAs, momentum, and clean price breaks.
Instead of relying on traditional EMA crossovers — which are often too slow — this tool focuses on direct EMA breakouts, allowing you to catch moves before most traders even react.
CSI Cycle Swing MomentumAdaptive Ultra-Smooth Momentum (Cycle-Swing Indicator – CSI)
The Cycle-Swing Indicator (CSI) is an advanced, adaptive momentum oscillator designed to extract clean, reliable signals from market data by focusing on the swing of the dominant market cycle rather than raw momentum. By identifying and aligning with the current dominant cycle, the CSI produces a momentum curve that is exceptionally smooth, responsive, and context-aware.
Key Advantages
The CSI offers several improvements over traditional momentum-based indicators:
Ultra-smooth signal line without sacrificing responsiveness
Zero-lag behavior, enabling timely entries and exits
Pronounced turning-point precision, enhancing signal clarity
Adaptive to real market cycles, automatically adjusting to changing conditions
Reliable deviation and divergence detection, even in noisy environments
Why Standard Indicators Fall Short
Conventional oscillators often struggle in real-world market conditions:
Excessive noise leads to frequent false signals.
Added smoothing reduces noise but introduces significant lag, delaying actionable insights.
Fixed-length parameters make indicators highly sensitive to user settings—you never truly know the "right" length.
The CSI solves all these challenges through its adaptive cyclic algorithm, which automatically aligns itself with the market’s dominant cycle—no manual tuning required.
Practical Example
In the example chart, the CSI highlights clear turning points and deviations with far less noise than the standard momentum indicator, demonstrating its superior clarity and responsiveness.
How to Use
The CSI is fully adaptive and requires no parameters. Simply apply it to any symbol and timeframe—the indicator automatically detects the dominant cycle and produces an ultra-smooth, cycle-aligned momentum curve.
Included features:
Adaptive upper and lower bands identifying extreme conditions
Automatic divergence detection (toggle on/off)
Works on any timeframe and any asset
Adaptive length - no input parameter required
How to Read the Indicator
The CSI functions similarly to a traditional momentum oscillator but with enhanced adaptive context:
Look for divergences between price and the CSI signal line — powerful early warnings of weakening trends or impending shifts.
Note on Divergence Signals:
The divergence markers displayed on the chart are generated using embedded pivot-based detection. Because pivots must be confirmed by price action, divergence signals can only be plotted after a pivot forms. For real-time monitoring on the latest bar, users should watch for early-forming divergences as they develop, since confirmed pivot-based divergences will always appear with a slight delay. Script parameters are available for precise adjustment of pivot detection behaviour.
Info: Legacy vs. Pro Version
This is the actively maintained and continuously enhanced edition of my free, open-source indicator “Cycle Swing Momentum”. The Pro Version will remain fully up to date with the latest Pine Script standards and will receive ongoing refinements and feature improvements, all while preserving the core logic and intent of the original tool. The legacy version will continue to be available for code review and educational purposes, but it will no longer receive updates. The legacy open-source version is always available in the public TV indicator repository.
Paid script
CSI Cycle Swing Momentum Indicator ProAdaptive Ultra-Smooth Momentum (Cycle-Swing Indicator – CSI)
The Cycle-Swing Indicator (CSI) is an advanced, adaptive momentum oscillator designed to extract clean, reliable signals from market data by focusing on the swing of the dominant market cycle rather than raw momentum. By identifying and aligning with the current dominant cycle, the CSI produces a momentum curve that is exceptionally smooth, responsive, and context-aware.
Key Advantages
The CSI offers several improvements over traditional momentum-based indicators:
Ultra-smooth signal line without sacrificing responsiveness
Zero-lag behavior, enabling timely entries and exits
Pronounced turning-point precision, enhancing signal clarity
Adaptive to real market cycles, automatically adjusting to changing conditions
Reliable deviation and divergence detection, even in noisy environments
Why Standard Indicators Fall Short
Conventional oscillators often struggle in real-world market conditions:
Excessive noise leads to frequent false signals.
Added smoothing reduces noise but introduces significant lag, delaying actionable insights.
Fixed-length parameters make indicators highly sensitive to user settings—you never truly know the "right" length.
The CSI solves all these challenges through its adaptive cyclic algorithm, which automatically aligns itself with the market’s dominant cycle—no manual tuning required.
Practical Example
In the example chart, the CSI highlights clear turning points and deviations with far less noise than the standard momentum indicator, demonstrating its superior clarity and responsiveness.
How to Use
The CSI is fully adaptive and requires no parameters. Simply apply it to any symbol and timeframe—the indicator automatically detects the dominant cycle and produces an ultra-smooth, cycle-aligned momentum curve.
Included features:
Adaptive upper and lower bands identifying extreme conditions
Automatic divergence detection (toggle on/off)
Works on any timeframe and any asset
Adaptive length - no input parameter required
How to Read the Indicator
The CSI functions similarly to a traditional momentum oscillator but with enhanced adaptive context:
Look for divergences between price and the CSI signal line — powerful early warnings of weakening trends or impending shifts.
Note on Divergence Signals:
The divergence markers displayed on the chart are generated using embedded pivot-based detection. Because pivots must be confirmed by price action, divergence signals can only be plotted after a pivot forms. For real-time monitoring on the latest bar, users should watch for early-forming divergences as they develop, since confirmed pivot-based divergences will always appear with a slight delay. Script parameters are available for precise adjustment of pivot detection behaviour.
Info: Legacy vs. Pro Version
This is the actively maintained and continuously enhanced edition of my free, open-source indicator “Cycle Swing Momentum”. The Pro Version will remain fully up to date with the latest Pine Script standards and will receive ongoing refinements and feature improvements, all while preserving the core logic and intent of the original tool. The legacy version will continue to be available for code review and educational purposes, but it will no longer receive updates. The legacy open-source version is always available in the public TV indicator repository.
SPX Breadth – Stocks Above 200-day SMA//@version=6
indicator("SPX Breadth – Stocks Above 200-day SMA",
overlay = false,
max_lines_count = 500,
max_labels_count = 500)
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// Inputs
group_source = "Source"
breadthSymbol = input.symbol("SPXA200R", "Breadth symbol", group = group_source)
breadthTf = input.timeframe("", "Timeframe (blank = chart)", group = group_source)
group_params = "Parameters"
totalStocks = input.int(500, "Total stocks in index", minval = 1, group = group_params)
smoothingLen = input.int(10, "SMA length", minval = 1, group = group_params)
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// Breadth series (symbol assumed to be percent 0–100)
string tf = breadthTf == "" ? timeframe.period : breadthTf
float rawPct = request.security(breadthSymbol, tf, close) // 0–100 %
float breadthN = rawPct / 100.0 * totalStocks // convert to count
float breadthSma = ta.sma(breadthN, smoothingLen)
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// Regime levels (0–20 %, 20–40 %, 40–60 %, 60–80 %, 80–100 %)
float lvl0 = 0.0
float lvl20 = totalStocks * 0.20
float lvl40 = totalStocks * 0.40
float lvl60 = totalStocks * 0.60
float lvl80 = totalStocks * 0.80
float lvl100 = totalStocks * 1.0
p0 = plot(lvl0, "0%", color = color.new(color.black, 100))
p20 = plot(lvl20, "20%", color = color.new(color.red, 0))
p40 = plot(lvl40, "40%", color = color.new(color.orange, 0))
p60 = plot(lvl60, "60%", color = color.new(color.yellow, 0))
p80 = plot(lvl80, "80%", color = color.new(color.green, 0))
p100 = plot(lvl100, "100%", color = color.new(color.green, 100))
// Colored zones
fill(p0, p20, color = color.new(color.maroon, 80)) // very oversold
fill(p20, p40, color = color.new(color.red, 80)) // oversold
fill(p40, p60, color = color.new(color.gold, 80)) // neutral
fill(p60, p80, color = color.new(color.green, 80)) // bullish
fill(p80, p100, color = color.new(color.teal, 80)) // very strong
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// Plots
plot(breadthN, "Stocks above 200-day", color = color.orange, linewidth = 2)
plot(breadthSma, "Breadth SMA", color = color.white, linewidth = 2)
// Optional label showing live value
var label infoLabel = na
if barstate.islast
label.delete(infoLabel)
string txt = "Breadth: " +
str.tostring(breadthN, format.mintick) + " / " +
str.tostring(totalStocks) + " (" +
str.tostring(rawPct, format.mintick) + "%)"
infoLabel := label.new(bar_index, breadthN, txt,
style = label.style_label_left,
color = color.new(color.white, 20),
textcolor = color.black)
Square of Nine Levels [RC] Basic📐 Square of Nine Levels Basic— Precision Market Geometry for Dynamic Price Targets
The Square of Nine Levels Basic indicator is a powerful price-projection and level-mapping tool based on W.D. Gann’s legendary Square of Nine mathematical system. This indicator transforms market prices into geometric rotations and harmonic levels—revealing price zones where markets historically accelerate, pause, or reverse with uncanny accuracy.
Unlike static Fibonacci tools, Square of Nine levels expand radially around a chosen base price, creating concentric price cycles that align with vibrational mathematics and cyclical market resonance. When price interacts with these rotational degrees, traders often witness structural reactions that are invisible to standard indicators.
🧭 What This Indicator Does
Once a trader inputs (or clicks) a Base Price, the indicator automatically:
✔️ Computes Square of Nine projections in upward and downward directions
✔️ Plots concentric price circles (levels of expansion) (Basic Version 1 Level Only)
✔️ Highlights rotational harmonics and midpoint attractors
✔️ Shows Golden Ratio (0.786 / 0.618 / 0.382 / 0.236) cyclic divisions
✔️ Provides clear visual level markers & labels for analysis
✔️ Adjusts dynamically as price trends evolve
These levels act as mathematical magnets, where price frequently:
Finds hidden support or resistance
Creates fair value rejection zones
Forms breakout thresholds
Completes wave and time cycles
Resonates with prior swing pivots
🔍 Key Features
Feature Benefit
_________________________________________________________________________
Auto Square-of-Nine Level Calculation Zero manual computation—instant geometry
Adjustable Circles & Points Model Gann expansions as per your theory
Golden Ratio & Midpoint Zones Adds confluence for precision entries
Multi-color Cycle Layers Instantly differentiate price cycles
Minimal UI Designed for professional clean charts
🧠 Why the Square of Nine Matters
Gann believed that price does not move randomly—it rotates through degrees, harmonics, and vibrational frequencies. The Square of Nine captures this rotation mathematically:
Price in time equals price in space.
This tool reveals those rotational levels, allowing traders to anticipate when price is likely to pivot or continue—with mathematically predictable targets.
🎯 Best Use-Cases
Identifying major support/resistance levels
Timing cycle inflection points
Swing, positional, and index-level forecasting
If you trade using Gann methods, cycles, harmonics, Square of 9, or astro-geometry, this indicator becomes a foundational levels and projection engine.
🚀 Take Your Charting to the Next Dimension
The Square of Nine Levels Basic is not just a level plotter—it is a market resonance system. Once you understand how price vibrates around these circles, you gain a structural edge that most traders never discover.
Z-score RegimeThis indicator compares equity behaviour and credit behaviour by converting both into z-scores. It calculates the z-score of SPX and the z-score of a credit proxy based on the HYG divided by LQD ratio.
SPX z-score shows how far the S&P 500 is from its rolling average.
Credit z-score shows how risk-seeking or risk-averse credit markets are by comparing high-yield bonds to investment-grade bonds.
When both z-scores move together, the market is aligned in either risk-on or risk-off conditions.
When SPX z-score is strong but credit z-score is weak, this may signal equity strength that is not supported by credit markets.
When credit z-score is stronger than SPX z-score, credit markets may be leading risk appetite.
The indicator plots the two z-scores as simple lines for clear regime comparison.
CCI TIME COUNT//@version=6
indicator("CCI Multi‑TF", overlay=true)
// === Inputs ===
// CCI Inputs
cciLength = input.int(20, "CCI Length", minval=1)
src = input.source(hlc3, "Source")
// Timeframes
timeframes = array.from("1", "3", "5", "10", "15", "30", "60", "1D", "1W")
labels = array.from("1m", "3m", "5m", "10m", "15m", "30m", "60m", "Daily", "Weekly")
// === Table Settings ===
tblPos = input.string('Top Right', 'Table Position', options = , group = 'Table Settings')
i_textSize = input.string('Small', 'Text Size', options = , group = 'Table Settings')
textSize = i_textSize == 'Small' ? size.small : i_textSize == 'Normal' ? size.normal : i_textSize == 'Large' ? size.large : size.tiny
textColor = color.white
// Resolve table position
var pos = switch tblPos
'Top Left' => position.top_left
'Top Right' => position.top_right
'Bottom Left' => position.bottom_left
'Bottom Right' => position.bottom_right
'Middle Left' => position.middle_left
'Middle Right' => position.middle_right
=> position.top_right
// === Custom CCI Function ===
customCCI(source, length) =>
sma = ta.sma(source, length)
dev = ta.dev(source, length)
(source - sma) / (0.015 * dev)
// === CCI Values for All Timeframes ===
var float cciVals = array.new_float(array.size(timeframes))
for i = 0 to array.size(timeframes) - 1
tf = array.get(timeframes, i)
cciVal = request.security(syminfo.tickerid, tf, customCCI(src, cciLength))
array.set(cciVals, i, cciVal)
// === Countdown Timers ===
var string countdowns = array.new_string(array.size(timeframes))
for i = 0 to array.size(timeframes) - 1
tf = array.get(timeframes, i)
closeTime = request.security(syminfo.tickerid, tf, time_close)
sec_left = barstate.isrealtime and not na(closeTime) ? math.max(0, (closeTime - timenow) / 1000) : na
min_left = sec_left >= 0 ? math.floor(sec_left / 60) : na
sec_mod = sec_left >= 0 ? math.floor(sec_left % 60) : na
timer_text = barstate.isrealtime and not na(sec_left) ? str.format("{0,number,00}:{1,number,00}", min_left, sec_mod) : "–"
array.set(countdowns, i, timer_text)
// === Build Table ===
if barstate.islast
rows = array.size(timeframes) + 1
var table t = table.new(pos, 3, rows, frame_color=color.rgb(252, 250, 250), border_color=color.rgb(243, 243, 243))
// Headers
table.cell(t, 0, 0, "Timeframe", text_color=textColor, bgcolor=color.rgb(238, 240, 242), text_size=textSize)
table.cell(t, 1, 0, "CCI (" + str.tostring(cciLength) + ")", text_color=textColor, bgcolor=color.rgb(239, 243, 246), text_size=textSize)
table.cell(t, 2, 0, "Time to Close", text_color=textColor, bgcolor=color.rgb(239, 244, 248), text_size=textSize)
// Data Rows
for i = 0 to array.size(timeframes) - 1
row = i + 1
label = array.get(labels, i)
cciVal = array.get(cciVals, i)
countdown = array.get(countdowns, i)
// Color CCI: Green if < -100, Red if > 100
cciColor = cciVal < -100 ? color.green : cciVal > 100 ? color.red : color.rgb(236, 237, 240)
// Background warning if <60 seconds to close
tf = array.get(timeframes, i)
closeTime = request.security(syminfo.tickerid, tf, time_close)
sec_left = barstate.isrealtime and not na(closeTime) ? math.max(0, (closeTime - timenow) / 1000) : na
countdownBg = sec_left < 60 ? color.rgb(255, 220, 220, 90) : na
// Table cells
table.cell(t, 0, row, label, text_color=color.rgb(239, 240, 244), text_size=textSize)
table.cell(t, 1, row, str.tostring(cciVal, "#.##"), text_color=cciColor, text_size=textSize)
table.cell(t, 2, row, countdown, text_color=color.rgb(232, 235, 243), bgcolor=countdownBg, text_size=textSize)
BTC Runner V1Bitcoin Runner V1 — advanced proprietary visual tool created specifically for long-term Bitcoin cycle research on 1D, 1W and 1M timeframes.
The indicator operates in two fundamentally different visual modes:
Buffett Mode (4-Year Halving Cycle Logic)
Fully built on Bitcoin’s historical ~4-year halving cycle. Using an original mathematical formula and real-time price data, the indicator continuously tracks whether the current cycle has reached the structural point that historically marked the final phase of previous bull markets.
As soon as ALL formula conditions are met for the first time:
- Chart background instantly changes color (green → red at cycle top, red → green at cycle bottom reversal)
- A large permanent non-repainting banner appears showing the exact date and price of the All-Time High (ATH) of the current cycle
- Fixed label “ATH” with price and timestamp is plotted and remains on the chart forever
Examples on charts:
- Chart #1 (20 Jan 2018) — green background still active, bull phase ongoing
- Chart #2 (22 Jan 2018) — exact moment all conditions triggered: background turns red + permanent ATH banner with unchangeable data appears
The same logic works in reverse when a bear cycle ends and a new bull cycle begins.
Cramer Mode (Historical Correction & Drawdown Zones Logic)
Based on over 10 years of personal observation of recurring percentage zones across multiple Bitcoin cycles:
• Major corrections historically reaching up to ~84% from local highs
• Intermediate drawdowns typically 20–55%
When ALL conditions of the multi-stage proprietary formula are satisfied for the first time after a prolonged decline or consolidation, the indicator automatically draws in real time:
1. Large green background banner with bold white text “AP” (Analyzed Point) — marking the price level where, according to many years of observation across several cycles, such deep corrections have historically completed.
2. Dynamic floating label “TP” (Tracked Progress) — a temporary price marker that moves with the current price in real time.
As soon as price touches or exceeds this level, the entire banner instantly and permanently turns blue and the text changes to “AP Completed”.
All banners, colors, and labels appear strictly automatically in live mode and never repaint.
Important:
- The script contains over 500 lines of completely original closed-source code.
- No standard indicators are used (moving averages, Fibonacci, waves, volume, volume profile, etc.). Only pure original mathematical modeling.
- The indicator is intended exclusively for research, educational, and informational purposes.
- It contains no trading recommendations, investment advice, or calls to action of any kind.
Respectful note to TradingView moderators and users:
If any visual elements or logic seem similar to previously published open-source scripts — feel free to use those open-source versions instead.
Bitcoin Runner V1 is a 100% original closed-source tool based on the author’s personal multi-year research and observations.
Jon Secret SauceJon Secret Sauce — Advanced Trend + Momentum Entry Signals
A premium trade-timing engine that combines MA trend confirmation, volatility filters, RSI momentum, and smart volume validation to identify high-probability long & short entries on your preferred timeframe.
Includes auto-managed exits (TP / SL / technical breakdown), professional visuals, and alert notifications so you catch the move and protect profits — without overcrowding your chart.
Momentum Structural AnalysisMomentum Structural Analysis (MSA‑style Oscillator)
This indicator implements a simple, MSA‑style momentum oscillator that measures how far price has moved above or below its own long‑term trend on the active timeframe, expressed in percentage terms. Instead of looking at raw price, it "oscillates" price around a timeframe‑appropriate simple moving average (SMA) and plots the percentage distance from that SMA as an orange line around a zero baseline. Zero means price is exactly at its structural trend; positive values mean price is extended above trend; negative values mean it is trading below trend.
The script automatically selects the SMA length based on the chart timeframe:
On daily charts it uses the configurable Daily SMA Length (default 252 trading days, roughly 1 year).
On weekly charts it uses Weekly SMA Length (default 208 weeks).
On monthly charts it uses Monthly SMA Length (default 120 months).
This approach is inspired by the ideas behind Momentum Structural Analysis (MSA), which studies where a market trades relative to long‑term moving averages and then treats the momentum line (the oscillator) as the primary object of analysis. The goal is to highlight structural overbought/oversold conditions and regime changes that are often clearer on momentum than on the raw price chart.
--------------------------------------------------
What the script computes and how it works
For each bar, the indicator:
Chooses an SMA length based on the current timeframe (daily/weekly/monthly).
Calculates the SMA of the close.
Computes the percentage distance:
\text{Diff %} = \frac{\text{Close} - \text{SMA}}{\text{SMA}} \times 100
Plots this Diff % as an orange line, with a dashed horizontal zero line as the base.
This produces a momentum oscillator that oscillates around zero and reflects the "structural" position of price versus its own long‑term mean.
--------------------------------------------------
How to use it on index charts (e.g., NIFTY50)
On indices like NIFTY50, use the indicator to see how stretched the index is versus its structural trend.
Typical uses:
Identify extremes: a). Historically high positive readings can signal euphoric, late‑stage conditions where risk is elevated. b). Deep negative readings can highlight panic/capitulation zones where downside may be exhausted.
Draw structural levels: a). Mark horizontal bands on the oscillator where past turns have occurred (e.g., +15%, −10%, etc. specific to NIFTY50). b). Watch how price behaves when the oscillator revisits these zones: repeated rejections can validate them as structural bounds; clean breaks can indicate a change of regime.
This is not a buy/sell signal generator by itself; it is a framework to understand where the index sits within its long‑term momentum structure and to support risk‑management decisions.
--------------------------------------------------
How to use it on ratio charts
Apply the same indicator to ratio symbols such as NIFTY50/GOLD, BANKNIFTY/NIFTY50, sector vs index, or any spread you plot as a ratio.
On a ratio chart:
The oscillator now measures relative momentum: how far that ratio is above or below its own long‑term mean.
High positive readings = strong outperformance of the numerator vs the denominator (e.g., equities strongly outperforming gold).
Deep negative readings = strong underperformance (e.g., equities structurally lagging gold).
This is very much in the spirit of MSA’s work on spreads between asset classes: it helps visualize major rotations (equities → gold, financials → commodities, etc.) and whether a relative‑performance trend is stretched, reverting, or breaking into a new phase.
--------------------------------------------------
Using multiple timeframes for better decisions
You can stack information across timeframes to get a more robust view:
Monthly : a). Use monthly charts to see secular/structural phases. b). Long multi‑year stretches above or below zero, and large bases or trendline breaks on the monthly oscillator, can mark major bull or bear cycles and big rotations between asset classes.
Weekly : a). Use weekly charts for the primary trend. b). Weekly structures (multi‑month highs/lows, channels, or trendlines on the oscillator) are useful for medium‑term positioning and for confirming or rejecting signals seen on the monthly view.
Daily : a). Use daily charts mainly for timing entries/exits once the higher‑timeframe direction is clear. b). Short‑term extremes on the daily oscillator that align with the larger weekly/monthly structure can offer better‑timed opportunities, while signals that contradict higher‑timeframe momentum are more likely to be noise.
--------------------------------------------------






















