Customizable Macro If you’re strategy relies on time then this indicator allows you to customize specific time windows to show so you no longer have to manually keep track of the time.
Dönemler
Work Break Area BackgroundWorkdays and off-hours are distinguished by background color for easy date differentiation during reviews.
Yearly VWAPIn this update, I’ve enhanced the Yearly VWAP script so that it now works reliably on all timeframes starting from the 5-minute chart and higher. Previously, the monthly reset logic caused inconsistencies on lower timeframes. Now, the indicator uses a yearly reset based on the calendar year, ensuring stable and accurate VWAP calculations without issues.
In short, you can confidently apply this Yearly VWAP to any timeframe from 5 minutes upwards and get consistent results.
EURUSD | Yield Curve Flip Strategy (2s10s State Flips)Strategy Core (Concept)
The strategy trades EURUSD exclusively when the US yield curve regime (2Y/10Y) flips into a new, clearly bullish or bearish regime. The core assumption is that re-pricing in the US yield curve (rather than individual data points) is a robust driver of USD strength or weakness and can act as a structural trigger for trend changes.
⸻
Data Basis
• Uses US 2Y Yield (TVC:US02Y) and US 10Y Yield (TVC:US10Y).
• The 2s10s curve is calculated as:
curveUS = US10Y – US2Y
• Regime assessment is based on the N-day change (default: 5 days), calculated on true rates bars (not intraday noise).
⸻
Regime Detection (Correct Bond Logic)
First, the strategy checks whether the curve has significantly steepened or flattened over the lookback period:
• Steepener if Δ(2s10s) > thrCurve (default: +0.10 percentage points = 10 bp)
• Flattener if Δ(2s10s) < −thrCurve
Next, a leg confirmation determines the specific type of steepener/flattener (default thrLeg = 5 bp):
Bull Steepener
• Curve steepens because yields fall, with the 2Y falling more (risk-off / rate-cut pricing)
Bear Steepener
• Curve steepens because yields rise, with the 10Y rising more (reflation / term-premium move)
Bull Flattener
• Curve flattens because yields fall, with the 10Y falling more (growth shock / long-end rally)
Bear Flattener
• Curve flattens because yields rise, with the 2Y rising more (hawkish repricing / front-end up)
Important: By default, a Bear Steepener is not treated as a bearish signal, unless allowBearSteepForShort is enabled.
⸻
State Machine (Memory + Flip Triggers)
The strategy maintains a persistent state variable curveState:
• +1 = bullish
• −1 = bearish
• 0 = neutral
The state is updated only on a new rates bar (daily rates when tfRates = "D"), avoiding intraday noise.
A trade is generated only on a true regime flip:
• flipToBull: new state turns bullish and the previous state was bearish (or neutral, if allowed)
• flipToBear: new state turns bearish and the previous state was bullish (or neutral, if allowed)
The option enterFromNeutral controls whether the first clear regime emerging from neutral is traded.
The option onlyOnNewRatesBar ensures signals occur only when a new rates bar is printed, providing clean timing.
⸻
Trading Rules (Entry / Exit)
There are no stops, targets, or trailing mechanisms. The strategy is a pure regime-switching / reversal system:
• On flipToBull
• Close short (“S”)
• Open long (“L”)
• On flipToBear
• Close long (“L”)
• Open short (“S”)
Positions are therefore held until the next regime flip.
⸻
Parameter Interpretation
• N: Smoothing / inertia. Smaller = faster but noisier; larger = more stable but later.
• thrCurve: Minimum curve move required to define a regime.
• thrLeg: Minimum move of the confirming leg (2Y or 10Y) to reduce misclassification.
• allowBearSteepForShort: Makes the system more aggressive (more bearish signals), but represents a different macro case.
• enterFromNeutral: Increases trade frequency by trading the first regime impulse.
⸻
What You See on the Chart
• Background shading:
• Green for bullish state
• Red for bearish state
• The curve and Δ-curve are plotted but hidden (display=none), mainly for debugging and analysis.
Highlighted Range (3 Sessions)3 session customizable range. All one color customizable for simplicity.
BTC - VDD Multiple (Approx)Overview & Philosophy
⚠️ Note: This indicator is optimized for the Daily (1D) Timeframe. Please switch your chart to 1D for accurate signal reading.
The BTC – VDD Multiple (Approx) is an advanced oscillator designed to identify market overheating and cycle tops by analyzing the velocity of value moving through the market.
In traditional On-Chain Analysis, Value Days Destroyed (VDD) is a premier metric for spotting macro tops. It multiplies the coin age (how long a coin was held) by the price at which it was moved. When old coins (HODLer money) move at high prices, VDD spikes, signaling massive profit-taking.
The Problem: Real "Coin Days Destroyed" (CDD) data is typically locked behind institutional paywalls or unavailable on standard TradingView plans.
The Solution: This script calculates a Deterministic Proxy. By analyzing the relationship between Exchange Volume, Price, and a Dormancy Constant, we can approximate the structure of the VDD Multiple without needing a premium data feed.
Methodology
The VDD Multiple works by comparing short-term market velocity against a long-term baseline.
1. The Proxy Calculation
Since we cannot directly access the age of coins on TradingView, we model the economic weight of the move:
Proxy Value = Exchange Volume * Price * Dormancy Factor
This creates a synthetic representation of "Value Throughput."
2. The Multiple
We compare the immediate heat of the market against the yearly trend:
• Short-Term MA (2 Days): Captures flash spikes and sudden liquidity exit events.
• Long-Term MA (365 Days): Represents the baseline "hum" of network activity.
VDD Multiple = Short Term MA / Long Term MA
How to Read the Chart
The indicator plots the Multiple as a line and uses background highlighting to signal extreme regimes.
🔴 The Red Zone (Overheated > 2.9)
Meaning: Current value transfer is ~3x higher than the yearly average.
Interpretation: Historically, sharp spikes into the Red Zone correlate with Local or Cycle Tops. This indicates that massive volume is changing hands at high prices—typically a sign of "Smart Money" distributing into "Dumb Money" FOMO.
Note: In strong bull runs, price can push higher even after a VDD spike, but the risk/reward ratio is extremely poor here.
🟢 The Green Zone (Undervalued < 0.75)
Meaning: Market activity is quiet and below the yearly baseline.
Interpretation: These are periods of apathy or accumulation. Historically, extended time spent in the Green Zone (the "flatline") has offered the best asymmetric buying opportunities.
🟠 The Orange Line (Neutral)
Meaning: The market is in transition or equilibrium.
Strategy & Context
This indicator is best used as a Macro Cycle Tool, not a day-trading signal.
• Exit Strategy: Look for "Clusters" of Red Spikes. A single spike often marks a local correction, but a cluster of intense spikes while price makes new highs (Divergence) is a strong Cycle Top warning.
• Entry Strategy: Historically the best entries occur when the indicator flattens out in the Green Zone for weeks or months. This suggests sellers are exhausted and the market has reached a floor.
Credits
This script is an approximation of the original VDD Multiple concept. Full credit for the underlying on-chain theory goes to the pioneers of this metric:
• Concept: The original Value Days Destroyed metric was popularized by Hans Hauge and Glassnode.
• The Multiple: The specific application of a Short/Long MA Multiple on VDD is widely attributed to analysts like TXMC and Bitbo.
This script adapts these concepts for the free TradingView environment using exchange volume proxies.
Settings
• Data Source: Defaults to BINANCE:BTCUSDT to capture high-volume liquidity.
• Short MA: Default is 2 Days to capture rapid velocity spikes.
• Long MA: Default is 365 Days to track the annual trend.
Disclaimer
This tool is an approximation based on exchange volume, not raw blockchain data. While exchange volume and on-chain volume are highly correlated during cycle extremes, they are not identical. This script is for educational and research purposes only. Past performance does not guarantee future results.
Tags
bitcoin, btc, onchain, vdd, cdd, valuation, cycle, top, bottom, Rob Maths
Dipy the MFT Super OscillatorDipy the MFT Super Oscillator
A multi-timeframe bandpass oscillator for mean-reversion and "buy the dip" strategies.
🎯 What It Does
Isolates market cycles within a specific frequency range to identify overbought/oversold conditions and reversal points.
⏱️ Multi-Timeframe
Set Signal Timeframe to calculate signals on higher TF while viewing lower TF chart. Example: 5min chart + 1H signals = noise reduction with precise timing.
⚙️ Key Settings
Bandwidth/BandEdge: Define the cycle range to capture
Cloud Type: None for thresholds, others for consensus cloud
Thresholds: Overbought/oversold levels for signals
💡 Best Use
Combine with trend indicator (only buy dips in uptrend)
Higher Signal Timeframe = cleaner signals
Cloud mode = more conservative entries
🔔 Alerts
Create ONE alert for all signals.
Derived from TASC 2025.04 Ultimate Oscillator by John Ehlers.
Druckenmiller Alpha-Physics [Dual-Core]Stop trading in a vacuum. Start trading like a Macro Fund Manager.
The Druckenmiller Alpha-Physics engine is a professional-grade dashboard designed to solve the single biggest problem in trading: Context. Most traders buy a "dip" only to realize it was a crash, or sell a "rip" only to watch it fly higher.
This tool solves this by synthesizing Market Physics (Velocity & Acceleration) across two distinct timeframes (Weekly Macro & Daily Tactical) and filtering every signal through a Global Liquidity Shield.
It is engineered based on the trading philosophy of Stanley Druckenmiller: “I don’t care about the news. I care about the liquidity and the acceleration of the trend.”
How It Works (The Dual-Core Logic)
The engine runs 27 distinct sector assets through a dual-loop physics processor:
The Macro Core (Weekly): Analyzes the 18-month trend. Is the "Tide" coming in or going out?
The Tactical Core (Daily): Analyzes the 3-day price action. Is the "Wave" crashing or rising?
It then synthesizes these two data streams into a single Action Signal.
The Signals (How to Read)
The dashboard tells you exactly what to do based on the conflict between Macro and Micro:
🟢 BUY PULLBACK (The "Alpha" Trade):
Logic: Macro is RIPPING (Bullish) + Tactical is TOP/CRASH (Bearish).
Meaning: You are buying a long-term leader on a short-term discount.
🔵 STINK BID (The "Bottom" Trade):
Logic: Macro is TURNING UP + Tactical is CRASHING.
Meaning: The physics have shifted positive, but price is still dumping. Place limit orders -5% lower to catch the panic bottom.
🔴 SELL RIP (The "Trap" Trade):
Logic: Macro is TOPPING (Bearish) + Tactical is RIPPING (Bullish).
Meaning: The long-term trend is dead. Sell into this short-term rally immediately.
⚪ HOLD: All systems go. Sit on your hands and ride the trend.
The "Invisible" Liquidity Shield
The most dangerous time to buy is when the Fed is draining liquidity. This script monitors the 10-Year Treasury Yield (TNX) and VIX in real-time.
If Liquidity is OK (Navy Header): Signals are valid. Green means Go.
If Liquidity is TIGHT (Maroon Header): The entire dashboard enters "Defense Mode." Buy signals are tinted Maroon to warn you that you are fighting the Fed.
Included Universe (The "Ultimate" List)
Includes 27 institutional-grade tickers covering every corner of the market:
Growth: XLK, SMH, IGV, GRID, QTUM
Cyclical: JETS, XHB, KRE, XLI, XLF
Commodities: GDX, URA, XLE, XLB, TAN
Risk/Safety: IBIT, TLT, XLV, XLP
Note: This script uses dynamic request handling optimized for Pine Script v6. It is designed for Premium/Ultimate plans due to the high volume of data processing (54+ simultaneous streams).
Time Window Highlight📌 What this script does
Time Window Highlight highlights a specific intraday time window directly on your chart using a background color and optional vertical lines.
It was built for traders who focus on behavior around the US market open, where volatility, positioning, and false initial moves often occur.
The script does not generate signals.
It provides visual structure and timing clarity.
⸻
⏰ Default Use Case
By default, the window is set to:
• 15:40 – 16:00 (Europe/Rome time)
This time range is commonly used to observe:
• post-open fake moves
• early reversals
• stabilization after initial volatility
All times are fully customizable.
⸻
🎛️ Features
• ✅ Custom start & end time (hours and minutes)
• ✅ Background highlight for the active window
• ✅ Optional vertical start & end lines
• ✅ Option to include the full end candle
• ✅ Option to shift the end line to the end of the end candle
• ✅ Optional weekday filter (Monday–Friday only)
• ✅ Clean chart logic (historical background, live-day focus)
⸻
🧠 Designed Philosophy
This script was intentionally built to:
• avoid repainting
• avoid signals or bias
• avoid over-engineering
It is meant to support discretion, not replace it.
Use it to:
• stay patient outside your key window
• focus only when your session begins
• avoid forcing trades at random times
⸻
⚠️ Important Notes
• The script uses the chart’s timezone
→ Make sure your chart is set to Europe/Rome (or your preferred timezone).
• Background coloring works on full candles only (TradingView limitation).
• Vertical lines are time-anchored and align precisely with the session window.
⸻
🧪 Recommended Timeframes
• 1m / 2m / 5m (intraday)
• Not intended for daily or higher timeframes
⸻
❗ Disclaimer
This script is a visual aid only.
It does not provide buy or sell signals and should be used as part of a broader trading plan.
Guru Dronacharya Option Pair Intelligence SystemGuru Dronacharya is an advanced options-pair analysis and intraday trading system designed for index and stock options (NIFTY, BANKNIFTY, and selected equities).
The script analyzes Call (CE) and Put (PE) option pairs simultaneously to identify:
• Low-risk option combinations
• Price overlap (compression) zones
• Breakout-based Buy Call / Buy Put opportunities
• Re-entry hedge signals
• Nth-candle angle-based momentum trades
It combines price structure, volatility and time-based geometry to produce high-probability directional option trades with automatic target projections.
IMPORTANT NOTES
• This is not a fully automated system
• Always use proper risk management
• Avoid trading during low-volume or sideways markets
• Designed for intraday option buying only
• Targets are projections, not guarantees
How to use : 1. Enter index/stock opening price in index/option stock price box.
2. Select the CE/PE pair from the center Grid Table.
3. Ensure that final condition showing "yes" in all section.
WHO SHOULD USE THIS?
✔ Intraday option buyers
✔ Traders who prefer structure + confirmation
✔ Users who want strike-selection assistance
✔ Traders avoiding emotional or random trades
DISCLAIMER
This indicator is for educational and analytical purposes only.
The author is not responsible for any financial losses.
Please consult a licensed financial advisor before trading.
Key High/Low liquidity @sheershThe Key High/Low ICT by @sheersh169sharma indicator is designed to identify key liquidity levels across multiple timeframes and custom trading sessions. It provides precise visualization of historical highs and lows to assist in technical analysis.
## Key Features
* Multi-Timeframe Support: Automatically plots Previous Day, Week, 4-Hour, and 1-Hour levels.
* Custom Sessions: Supports up to 6 independently configurable time windows.
* Precise Anchoring: Lines originate exactly from the time the high or low formed.
* Mitigation Logic: Options to terminate lines upon price interaction or extend them indefinitely.
## Configuration Guide
### Standard Timeframes
Users can toggle and customize the following levels:
* Previous Day High/Low
* Previous Week High/Low
* Previous 4-Hour High/Low
* Previous 1-Hour High/Low
Each level allows for customization of visibility, color, and line style (Solid, Dashed, Dotted).
### Custom Sessions
The indicator supports 6 distinct custom sessions, ideal for defining specific market hours (e.g., Asia, London, New York).
Setup Instructions:
1. Navigate to the desired Session group in settings (e.g., Session 1).
2. Enable the session.
3. Define the time range in HHMM-HHMM format (e.g., 0930-1600).
4. Assign custom labels for identification.
5. Select line colors and styles.
### Extension Logic
The "Extend until Mitigated Only" setting controls how lines are drawn:
* Disabled (Default): Lines extend from the custom timeframe to the current chart bar.
* Enabled: Lines terminate strictly at the point where price touches the level.
### Visual Settings
* Line Width: Adjusts the thickness of all indicator lines globally.
* Labels: Text labels are positioned to the right of the lines to maintain chart clarity.
BTC Halving VWAP [Cycle Analysis]█ OVERVIEW
This indicator plots Anchored Volume Weighted Average Prices (VWAPs) from each Bitcoin halving date, revealing the "fair value" of each market cycle.
The key insight: When price closes below the current cycle's VWAP on the monthly chart (after 1+ year into the cycle), it historically signals the end of the bull market and continuation toward the previous halving's VWAP.
█ HALVING DATES
• H1: November 28, 2012 (Block 210,000)
• H2: July 9, 2016 (Block 420,000)
• H3: May 11, 2020 (Block 630,000)
• H4: April 19, 2024 (Block 840,000)
█ FEATURES
◽ Anchored VWAPs — VWAP lines calculated from each halving date
◽ Consolidation Bands — Adjustable percentage bands around each VWAP (default ±15%)
◽ Cycle Top Detection — Tracks the highest high before VWAP breakdown
◽ Breakdown Signals — Visual markers when price breaks below cycle VWAP (bearish confirmation)
◽ Interactive Dashboard — Shows cycle progress, VWAP levels, and historical comparison
◽ Alerts — Configurable alerts for VWAP crossovers and breakdowns
█ HOW TO USE
1. Apply to BTCUSD on the Monthly timeframe for best results
2. Watch the H4 VWAP (gold line) — this is the current cycle's fair value
3. When price is ABOVE the VWAP → Bullish bias
4. When price is BELOW the VWAP → Bearish bias, expect move to previous cycle VWAP
5. The ▼ signal marks confirmed cycle tops (VWAP breakdown after 1+ year)
█ DASHBOARD GUIDE
• Price — Current price and gain from halving
• Day — Days since halving and cycle progress %
• VWAP Levels — Current VWAP values with status (ABOVE/BELOW/CONSOL)
• Cycle Tops — Historical days to cycle top for H2 and H3
• Next Halving — Estimated date and countdown
█ SETTINGS
Display:
• Toggle dashboard, consolidation bands, vertical lines, cycle tops, breakdown signals
VWAPs:
• Show/hide individual halving VWAPs (H1-H4)
Settings:
• Dashboard text size
• Consolidation band percentage
• Cycle top label size
█ ALERTS
• VWAP Breakdown — Price breaks below any halving VWAP
• VWAP Reclaim — Price reclaims a halving VWAP
• Consolidation Zone — Price enters consolidation around VWAP
█ NOTES
• Best used on Monthly (1M) timeframe for cycle analysis
• Weekly timeframe also works for more granular view
• H1 VWAP disabled by default (requires data from 2012)
• Cycle top locks when price closes below VWAP after 365+ days into the cycle
Smart S/R Levels [Stansbooth]
Introducing the Ultimate Support & Resistance Indicator for Live Market Analysis!
Unlock the power of real-time market insights with our cutting-edge Support & Resistance Indicator! Designed for traders who demand precision and clarity, this tool automatically plots key support and resistance levels on your chart, ensuring you never miss crucial price action points.
🚀 Key Features:
Real-Time Tracking: Accurately identifies and updates support & resistance levels as market conditions evolve.
Easy-to-Use: Simple integration into your TradingView charts with no complicated setup.
Customizable Alerts : Get notified when the price approaches key levels for actionable trading opportunities.
Accurate & Reliable : Built using advanced algorithms for pinpoint precision in real-time market conditions.
Time-Saving: Automatically draws support and resistance lines, so you can focus on strategy and execution.
Whether you’re a day trader, swing trader, or a long-term investor, this indicator is designed to give you the edge by highlighting the most important levels for price reversals and breakouts.
Start trading smarter today with the Support & Resistance Indicator —your ultimate market companion!
IDX_BBCAPT Bank Central Asia Tbk (BCA) is the largest private bank in Indonesia by assets and market value, headquartered in Jakarta. Founded on February 21, 1957, BCA offers a comprehensive range of financial services to individuals, SMEs, and corporations.
SMA vs Candle True CloudSMA vs Candle – Trend Cloud Indicator (Brief Note)
This indicator compares price (candle source) with a long-period Hull Moving Average (SMA) to identify trend direction, momentum shifts, and regime changes.
The SMA, being momentum-sensitive, reacts to changes in price speed, while price itself represents real-time market action.
A dynamic two-way cloud is drawn between price and SMA:
Green cloud when price is above SMA → bullish dominance and accumulation
Red cloud when price is below SMA → bearish control and distribution
The width of the cloud reflects the strength of momentum:
Narrow cloud → compression / consolidation
Expanding cloud → impulse move or trend acceleration
This setup is especially effective on short timeframes with long SMA periods, where it filters noise while preserving early trend signals.
Overall, the indicator acts as a visual trend-momentum framework, highlighting early warnings, trend confirmation, and exhaustion zones in a single view.
Trend Warning / Direction (EMA20/50)This indicator visualizes trend changes and consolidation phases using the 20 EMA and 50 EMA.
🔹 Trend Signals
• Green triangle (▲): EMA 20 crosses above EMA 50 → bullish trend signal
• Red triangle (▼): EMA 20 crosses below EMA 50 → bearish trend signal
• Crosses are confirmed on candle close to avoid false signals.
🔹 EMA Distance Warning
The indicator highlights low-momentum / squeeze zones when the distance between EMA 20 and EMA 50 falls below a configurable threshold.
• Yellow triangle with number:
Displays the current EMA distance in percent (without the % symbol).
• The warning threshold can be configured individually for each timeframe:
• 1m, 5m, 15m, 30m
• 1h, 4h, 8h
• 1D, 1W
• The active chart timeframe automatically determines which threshold is applied.
🔹 Customization
• Enable or disable EMA distance warnings via settings
• Adjust distance thresholds per timeframe
• Option to limit warning labels to one per bar
• Works on all markets and timeframes
🔹 Use Cases
• Trend identification
• Momentum exhaustion and consolidation detection
• Early warning before potential breakouts
• Trade confirmation in combination with other indicators
This indicator is non-repainting, lightweight, and designed for clean, actionable chart signals.
20-50 EMA Bear / Bull TrendThis indicator identifies uptrends and downtrends based on confirmed EMA crossovers between the 20 EMA and 50 EMA, using candle close confirmation only to avoid false intrabar signals.
• Green up arrow (↑): EMA 20 crosses above EMA 50 → bullish signal / start of an uptrend
• Red down arrow (↓): EMA 20 crosses below EMA 50 → bearish signal / start of a downtrend
The signals are plotted directly on the chart and can be used to create separate TradingView alerts for bullish and bearish crosses.
Key features:
• Visual identification of uptrends and downtrends
• EMA 20 & EMA 50 plotted on the chart
• Signals confirmed on candle close (non-repainting)
• Clear arrow-based signals instead of text labels
• Selectable alert conditions for bullish and bearish crosses
• Optional support for “Any alert() function call”
This indicator works on all timeframes and is suitable for trend detection, momentum shifts, and trade confirmation.
ZenAlgo - Coin XA multi input Z Score framework that compares the behavior of a selected symbol against several market wide aggregates: total crypto market metrics, alternative asset baskets, stablecoin dominance, Bitcoin, and risk composites. The script processes each data stream into comparable normalized values, evaluates their relationships, and derives a set of bias states, alerts, and real time conditions.
Data Preparation and Normalization
The indicator starts by gathering multiple reference series:
The chart ticker.
A basket representing non Bitcoin crypto assets.
Bitcoin market data.
Several total market variations (full, without Bitcoin, and additional categories).
A stablecoin dominance series.
A macro risk composite.
A daily anchored average used for context.
Each series is transformed into a normalized value using a lookback window. This produces multiple comparable Z Scores that reflect how far each series currently sits from its typical range. Smoothing is optionally applied to macro based values to reduce noise. These normalized values allow consistent comparisons across unrelated instruments.
This works because Z Score based normalization removes scale differences and makes directional deviations directly comparable across many independent metrics, which is necessary when the script later evaluates their relationships.
Cross and Momentum Detection
The script then evaluates structural interactions between the normalized series:
Whether one group rises above or falls below another.
Whether any of the series crosses over or under another.
Whether each series is currently advancing or declining.
Whether price is above or below the daily anchored average.
Whether stablecoin dominance is rising or falling.
Whether a sharp directional change occurs within a single bar.
Whether a multi threshold movement happens within a defined number of bars.
These checks capture relative strength shifts across the market. For example, an increase in the ticker combined with a decline in dominance suggests capital rotation toward the ticker, while the opposite suggests defensive flows. Using normalized changes allows these comparisons to be scale independent.
Combined Bias Logic
The indicator then evaluates a hierarchy of conditions that combine normalized relationships, momentum, and sharp movement checks. Each condition corresponds to a specific market state. The script tests the conditions in a defined order because later conditions depend on earlier structural checks.
Examples of combined evaluations include:
Cases where the ticker and alternative asset basket rise together while dominance declines.
Cases where both the ticker and alternatives fall together under a rising dominance series.
Conditions where several aggregates cross above or below dominance simultaneously.
Cases where multiple aggregates show coordinated sharp rises or sharp declines.
Situations where stablecoin dominance rises during weakness of other groups.
Situations where stablecoins fall while the ticker strengthens.
Conditions where the ticker rapidly moves through several thresholds in a short period.
The script assigns a bias label that corresponds to the earliest satisfied condition. This design ensures that highly distinctive and rare states take priority over broader or more common states. The reasoning behind this is that specific coordinated market moves provide clearer view than general divergence or simple momentum alone.
Crash and Pump Amplification
The script includes a section that detects extreme scenarios by combining several coordinated factors:
Very negative or very positive normalized values across multiple aggregates.
Sharp bar by bar declines or rises across key series.
Simultaneous movement in the risk composite and dominance.
These checks amplify certain bias states when market conditions show synchronized extreme movement. This provides additional clarity when multiple parts of the market behave in the same direction beyond typical deviation. The logic relies only on the relationships of the normalized values and their changes.
Fast Movement Detection
Two additional mechanisms evaluate movements over a short multi bar window.
A fast ticker move is detected when the current normalized ticker value differs from one several bars ago by multiple threshold increments.
A fast stablecoin rise or fall is detected using a step based method. The script checks for progression through sequential levels across the window while verifying whether the ticker moves in agreement or disagreement with the direction.
These mechanisms are intended to identify sudden acceleration or deceleration that standard normalized changes may not fully capture.
Season Scale
The script calculates a quantitative scale from minus 100 to plus 100 by evaluating several binary conditions:
Whether the ticker is above or below the alternative basket.
Whether the alternative basket is above or below dominance.
Whether the ticker and alternative basket are rising or falling.
Whether dominance is rising or falling.
Optionally whether price is above or below the anchored average.
Each condition contributes positively or negatively. The weighted combination produces the season value which is rounded. The naming of the state (Full Bull, Neutral, Full Bear etc.) is derived from where the score falls on the range.
This works because combining several directional tests across related groups provides a compressed singular measure of market structure.
Divergence Detection
The script includes divergence logic for Bitcoin, the alternative asset basket, and the chart ticker. It evaluates pivot highs and lows in price and compares them with pivot highs and lows in their respective normalized values. The script checks for pairs of pivot points where price moves in one direction while the normalized oscillator moves in the opposite. Both regular and hidden forms are evaluated.
This works because divergences highlight points where price and its normalized deviation disagree which often marks a structural imbalance.
Table Output
If enabled, the indicator displays a table showing the current normalized values of all monitored series along with color backgrounds reflecting structural relationships identified earlier. This supports interpretation without opening additional charts.
Visual Lines and Background
The script draws horizontal reference lines for several normalized levels using a fading mechanism if ghost mode is enabled. The background color changes according to the main season logic and intensifies with market wide deviations. Optional pulse effects are triggered when the bias state changes.
This works because visual context helps understand how extreme the current market state is relative to its typical historical range.
Alerts
The indicator creates alerts for all important structural states:
Bias state changes.
Fast ticker moves.
Fast stablecoin rises or falls.
Divergence based triggers.
Cross conditions corresponding to notable structural transitions.
These alerts correspond exactly to the logical conditions already described.
Added Value Compared to Free Alternatives
It evaluates many separate market wide aggregates simultaneously rather than relying on a single comparison.
It uses a consistent normalized framework so unrelated metrics become comparable.
It identifies multi series coordinated shifts which many simpler indicators cannot detect.
It provides a full deterministic bias state hierarchy that removes interpretation ambiguity.
It includes fast movement evaluation through multi level and multi bar logic.
It combines multiple categories of divergences with normalized values rather than only price based oscillators.
It provides a unified season value derived from several independent binary conditions.
Limitations and Situations Where It May Fall Short
Normalized values depend on the chosen lookback window and may behave differently under unusual volatility regimes.
If reference data feeds are incomplete or delayed the relationships may briefly reflect distorted values.
Extreme single bar events can cause temporary exaggeration of normalized values before stabilization.
Divergence detection depends on identifying pivots which may repaint until the pivot is confirmed.
Bias states rely on hierarchical evaluation so rare but extreme conditions will override more common states by design.
Sudden changes in stablecoin supply or methodology on the data source may influence stable dominance readings.
How to Interpret the Values
Positive normalized values indicate movement above the typical range while negative values indicate movement below the typical range.
The relationships between the ticker, the alternative asset basket, dominance, and the risk composite define the structural meaning of each bias.
The season value near plus 100 means most bull related conditions are simultaneously satisfied while near minus 100 means most bear related conditions are satisfied.
Sharp rise or fall conditions indicate abrupt movement beyond the usual deviation.
Cross conditions indicate structural transitions such as the ticker moving above or below another aggregate.
Divergences indicate inconsistency between price action and normalized deviation.
Best Practices for Practical Use
Use the bias state as a structural context rather than a direct entry or exit trigger.
Observe whether multiple aggregates align in the same direction since the script is designed around confirming coordinated behavior.
Combine the season value with the main bias state to evaluate whether short term view agree with broader conditions.
Use fast movement alerts for monitoring sudden volatility or intraday acceleration.
Use divergence conditions to identify potential exhaustion points when the main bias does not align with price behavior.
Reference the table and background colors for a quick visual overview of how several groups relate in the current moment.
HMA1//@version=5
strategy("黄金 HMA + SuperTrend 趋势增强策略", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// --- 1. 输入参数 ---
// HMA 参数
hmaLen = input.int(55, "HMA 长度", minval=1, group="HMA 设置")
// SuperTrend 参数
stFactor = input.float(3.0, "SuperTrend 乘数", step=0.1, group="SuperTrend 设置")
stPeriod = input.int(10, "SuperTrend ATR 周期", group="SuperTrend 设置")
// 离场设置
useAtrSl = input.bool(true, "启用 ATR 动态止损", group="风险管理")
atrSlMult = input.float(2.0, "止损 ATR 倍数", step=0.1, group="风险管理")
// --- 2. 指标计算 ---
// 计算 HMA
hmaValue = ta.hma(close, hmaLen)
// 计算 SuperTrend
= ta.supertrend(stFactor, stPeriod)
// 计算 ATR(用于止损)
atr = ta.atr(14)
// --- 3. 绘图 ---
plot(hmaValue, "HMA 趋势线", color=hmaValue > hmaValue ? color.green : color.red, linewidth=2)
plot(stValue, "SuperTrend 线", color=stDirection < 0 ? color.new(color.teal, 0) : color.new(color.maroon, 0), linewidth=2)
// --- 4. 交易逻辑 ---
// 做多条件:
// 1. 价格在 HMA 之上 且 HMA 正在向上拐头
// 2. SuperTrend 变为看涨方向 (stDirection < 0)
longCondition = close > hmaValue and hmaValue > hmaValue and stDirection < 0
// 做空条件:
// 1. 价格在 HMA 之下 且 HMA 正在向下拐头
// 2. SuperTrend 变为看跌方向 (stDirection > 0)
shortCondition = close < hmaValue and hmaValue < hmaValue and stDirection > 0
// --- 5. 执行与止损逻辑 ---
var float longStop = na
var float shortStop = na
// 入场逻辑
if (longCondition)
longStop := close - (atr * atrSlMult)
strategy.entry("Long", strategy.long, comment="HMA+ST 多")
if (shortCondition)
shortStop := close + (atr * atrSlMult)
strategy.entry("Short", strategy.short, comment="HMA+ST 空")
// 离场逻辑:当 SuperTrend 反转或触及 ATR 止损时离场
if (strategy.position_size > 0)
strategy.exit("Exit Long", "Long", stop=longStop, limit=na, when=stDirection > 0, comment="多单离场")
if (strategy.position_size < 0)
strategy.exit("Exit Short", "Short", stop=shortStop, limit=na, when=stDirection < 0, comment="空单离场")
// 填充背景色以示趋势
fill(plot(stValue), plot(open > close ? open : close), color = stDirection < 0 ? color.new(color.green, 90) : color.new(color.red, 90))
ETHThe Indicator is using the combination of below indicators:
Relative Strength Index (RSI): A momentum oscillator used to identify overbought (above 70) or oversold (below 30) conditions, which can signal potential price reversals.
Moving Averages (MA & EMA): These smooth out price data to help identify the direction of the overall trend. Crossovers between different period MAs (e.g., a short-term MA crossing above a long-term MA) can generate buy or sell signals.
Moving Average Convergence Divergence (MACD): A trend-following momentum indicator that shows the relationship between two moving averages. A bullish crossover (MACD line above signal line) suggests upward momentum, while a bearish crossover (MACD line below signal line) indicates downward momentum.
Bollinger Bands: This volatility indicator consists of a middle band (moving average) and two outer bands based on standard deviation. Price touching the upper band may signal overbought conditions, while touching the lower band may signal oversold conditions or a potential bounce.
Volume Indicators (e.g., On-Balance Volume - OBV): Volume confirms the strength of a price movement. A price increase with high volume suggests strong buying pressure, validating the trend.
Ethereum Long/Short Ratio: This sentiment indicator compares the number of traders holding long positions versus short positions. A high ratio might indicate excessive bullish sentiment, potentially preceding a market correction.






















