Trendshift [CHE]Trendshift — First-Shift Regime Turns with Premium/Discount Context
Summary
Trendshift highlights the first confirmed directional structure shift in price and overlays a premium or discount context based on the most recent structural range. It identifies the major swing levels, detects a regime transition when price closes beyond these levels with optional ATR-based conviction, and marks only the first shift per direction to reduce repetition and noise. The indicator then establishes a premium or discount band around the break and tints the background when price operates in either region. This produces a clean regime-aware view that emphasizes only the earliest actionable turn while maintaining contextual bias information.
Motivation: Why this design?
Conventional swing-based structure tools often fire repeated signals after each minor break, especially in volatile environments. This leads to cluttered charts and little informational value. Trendshift focuses on the core trading need: isolating the first confirmed change in directional structure and providing a premium or discount context after the break. By limiting signals to the initial flip and suppressing further markers until direction reverses again, the script reduces noise and highlights only the structural event that materially matters. The band logic further addresses the challenge of distinguishing contextual extremes and avoiding trades taken too late after a shift.
What’s different vs. standard approaches?
Baseline reference: Most structure indicators repeatedly plot every new break of a swing high or swing low.
Differences:
Only the first confirmed bullish or bearish shift is plotted until the opposite direction occurs.
ATR-filtered breakout validation to reduce false breaks during volatility spikes.
A reduced premium and discount band derived from the breakout candle and prior swing structure.
Tinted background for contextual positioning rather than explicit entry signals.
Practical effect:
Fewer but more meaningful shift markers.
Clear visual context of where price operates relative to the structural band.
Cleaner regime transitions and less chart clutter.
How it works (technical)
The indicator continuously evaluates major swing highs and lows using a symmetric window length. When a swing is confirmed, the script stores its price and bar index. A structure shift occurs when price closes beyond the most recent major swing in the opposite direction. Optional ATR filtering requires the breakout distance to exceed an ATR-scaled threshold.
Upon a confirmed shift, the script sets a regime state that remains active until a new shift or an optional timeout. It also establishes a structural band anchored between the breakout candle extremum and the prior opposite swing. The band informs the premium and discount boundaries, each representing a quarter subdivision.
Only the first shift event per direction generates a visual triangle marker. The band is validated by comparing its height to ATR to avoid extremely narrow structures. Background tinting activates whenever price resides within the premium or discount zones. Persistent variables maintain previous structural states and prevent re-triggering until direction reverses.
Parameter Guide
Swing length (default 5): Controls the number of bars used on each side of a swing. Smaller values are more reactive; larger values reduce noise.
Use ATR filter (default true): Requires breakout strength beyond the swing to exceed an ATR-scaled threshold. Disabling increases signal frequency.
ATR length (default 14): Controls volatility estimation for breakout filtering and band validation.
Break ATR multiplier (default 1.0): Higher values require stronger breakouts, reducing false shifts.
Enable framework (default true): Activates the premium and discount context logic.
Persist band on timeout (default true): Retains the current band after a regime timeout.
Min band size ATR mult (default 0.5): Rejects extremely small bands and prevents unrealistic tinting.
Regime timeout bars (default 500): Resets the regime after extended inactivity.
Invert colors (default false): Swaps premium and discount tint color assignments.
Show zone tint (default true): Toggles background shading.
Show shift markers (default true): Enables or disables the first-shift triangles.
Reading & Interpretation
A green or red tint signals that price is operating in the discount or premium region of the most recent structural band. These regions are derived from the breakout event and the prior swing. A green triangle below a bar indicates the first bullish structure shift after a bearish regime. A red triangle above a bar indicates the first bearish shift after a bullish regime. No further markers appear until direction reverses. When tint is active, price location within the band offers simple contextual bias without providing explicit entries.
Practical Workflows & Combinations
Trend following: Treat the first bullish marker as the earliest confirmation of a potential up-regime and the first bearish marker for a potential down-regime. Use price location relative to the premium and discount zones as context for continuation or mean-reversion setups.
Structure-based execution: Combine with simple swing highs and lows to refine entry points within discount after a bullish shift or within premium after a bearish shift.
Higher-timeframe overlays: Apply the indicator on higher timeframes to define macro structure, then trade on lower timeframes using the band as a contextual anchor.
Risk management: When price stays in premium during a bearish regime or in discount during a bullish regime, consider protective actions or position management adjustments.
Behavior, Constraints & Performance
The script uses only confirmed swing points and closed-bar conditions, so repainting from future bars does not occur except the inherent delay of pivot confirmation. No higher-timeframe security calls are used, avoiding HTF repaint paths.
Performance impact is minimal because the script uses no loops or arrays and relies on persistent variables. The maximum bars back setting is five-thousand, required for swing lookback. Known limitations include quiet behavior during long consolidations, occasional delayed recognition of shifts due to swing confirmation, and limited effectiveness during large market gaps where extremum logic may be distorted.
Sensible Defaults & Quick Tunin g
Increase the swing length for smoother trend shifts and fewer signals.
Decrease the swing length for more sensitivity.
Raise the ATR breakout multiplier to reduce noise in volatile markets.
Lower the band size requirement to make premium and discount zones more active on slower markets.
Extend the regime timeout for slow-moving assets.
What this indicator is—and isn’t
This tool is a structural regime-shift detector with contextual premium and discount shading. It is not a complete trading system and does not include entries, exits, or risk models. It does not predict future price movement. It should be combined with broader structure analysis, liquidity considerations, and risk management practices.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on Heikin-Ashi, Renko, Kagi, Point-and-Figure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
دورات
Index Top 5 Heavyweight Analyzer## 🎯 Overview
This advanced Pine Script indicator applies the **Pareto Principle** to Nifty 50 trading: the top 5 heavyweights control 40%+ of the index's movement. Instead of watching all 50 stocks, this tool monitors the "Kings" that actually drive the index direction.
Professional traders don't trade the index in isolation - they look "under the hood" at heavyweight constituents. This indicator does exactly that, providing real-time analysis of HDFC Bank, Reliance, ICICI Bank, Bharti Airtel, and TCS to predict Nifty movements before they happen.
## 🔥 Key Features
### 1️⃣ Four-Quadrant OI Cycle Analysis
Identifies which cycle each heavyweight is in using Open Interest from continuous futures contracts:
- **Long Buildup** (Price ↑ + OI ↑): Institutions buying aggressively → Bullish driver
- **Short Covering** (Price ↑ + OI ↓): Bears trapped and exiting → Fast bullish spike
- **Short Buildup** (Price ↓ + OI ↑): Big money shorting → Bearish drag
- **Long Unwinding** (Price ↓ + OI ↓): Buyers giving up → Index weakness
### 2️⃣ Alignment Score System
Counts how many of the top 5 stocks are bullish/bearish/neutral. When 3+ heavyweights align in the same direction with sufficient weightage (15%+), the indicator generates high-conviction trade signals for the Nifty index.
### 3️⃣ Cost of Carry (Basis) Analysis
Compares Future vs Spot prices to gauge institutional sentiment:
- **Rising Premium**: Aggressive institutional buying
- **Discount (Backwardation)**: Extreme bearishness
### 4️⃣ Divergence Detection
Warns when the index move contradicts heavyweight signals - identifying "fake moves" that professional traders fade.
### 5️⃣ Actionable Trade Signals
- **Strong Bullish**: Buy Index Calls / Long Nifty Future
- **Strong Bearish**: Buy Index Puts / Short Nifty Future
- **Neutral/Choppy**: Iron Condor / Avoid Directional trades
## 📈 What Makes This Different?
Unlike basic index indicators, this tool:
- Fetches real Open Interest data from continuous futures (RELIANCE1!, HDFCBANK1!, etc.)
- Applies weighted analysis - top 3 stocks matter most
- Provides professional trade recommendations based on constituent alignment
- Uses dark theme optimized colors for extended screen time
- Displays comprehensive dashboard with price, OI, OI change %, cycle status, and basis
## 💡 How to Use
1. **Add to any Nifty 50 or Bank Nifty chart**
2. **Watch the dashboard** in the top-right corner showing all 5 heavyweights
3. **Check the ALIGNMENT row**:
- 🔼 Bull Count | 🔽 Bear Count | ➖ Neutral Count
- Weighted Bull/Bear scores
4. **Read the INDEX SIGNAL row** for trade recommendations
5. **Look for divergence warnings** (⚠️) indicating fake moves
6. **Use the histogram plot** to visualize signal strength over time
## ⚙️ Customizable Settings
- **Constituents**: Modify ticker symbols and weightages
- **Signal Thresholds**: Adjust minimum alignment required (default: 3 out of 5)
- **Display Options**: Toggle table, signals, and basis calculations
- **Timeframe**: Works on all timeframes (intraday and daily)
## 🎨 Dark Theme Optimized
Designed specifically for TradingView's dark mode with:
- High-contrast colors that reduce eye strain
- Bright lime green (#00E676) for bullish signals
- Bright red (#FF5252) for bearish signals
- Electric colors for easy pattern recognition
## 📊 Best Used For
- **Nifty 50 Options Trading**: Know whether to buy calls or puts
- **Index Futures Trading**: Identify high-probability directional moves
- **Risk Management**: Avoid trading when heavyweights show divergence
- **Market Timing**: Enter when top stocks align (3+ in same direction)
## 🚀 Pro Tips
- **"Double Engine" Signal**: When Reliance shows Long Buildup AND HDFC Bank shows Short Covering → Extremely bullish for Nifty
- **Sector Rotation**: If Banks are strong but Tech is weak (or vice versa) → Expect choppy, range-bound index
- **Rollover Analysis**: Near expiry, watch for high OI with rising basis → Bulls/Bears carrying positions forward with confidence
## ⚠️ Important Notes
- Requires TradingView Premium for multiple `request.security()` calls
- OI data available only for stocks with active futures
- Best used on NSE exchange during market hours
- Combine with your own risk management strategy
## 📝 Credits
Based on professional institutional trading methodologies that analyze index constituents rather than the index itself. Implements the Pareto Principle: focus on the 20% (top 5 stocks) that drives 80% of the index movement.
***
## 🔔 Alerts Available
- Strong Bullish Signal (3+ stocks aligned bullish)
- Strong Bearish Signal (3+ stocks aligned bearish)
- Divergence Warning (fake index moves)
**Made for serious traders who want to trade like institutions - by watching what the "smart money" is doing in the heavyweights.**
***
*Optimize your Nifty trading by monitoring the stocks that actually matter. Stop watching all 50 - focus on the 5 Kings!* 👑
***
**Tags**: Nifty, Open Interest, OI Analysis, Heavyweight Analysis, Index Trading, Options Trading, Futures Trading, Institutional Analysis, Smart Money, Pareto Principle
Regime MapRegime Map — Volatility State Detector
This indicator is a PineScript friendly approximation of a more advanced Python regime-analysis engine.
The original backed identifies market regimes using structural break detection, Hidden-Markov Models, wavelet decomposition, and long-horizon volatility clustering. Since Pine Script cannot execute these statistical models directly, this version implements a lightweight, real-time proxy using realised volatility and statistical thresholds.
The purpose is to provide a clear visual map of evolving volatility conditions without requiring any heavy offline computation.
________________________________________
Mathematical Basis: Python vs Pine
1. Volatility Estimation
Python (Realised Volatility):
RVₜ = √N × stdev( log(Pₜ) − log(Pₜ₋₁) )
Pine Approximation:
RVₜ = stdev( log(Pₜ) − log(Pₜ₋₁), lookback )
Rationale:
Realised volatility captures volatility clustering — a key characteristic of regime transitions.
________________________________________
2. Regime Classification
Python (HMM Volatility States):
Volatility is modelled as belonging to hidden states with different means and variances:
State μ₁, σ₁
State μ₂, σ₂
State μ₃, σ₃
with state transitions determined by a probability matrix.
Pine Approximation (Z-Score Regimes):
Zₜ = ( RVₜ − mean(RV) ) / stdev(RV)
Regime assignment:
• Regime 0 (Low Vol): Zₜ < Zₗₒw
• Regime 1 (Normal): Zₗₒw ≤ Zₜ ≤ Zₕᵢgh
• Regime 2 (High Vol): Zₜ > Zₕᵢgh
Rationale:
Z-scores provide clean statistical boundaries that behave similarly to HMM state separation but are computable in real time.
________________________________________
3. Structural Break Detection vs Rolling Windows
Python (Bai–Perron Structural Breaks):
Segments the volatility series into periods with distinct statistical properties by minimising squared error over multiple regimes.
Pine Approximation:
Rolling mean and rolling standard deviation of volatility over a long window.
Rationale:
When structural breaks are not available, long-window smoothing approximates slow regime changes effectively.
________________________________________
4. Multi-Scale Cycles
Python (Wavelet Decomposition):
Volatility decomposed into long-cycle (A₄) and short-cycle components (D bands).
Pine Approximation:
Single-scale smoothing using long-horizon averages of RV.
Rationale:
Wavelets reveal multi-frequency behaviour; Pine captures the dominant low-frequency component.
________________________________________
Indicator Output
The background colour reflects the active volatility regime:
• Low Volatility (Green): trending behaviour, cleaner directional movement
• Normal Volatility (Yellow): balanced environment
• High Volatility (Red): sharp swings, traps, mean-reversion phases
Regime labels appear on the chart, with a status panel displaying the current regime.
________________________________________
Operational Logic
1. Compute log returns
2. Calculate short-horizon realised volatility
3. Compute long-horizon mean and standard deviation
4. Derive volatility Z-score
5. Assign regime classification
6. Update background colour and labels
This provides a stable, real-time map of market state transitions.
________________________________________
Practical Applications
Intraday Trading
• Low-volatility regimes favour trend and breakout continuation
• High-volatility regimes favour mean reversion and wide stop placement
Swing Trading
• Compression phases often precede multi-day trending moves
• Volatility expansions accompany distribution or panic events
Risk Management
• Enables volatility-adjusted position sizing
• Helps avoid leverage during expansion regimes
________________________________________
Notes
• Does not repaint
• Fully configurable thresholds and lookbacks
• Works across indices, stocks, FX, crypto
• Designed for real-time volatility regime identification
________________________________________
Disclaimer
This script is intended solely for educational and research purposes.
It does not constitute financial advice or a recommendation to buy or sell any instrument.
Trading involves risk, and past volatility patterns do not guarantee future outcomes.
Users are responsible for their own trading decisions, and the author assumes no liability for financial loss.
MA200 Deviation Percentile200-Day MA Deviation with Dynamic Thresholds
OVERVIEW
This indicator measures price deviation from the 200-day moving average as a percentage, with dynamically calculated overbought/oversold thresholds based on historical percentiles.
Best suited for broad market indices (SPY, QQQ, IWM, etc.) where the 200-day MA serves as a reliable long-term trend indicator. Individual stocks may exhibit more erratic behavior around this level.
CALCULATION
Deviation (%) = (Close - 200MA) / 200MA x 100
Dynamic thresholds are derived from actual historical distribution rather than assuming normal distribution:
- Overbought threshold = 97.5th percentile of historical deviations
- Oversold threshold = 2.5th percentile of historical deviations
SETTINGS
MA Length (default: 200)
Moving average period.
Lookback Period (default: 1260)
Historical window for threshold calculation. 1260 bars approximates 5 years of daily data.
Threshold Percentile (default: 5%)
Two-tailed threshold. 5% places overbought/oversold boundaries at the 97.5th and 2.5th percentiles respectively.
INTERPRETATION
Deviation Value
- Positive: Price trading above 200MA
- Negative: Price trading below 200MA
- Magnitude indicates extent of deviation
Percentile Ranking (0-100%)
- Shows where current deviation ranks historically
- Above 90%: Historically elevated
- Below 10%: Historically depressed
Dynamic Threshold Lines
- Red line: Upper boundary based on historical distribution
- Green line: Lower boundary based on historical distribution
- These adapt automatically to each asset's volatility characteristics
APPLICATION
Mean Reversion
Extreme deviations tend to normalize over time. When deviation exceeds dynamic thresholds, probability of mean reversion increases.
Trend Assessment
Sustained positive/negative deviation confirms trend direction. Zero-line crossovers may signal trend changes.
NOTES
- Optimized for daily timeframe on market indices
- Requires sufficient historical data (minimum equal to lookback period)
- Extreme readings do not guarantee immediate reversals
- Use in conjunction with other analysis methods
DAILY - 3-Condition Arrows - Buy & SellVersion 1.
On the DAILY time frame, this indicator will add a green BUY arrow to a stock price when the following 3 conditions are ALL true:
BUY (all 3 conditions are true)
1. Stock price > 50 EMA
2. MACD line above moving average
3. Williams %R (Best_Solve version) is above moving average
Conversely, a red SELL arrow will point out when the following 3 conditions are ALL true:
SELL (all 3 conditions are true)
1. Stock price < 50 EMA
2. MACD line below moving average
3. Williams %R (Best_Solve version) is below the moving average
Blockchain Fundamentals: PPT [CR]Blockchain Fundamentals: PPT
A proprietary market positioning indicator that analyzes price behavior using percentile-based statistical methods. The PPT (Percentile Position Transform) provides a normalized oscillator view of market conditions, helping traders identify potential trend exhaustion and reversal zones through multi-timeframe statistical analysis.
█ FEATURES
Dual Signal Lines
The indicator plots two distinct signals:
- White Line — Primary signal representing the normalized, smoothed market position. This is the main signal used for trading decisions.
- Red Line — Raw statistical measurement before final normalization. Useful for identifying divergences and signal development.
Background Coloring
Dynamic background colors provide at-a-glance market context:
- Green Background — Indicates bullish positioning when the primary signal exceeds the buffer threshold.
- Red Background — Indicates bearish positioning when the primary signal falls below the buffer threshold.
- Gray Background — Neutral zone where no clear directional bias is present.
Flip Buffer
An adjustable threshold system designed to reduce noise and false signals:
- Enable Flip Buffer — Toggle the buffer system on or off.
- Buffer Size — Adjustable threshold level (default -0.1) that determines when background colors change. Higher values reduce sensitivity; lower values increase responsiveness.
Reference Levels
Three horizontal reference lines provide context:
- Center line at 0 — Neutral market position.
- Upper dashed line at +1 — Extreme bullish positioning threshold.
- Lower dashed line at -1 — Extreme bearish positioning threshold.
█ HOW TO USE
Signal Interpretation
The indicator operates as a mean-reversion oscillator within a normalized range:
1 — Values approaching +1 suggest extended bullish conditions where price may be overextended relative to recent history.
2 — Values approaching -1 suggest extended bearish conditions where price may be oversold relative to recent history.
3 — Crosses of the center line (0) indicate shifts in the underlying statistical trend.
Trading Applications
While specific trading strategies will vary by individual approach and market conditions:
- Consider the extremes (+1 and -1 levels) as potential areas of interest for mean-reversion setups.
- Background color changes can help identify when market positioning shifts from one regime to another.
- Divergences between the white and red lines may provide early warning of potential trend changes.
- The buffer zone (gray background) represents areas where market positioning is relatively neutral.
█ LIMITATIONS
- The indicator requires sufficient historical data to function properly. In assets with limited price history, the statistical measurements may be less reliable during early data periods.
- As a percentile-based system, the indicator is relative to recent history. Changing market regimes may require interpretation adjustments.
- Not designed for high-frequency or scalping strategies due to its daily data dependency.
- Background colors are visual aids and should not be used as standalone trading signals without additional confirmation.
█ NOTES
This indicator is part of the Blockchain Fundamentals suite and represents proprietary research into statistical market positioning analysis.
Users should experiment with the buffer settings to match their risk tolerance and trading style. More conservative traders may prefer larger buffer values to reduce signal frequency, while active traders might benefit from smaller buffers that provide earlier warnings.
Nexural Fisher ProNexural Fisher Transform Ultimate
This is my take on what the Fisher Transform should have been from the start. Not a repaint of the standard indicator with a fresh coat of paint, but a ground-up rebuild using techniques from John Ehlers and quantitative finance that actually make a difference.
What This Indicator Does
The Fisher Transform converts price into a Gaussian normal distribution, which sounds complicated but really just means it gives you clear overbought and oversold readings with sharp turning points. The problem with the standard Fisher Transform is that it was designed decades ago and has some serious limitations. This version addresses those limitations directly.
The Core Improvements
Adaptive Period via Dominant Cycle Measurement
Instead of guessing what lookback period works best, this indicator measures the dominant cycle in the market using autocorrelation and adjusts itself automatically. In choppy markets it becomes more responsive. In smooth trends it slows down to avoid false signals. You no longer have to optimize the length setting for every instrument and timeframe because the indicator
does it for you.
Tanh Normalization
The standard Fisher Transform has a nasty habit of spiking to extreme values during volatile moves. You have probably seen Fisher readings of plus or minus 8 or even higher which makes the indicator almost unreadable. This version uses hyperbolic tangent normalization to mathematically bound the output. The indicator stays within a consistent range regardless of market conditions so your overbought and oversold levels actually mean something.
Efficiency Ratio Regime Detection
This is the feature that changes how you use the indicator. The Efficiency Ratio measures whether the market is trending or ranging on a scale from zero to one. A high reading means price is moving efficiently in one direction which indicates a trend. A low reading means price is chopping around which indicates a range.
Why does this matter? Because oscillators work completely differently in trends versus ranges. In a ranging market you want to fade overbought and oversold readings. In a trending market those same signals will destroy you as the market stays overbought or oversold for extended periods while continuing in the trend direction.
The info panel shows you the current regime so you know how to interpret the signals. When it says Trending you trust the direction and ignore the zones. When it says Ranging you trust the zones and fade the extremes.
Volume Weighted Calculation
High volume bars have more influence on the Fisher calculation than low volume bars. This means the indicator responds more to moves that have real participation behind them and filters out low volume noise. The weighting is clamped to prevent any single bar from dominating the calculation.
Ehlers Super Smoother
Rather than using a simple moving average or exponential moving average for smoothing, this indicator uses the Ehlers Super Smoother which is a two pole filter specifically designed to remove noise without adding lag. The math behind it is based on signal processing theory and it genuinely works better than traditional smoothing methods.
How To Use It
The indicator shows two lines. The main Fisher line changes color based on direction. Green means bullish momentum and red means bearish momentum. The white trigger line is the previous bar value and crossovers between the two lines indicate momentum shifts.
The info panel in the corner gives you everything at a glance. State tells you the current direction. Zone tells you if the indicator is overbought, oversold, or neutral. Regime tells you if the market is trending, ranging, or mixed. ER shows you the raw Efficiency Ratio value. Period shows you the current adaptive lookback being used. Fisher shows you the exact indicator
value.
For ranging markets look for bullish crosses when the indicator is in oversold territory and bearish crosses when the indicator is in overbought territory. These are mean reversion setups.
For trending markets use the indicator to confirm trend direction and look for pullback entries when the indicator dips toward the zero line without reaching oversold or overbought extremes.
Strengths
The adaptive period is the biggest advantage. Most traders either use a default setting that works sometimes or spend hours optimizing settings that stop working when market conditions change. This indicator handles that problem automatically.
The regime detection is genuinely useful. Knowing whether to fade extremes or ride momentum is half the battle with any oscillator and this indicator tells you directly.
The bounded output means your levels are consistent. When the indicator hits 1.5 it means the same thing today as it did last month. You are not constantly adjusting your interpretation based on recent volatility.
The volume weighting adds a layer of confirmation that most oscillators lack entirely. Moves on high volume carry more weight which aligns with how markets actually work.
Weaknesses
No indicator predicts the future. This indicator tells you about momentum and regime but it does not tell you where to place your stop or what your target should be. It is a tool not a strategy.
The adaptive period can occasionally shift during volatile transitions which may cause the indicator to behave slightly differently than expected. The smoothing minimizes this but it can still happen.
Like all oscillators this indicator is better at identifying conditions than timing exact entries. A cross into oversold does not mean price stops falling immediately. It means conditions favor a bounce but the timing of that bounce requires additional analysis.
The regime detection has a slight lag because it needs data to determine whether the market is trending or ranging. At the exact moment of a regime change the indicator may still show the previous state for a few bars.
What This Is Not
This is not a signal service. There are no buy and sell arrows because markets are more nuanced than that. A bullish cross in a range means something completely different than a bullish cross in a trend and treating them the same is how traders lose money.
This is not a holy grail. It will not turn a losing trader into a winning trader on its own. It is a well built tool that gives you better information than the standard Fisher Transform.
This is not overfitted to historical data. The techniques used here are based on principles that have been validated across decades of market data. There is no curve fitting or optimization to make backtests look good.
Final Thoughts
I built this because I got tired of indicators that looked good in marketing but fell apart in live trading. The standard Fisher Transform has real value but the standard implementation has real problems. This version solves those problems using math that actually makes sense.
If you understand what the indicator is telling you and combine it with solid risk management and market structure analysis, it will serve you well. If you are looking for something to tell you exactly when to buy and sell, keep looking because that does not exist.
This is an excellent indicator on the 5-15 time frame. Use it wisely.
Asia Range - London & NY Open - First 2 HoursThis indicator will identify the areas where different session of trading happens around the world giving you the edge to identify traps in Asia range and utilize the volitility of London and New York open
50, 100 & 200 Week MA (SMA/EMA Switch)Clean, multi-timeframe weekly moving average indicator displaying the classic 50, 100, and 200-week MAs directly on any chart timeframe.
Features:
True weekly calculations using request.security (accurate, no daily approximation)
Switch between SMA and EMA with one click
Individually toggle each MA (50w orange, 100w purple, 200w blue)
Perfect for long-term trend analysis, golden/death crosses, and institutional-level support/resistance
Ideal for swing traders, investors, and anyone tracking major market cycles. Lightweight and repaints-free.
Cycle Forecast + MACD Divergence (Kombi v6 FULL)This indicator merges two powerful analytical models:
🔮 1. Dominant Cycle Forecasting
The script automatically identifies major structural market cycles by detecting significant swing highs and lows.
It then fits a sinusoidal wave (amplitude, phase, and period) to the dominant cycle and projects it into the future.
Features:
Automatically extracts large, dominant cycles (no noise, no small swings)
Smooth sinusoidal historical cycle visualization
Future cycle projection for 1–2 upcoming cycle periods
Dynamic amplitude and phase alignment based on market structure
Helps anticipate cycle tops and bottoms for long-term timing
📉 2. MACD Divergence Detection
Full divergence detection engine using MACD or MACD Histogram.
Detects:
Bullish Divergence
Price ↓ while MACD (or Histogram) ↑
→ Possible trend reversal upward
Bearish Divergence
Price ↑ while MACD (or Histogram) ↓
→ Possible trend reversal downward
Features:
Pivot-based divergence confirmation (no repaint)
Choice of MACD Line or Histogram as divergence source
Labels + connecting divergence lines
Works across all markets and timeframes
⚙️ Smart Auto-Pivot System
The indicator optionally adjusts pivot sensitivity based on timeframe:
Weekly → tighter pivots
Daily → medium pivots
Intraday → wider pivots
Ensures stable, meaningful divergence signals even on higher timeframes.
🎯 Use cases
Identify upcoming cycle highs/lows
Spot major trend reversals early
Improve swing entries with MACD divergences near cycle turns
Combine forecasting with momentum exhaustion
Suitable for crypto, stocks, indices, forex & commodities
🧠 Why this indicator is powerful
This tool blends time-based cycle forecasting with momentum-based divergence signals, giving you a unique perspective of where the market is likely to turn.
Cycles reveal when a move may occur.
Divergences reveal why a move may occur.
Combined, they offer highly effective market timing.
Quarterly Theory IndicatorQuarterly Theory Indicator (from Daye's Theory)
Functionalities:
1) Monthly Quarterly Cycles (division with vertical lines) & the latest Monthly True Open- only visible in the weekly TF (horizontal line).
2) Weekly Quarterly Cycles (division with vertical lines) & the latest Weekly True Open (horizontal line).
3) Daily Quarterly Cycles (division with vertical lines) & the latest Daily True Open (horizontal line).
4) 90Min "Sessional" Quarterly Cycles (division with vertical lines) & the four 90Min cycle True Open lines of the latest day (horizontal lines).
Market Regime Storyline v6Title: Market Regime Storyline
Description:
The Market Regime Storyline indicator identifies and displays the current market condition or "regime" through a comprehensive framework that combines trend direction and volatility analysis.
The indicator classifies market conditions into four distinct regimes:
Uptrend: Price is above the trend moving average with short-term momentum confirming upward movement
Downtrend: Price is below the trend moving average with short-term momentum confirming downward movement
Squeeze: Low normalized volatility indicating a period of consolidation and potential impending breakout
Chop: Sideways, range-bound price action with no clear directional bias and normal volatility
Key features include:
• Clear identification of the dominant market regime with visual background coloring
• Continuous display of the current regime and normalized volatility level in the upper-left corner
• Labels marking transitions between different market regimes
• Subtle background coloring that provides visual context without visual clutter
The indicator combines trend determination (using an exponential moving average and momentum confirmation) with volatility normalization to provide a complete picture of the prevailing market environment. This regime identification helps traders adapt their strategies to the current market conditions, whether trending, consolidating, or ranging.
This approach recognizes that different trading strategies perform optimally in different market environments, allowing users to adjust their approach based on whether the market is exhibiting trending behavior, preparing for a volatility expansion, or trading in a range-bound manner.
Category: Trend Analysis
Tags: Market Regime, Trend Identification, Volatility Squeeze, Market Conditions, Consolidation, Trending, Range-Bound, Regime Change, Volatility Normalization, Market Environment
Recommended Publishing Information:
The Market Regime Storyline indicator is designed to provide traders with a clear, unambiguous identification of the prevailing market condition. By categorizing market behavior into distinct regimes, the indicator enables users to:
Determine whether the market is exhibiting directional trending behavior that favors trend-following strategies
Identify periods of low volatility consolidation (squeezes) that often precede significant directional moves
Recognize range-bound, non-directional market conditions where mean reversion or breakout strategies may be more appropriate
The indicator uses a combination of trend filtering through a primary moving average and momentum confirmation, along with normalized volatility measurement, to provide a robust regime classification system. The normalized volatility component helps distinguish between true consolidation periods (squeezes) and typical sideways movement (chop), providing additional context for anticipating potential changes in market behavior.
This regime-based approach acknowledges the reality that all trading strategies do not perform equally well in all market environments, and provides a framework for adapting trading approaches to the prevailing market conditions.
The combination of these classification elements and the clear visual presentation makes this indicator particularly useful for traders who need to adjust their strategy depending on whether the market is in a trending, consolidating, or range-bound state.
Z-EMA Fusion BandsDesigned with crypto markets in mind, particularly Bitcoin , it builds on the concept that the 1-Week 50 EMA often serves as a long-term bull/bear market threshold — an area where institutional bias, momentum shifts, and cyclical rotations tend to occur.
🔹 Core Components & Synergies:
1. 1W 50 EMA (Higher Timeframe)
- This EMA is calculated on a weekly timeframe, regardless of your current chart.
- In crypto, price above the 1W 50 EMA typically aligns with long-term bull market phases, while extended periods below can signify bearish macro structure.
- The slope of the EMA is also analyzed to add directional confidence to trend strength.
2. ±1 Standard Deviation Bands
- Surrounding the 50 EMA, these bands visualize normal price dispersion relative to trend.
- When price consistently hugs or breaks outside these bands, it often reflects market expansion, volatility events, or mean-reversion opportunity.
3. Z-Score Gradient Fill
- The area between the bands is filled using a Z-score-based gradient, which dynamically adjusts color based on how far price is from the EMA (in terms of standard deviations).
- Color shifts from aqua (near EMA) to fuchsia (far from EMA) help you spot price compression, equilibrium, or overextension at a glance.
- The fill also uses transparency scaling, making it fade as price stretches further, emphasizing the core structure.
4. Directional EMA Coloring
- The EMA line itself is colored based on:
- The slope of the EMA (rising/falling)
- Whether the HTF candle is bullish or bearish
- This provides intuitive color-coded confirmation of momentum alignment or potential exhaustion.
5. Price/EMA Divergence Detection
- The script detects bullish and bearish divergence between price and the EMA (rather than using a traditional oscillator).
- Bullish Divergence: Price makes a lower low, EMA makes a higher low.
- Bearish Divergence: Price makes a higher high, EMA makes a lower high.
- These signals often mark transitional zones where momentum fades before a trend reversal or correction.
📊 Suggested Uses:
🔸 Swing and Position Trading:
- Use the 1W 50 EMA as a macro-trend anchor.
- Stay long-biased when price is above with positive slope, and short-biased when below.
- Consider entries near band edges for mean-reversion plays, especially if confluence forms with divergence signals.
🔸 Volatility-Based Filtering:
- Use the Z-score fill to identify volatility compression (near EMA) or expansion (edge of bands).
- Combine this with breakout strategies or dynamic position sizing.
🔸 Divergence Confirmation:
- Combine divergence markers with HTF EMA slope for high-probability setups.
- Bullish div + EMA flattening/rising can signal the start of accumulation after a macro dip.
🔸 Multi-Timeframe Analysis:
- Works well as a structural overlay on intraday charts (1H, 4H, 1D).
- Use this indicator to track long-term bias while executing lower timeframe trades.
⚠️ Disclaimer:
This indicator is designed for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any asset.
Always use proper risk management, and combine with your own analysis, tools, and strategy. Performance in past market conditions does not guarantee future results.
Kaufman Adaptive Moving Average + ART**Kaufman Adaptive Moving Average (fixed TF) + ATR Volatility Bands**
This script is a Pine Script v5 extension of the original *Kaufman Adaptive Moving Average* by Alex Orekhov (everget).
It adds:
* a **fixed timeframe option** for KAMA
* a separate **ATR panel under the chart**
* **configurable ATR volatility levels** with dynamic coloring.
KAMA adapts its smoothing to market conditions: it speeds up in strong trends and slows down in choppy phases. Here, KAMA can be calculated on any timeframe (e.g. 1D) and overlaid on a lower-timeframe chart (e.g. 1H), so you can track higher-TF trend structure while trading intraday.
The ATR panel visualizes volatility in the same or a separate timeframe and highlights phases of high/low volatility based on user-defined thresholds.
---
### Features
**KAMA (on chart)**
* Standard KAMA parameters: `Length`, `Fast EMA Length`, `Slow EMA Length`, `Source`
* Input: **KAMA Timeframe**
* empty → uses chart timeframe
* any value (e.g. `60`, `240`, `D`, `W`) → calculates KAMA on that fixed TF and maps it to the chart
* Color-changing KAMA line:
* **green** when the selected-TF KAMA is rising
* **red** when it is falling
* Optional *Await Bar Confirmation* to avoid reacting to still-forming bars
* Built-in alert when the KAMA color changes (potential trend shift).
**ATR panel (separate window under the chart)**
* Own inputs: `Show ATR`, `ATR Length`
* **ATR Timeframe** input:
* empty → ATR uses the same TF as KAMA
* custom value → fully independent ATR timeframe
* Two user-defined volatility levels:
* `ATR High Vol Level` – threshold for **high volatility**
* `ATR Low Vol Level` – threshold for **low volatility**
* ATR line coloring:
* **red** when ATR > High Vol Level (high volatility regime)
* **green** when ATR < Low Vol Level (quiet market)
* **blue** in the normal range between the two levels.
---
### How to use
1. Add the script to your chart.
2. Choose a **KAMA Timeframe** (leave empty for chart TF, or set to a higher TF for multi-timeframe trend following).
3. Optionally set a different **ATR Timeframe** to monitor volatility on yet another TF.
4. Adjust `ATR High Vol Level` and `ATR Low Vol Level` to match the instrument and timeframe you trade.
5. Use:
* the **KAMA color changes** as trend / regime signals, and
* the **ATR colors & levels** to quickly see whether you’re trading in a low-, normal- or high-volatility environment.
This combination is designed to keep the chart itself clean (only KAMA on price) while giving you a dedicated volatility dashboard directly underneath.
Session Markers - JDK AnalysisSession Markers is a tool designed to study how markets behave during specific, recurring time windows. Many traders know that price behaves differently depending on the day of the week, the time of the day, or particular market sessions such as the weekly open, the London session, or the New York open. This indicator makes those recurring windows visible on the chart and then analyzes what price typically does inside them. The result is a clear statistical understanding of how a chosen session behaves, both in direction and in strength.
The script works by allowing the trader to define any time window using a start day and time and an end day and time. Every time this window occurs on the chart, the indicator highlights it with a full-height vertical band. These visual markers reveal patterns that are otherwise difficult to detect manually, such as whether certain sessions tend to trend, reverse, consolidate, or create large imbalances. They also help the trader quickly scan through historical price action to see how the market has behaved under similar conditions.
For every completed session window, the indicator measures how much price changed from the moment the window began to the moment it ended. Instead of using raw price differences, it converts these changes into percentage moves. This makes the measurement consistent across different price ranges and market regimes. A one-percent move always has the same meaning, whether the asset is trading at 100 or 50,000. These percentage moves are collected for a user-selected number of past sessions, creating a dataset of how the market has behaved in the chosen time window.
Based on this dataset, the indicator generates several statistics. It counts how many past sessions closed higher and how many closed lower, producing a directional tendency. It also computes the probability of an upward session by dividing the number of positive sessions by the total. More importantly, it calculates the average percentage movement for all sessions in the lookback period. This average move reflects not just the direction but also the magnitude of price changes. A session with frequent small upward moves but occasional large downward moves will show a negative average movement, even if more sessions ended positive. This creates a more realistic representation of true market behavior.
Using this average movement, the script determines a “Bias” for the session. If the average percentage move is positive, the bias is considered bullish. If it is negative, the bias is bearish. If the values are very close to zero, the bias is neutral. This way, the indicator takes both frequency and impact into account, producing a magnitude-aware assessment instead of one that only counts wins and losses. A sequence such as +5%, –1% results in a bullish bias because the overall impact is strongly positive. On the other hand, a series of small gains followed by a large drop produces a bearish bias even if more sessions ended positive, because the large move dominates the average. This provides a far more truthful picture of what the market tends to do during the chosen window.
All relevant statistics are displayed neatly in a small panel in the top-right corner of the chart. The panel updates in real time as new sessions complete and older ones fall out of the lookback range. It shows how many sessions were analyzed, how many ended up or down, the probability of an upward move, the average percentage change, and the final bias. The background color of the panel instantly reflects that bias, making it easy to interpret at a glance.
To use the tool effectively, the trader simply needs to define a time window of interest. This could be something like the weekly opening window from Sunday to Monday, the London open each day, or even a unique custom window. After selecting how many past sessions to analyze, the indicator takes care of the rest. The vertical session markers reveal the structure visually. The statistics summarize the historical behavior objectively. The magnitude-weighted bias provides a realistic indication of whether the window tends to produce upward or downward movement on average.
Session Markers is helpful because it translates repeated market timing behavior into measurable data. It exposes hidden tendencies that are easy to feel intuitively but hard to quantify manually. By analyzing both direction and magnitude, it prevents misleading interpretations that can arise from looking only at win rates. It helps traders understand whether a session typically produces meaningful moves or just small noise, whether it tends to trend or reverse, and whether its behavior has recently changed. Whether used for bias building, session filtering, or deeper market research, it offers a structured framework for understanding the market through time-based patterns.
67Major Market Trading Hours
New York Stock Exchange (NYSE)
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
Nasdaq
Open: 9:30 AM (ET)
Close: 4:00 PM (ET)
Pre-Market: 4:00 AM – 9:30 AM (ET)
After Hours: 4:00 PM – 8:00 PM (ET)
London Stock Exchange (LSE)
Open: 8:00 AM (GMT)
Close: 4:30 PM (GMT)
Tokyo Stock Exchange (TSE)
Open: 9:00 AM (JST)
Lunch Break: 11:30 AM – 12:30 PM (JST)
Close: 3:00 PM (JST)
Hong Kong Stock Exchange (HKEX)
Open: 9:30 AM (HKT)
Lunch Break: 12:00 PM – 1:00 PM (HKT)
Close: 4:00 PM (HKT)
If you'd like anything bigger, bold, color‑coded, or reorganized, just tell me and I’ll adjust it!






















