First Passage Time - Distribution AnalysisThe First Passage Time (FPT) Distribution Analysis indicator is a sophisticated probabilistic tool that answers one of the most critical questions in trading: "How long will it take for price to reach my target, and what are the odds of getting there first?"
Unlike traditional technical indicators that focus on what might happen, this indicator tells you when it's likely to happen.
Mathematical Foundation: First Passage Time Theory
What is First Passage Time?
First Passage Time (FPT) is a concept in stochastic processes that measures the time it takes for a random process to reach a specific threshold for the first time. Originally developed in physics and mathematics, FPT has applications in:
Quantitative Finance: Option pricing, risk management, and algorithmic trading
Neuroscience: Modeling neural firing patterns
Biology: Population dynamics and disease spread
Engineering: Reliability analysis and failure prediction
The Mathematics Behind It
This indicator uses Geometric Brownian Motion (GBM), the same stochastic model used in the Black-Scholes option pricing formula:
dS = μS dt + σS dW
Where:
S = Asset price
μ = Drift (trend component)
σ = Volatility (uncertainty component)
dW = Wiener process (random walk)
Through Monte Carlo simulation, the indicator runs 1,000+ price path simulations to statistically determine:
When each threshold (+X% or -X%) is likely to be hit
Which threshold is hit first (directional bias)
How often each scenario occurs (probability distribution)
🎯 How This Indicator Works
Core Algorithm Workflow:
Calculate Historical Statistics
Measures recent price volatility (standard deviation of log returns)
Calculates drift (average directional movement)
Annualizes these metrics for meaningful comparison
Run Monte Carlo Simulations
Generates 1,000+ random price paths based on historical behavior
Tracks when each path hits the upside (+X%) or downside (-X%) threshold
Records which threshold was hit first in each simulation
Aggregate Statistical Results
Calculates percentile distributions (10th, 25th, 50th, 75th, 90th)
Computes "first hit" probabilities (upside vs downside)
Determines average and median time-to-target
Visual Representation
Displays thresholds as horizontal lines
Shows gradient risk zones (purple-to-blue)
Provides comprehensive statistics table
📈 Use Cases
1. Options Trading
Selling Options: Determine if your strike price is likely to be hit before expiration
Buying Options: Estimate probability of reaching profit targets within your time window
Time Decay Management: Compare expected time-to-target vs theta decay
Example: You're considering selling a 30-day call option 5% out of the money. The indicator shows there's a 72% chance price hits +5% within 12 days. This tells you the trade has high assignment risk.
2. Swing Trading
Entry Timing: Wait for higher probability setups when directional bias is strong
Target Setting: Use median time-to-target to set realistic profit expectations
Stop Loss Placement: Understand probability of hitting your stop before target
Example: The indicator shows 85% upside probability with median time of 3.2 days. You can confidently enter long positions with appropriate position sizing.
3. Risk Management
Position Sizing: Larger positions when probability heavily favors one direction
Portfolio Allocation: Reduce exposure when probabilities are near 50/50 (high uncertainty)
Hedge Timing: Know when to add protective positions based on downside probability
Example: Indicator shows 55% upside vs 45% downside—nearly neutral. This signals high uncertainty, suggesting reduced position size or wait for better setup.
4. Market Regime Detection
Trending Markets: High directional bias (70%+ one direction)
Range-bound Markets: Balanced probabilities (45-55% both directions)
Volatility Regimes: Compare actual vs theoretical minimum time
Example: Consistent 90%+ bullish bias across multiple timeframes confirms strong uptrend—stay long and avoid counter-trend trades.
First Hit Rate (Most Important!)
Shows which threshold is likely to be hit FIRST:
Upside %: Probability of hitting upside target before downside
Downside %: Probability of hitting downside target before upside
These always sum to 100%
⚠️ Warning: If you see "Low Hit Rate" warning, increase this parameter!
Advanced Parameters
Drift Mode
Allows you to explore different scenarios:
Historical: Uses actual recent trend (default—most realistic)
Zero (Neutral): Assumes no trend, only volatility (symmetric probabilities)
50% Reduced: Dampens trend effect (conservative scenario)
Use Case: Switch to "Zero (Neutral)" to see what happens in a pure volatility environment, useful for range-bound markets.
Distribution Type
Percentile: Shows 10%, 25%, 50%, 75%, 90% levels (recommended for most users)
Sigma: Shows standard deviation levels (1σ, 2σ)—useful for statistical analysis
⚠️ Important Limitations & Best Practices
Limitations
Assumes GBM: Real markets have fat tails, jumps, and regime changes not captured by GBM
Historical Parameters: Uses recent volatility/drift—may not predict regime shifts
No Fundamental Events: Cannot predict earnings, news, or macro shocks
Computational: Runs only on last bar—doesn't give historical signals
Remember: Probabilities are not certainties. Use this indicator as part of a comprehensive trading plan with proper risk management.
Created by: Henrique Centieiro. feedback is more than welcome!
Sentiment
Customizable Dashboard (SIMPLE)This is a custom table where you can track any ticker and it's daily change. color coded to make things easy.
VIX Fear Gauge – Intraday Horizontal with alerts by Carlos CThe VIX Fear Gauge – Intraday Horizontal is a clean overlay tool that displays the current market sentiment (Fear & Greed levels) based on the VIX index.
Key Features:
📊 Horizontal Dashboard with five levels: Low, Light Fear, Neutral, High Fear, Panic.
🎨 Color Schemes: choose between Normal (fear = red) or Inverted (fear = green).
📍 Custom Positioning: move the panel to any chart corner.
🏷️ Dynamic Label: optional large label showing the current VIX value and category.
🚨 Smart Alerts: triggers when VIX enters or exits High Fear and Panic zones.
This indicator is designed for intraday traders who use the VIX as a risk barometer to confirm directional bias in SPY, QQQ, and other equities or options trading setups.
Crypto Exchange PremiumDescription: Crypto Exchange Premium
The Crypto Exchange Premium indicator is designed to quantify and visualize price disparities between different types of crypto markets — specifically between spot and perpetual futures markets, or between any two customizable sources of price data. By consolidating live data from multiple major exchanges, it creates a unified, cross-market measure of premium (or discount), helping traders identify institutional activity (i. e. by comparing exchanges with high institutional activity against others), arbitrage opportunities, and shifts in market sentiment before they become visible in price action alone.
Concept and Purpose
In cryptocurrency markets, price divergence between spot and perpetual pairs reflects the real-time interaction of demand and liquidity across market segments.
When perpetual prices trade above spot, it implies aggressive long positioning or bullish leverage (positive funding expectations).
Conversely, when spot trades above perps, it may reflect net selling pressure in futures or strong spot accumulation.
Unlike most tools that rely on funding rates or open interest alone, this indicator measures the actual traded price spread dynamically across exchanges. This allows traders to visualize the “premium curve” of the crypto market in a clear, data-driven format.
How It Works
The indicator aggregates real-time prices from a wide selection of exchanges, normalizes them into groups, and computes the difference (“premium”) between two chosen reference markets.
1. Exchange Aggregation:
Users can toggle individual exchanges for both spot and perpetual aggregation groups.
The script automatically calculates group averages by dividing the sum of all enabled exchange prices by the number of valid feeds.
Non-USD exchanges (e.g., KRW pairs on Upbit or Bithumb) are automatically converted into USD using live FX data (USDKRW) for accurate normalization.
2. Flexible Comparison Logic:
Each leg of the comparison (First vs. Second Source) can be chosen as one of:
Local chart symbol
Custom symbol
Aggregated Spot group
Aggregated Perpetual group
This allows users to compare, for example:
Binance Spot vs. Global Perp Average
Coinbase Spot vs. Binance Perp
BTCUSD vs. BTCUSDT.P (or any cross-exchange combination)
3. Premium Calculation:
The final value is computed as:
Premium = First Source Price − Second Source Price
and is plotted as a histogram (positive = green, negative = red). This visual instantly shows whether the first source trades at a premium or discount relative to the second.
How to Use
Select Data Sources:
Configure the “First Symbol” and “Second Symbol” in the settings. For most use cases:
First Symbol → Perps (Aggregated)
Second Symbol → Spot (Aggregated)
Adjust Exchange Selection:
Enable or disable individual exchanges to fine-tune your data set. For instance, disabling Korean exchanges filters out regional FX distortions.
Originality and Value
While many exchange difference or “premium indicators” track one or two exchanges, this script introduces multi-exchange aggregation, cross-market normalization, and user-configurable pairing, resulting in a more holistic and accurate reflection of market structure.
It bridges a gap between macro market breadth and microstructural price dynamics, empowering traders to:
Detect arbitrage inefficiencies between spot and perps.
Track regional price dislocations (USD vs. KRW).
Gauge the intensity of speculative leverage over time.
Anticipate funding rate shifts and liquidation clusters before they happen.
Ajay R5.41🔻 Ajay Gold 3H Power Indicator 🔻
Precision-Based Smart Sell System for Gold (XAU/USD)
💡 Overview
This indicator is specifically designed for Gold (XAU/USD) and delivers best results on the 3-Hour Timeframe (3H TF).
It is a Smart Money Logic-based Sell Confirmation System, combining institutional structure and candle behavior to generate highly accurate bearish signals.
⚙️ Technical Foundation
The indicator uses multiple advanced confirmations:
📉 EMA Trend Filter → Confirms downtrend
💪 RSI Overbought Rejection → Momentum reversal signal
📊 MACD Bearish Cross → Confirms trend strength
🕯️ Bearish Candle Structure → Price action validation
When all conditions align, a clear 🔻 Sell Signal is plotted on the chart.
💎 Hidden Feature
This indicator includes a hidden feature that activates only when the correct market structure forms.
It helps reduce false signals and increases accuracy without being visible on the chart — fully automated internal logic.
📆 Recommended Settings
Symbol: XAU/USD (Gold)
Timeframe: 3-Hour (3H)
Market: Forex / Commodity
Mode: Sell-Only Confirmation Indicator
Performance: Best precision and consistency on 3H TF
📈 How to Use
Select XAU/USD on chart and set 3H timeframe.
Add the indicator to the chart.
Wait for the 🔻 Sell Signal and confirm the market structure after candle close.
Take entry according to your risk management.
⚠️ Disclaimer
This indicator is for educational and analytical purposes only.
No system is 100% accurate — always backtest and demo trade before using in real trading.
💬 Credits
Developed by Ajay Sahu (India)
Based on Institutional & Smart Money Logic
Best results on 3H TF
Hidden Algorithm for XAU/USD traders
Custom Time VWAPA custom time VWAP lets you choose any specific start time or period instead of fixed sessions or days.
VWAP then resets and starts calculating from that custom anchor point (e.g., 9:15 AM, Monday open, or a specific date).
It averages price weighted by volume only within your defined time window.
Useful for traders who want VWAP for a custom session, such as the London or New York market hours.
Helps compare intraday trends and spot true average price levels during your chosen timeframe.
Traders use it to detect mean reversion or trend continuation from custom session starts.
You can manually set this using ta.vwap() with a custom isNewPeriod condition based on time.
Unlike standard VWAP, it doesn’t automatically reset daily unless you define it.
Ideal for scalping, intraday trading, or session-based analysis.
Essentially, it gives VWAP more flexibility to match your own trading schedule or strategy.
Square Root Price Calculator By ABPinescript to Calculate Square root of Price usefull for Gann Lover
Bias Table-manualIt is just at tabular column to manually update Bullish/Bearish for multiple timeframes. Provided date option which is also manual, to denote when the analysis was done and table updated. This will be helpful for multiple stocks/securities analysis on regular basis
Multi-Market Trend-Pullback Alerts (EMA20/50 + RSI) [v6]//@version=6 replaces 5
Some functions (like label.delete) need to be called as methods
Minor syntax tightening around string concatenation and label management
All alertcondition() and table logic still works, but must be explicitly version 6 compatible
Macro Momentum – 4-Theme, Vol Target, RebalanceMacro Momentum — 4-Theme, Vol Target, Rebalance
Purpose. A macro-aware strategy that blends four economic “themes”—Business Cycle, Trade/USD, Monetary Policy, and Risk Sentiment—into a single, smoothed Composite signal. It then:
gates entries/exits with hysteresis bands,
enforces optional regime filters (200-day bias), and
sizes the position via volatility targeting with caps for long/short exposure.
It’s designed to run on any chart (index, ETF, futures, single stocks) while reading external macro proxies on a chosen Signal Timeframe.
How it works (high level)
Build four theme signals from robust macro proxies:
Business Cycle: XLI/XLU and Copper/Gold momentum, confirmed by the chart’s price vs a long SMA (default 200D).
Trade / USD: DXY momentum (sign-flipped so a rising USD is bearish for risk assets).
Monetary Policy: 10Y–2Y curve slope momentum and 10Y yield trend (steepening & falling 10Y = risk-on; rising 10Y = risk-off).
Risk Sentiment: VIX momentum (bearish if higher) and HYG/IEF momentum (bullish if credit outperforms duration).
Normalize & de-noise.
Optional Winsorization (MAD or stdev) clamps outliers over a lookback window.
Optional Z-score → tanh mapping compresses to ~ for stable weighting.
Theme lines are SMA-smoothed; the final Composite is LSMA-smoothed (linreg).
Decide direction with hysteresis.
Enter/hold long when Composite ≥ Entry Band; enter/hold short when Composite ≤ −Entry Band.
Exit bands are tighter than entry bands to avoid whipsaws.
Apply regime & direction constraints.
Optional Long-only above 200MA (chart symbol) and/or Short-only below 200MA.
Global Direction control (Long / Short / Both) and Invert switch.
Size via volatility targeting.
Realized close-to-close vol is annualized (choose 9-5 or 24/7 market profile).
Target exposure = TargetVol / RealizedVol, capped by Max Long/Max Short multipliers.
Quantity is computed from equity; futures are rounded to whole contracts.
Rebalance cadence & execution.
Trades are placed on Weekly / Monthly / Quarterly rebalance bars or when the sign of exposure flips.
Optional ATR stop/TP for single-stock style risk management.
Inputs you’ll actually tweak
General
Signal Timeframe: Where macro is sampled (e.g., D/W).
Rebalance Frequency: Weekly / Monthly / Quarterly.
ROC & SMA lengths: Defaults for theme momentum and the 200D regime filter.
Normalization: Z-score (tanh) on/off.
Winsorization
Toggle, lookback, multiplier, MAD vs Stdev.
Risk / Sizing
Target Annualized Vol & Realized Vol Lookback.
Direction (Long/Short/Both) and Invert.
Max long/short exposure caps.
Advanced Thresholds
Theme/Composite smoothing lengths.
Entry/Exit bands (hysteresis).
Regime / Execution
Long-only above 200MA, Short-only below 200MA.
Stops/TP (optional)
ATR length and SL/TP multiples.
Theme Weights
Per-theme scalars so you can push/pull emphasis (e.g., overweight Policy during rate cycles).
Macro Proxies
Symbols for each theme (XLI, XLU, HG1!, GC1!, DXY, US10Y, US02Y, VIX, HYG, IEF). Swap to alternatives as needed (e.g., UUP for DXY).
Signals & logic (under the hood)
Business Cycle = ½ ROC(XLI/XLU) + ½ ROC(Copper/Gold), then confirmed by (price > 200SMA ? +1 : −1).
Trade / USD = −ROC(DXY).
Monetary Policy = 0.6·ROC(10Y–2Y) − 0.4·ROC(10Y).
Risk Sentiment = −0.6·ROC(VIX) + 0.4·ROC(HYG/IEF).
Each theme → (optional Winsor) → (robust z or scaled ROC) → tanh → SMA smoothing.
Composite = weighted average → LSMA smoothing → compare to bands → dir ∈ {−1,0,+1}.
Rebalance & flips. Orders fire on your chosen cadence or when the sign of exposure changes.
Position size. exposure = clamp(TargetVol / realizedVol, maxLong/Short) × dir.
Note: The script also exposes Gross Exposure (% equity) and Signed Exposure (× equity) as diagnostics. These can help you audit how vol-targeting and caps translate into sizing over time.
Visuals & alerts
Composite line + columns (color/intensity reflect direction & strength).
Entry/Exit bands with green/red fills for quick polarity reads.
Hidden plots for each Theme if you want to show them.
Optional rebalance labels (direction, gross & signed exposure, σ).
Background heatmap keyed to Composite.
Alerts
Enter/Inc LONG when Composite crosses up (and on rebalance bars).
Enter/Inc SHORT when Composite crosses down (and on rebalance bars).
Exit to FLAT when Composite returns toward neutral (and on rebalance bars).
Practical tips
Start higher timeframes. Daily signals with Monthly rebalance are a good baseline; weekly signals with quarterly rebalances are even cleaner.
Tune Entry/Exit bands before anything else. Wider bands = fewer trades and less noise.
Weights reflect regime. If policy dominates markets, raise Monetary Policy weight; if credit stress drives moves, raise Risk Sentiment.
Proxies are swappable. Use UUP for USD, or futures-continuous symbols that match your data plan.
Futures vs ETFs. Quantity auto-rounds for futures; ETFs accept fractional shares. Check contract multipliers when interpreting exposure.
Caveats
Macro proxies can repaint at the selected signal timeframe as higher-TF bars form; that’s intentional for macro sampling, but test live.
Vol targeting assumes reasonably stationary realized vol over the lookback; if markets regime-shift, revisit volLook and targetVol.
If you disable normalization/winsorization, themes can become spikier; expect more hysteresis band crossings.
What to change first (quick start)
Set Signal Timeframe = D, Rebalance = Monthly, Z-score on, Winsor on (MAD).
Entry/Exit bands: 0.25 / 0.12 (defaults), then nudge until trade count and turnover feel right.
TargetVol: try 10% for diversified indices; lower for single stocks, higher for vol-sell strategies.
Leave weights = 1.0 until you’ve inspected the four theme lines; then tilt deliberately.
Synthetic Implied APROverview
The Synthetic Implied APR is an artificial implied APR, designed to imitate the implied APR seen when trading cryptocurrency funding rates. It combines real-time funding rates with premium data to calculate an artificial market expectation of the annualized funding rate.
The (actual) implied APR is the market's expectation of the annualized funding rate. This is dependent on bid/ask impacts of the implied APR, something which is currently unavailable to fetch with TradingView. In essence, an implied APR of X% means traders believe that asset's funding fees to average X% when annualized.
What's important to understand, is that the actual value of the synthetic implied APR is not relevant. We only simply use its relative changes when we trade (i.e if it crosses above/below its MA for a given weight). Even for the same asset, the implied APRs will change depending on days to maturity.
How it calculates
The synthetic implied APR is calculated with these steps:
Collects premium data from perpetual futures markets using optimized lower timeframe requests (check my 'Predicted Funding Rates' indicator)
Calculates the funding rate by adding the premium to an interest rate component (clamped within exchange limits)
Derives the underlying APR from the 8-hour funding rate (funding rate × 3 × 365)
Apply a weighed formula that imitates both the direction (underlying APR) with the volatility of prices (from the premium index and funding)
premium_component = (prem_avg / 50 ) * 365
weighedprem = (weight * fr) + ((1 - weight) * apr) + (premium_component * 0.3)
impliedAPR = math.avg(weighedprem, ta.sma(apr, maLength))
How to use it: Generally
Preface: Funding rates are an indication of market sentiment
If funding is positive, generally the market is bullish as longs are willing to pay shorts funding
If funding is negative, generally the market is bearish as shorts are willing to pay longs funding
So, this script can be used like a typical oscillator:
Bullish: If implied APR > MA OR if implied APR MA is green
Bearish: If implied APR < MA OR if implied APR MA is red
The components:
Synthetic Implied APR: The main metric. At current setting of 0.7, it imitates volatility
Weight: The higher the value, the smoother the synthetic implied APR is (and MA too). This value is very important to the imitation. At 0.7, it imitates the actual volatility of the implied APR. At weight = 1, it becomes very smooth. Perfect for trading
Synthetic Implied APR Moving Average: A moving average of the Synthetic implied APR. Can choose from multiple selections, (SMA, EMA, WMA, HMA, VWMA, RMA)
How to use it: Trading Funding
When trading funding there're multiple ways to use it with different settings
Trade funding rates with trend changes
Settings: Weight = 1
Method 1: When the implied APR MA turns green, long funding rates (or short if red)
Method 2: When the implied APR crosses above the MA, long funding rates (or short when crosses below)
Trade funding rates with MA pullbacks
Settings: Weight = 0.7, timeframe 15m
In an uptrend: When implied APR crosses below then above the script, long funding opportunity
In an downtrend: When implied APR crosses above then below the script, shortfunding opportunity
You can determine the trend with the method before, using a weight of 1
To trade funding rates, it's best to have these 3 scripts at these settings:
Predicted Funding Rates: This allows you to see the predicted funding rates and see if they've maxxed out for added confluence too (+/-0.01% usually for Binance BTC futures)
Synthetic implied APR: At weight 1, the MA provides a good trend (whether close above/below or colour change)
Synthetic implied APR: At weight 0.7, it provides a good imitation of volatility
How to use it: Trading Futures
When trading futures:
You can determine roughly what the trend is, if the assumption is made that funding rates can help identify trends if used as a sentiment indicator. It should be supplemented with traditional trend trading methods
To prevent whipsaws, weight should remain high
Long trend: When the implied APR MA turns green OR when it crosses above its MA
Short trend: When the implied APR MA turns red OR when it below above its MA
Why it's original
This indicator introduces a unique synthetic weighting system that combines funding rates, underlying APR, and premium components in a way not found in existing TradingView scripts. Trading funding rates is a niche area, there aren't that many scripts currently available. And to my knowledge, there's no synthetic implied APR scripts available on TradingView either. So I believe this script to be original in that sense.
Notes
Because it depends on my triangular weighting algos, optimal accuracy is found on timeframes that are 4H or less. On higher timeframes, the accuracy drops off. Best timeframes for intraday trading using this are 15m or 1 hour
The higher the timeframe, the lower the MA one should use. At 1 hour, 200 or higher is best. At say, 4h, length of 50 is best
Only works for coins that have a Binance premium index
Inputs
Funding Period - Select between "1 Hour" or "8 Hour" funding cycles. 8 hours is standard for Binance
Table - Toggle the information dashboard on/off to show or hide real-time metrics including funding rate, premium, and APR value
Weight - Controls the balance between funding rate (higher values = smoother) and APR (lower values = more responsive) in the calculation, ranging from 0.0 to 1.0. Default is 0.7, this imitates the volatility
Auto Timeframe Implied Length - Automatically calculates optimal smoothing length based on your chart timeframe for consistent behavior across different time periods
Manual Implied Length - Sets a fixed smoothing length (in bars) when auto mode is disabled, with lower values being more responsive and higher values being smoother
Show Implied APR MA - Displays an additional moving average line of the Synthetic Implied APR to help identify trend direction and crossover signals
MA Type for Implied APR - Selects the calculation method (SMA, EMA, WMA, HMA, VWMA, or RMA) for the moving average, each offering different responsiveness and lag characteristics
MA Length for Implied APR - Sets the lookback period (1-500 bars) for the moving average, with shorter lengths providing more signals and longer lengths filtering noise
Show Underlying APR - Displays the raw APR calculation (without synthetic weighting) as a reference line to compare against the main indicator
Bullish Color - Sets the color for positive values in the table and rising MA line
Bearish Color - Sets the color for negative values in the table and falling MA line
Table Background - Customizes the background color and transparency of the information dashboard
Table Text Color - Sets the color for label text in the left column of the information table
Table Text Size - Controls the font size of table text with options from Tiny to Huge
Market Structure DashboardThis indicator displays a **multi-timeframe dashboard** that helps traders track market structure across several horizons: Monthly, Weekly, Daily, H4, H1, M15, and M5.
It identifies the current trend (Bullish, Bearish, or Neutral) based on the progression of **swing highs and lows** (HH/HL, LH/LL).
For each timeframe, the dashboard shows:
* The **current structure** (Bullish, Bearish, Neutral) with a clear color code (green, red, gray).
* **Pivot information**:
* either the latest swing high/low values,
* or the exact date and time of their occurrence (user-selectable in the settings).
An integrated **alert system** notifies you whenever the market structure changes (e.g., "Daily: Neutral → Bullish").
### Key Features:
* Clear overview of multi-timeframe market structures.
* Customizable pivot info display (values or timestamps).
* Built-in alerts on trend changes.
* Compact and readable dashboard, displayed in the top-right corner of the chart.
This tool is ideal for traders who want to quickly assess the **overall market structure** across multiple timeframes and be instantly alerted to potential reversals.
Market Sentiment Trend Gauge [LevelUp]Market Sentiment Trend Gauge simplifies technical analysis by mathematically combining momentum, trend direction, volatility position, and comparison against a market benchmark, into a single trend score from -100 to +100. Displayed in a separate pane below your chart, it resolves conflicting signals from RSI, moving averages, Bollinger Bands, and market correlations, providing clear insights into trend direction, strength, and relative performance.
THE PROBLEM MARKET SENTIMENT TREND GAUGE (MSTG) SOLVES
Traditional indicators often produce conflicting signals, such as RSI showing overbought while prices rise or moving averages indicating an uptrend despite market underperformance. MSTG creates a weighted composite score to answer: "What's the overall bias for this asset?"
KEY COMPONENTS AND WEIGHTINGS
The trend score combines
▪ Momentum (25%): Normalized 14-period RSI, capped at ±100.
▪ Trend Direction (35%): 10/21-period EMA relationships,
▪ Volatility Position (20%): Price position, 20-period Bollinger Bands, capped at ±100.
▪ Market Comparison (20%): Daily performance vs. SPY benchmark, capped at ±100.
Final score = Weighted sum, smoothed with 5-period EMA.
INTERPRETING THE MSTG CHART
Trend Score Ranges and Colors
▪ Bright Green (>+30): Strong bullish; ideal for long entries.
▪ Light Green (+10 to +30): Weak bullish; cautiously favorable.
▪ Gray (-10 to +10): Neutral; avoid directional trades.
▪ Light Red (-10 to -30): Weak bearish; exercise caution.
▪ Bright Red (<-30): Strong bearish; high-risk for longs, consider shorts.
Reference Lines
▪ Zero Line (Gray): Separates bullish/bearish; crossovers signal trend changes.
▪ ±30 Lines (Dotted, Green/Red): Thresholds for strong trends.
▪ ±60 Lines (Dashed, Green/Red): Extreme strength zones (not overbought/oversold); manage risk (tighten stops, partial profits) but trends may persist.
Background Colors
▪ Green Tint (>+20): Bullish environment; favorable for longs.
▪ Red Tint (<-20): Bearish environment; caution for longs.
▪ Light Gray Tint (-20 to +20): Neutral/range-bound; wait for signals.
Extreme Readings vs. Traditional Signals
MSTG ±60 indicates maximum alignment of all factors, not reversals (unlike RSI >70/<30). Use for risk management, not automatic exits. Strong trends can sustain extremes; breakdowns occur below +30 or above -30.
INFORMATION TABLE INTERPRETATION
Trend Score Symbols
▲▲ >+30 strong bullish
▲ +10 to +30
● -10 to +10 neutral
▼ -30 to -10
▼▼ <-30 strong bearish
Colors: Green (positive), White (neutral), Red (negative).
Momentum Score
+40 to +100 strong bullish
0 to +40 moderate bullish
-40 to 0 moderate bearish
-100 to -40 strong bearish
Market vs. Stock
▪ Green: Stock outperforming market
▪ Red: Stock underperforming market
Example Interpretations:
-0.45% / +1.23% (Green): Market down, stock up = Strong relative strength
+2.10% / +1.50% (Red): Both rising, but stock lagging = Relative weakness
-1.20% / -0.80% (Green): Both falling, but stock declining less = Defensive strength
UNDERSTANDING EXTREME READINGS VS TRADITIONAL OVERBOUGHT/OVERSOLD
⚠️ Critical distinctions
Traditional Overbought/Oversold Signals:
▪ Single indicator (like RSI >70 or <30) showing momentum excess
▪ Often suggests immediate reversal or pullback expected
▪ Based on "price moved too far, too fast" concept
MSTG Extreme Readings (±60):
▪ Composite alignment of 4 different factors (momentum, trend, volatility, relative strength)
▪ Indicates maximum strength in current direction
▪ NOT a reversal signal - means "all systems extremely bullish/bearish"
Key Differences:
▪ RSI >70: "Price got ahead of itself, expect pullback"
▪ MSTG >+60: "Everything is extremely bullish right now"
▪ Strong trends can maintain extreme MSTG readings during major moves
▪ Breakdowns happen when MSTG falls below +30, not at +60
Proper Usage of Extreme Readings:
▪ Risk Management: Tighten stops, take partial profits
▪ Position Sizing: Reduce new position sizes at extremes
▪ Trend Continuation: Watch for sustained extreme readings in strong markets
▪ Exit Signals: Look for breakdown below +30, not reversal from +60
TRADING WITH MSTG
Quick Assessment
1. Check trend symbol for direction.
2. Confirm momentum strength.
3. Note relative performance color.
Examples:
▲▲ 55.2 (Green), Momentum +28.4, Outperforming: Strong buy setup.
▼ -18.6 (Red), Momentum -43.2, Underperforming: Defensive positioning.
Entry Conditions
▪ Long: stock outperforming market
- Score >+30 (bright green)
- Sustained green background
- ▲▲ symbol,
▪ Short: stock underperforming market
- Score <-30 (bright red)
- Sustained red background
- ▼▼ symbol
Avoid Trading When:
▪ Gray zone (-10 to +10).
▪ Rapid color changes or frequent zero-line crosses (choppy market).
▪ Gray background (range-bound).
Risk Management:
▪ Stop Loss: Exit on zero-line crossover against position.
▪ Take Profit: Partial at ±60 for risk control.
▪ Position Sizing: Larger when signals align; smaller in extremes or mixed conditions.
KEY ADVANTAGES
▪ Unified View: Weighted composite reduces noise and conflicts.
▪ Visual Clarity: 5-color system with gradients for rapid recognition.
▪ Market Context: Relative strength vs. SPY identifies leaders/laggards.
▪ Flexibility: Works across timeframes (1-min to weekly); customizable table.
▪ Noise Reduction: EMA smoothing minimizes false signals.
EXAMPLES
Strong Bull: Trend Score 71.9, Momentum Score 76.9
Neutral: Trend Score 0.1, Momentum Score -9.2
Strong Bear: Trend Score -51.7, Momentum Score -51.5
PERFORMANCE AND LIMITATIONS
Strengths: Trend identification, noise reduction, relative performance versus market.
Limitations: Lags at turning points, less effective in extreme volatility or non-trending markets.
Recommendations: View on multiple timeframes, combine with price action and fundamentals.
Sector RSI (Auto-Select)This indicator measures the relative strength momentum of any stock against its most closely correlated sector ETF, using the Relative Strength Index (RSI).
Auto sector selection: The script computes correlations between your symbol’s short-term returns and all major SPDR sector ETFs (XLB, XLE, XLF, XLI, XLK, XLP, XLU, XLV, XLY, XTN). The sector with the highest correlation is automatically chosen as the benchmark.
Sector vs Symbol RSI: It calculates RSI (default 14-period) for both the chosen sector and the current chart’s symbol.
Display modes:
Line mode: Plots both RSIs with colored fill (red if the sector RSI is stronger, green if the symbol RSI is stronger).
Histogram mode: Shows the difference between Sector RSI and Symbol RSI as a column chart.
RSI bands: Standard 70/50/30 reference lines are available in line mode.
Status line: The selected sector’s ticker is shown on the TradingView status line so you always know which sector is being used.
Use Cases:
Identify whether a stock’s momentum is driven by its sector or if it’s showing independent relative strength.
Detect sector rotations: when the stock begins to outperform or underperform its sector on momentum basis.
Combine with absolute RSI levels (overbought/oversold) to filter signals.
Notes:
This tool infers sector membership via rolling correlation, not from static classification metadata. This means in some cases (e.g. diversified companies or news shocks) the “best” sector may not be the official one, but the one most correlated in the current market regime.
Use min positive correlation input to filter out weak matches and enforce a fallback (defaults to Technology XLK).
Gold NY Session Key TimesJust showing to us that news come out, open market, close bond for NY Session Time For Indonesia
顺序三连穿越:2/3先入 + 3/3加仓(仅低波动过滤)策略描述(中文)
本策略基于 顺序三连穿越 原则:当 MA5 依次上穿 MA10、MA30、MA60 时,触发趋势做多信号;反之依次下穿时触发做空信号。
在完成 2/3 穿越时即可先行入场,完成 3/3 穿越时可选择加仓确认。
为减少震荡磨损,策略引入了布林带带宽过滤:当市场波动率过低时禁止入场。同时设有 冷静期,避免刚出场后立即反复进场。
该系统适用于趋势性较强或弱趋势行情,能够较好地捕捉单边走势,但在长时间震荡行情中仍可能遭遇利润侵蚀。
Strategy Description (English)
This strategy is built on the Sequential Triple Crossover principle:
When the 5-period moving average (MA5) sequentially crosses above MA10, MA30, and MA60, a bullish entry is triggered.
Conversely, when MA5 sequentially crosses below MA10, MA30, and MA60, a bearish entry is triggered.
An early entry is allowed once 2 out of 3 crossovers are completed, while the final crossover (3/3) can optionally serve as a confirmation add-on position.
To mitigate losses in choppy conditions, the system uses a Bollinger Bandwidth filter that blocks entries when volatility is too low. A cooldown period is also implemented to avoid immediate re-entries after closing a trade.
This setup performs well in trending or weak-trend environments, capturing directional moves effectively, but may still suffer from profit erosion during prolonged sideways markets.
Directional Strength IndicatorThe DSI fuses momentum (RSI), price acceleration (ROC), and volume strength across three hierarchical timeframes. When all three metrics align upward (or downward) it signals a strong directional move; otherwise it flags a lack of clear direction, useful as a filter or trigger in trading strategies. Watch the video at youtu.be
Fetti Fields Header (Presets)This is for individuals that like to customize their charts and add some style and motivation
Capitulation DayThe idea is that when US indexes are >10% below their 50,100,200sma it is a capitulation day.
Crypto Market Dominance Stacked with LabelsA professional stacked area chart showing the dominance of major crypto market segments: BTC, ETH, Top 100 Altcoins, and #101+ Altcoins. Each layer is color-coded for clarity and includes dynamic labels with the current dominance percentage. Provides a clear visual representation of market share trends for traders, analysts, and crypto enthusiasts.
Features:
Stacked visualization of BTC, ETH, Top 100, and small-cap altcoins (#101+).
Color-coded areas for easy identification.
Dynamic labels showing each category’s current dominance percentage.
Horizontal reference lines for percentage levels.
Approximates top 100 and #101+ altcoins using TOTAL2 and TOTAL3 market cap tickers.
Use Case:
Track how market share shifts between BTC, ETH, large altcoins, and smaller altcoins over time. Ideal for analyzing trends, spotting dominance changes, and visualizing overall crypto market structure.
Market Internals Dashboard (Table) v5 - FixedHas a Dashboard for Market Internals and 3 Indices, very helpful
Irrationality Index by CRYPTO_ADA_BTC"The market can be irrational longer than you can stay solvent" ~ John Maynard Keynes
This indicator, the Irrationality Index, measures how far the current market price has deviated from a smoothed estimate of its "fair value," normalized for recent volatility. It provides traders with a visual sense of when the market may be behaving irrationally, without giving direct buy or sell signals.
How it works:
1. Fair Value Calculation
The indicator estimates a "fair value" for the asset using a combination of a long-term EMA (exponential moving average) and a linear regression trend over a configurable period. This fair value serves as a smoothed baseline for price, balancing trend-following and mean-reversion.
2. Volatility-Adjusted Z-Score
The deviation between price and fair value is measured in standard deviations of recent log returns:
Z = (log(price) - log(fairValue)) / volatility
This standardization accounts for different volatility environments, allowing comparison across assets.
3. Irrationality Score (0–100)
The Z-score is transformed using a logistic mapping into a 0–100 scale:
- 50 → price near fair value (rational zone)
- >75 → high irrationality, price stretched above fair value
- >90 → extreme irrationality, unsustainable extremes
- <25 → high irrationality, price stretched below fair value
- <10 → extreme bearish irrationality
4. Price vs Fair Value (% deviation)
The indicator plots the percentage difference between price and fair value:
pctDiff = (price - fairValue) / fairValue * 100
- Positive values → Percentage above fair value (optimistic / overvalued)
- Negative values → Percentage below fair value (pessimistic / undervalued)
Visuals:
- Irrationality (%) Line (0–100) shows irrationality level.
- Background Colors: Yellow= high bullish irrationality, Green= extreme bullish irrationality, Orange= high bearish irrationality, Red= extreme bearish irrationality.
- Price - FairValue (%) plot: price deviation vs fair value (%), Colored green above 0 and red below 0.
- Label: display actual price, estimated fair value, and Z-score for the latest bar.
- Alerts: configurable thresholds for high and extreme irrationality.
How to read it:
- 50 → Market trading near fair value.
- >75 / >90 → Price may be irrationally high; risk of pullback increases.
- <25 / <10 → Price may be irrationally low; potential rebound zones, but trends can continue.
- Price - FairValue (%) plot → visual guide for % price stretch relative to fair value.
Notes / Warnings:
- Measures relative deviation, not fundamental value!
- High irrationality scores do not automatically indicate trades; markets can remain can be irrational longer than you can stay solvent .
- Best used with other tools: momentum, volume, divergence, and multi-timeframe analysis.