Pivot Levels [BigBeluga]🔵 OVERVIEW
The Pivot Levels indicator automatically detects and draws key market pivot levels across multiple sensitivity settings. Each pivot level represents a significant local high or low in price structure, acting as potential zones of support and resistance. Traders can visualize short-, medium-, and long-term pivot layers simultaneously, helping to identify where price may react, reverse, or break out.
🔵 CONCEPTS
Different pivot lengths provide multi-length sensitivity on the same timeframe — shorter lengths detect local micro-swings, while longer lengths capture broader swing structure within the current chart.
ATR-based color logic marks active, bullish, or bearish pivot zones dynamically.
Lines can extend to the right or both sides to track reactions over time.
🔵 FEATURES
Detects up to four custom pivot levels simultaneously.
Each pivot level has independent settings for length , style , and extension mode .
Auto-colors each pivot as support (green), resistance (orange), or active zone (blue).
Displays dual-width line layers: a solid base and a transparent overlay for visual depth.
Dynamic price labels show exact pivot levels for clarity.
Fully customizable line styles: dashed (--), solid (-), or dotted (..).
Extends lines to the right for future reaction tracking or both directions for structure alignment.
🔵 HOW TO USE
Enable or disable pivot levels (1–4) to control how many layers of structure you want visible.
Use shorter pivot lengths for intraday turning points and longer ones for macro structure.
Watch for multiple pivot lines clustering in the same region — these often mark strong reversal zones.
Observe color changes: green = support, orange = resistance, blue = active neutral zone.
Combine with price action or volume analysis to confirm reactions near major pivots.
🔵 CONCLUSION
The Pivot Levels indicator provides a clean, multi-layered visualization of market structure.
By tracking pivots of varying lengths, traders can easily identify overlapping support and resistance regions, gauge breakout strength, and align trades with the dominant structural zones visible across multiple time horizons.
指標和策略
HaP D-RSIHaP D-RSI (HaP Dual RSI) This code shares the dual RSI structure and divergences of hakan çift rsi-most indicator as open source. It is designed for simple, understandable, and effective use.
()
HaP D-RSI is a comprehensive oscillator that powerfully enhances the classic Relative Strength Index (RSI) indicator. By adding a 9-period EMA on top of the standard RSI(14), it smooths the momentum for clearer readability, while dynamic area filling between the short RSI(10) and long RSI(14) visually emphasizes trend strength. Its strongest feature is the automatic detection of regular (normal) and hidden positive/negative divergences, marked with clear labels. This provides opportunities to catch both trend reversals and continuations early.The indicator operates in a separate panel and includes overbought/oversold levels (70/30/50). With multi-timeframe support, you can display RSI values from a higher timeframe on your current chart.Main FeaturesDual RSI Calculation: Short-period RSI(10) and long-period RSI(14) are calculated separately.
EMA Smoothing: A 9-period EMA is applied to RSI(14) to reduce noise and clarify signals.
Dynamic Area Filling: Dynamic colored filling between RSI(10) and RSI(14)-EMA (blue tones for bullish, red tones for bearish momentum).
Fixed-intensity area between RSI(10) and RSI(14) (emphasizes trend strength).
Overbought/Oversold Lines: Dashed lines at 70 (overbought), 30 (oversold), and 50 (midline).
Full Divergence Detection:Positive Divergence (pu): Price makes a lower low while RSI makes a higher low → Potential bullish reversal.
Hidden Positive Divergence (gpu): Trend continuation signal (buying opportunity after pullback).
Negative Divergence (nu): Price makes a higher high while RSI makes a lower high → Potential bearish reversal.
Hidden Negative Divergence (gnu): Bearish trend continuation signal.
Customizable Pivot Settings: Adjust divergence sensitivity with lookback left/right and distance range.
Multi-Timeframe Support: Ability to pull RSI data from a different timeframe.
Usage InstructionsAdd to Chart: When added, it opens a separate RSI panel.
Settings: Change the short RSI (default 10) and long RSI (default 14) periods as needed.
Adjust the EMA period (default 9) to suit your needs.
If the timeframe is left blank, it uses the current chart timeframe; otherwise, select a higher timeframe.
You can toggle divergence types (positive/negative, hidden/regular) on/off.
Increase pivot lookback values for stronger (fewer signals) divergences.
Signal InterpretationBuy Opportunity: When "pu" or "gpu" labels appear (especially around the 30 level).
Sell Opportunity: When "nu" or "gnu" labels appear (especially around the 70 level).
Area filling colors support momentum direction: Blue tones indicate bullish pressure, red tones indicate bearish pressure.
For best results, use in combination with support/resistance levels, volume, or trend filters (e.g., EMA).
Why Use This Indicator?Powerful Divergence Detection: Automatically and accurately captures both regular (reversal) and hidden (continuation) divergences – a feature missing in many standard RSI indicators.
Visual Clarity: Dynamic colored areas and labels ensure you don't miss signals.
Flexibility: Suitable for all markets (stocks, forex, crypto) and timeframes.
Early Warning System: Divergences often signal before price reversals, providing high-probability entries.
Add this indicator to your strategies to elevate your momentum-based trading.
This indicator is free. Feel free to leave comments with your feedback and improvement suggestions. If you like it, don't forget to add it to favorites and share! Happy trading!
ICT Liquidity Sweep/Swing Fail Pattern V.1# ICT Liquidity Sweep/Swing Fail Pattern V.1
## Indicator Description & User Guide
---
## 📊 Indicator Overview
**Name:** ICT Liquidity Sweep/Swing Fail Pattern V.1
**Type:** Support/Resistance & Liquidity Detection
**Trading Style:** ICT Concepts (Inner Circle Trader)
**Best Timeframes:** 1M, 5M, 15M, 1H
---
## 🎯 Core Features
### 1. **Support & Resistance Lines**
- Automatically draws key swing high and swing low levels
- Based on significant pivot points in price structure
- Updates dynamically as new swings form
### 2. **"X" Mark - Liquidity Sweep**
- **Symbol:** X marker on chart
- **Meaning:** Indicates a liquidity sweep (stop hunt)
- **What it shows:** Price briefly moved beyond a key level to trigger stops, then reversed
- **Trading significance:** High-probability reversal zones after liquidity is taken
### 3. **"SFP" Label - Swing Failure Pattern**
- **Symbol:** SFP text label
- **Meaning:** Swing Failure Pattern detected
- **What it shows:** Price attempted to make a new high/low but failed and reversed sharply
- **Trading significance:** Strong reversal signal - smart money rejecting the level
---
## 📈 How to Use This Indicator
### Entry Setup Strategy:
#### **For SHORT Trades (Sell):**
1. Wait for **SFP** to appear at a swing high
2. Look for **X marker** confirming liquidity sweep above the high
3. **Entry Zone (Red Box):** Enter SHORT positions when price returns to this zone
4. **Stop Loss:** Place above the red zone (above the swept high)
5. **Take Profit (Green Box):** Target the green zone below
#### **For LONG Trades (Buy):**
1. Wait for **SFP** to appear at a swing low
2. Look for **X marker** confirming liquidity sweep below the low
3. **Entry Zone (Green Box):** Enter LONG positions when price returns to this zone
4. **Stop Loss:** Place below the green zone (below the swept low)
5. **Take Profit (Red Box):** Target the red zone above
---
## 🎨 Color Coding System
| Color | Zone Type | Usage |
|-------|-----------|-------|
| 🔴 **Red Box** | Stop Loss / Supply Zone | Place SL here for LONG trades / Entry zone for SHORT trades |
| 🟢 **Green Box** | Take Profit / Demand Zone | Target zone for LONG trades / Place SL here for SHORT trades |
| ❌ **X Mark** | Liquidity Sweep Point | Stop hunt occurred - reversal likely |
| 📝 **SFP Label** | Swing Failure Pattern | Failed breakout - strong reversal signal |
---
## 💡 Trading Examples
### Example 1: SHORT Trade (As shown in your chart)
```
1. SFP appears at swing high (Red zone around 4,000)
2. X marker confirms liquidity sweep above the high
3. Entry: SHORT when price re-enters red zone
4. Stop Loss: Above red zone (e.g., 4,002)
5. Take Profit: Green zone below (3,964-3,972)
6. Risk:Reward = 1:3+
```
### Example 2: LONG Trade
```
1. SFP appears at swing low (Green zone)
2. X marker confirms liquidity sweep below the low
3. Entry: LONG when price re-enters green zone
4. Stop Loss: Below green zone
5. Take Profit: Previous red zone above
6. Risk:Reward = 1:2 minimum
```
---
## ⚠️ Important Trading Rules
### ✅ DO:
- Wait for BOTH SFP and X marker confirmation
- Enter on price returning to the zone (not on first touch)
- Use proper position sizing (1-2% risk per trade)
- Combine with market structure analysis
- Look for confluences (orderblocks, fair value gaps)
### ❌ DON'T:
- Trade against the higher timeframe trend
- Enter without confirmation signals
- Ignore the colored zones for SL/TP placement
- Overtrade - wait for quality setups
- Move stop loss to breakeven too early
---
## 🔧 Indicator Settings (Typical)
**Adjustable Parameters:**
- Swing Length: Number of bars to identify swing points
- Show/Hide X markers
- Show/Hide SFP labels
- Zone opacity and colors
- Line thickness
---
## 📚 ICT Concepts Explained
### **Liquidity Sweep:**
Smart money intentionally pushes price beyond key levels to trigger retail stop losses, then reverses to their intended direction. The X marker identifies these moments.
### **Swing Failure Pattern (SFP):**
Price attempts to make a new high/low but lacks follow-through, indicating weak momentum and likely reversal. Similar to a "false breakout" but more specific to swing structures.
### **Supply & Demand Zones:**
- **Red zones** = Areas where selling pressure overwhelmed buyers
- **Green zones** = Areas where buying pressure overwhelmed sellers
- These zones act as magnets for price to return and react
---
## 🎓 Best Practices
1. **Confluence is Key:**
- Combine with daily/weekly bias
- Check for orderblocks nearby
- Look for imbalances (FVG)
2. **Session Timing:**
- Best during London/New York sessions
- Avoid low liquidity periods
3. **Risk Management:**
- Never risk more than 1-2% per trade
- Use proper lot sizing
- Take partial profits at key levels
4. **Timeframe Correlation:**
- Check higher timeframe for bias
- Enter on lower timeframe for precision
- Exit based on higher timeframe targets
---
## 📞 Support & Updates
**Version:** 1.0
**Compatibility:** TradingView Pine Script v5
**Updates:** Regular improvements based on ICT methodology
---
## ⚡ Quick Reference Card
| Signal | Action | SL Placement | TP Target |
|--------|--------|--------------|-----------|
| SFP + X at High | SHORT at Red Zone | Above Red | Green Zone |
| SFP + X at Low | LONG at Green Zone | Below Green | Red Zone |
**Remember:** The indicator shows you WHERE to trade, but YOU decide WHEN based on confirmation and market context.
---
*Disclaimer: This indicator is a tool for technical analysis. Always use proper risk management and never trade with money you cannot afford to lose.*
Golden Zone Structure [Kodexius]Golden Zone Structure is a ZigZag based market structure and Fibonacci tool designed to make swing context easier to read directly on the price chart. It detects meaningful pivot highs and lows, labels the evolving structure (HH, HL, LH, LL, including equal highs and lows), and automatically projects a Fibonacci map across the most recent completed swing.
Instead of forcing you to manually anchor Fib tools after every new leg, the script rebuilds levels each time a fresh pivot is confirmed. This makes it well suited for traders who focus on swing continuation, pullback depth, and reaction zones where liquidity and orderflow often concentrate.
A key emphasis is the Golden Zone highlight. The indicator shades the zone that is most relevant to the current swing context so you can quickly spot where a retracement is approaching a higher probability reaction area, without cluttering the chart with too many permanent objects.
The tool is intentionally visual and configurable. You can choose pivot source (High/Low or Close), adjust swing sensitivity via ZigZag period, switch color themes, and decide how much detail you want on screen (levels, zigzag lines, labels).
Optional trading markers can be enabled for users who want a lightweight “zone interaction” prompt. These markers are not intended as a standalone trading system. They are meant to complement your own confirmation rules (structure alignment, volume, higher timeframe bias, or price action triggers).
🔹Features
🔸 ZigZag Swing Engine
- Uses a configurable ZigZag period to filter noise and confirm swing points only when the lookback logic validates the move.
Supports different pivot sources (High/Low or Close) so you can choose between cleaner structure or more reactive behavior depending on the instrument.
Optional ZigZag leg drawing to visualize swing flow without clutter.
🔸 Market Structure Labels (HH, HL, LH, LL + Equals)
- Automatically labels each confirmed pivot based on how it compares to the prior pivot of the same type.
High side classification: H, HH, LH, EH.
Low side classification: L, HL, LL, EL.
Equal highs and lows help reveal potential liquidity pools and “magnet” areas where price often reacts or breaks with intent.
🔸 Auto Fibonacci Map on the Active Swing
- Rebuilds Fibonacci levels every time a new pivot is confirmed, keeping the projection aligned with the most recent completed leg.
Core retracement levels: 0.236, 0.382, 0.500, 0.618, 0.786.
Extension levels: 1.272 and 1.618 for expansion targeting and continuation mapping.
Optional price labels on each level, formatted to tick size so levels remain readable across markets.
🔸 Golden Zone Highlighting (Context Aware)
- Highlights the most relevant retracement band with a soft fill so you can spot “zone approach” moments at a glance.
The zone selection adapts to swing context, focusing on a different retracement region depending on whether the last confirmed pivot is a peak or a trough.
Adjustable transparency keeps the chart clean while preserving the key reaction area.
🔸 Visual Customization + Themes
- Multiple color themes (Neon, Ocean, Sunset, Monochrome) so the tool fits different chart styles and backgrounds.
Independent toggles for Fib levels, Golden Zone shading, ZigZag lines, and price labels.
Line width controls for better scaling across timeframes.
🔸 Optional Trading Markers + Alerts
- Optional BUY and SELL labels based on zone interaction logic with candle confirmation filters.
ATR based placement offset scaled by sensitivity so labels stay visually separated during volatility.
Built in alert conditions for new pivot highs and new pivot lows so you can monitor structure changes without watching every bar.
▶ Practical Usage Tip
• Use structure labels to define bias (HH + HL for bullish structure, LH + LL for bearish structure).
• Use the Golden Zone as a location filter, then wait for your own trigger (break of minor structure, rejection candle, volume shift, etc.).
• Treat extensions as “map points” not guaranteed targets. They work best when structure supports continuation.
Williams Fractals / Goldilocks Edition / [NPR21]This indicator, Williams Fractals — Goldilocks Edition , is a high-visibility technical analysis tool designed to identify key price reversal points on your chart. It is a refined version of the classic Williams Fractal, optimized for modern dark-themed trading environments with an emphasis on clarity and precise visual anchoring.
Indicator Description
The indicator identifies local price peaks (Highs) and valleys (Lows) using a specific look-back and look-forward period. Unlike standard fractals that can be difficult to read, this version features:
Enhanced Contrast: Darkened background labels (Deep Teal for Buy, Deep Red for Sell) that make the white and yellow text highly legible.
Long "V" Stems: Integrated arrow extensions that bridge the gap between the label and the candle, pointing precisely to the pivot point to remove any ambiguity during high volatility.
Customizable Spacing: User-defined offsets that allow the labels to sit comfortably above or below price action without overlapping other indicators.
How to Use It
Identify Reversals: A BUY signal appears under a local low, suggesting a potential upward move. A SELL signal appears above a local high, suggesting a potential downward move.
Support & Resistance: Use the fractal points to draw horizontal support and resistance lines.
Trend Confirmation: Fractals are most effective when used in conjunction with other indicators (like the EMA or WMA visible in your setup) to confirm trend direction.
Wait for Confirmation: Remember that a fractal is only "confirmed" after $n$ bars have closed to the right of the signal.
Understanding the "Periods (n)" Setting
The frequency of signals is entirely dependent on your Periods (n) input.
Lower Values (e.g., n=2): The indicator will find many local pivots, resulting in more frequent signals. This is useful for scalping or lower timeframes but may lead to more "noise".
Higher Values (e.g., n=5 or 10): The indicator requires a more significant peak or valley to trigger, resulting in fewer, more significant signals. This is better for identifying major trend shifts.
SMA MAD Trend [Alpha Extract]A sophisticated trend identification system that combines Simple Moving Average with Mean Absolute Deviation methodology to create adaptive Super Trend-style bands with advanced strength filtering and gradient visualization. Utilizing ADX-based trend strength validation and slope analysis for signal quality enhancement, this indicator delivers institutional-grade trend detection with dynamic ATR-based ribbon visualization and comprehensive strength measurement. The system's dual-filter architecture eliminates false signals during weak or choppy market conditions while maintaining sensitivity to genuine trend establishment and reversal events.
🔶 Advanced SMA-MAD Band Construction
Implements innovative Mean Absolute Deviation calculation around Simple Moving Average baseline to create volatility-adaptive bands with ratcheting logic for trend persistence. The system calculates MAD by measuring absolute price deviations from the mean, then applies configurable multipliers to generate upper and lower bands that adjust to changing market conditions while preventing premature band violations.
// Core SMA-MAD Framework
SMA_Value = ta.sma(close, SMA_Length)
Mean = ta.sma(close, MAD_Length)
Abs_Deviation = abs(close - Mean)
MAD_Value = ta.sma(Abs_Deviation, MAD_Length)
// Adaptive Bands
Upper_Band = SMA_Value + MAD_Factor * MAD_Value
Lower_Band = SMA_Value - MAD_Factor * MAD_Value
🔶 Intelligent Dual-Filter System
Features comprehensive trend validation using ADX strength measurement and slope analysis to eliminate low-conviction signals during ranging or consolidating markets. The system calculates normalized slope strength using ATR scaling and combines with ADX threshold analysis, generating filtered trend states that distinguish genuine trends from temporary price fluctuations.
🔶 Dynamic Trend Strength Engine
Implements sophisticated strength calculation combining slope intensity and ADX readings to produce normalized 0-100% strength scores with gradient colour intensity modulation. The system normalizes slope by minimum threshold and ADX by configurable level, multiplying factors to create composite strength measurement that drives visual feedback intensity across all indicator elements.
🔶 Super Trend-Style Direction Logic
Utilizes classic Super Trend methodology adapted for SMA-MAD bands, where trend direction flips occur on opposite band violations with persistent state maintenance. The system tracks previous band levels with ratcheting behaviour that adjusts bands only when price movement or new calculations warrant changes, preventing oscillation during normal volatility.
🔶 ATR-Based Ribbon Visualization
Provides dynamic ribbon overlay using ATR-scaled width around the trend line with opacity modulation based on trend strength for intuitive conviction assessment. The system creates upper and lower ribbon bounds at configurable ATR multiples, filling the channel with gradient-adjusted transparency that increases during strong trends and fades during weak conditions.
🔶 Multi-Dimensional Visual Architecture
Provides complete chart integration through trend line overlay, ATR ribbon fills, candle colouring, background glow, and transition signal labels with configurable visibility toggles. The system enables traders to customize display density from minimal (trend line only) to comprehensive (all visual elements) while maintaining consistent colour scheme and strength-based intensity across components.
🔶 Slope Strength Validation
Calculates ATR-normalized slope over configurable lookback periods to measure trend line momentum and filter sideways price action. The system compares absolute slope against minimum threshold requirements, preventing trend signals when price movement relative to the trend line lacks sufficient directional conviction regardless of band position.
🔶 Signal Generation Framework
Generates trend change signals when filtered direction state transitions from bearish to bullish or vice versa, with label placement and alert integration. The system implements state persistence that maintains previous trend until both ADX and slope filters confirm directional change, reducing whipsaw signals while capturing genuine reversals with minimal lag.
🔶 Performance Optimization Framework
Utilizes efficient calculation methods with optimized variable management and configurable parameters for balance between responsiveness and stability. The system includes intelligent state tracking with NA handling for initial bars and smooth gradient calculations that maintain performance across extended historical periods and real-time updates.
This indicator delivers sophisticated trend identification through Mean Absolute Deviation methodology combined with dual-strength filtering for superior signal quality. Unlike traditional Super Trend indicators that rely solely on ATR bands, the SMA-MAD approach uses statistical deviation measurement while incorporating ADX strength and slope validation to eliminate false signals during choppy conditions. The system's gradient-based visual feedback, ATR ribbon visualization, comprehensive dashboard, and multi-dimensional filtering make it essential for traders seeking reliable trend-following approaches with clear conviction measurement across cryptocurrency, forex, and equity markets. The combination of adaptive bands, strength-based transparency, and intelligent filtering creates an institutional-grade trend system suitable for systematic trading strategies.
Interest ZonesThis indicator automatically identifies and plots "Interest Zones" around significant pivot highs and lows, representing potential areas of institutional interest, support/resistance, or accumulation/distribution. Zones are dynamically merged when pivots cluster near the same price level and extended for visibility.
How It Works (Technical Methodology)
Pivot Point Detection
The indicator uses Pine Script's ta.pivothigh() and ta.pivotlow() with asymmetric left/right lengths (default left=20, right=13) to detect swing highs and lows. This allows for customizable sensitivity – longer left for stronger confirmation, shorter right for faster detection.
Zone Start Condition (Filtering)
Multiple modes control from which point in history zones begin to be drawn:
"None": All historical pivots (limited by max zones).
"Auto (Start of Day)": Zones only from the beginning of the current trading day (resets daily).
"Manual Date": User-defined fixed date.
"Interactive (Chart)": User-confirmed date via input (useful for backtesting specific periods).
"Last X Bars": Only pivots within the last user-defined number of bars (default 400).
A vertical line marks the start point in date-based modes for visual reference.
Zone Construction
For each valid pivot:
Zone thickness is based on ATR(14) × user-defined multiplier (default 0.3) for dynamic, volatility-adjusted height.
Pivot High zones: Centered below the high (potential supply/resistance).
Pivot Low zones: Centered above the low (potential demand/support).
Zones are drawn as boxes extending to the right, with gray fill and border.
Merge & Overlap Logic
When a new pivot falls inside an existing zone or is very close (within user-defined "Proximity Sensitivity %" of the zone's midpoint, default 1.1%):
The new pivot is merged into the existing zone.
A counter ("x2", "x3", etc.) is displayed on the zone, indicating how many pivots have clustered there.
The zone is strengthened visually (counter text) and extended further right.
This highlights high-interest levels where price repeatedly reversed.
Zone Management
In "None" mode: Only the most recent user-defined max zones are kept (default 5) – oldest deleted automatically.
In other modes: Up to ~490 zones (performance limit), oldest pruned if exceeded.
All zones auto-extend to the right on the last bar for continuous visibility.
Visual Elements
Uniform gray color for all zones (configurable).
Transparent background fill (adjustable).
Counter text in white (configurable) when zones have multiple touches.
Clean, non-directional design – focuses purely on clustered reversal points.
How to Use
Interest Zones highlight price levels where the market has shown repeated respect through multiple swing pivots – often coinciding with institutional order clusters, psychological levels, or hidden support/resistance.
Higher counter values ("x3+", "x5+"): Stronger zones – higher probability of reaction on retest.
Use for:
Potential reversal or bounce areas when price approaches a zone.
Confluence with other tools (order blocks, FVG, volume profile, etc.).
Stop-loss placement beyond zones or take-profit at opposite zones.
Daily reset ("Auto Start of Day"): Ideal for intraday trading – fresh zones each session.
Backtesting: Use "Manual" or "Interactive" date modes to analyze specific historical periods.
"Last X Bars": Good for medium-term swing analysis without full history clutter.
Adjust ATR multiplier for tighter (lower) or wider (higher) zones based on asset volatility. Increase proximity sensitivity for more aggressive merging in ranging markets.
Combine with trend direction, volume, or higher-timeframe structure for best results.
Disclaimer
This indicator is a technical analysis tool and should be used in conjunction with other forms of analysis. Past performance does not guarantee future results. Always use proper risk management.
HaP MACDHaP MACD - Advanced DEMA Assisted Signal Indicator
Overview
The HaP MACD is an evolution of the classic MACD, designed for traders who demand faster response times and clearer trend visualisations. By integrating DEMA (Double Exponential Moving Average) logic into the standard MACD framework, this indicator filters out noise and highlights momentum shifts with a unique color-coded dot system.
How It Works
The indicator calculates two types of MACD: a standard one for the main lines and a DEMA-based one for signal generation. This dual approach ensures you stay in the trend while being alerted the moment the momentum starts to fade.
Visual Guide & Color Logic
The signal dots are placed directly on the MACD line to guide your decisions:
🔵 Blue Dot: The Entry Signal. Appears when DEMA conditions first align for a bullish move.
🟢 Green Dot: Strong Momentum. The trend is active and the MACD value is increasing.
🟠 Orange Dot: Warning Signal. The bullish trend is still active, but the momentum is slowing down (MACD is lower than the previous bar).
🔴 Red Dot: Exit Signal. The bullish condition has ended. It’s time to consider closing the position or tightening stops.
Key Features
Reduced Lag: DEMA integration provides earlier signals than standard EMA-based MACDs.
Trend Monitoring: Easily distinguish between a healthy trend (Green) and a tiring trend (Orange).
Customizable: Choose between EMA and SMA for both the oscillator and signal calculations.
Crossover Markers: Optional triangle markers for classic MACD crossovers (can be enabled in settings).
Daily Candle Bias Backtesting Stats @MaxMaserati This indicator, is a powerful backtesting and probability tool designed to quantify the "follow-through" of specific candle types across different market sessions.
It identifies specific price action setups and tracks whether price hits a "Target" (continuation) or an "Invalidation" (reversal) first, providing real-time win rates for your favorite sessions.
The Candle Bias Stats indicator automatically categorizes every candle based on the MMM candle bias and tracks their historical success rate. It calculates how often a candle's high/low is broken before its opposite end is touched. By breaking this data down into sessions (Asian, London, NY), it identifies high-probability "time-of-day" windows where specific price action setups are most reliable.
MMM CANDLE LOGIC
Bullish Expansion & Breakout Signatures
Bullish Body Close Plus (BuBC Plus): Represents strong bullish momentum where price closes above the previous high and near its own top, signaling that buyers are in complete control.
Bullish Body Close Minus (BuBC Minus): Indicates weak bullish momentum; while the price closes above the previous high, a long top wick shows sellers pushed back, suggesting a potential retest of the previous high.
Bearish Expansion & Breakout Signatures
Bearish Body Close Plus (BeBC Plus): A very strong bearish signal where price closes below the previous low and near its own bottom, indicating sellers are dominant.
Bearish Body Close Minus (BeBC Minus): Signifies weak bearish momentum; the price breaks the previous low but finishes with a long bottom wick as buyers push back, often leading to a retest of the old ceiling.
Bullish Reversal & Trap Signatures (Affinity)
Bullish Affinity Plus (BuAF Plus): A strong bullish reversal where a new low is made, but sellers hit a wall and get trapped, causing price to finish near its top with a long bottom wick.
Bullish Affinity Minus (BuAF Minus): A weak bullish bounce where a new low is made and price finishes back inside the previous range, but buyers lack the energy for a significant move.
Bearish Reversal & Trap Signatures (Affinity)
Bearish Affinity Plus (BeAF Plus): A strong bearish reversal; buyers are trapped after making a new high, and price finishes near its bottom with a long top wick.
Bearish Affinity Minus (BeAF Minus): A weak bearish drop where sellers stop the rise but lack the energy to push price significantly lower.
Neutral & Volatility Signatures
Close Inside Bullish (CI•BuAF): Bullish neutral state where price stays inside the previous candle’s range but finishes in the top half, indicating buyers are slightly more active.
Close Inside Bearish (CI•BeAF): Bearish neutral state where price remains inside the previous box and finishes in the bottom half.
Seek & Destroy Bullish (S&D•BuAF): Bullish volatility characterized by price moving above and below the previous candle before buyers win the battle and close price near the top.
Seek & Destroy Bearish (S&D•BeAF): Bearish volatility where sellers win a high-chaos battle, closing price near the bottom after sweeping both sides of the previous candle.
H4 CANDLE EXAMPLE
Deep Dive: Analysis of the 4H Statistics
The image presents a comprehensive backtest of 4,999 total candles from September 2022 to December 2025. Here is the breakdown of what the interface is telling us:
1. The Strategy: Target vs. Invalidation
The indicator tracks BuBC (Bullish Body Close) and BeBC (Bearish Body Close).
The Target: For a Bullish candle, the target is the High. For a Bearish candle, it is the Low.
The Invalidation: The opposite end of the candle (the Low for Bullish, the High for Bearish).
The Goal: To see which level is touched first in the subsequent bars.
2. Global Performance (The Top Right Table)
Looking at the BuBC (1402 samples) section:
Target First (67.8%): In nearly 7 out of 10 cases, once a 4H candle closes "bullish" (breaking the previous high), the price continues higher to break its own high before it ever returns to take out its own low.
Both Hit (17.7%): This is a critical metric. It represents "Stop Runs" or "Wicks" where price hits the target but also hits the invalidation within the same tracking period.
Efficiency (1.3 Bars): This tells us the "follow-through" is almost immediate. If the trade doesn't work within 1 or 2 candles, the statistical edge drops off significantly.
3. The Session Breakdown (The Bottom Left Table)
This is where the "Edge" is found. Not all hours of the day are created equal.
Asian Late (02:00-06:00) – The "Star" Performer: With a 72.9% Target rate, this is labeled "BEST." It has the lowest "Both%" (6.5%), meaning moves during these hours are incredibly "clean." If a setup forms here, price usually moves directly to the target without looking back.
London Open & Overlap (06:00-14:00): These sessions maintain a high win rate (approx. 70%). This suggests that the European session provides reliable trend continuation for the S&P 500.
NY Session (14:00-18:00) – The "Trap" Zone: This is labeled "WORST" for a reason. While the win rate is basically a coin flip (49.6%), the Both% spikes to 36.7%. This means that even if you are right about the direction, the market is highly likely to "sweep" your stop loss before going to the target. It is the most volatile and "fake-out" prone time for this specific setup.
Summary of the Data
The statistics show that the S&P 500 4H Candle Bias is a highly reliable trend-following indicator, provided you trade it at the right time.
The data suggests a clear three-step logic:
Directional Edge: Both Bullish and Bearish body closes have a natural ~67% probability of continuation.
Timing is Everything: Trading during the Late Asian and London sessions increases your probability of success to over 70% with very low risk of a "fake-out."
Risk Warning: Avoid "Body Close" breakout strategies during the NY Mid-day (14:00-18:00). The statistics prove that this window is dominated by "Seek and Destroy" price action, where price is mathematically likely to hit both your target and your stop, usually hitting the stop first.
Quant VWAP System 3.8 This is the lower-indicator companion to the "Quant VWAP System." While the main chart tells you where the price is, this oscillator tells you how statistically significant the move is.
It uses a Z-Score algorithm to normalize price action. This means it ignores dollar amounts and instead measures how many Standard Deviations (SD) the price is away from its mean (VWAP). This allows you to instantly spot "Overbought" or "Oversold" conditions on any asset (Bitcoin, Forex, or Stocks) without needing to guess.
Key Features:
1. Normalized Extremes (The "Kill Zones")
±2.0 SD: These dotted lines represent statistical extremes. When the signal line crosses above +2.0, the asset is mathematically expensive (Overbought). When it crosses below -2.0, it is mathematically cheap (Oversold).
The Logic: Price rarely sustains movement beyond 2 Standard Deviations without a reversion or a pause.
2. The Squeeze Radar (Yellow Dots)
Volatility Detection: A row of Yellow Dots appearing on the center line indicates a "Squeeze."
What it means: The Standard Deviation bands are compressing. Energy is building.
Warning: DO NOT trade Mean Reversion when you see Yellow Dots. A squeeze often leads to a violent breakout. Wait for the dots to disappear to confirm the direction of the explosion.
3. Momentum Coloring
Green Line: Z-Score is rising (Bullish Momentum).
Red Line: Z-Score is falling (Bearish Momentum).
This helps you spot divergences (e.g., Price makes a Higher High, but the Oscillator makes a Lower High = Exhaustion).
How to Trade with It
Strategy A: The "Zero Bounce" (Trend Continuation)
Scenario: You are in a Bull Trend.
Signal: The Oscillator line pulls back to the Zero Line (White), turns Green, and curls upward.
Meaning: Price has tested the average (VWAP) and buyers have stepped in. This is a high-probability entry for trend continuation.
Strategy B: The "Extreme Fade" (Reversion)
Scenario: The Oscillator pushes deep into the Red Zone (+2.0 SD).
Signal: The line turns Red and crosses back down below the +2.0 dotted line. A small Red Triangle will appear.
Meaning: The statistical extension has failed, and price is likely snapping back to the mean.
Strategy C: Squeeze Breakout
Scenario: Yellow Dots appear on the center line.
Action: Stop trading. Wait.
Signal: The dots disappear, and the line shoots aggressively through +1.0 SD (Long) or -1.0 SD (Short). Ride the momentum.
Session Opening Bar RangeSession Opening Bar Range (OBR) - Advanced Opening Range Indicator with Statistical Analysis
Overview
The Session First Bar Range (FBR) indicator is a comprehensive tool that captures and projects key levels based on the first bar of a user-defined trading session. Unlike traditional daily opening range indicators, this script allows traders to focus on specific session windows (New York RTH, London, Asia, etc.) and analyze price behavior relative to the initial momentum established in that session's opening bar.
What makes this indicator unique is its combination of three distinct projection methodologies: statistical analysis based on historical range data, Fibonacci extensions, and fixed-point rotation levels commonly used by institutional traders. To our knowledge, this is the only opening range indicator that incorporates statistical standard deviation levels calculated from historical first bar ranges, making it both a technical and probabilistic tool.
Core Concept
The opening range concept is based on the principle that the initial price action of a trading session often sets the tone for the remainder of that session.
Professional traders have long observed that:
The first bar's high and low act as key reference points
Price often respects or breaks these levels with significance
Expansion beyond the opening range tends to occur in measurable increments
This indicator takes these observations and enhances them with:
Historical probability analysis - "Based on the last 60 sessions, price typically extends X standard deviations beyond the opening range"
Proportional projections - Fibonacci-based extensions showing where measured moves typically target
Fixed-point rotations - Institutional rotation levels (e.g., 65 points for NQ, 15 points for ES)
How It Works
Session Detection & First Bar Capture
The indicator uses Pine Script's time() function with timezone support to precisely detect when a trading session begins. When the first bar of the selected timeframe occurs within the session window, the script captures:
High (H): The high of the first bar
Low (L): The low of the first bar
Mid (M): The midpoint (hl2) of the first bar
Critical Detail: These levels are fixed from the first bar only - they do not update as the session progresses. This differs from many "opening range" indicators that use a time period (e.g., first 30 minutes). Here, you select the bar timeframe (default 5-minute), and only that single first bar's range is captured.
Statistical Level Calculation
The indicator maintains a rolling array of the last N session's first bar ranges (default: 60 sessions). For each new session, it calculates:
Average Range: Mean of historical first bar ranges
Standard Deviation: Volatility of those ranges
Projection Levels: High/Low ± (Average Range + Std Dev × Multiplier)
This provides probability-based levels. For example, a +2σ level suggests: "Historically, price extending this far beyond the opening range is a 2-standard-deviation event (approximately 95th percentile)."
Fibonacci Extensions
Using the first bar range as the base unit (100%), the indicator projects Fibonacci levels:
100% extension: One full range above the high / below the low
1.618x extension: (Default) Golden ratio projection
2.618x, 3.618x extensions: Additional Fibonacci levels
Calculation: Range = H - L, then Target = H + (Range × Multiplier) for upside projections.
OR Rotation Levels
These are fixed-point increments from the first bar's high and low. Unlike percentage-based methods, rotations use absolute point values:
NQ traders often use 65-point increments
ES traders often use 15-point increments
Gold/bonds use different values
The indicator draws 5 levels above the high (R+1 through R+5) and 5 below the low (R-1 through R-5), each separated by your specified point increment.
Features:
Session Options
Pre-configured Sessions:
New York RTH (9:30am - 4:00pm)
New York Futures (8:00am - 5:00pm)
London (2:00am - 8:00am)
Asia (7:00pm - 2:00am)
Midnight to 5pm
ZB/Gold/Silver OR (8:20am - 4:00pm)
CL OR (9:00am - 4:00pm)
Custom Session: Define your own start/end times in HHMM format
Timezone Support: All sessions respect the selected timezone (default: America/New_York)
Customizable Timeframe
Select any timeframe for the first bar (1min, 5min, 15min, etc.)
Default: 5-minute bars
Important: This is the timeframe for the first bar capture, independent of your chart's timeframe
Display Options
Historical Ranges: Show/hide past session ranges (with configurable limit to manage performance)
Line Styles: Choose between Solid, Dashed, or Dotted for range lines and midline
Label Position: Left or Right side of range
Show Prices: Optionally display actual price values on labels
Custom Colors: Fully customizable colors for all components
Statistical Levels
Lookback Period: Number of historical sessions to analyze (default: 60)
Two Multiplier Levels: Default 1σ and 2σ, fully adjustable
Separate styling: Different line styles (dashed vs dotted) for each sigma level
Optional Labels: Show/hide sigma notation labels
Fibonacci Extensions
Four Extension Levels: 100%, 1.618x, 2.618x, 3.618x (all customizable)
Bidirectional: Projections both above and below the opening range
Optional Labels: Toggle percentage/multiplier labels
OR Rotation Levels
Configurable Increment: Set the point value for your instrument
Five Levels Each Direction: R±1 through R±5
Dynamic Labels: Show both rotation number and point value (e.g., "R+1 (65)")
Three Line Styles: Solid, Dashed, or Dotted
How to Use
Setup
Add the indicator to your chart
Select your trading session from the dropdown
Set the timeframe for first bar capture (typically 5-15 minutes)
Configure which projection methods you want to see (Statistical, Fibonacci, and/or Rotations)
For Day Traders
Scenario: Trading NQ during New York RTH
Session: Select "New York RTH (9:30am - 4:00pm)"
Timeframe: 5-minute (captures 9:30-9:35 bar)
Enable: OR Rotations with 65-point increments
Strategy:
Watch for acceptance/rejection at rotation levels
Use R+1/R-1 as initial profit targets
R+2/R-2 as extended targets
Statistical levels show when price is in "outlier" territory
and rotation levels
Performance Notes
The indicator limits objects to stay within TradingView's constraints (500 max)
If you enable all features, reduce "Maximum Historical Ranges" to prevent slowdown
Typical configuration: 10-20 historical ranges with all features enabled works well
Settings Guide
Session Settings
Session: Choose from pre-configured sessions or "Custom"
Custom Session Start/End: HHMM format (e.g., "0930" for 9:30am)
Timezone: Critical for accurate session detection
Opening Bar Format
Timeframe: The bar size for capturing the first bar's range
Show Midline: Toggle the mid-point line
Show Historical Ranges: Display previous sessions (recommended: leave ON)
Maximum Historical Ranges: Limit history to manage performance (1-500)
Range Style / MidLine Style: Solid, Dashed, or Dotted
Position: Label placement (Left or Right)
Show Prices: Include actual price values on labels
Statistical Levels
Lookback Periods: How many historical first bar ranges to analyze (default: 60)
Std Dev Multiplier 1/2: The sigma levels to project (default: 1.0 and 2.0)
All visual settings (colors, line width, label size)
Fibonacci Extensions
Show Fib Extensions: Enable/disable Fibonacci projections
Measured Move Extensions 1-4: The multipliers (default: 1.618, 2.618, 3.618, 4.618)
Visual customization options
OR Rotations
Rotation Increment: The point value for your instrument
NQ: 65 points
ES: 15 points
Adjust for other instruments based on their typical rotation behavior
Show Rotation Labels: Display level numbers and point values
Visual customization options
Use Cases
Gap Trading: When price gaps away from previous day's close, the first bar range shows the initial gap acceptance/rejection zone
Breakout Confirmation: Price breaking and holding above the first bar high with volume suggests trend day potential. Rotation levels provide measured targets.
Reversal Identification: Price reaching +2σ statistical level = rare event, potential exhaustion
Range Bound Days: Price oscillating between first bar high/low suggests range-bound session; trade reversals at extremes
Institutional Level Awareness: OR Rotations at 65 points (NQ) align with levels professional traders watch
Technical Notes
The indicator uses request.security() with lookahead=barmerge.lookahead_on to ensure the first bar levels are captured correctly
All drawing objects (lines, labels, fills) are managed in arrays with automatic cleanup to prevent memory issues
The statistical calculations use array.avg() and array.stdev() for accurate probability estimates
Rotation levels use individual line variables (like Fibonacci) rather than loops for reliability
Summary
This indicator is original in its combination of three distinct methodologies for projecting levels from a session's opening range:
Statistical Analysis - No other opening range indicator (to our knowledge) calculates standard deviation projections from historical first bar ranges
Time-Based Session Flexibility - Most OR indicators use only daily or fixed time periods; this allows any custom session window
Multiple Projection Methods - Traders can use statistical, Fibonacci, AND rotation levels together or separately
[ASFX] Free Automatic VWAPsAutomatic VWAP & Key Levels
Overview
This indicator is designed to help traders evaluate VWAP interactions in context, rather than treating every VWAP touch as a trade opportunity. It combines VWAP with a momentum-based directional filter to highlight situations where price interaction with VWAP is supported by broader intraday momentum. This indicator also shows you the initial balance and opening range each day.
Concept and Originality
VWAP is commonly used as an institutional reference level, but VWAP alone does not distinguish between meaningful acceptance/rejection and random intraday chop. This script addresses that limitation by conditioning VWAP interactions with a momentum filter. Signals are only displayed when price location and momentum alignment occur together, allowing traders to focus on higher-quality VWAP reactions instead of monitoring multiple indicators separately.
How It Works
• VWAP is used as the primary price reference level.
• A momentum filter evaluates directional bias and participation.
• Visual signals appear only when price is interacting with VWAP and momentum confirms acceptance or rejection in the same direction.
• No signals are shown during low-momentum or sideways conditions around VWAP.
How to Use
This indicator is best used as a confirmation tool, not as a standalone trading system. It is intended to assist traders in filtering VWAP-based trade ideas by highlighting when conditions are aligned versus when price is simply chopping around VWAP.
Markets and Timeframes
• Designed for index futures such as ES and NQ
• Optimized for intraday trading
• Works best on lower timeframes (1–5 minute charts)
Limitations
• Not predictive
• Not a complete trading strategy
• Does not replace price action analysis, trade management, or risk control
• Signals should be evaluated alongside market structure and context
virgin wick theorybased off of www.youtube.com strategy.
shows levels for the next HTF period to trade off of
make sure to check your htf to double check as the max lookback doesnt cover some levels occasionally
BulletProof Long Wick Reversal Markers with LinesThis custom Pine Script indicator for TradingView identifies and marks potential reversal points on your chart based on long wick candles at swing highs (tops) and lows (bottoms). It focuses on candles where the wick is significantly longer than the body (e.g., shooting stars or hammers) and where the subsequent price reversal exceeds a minimum percentage move. Markers appear as colored circles (green for tops, red for bottoms), with horizontal lines extending from each marker to the current bar for easy reference as support/resistance levels.Key Features and InterpretationMarkers (Dots): Green circles at tops: Indicate a potential bearish reversal where price was pushed down after a long upper wick candle.
Red circles at bottoms: Indicate a potential bullish reversal where price was pushed up after a long lower wick candle.
These only appear if the wick-to-body ratio meets the threshold (default 2.0) and the reversal move is at least the minimum percentage (default 1%).
Lines: Horizontal lines extend from each marker to the current bar (updating in real-time). Use these as dynamic levels—e.g., a green top line might act as resistance, while a red bottom line could be support. Lines do not extend into the future blank space on the chart.
Time Filtering: By default, only markers from the last 7 days are shown to reduce clutter. Set to 0 to display all historical ones.
Best Used On: 1-hour charts as per your request, but it works on any timeframe. It's ideal for spotting reversals in trending markets or confirming entries/exits with other indicators.
Smart Gap Concepts [MarkitTick]💡 This indicator automates the identification and classification of price gaps, commonly known as Fair Value Gaps (FVG) or Imbalances, by integrating market structure and volume analysis. Unlike standard gap detectors that simply highlight empty space on a chart, this script applies algorithmic filters to categorize gaps into three distinct phases of market movement: Breakaway, Runaway, and Exhaustion. This helps traders understand the potential context of a move rather than just seeing a support or resistance zone.
● Originality and Utility
The primary innovation of this tool is its dynamic classification system. It moves beyond visual detection by checking the "why" behind the gap. By referencing Swing Highs and Swing Lows (Market Structure) alongside Volume efficiency, it determines if a gap represents a breakout, a trend continuation, or a climatic end to a move. Additionally, the script features an automated mitigation tracking system that removes gaps from the chart once price has re-tested the midpoint, ensuring the visual workspace remains clean and relevant to current price action.
● Methodology
The script operates on a multi-stage logic engine:
• Gap Detection
It first identifies the core imbalance where the Low of the current bar does not overlap with the High of the bar two periods prior (for bullish gaps), ensuring the intervening candle represents a strong displacement.
• Structural Analysis (Breakaway Gaps)
The script monitors Pivot Highs and Lows. If a gap occurs simultaneously with a close beyond a key structural Pivot, it is classified as a "Breakaway Gap." This signals the potential start of a new trend.
• Volume and Time Analysis (Exhaustion Gaps)
To identify potential reversals, the script looks for "Trend Maturity." If a gap forms after a long duration since the last pivot and is accompanied by a volume spike (defined by the Volume Spike Multiplier), it is labeled as an "Exhaustion Gap."
• Continuation (Runaway Gaps)
If a gap is valid but meets neither the Breakaway nor Exhaustion criteria, it is considered a "Runaway Gap," typically found in the middle of an established trend.
• Dynamic Cleanup
The script tracks the midpoint of every active gap. If price creates a lower low (for bullish gaps) or higher high (for bearish gaps) beyond this midpoint, the gap is considered mitigated and is removed from the screen.
📖 How to Use
Traders can utilize the color-coded classifications to gauge market intent:
Breakaway (Default Blue): Watch these zones for potential trend initiations. These are often high-probability areas for a retest entry after a structure break.
Runaway (Default Orange): These indicate strong momentum. They can be used to trail stop-losses or add to winning positions, as price should ideally not close below these gaps in a healthy trend.
Exhaustion (Default Red): Be cautious when these appear. They suggest the current move is overextended and a reversal or complex pullback may be imminent.
• Exhaustion Gap : A Practical Case Study
• Breakaway Gap: A Practical Case Study
• Runaway Gap : A Practical Case Study
⚙️ Inputs and Settings
Min Gap Size (Points): Filters out insignificant gaps smaller than this threshold.
Structure Lookback: Defines the sensitivity of the Pivot detection (Swing High/Low).
Volume Avg Length & Multiplier: Determines what qualifies as a "Volume Spike" for exhaustion logic.
Trend Maturity: The minimum number of bars required to consider a trend "old" enough for an exhaustion signal.
Visual Settings: Custom colors for each gap type and box extension length.
● Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.
Early Trend Warning Using MTF AnalysisAs an active trader and software professional, I build my own indicators. I built this one today which I want to share with fellow traders.
If you are a trend trader then HTF/MTF analysis is very critical. It is virtually impossible to constantly track multiple tickers all the time. One should not take a buy trade when MTF is bearish and vice versa. This indicator solves this problem.
The EMA Trend Warning indicator helps traders detect potential trend changes early by analyzing price interactions with multi-timeframe Exponential Moving Averages (EMAs) and their momentum. It sends instant alerts when price crosses above or below EMAs with supporting momentum, making it easier to capture bullish or bearish moves.
The EMA Trend Warning indicator detects potential trend changes by monitoring price against 14-period EMAs on multiple timeframes: 15-minute, 30-minute, and 1-hour charts. It sends alerts when the price crosses above or below the EMA with supporting momentum, helping traders identify early bullish or bearish signals.
How It Works:
1. Calculates 14-period EMA on 15m, 30m, and 1H charts.
2. Computes EMA slopes to determine momentum direction.
3. BUY alert triggers when price crosses above the 15m EMA and at least one EMA slope is upward.
4. SELL alert triggers when price crosses below the 15m EMA and at least one EMA slope is downward.
5. Alerts fire once per bar and track previous state to avoid repeated notifications.
Features:
1. Multi-timeframe EMA monitoring.
2. Momentum confirmation with EMA slopes.
3. Instant BUY/SELL alerts.
4. Tracks previous trend state to prevent alert spam.
Benefits:
1. Detects trend changes early for better entry timing.
2. Confirms trend across multiple timeframes.
3. Saves time with automated alerts.
4. Helps traders align trades with market momentum.
Please consider this indicator as EARLY WARNING ONLY. Take trade based on multiple confluences post receiving any warning. I have tested it on BTCUSD since yesterday, multiple warning alerts were 100% perfect.
As Good As It Gets Pivot Arrows [NPR21]As Good As It Gets Pivot Triangles
Description:
This indicator is a precise replica of the popular Thinkorswim (TOS) "AsGood_HighLowPointPivot_Arrows" script, tweaked by now fully adapted for TradingView Pine Script v6.
It plots clean, small green upward triangles below confirmed pivot lows (buy signals) and red downward triangles above confirmed pivot highs (sell signals). The pivot detection logic is identical to the original TOS script, ensuring the same number and placement of signals. The indicator also includes an optional toggle for white pivot dots (matching the TOS points style).
Features:
Exact replication of TOS pivot logic (left/right strength confirmation)
Small, clean triangles (no text, no clutter)
Brighter green for buy triangles
Toggle for showing/hiding pivot dots
Ignore last bar option (default on)
How to Use:
Add the indicator to your chart.
Adjust the Pivot Length (default 7) to match your timeframe preference (shorter = more signals, longer = fewer).
Use the green upward triangles below price as buy signals (potential bottoms/reversals).
Use the red downward triangles above price as sell signals (potential tops/reversals).
Enable "Show Pivot Dots" if you want the white confirmation points (like TOS).
Use in conjunction with your existing trend, support/resistance, or volume tools for confirmation.
Order Blocks & ImbalanceThis indicator automatically identifies and plots Order Blocks (also known as Fair Value Gaps or Imbalances) based on Smart Money Concepts (SMC) and ICT methodology. It detects significant price inefficiencies (gaps between candles) that often act as institutional supply or demand zones.
How It Works (Technical Methodology)
1. Fair Value Gap (FVG) Detection
The indicator identifies classic 3-candle imbalances:
- Bullish Order Block (Demand): When the low of the current candle is significantly below the high of the candle two bars ago (low - high ).
- Bearish Order Block (Supply): When the high of the current candle is significantly above the low of the candle two bars ago (low - high ).
A minimum size threshold is enforced using ATR(14) × user-defined multiplier (default 0.5) to filter out minor gaps and focus on meaningful inefficiencies.
2. Zone Creation
- Bullish zones are created at the candle two bars ago (the "origin" candle where inefficiency occurred).
- Bearish zones use the same origin candle.
- Zone boundaries:
Top = high of origin candle
Bottom = low of origin candle
This captures the full range where price moved aggressively, leaving an imbalance that institutions may later revisit.
3. Mitigation Detection
Zones can be mitigated in two ways (user-selectable):
- "Close": Zone is considered touched only if the close price enters the zone.
- "Wick": Zone is touched if any wick (high/low) enters the zone (more sensitive).
When mitigated:
- Background becomes more transparent
- Border turns dotted
- Label changes to "Mitigated"
Broken zones (price fully closes beyond the opposite side) are automatically deleted.
4. Zone Lifecycle Management
- Active Zone: Strong color fill (green for demand, red for supply) with solid border.
- Mitigated Zone: Faded color, dotted border – indicates partial fill or reduced strength.
- Broken Zone: Automatically removed from chart to reduce clutter.
Old zones are also pruned when exceeding 450 total to maintain performance.
5. Smart Visibility Engine (Optional)
When enabled:
- All zones are initially hidden.
- Only the closest relevant zones are shown:
- Up to user-defined limit (default 10) highest bullish zones (closest below price)
- Up to user-defined limit (default 10) lowest bearish zones (closest above price)
- Visible zones are automatically extended to the right and styled appropriately.
This keeps the chart clean while highlighting the most actionable zones near current price.
6. Visual Elements
- Demand Zones: Green fill, labeled "OB Demand"
- Supply Zones: Red fill, labeled "OB Supply"
- Tiny text size to minimize chart clutter
- Zones drawn as boxes using bar_index positioning
How to Use
Order Blocks represent areas of price inefficiency where smart money likely entered/exited positions aggressively.
- Demand Zones (Green): Potential long entry areas when price returns. Expect buying pressure to defend these levels. Best setups when price retests an active (non-mitigated) zone.
- Supply Zones (Red): Potential short entry areas when price returns. Expect selling pressure to emerge.
- Mitigated Zones: Lower probability – may act as weaker support/resistance.
- Smart Visibility: Highly recommended for cleaner charts. Focuses attention on zones most likely to be tested soon.
- Combine with:
- Break of Structure (BOS)/Change of Character (CHOCH)
- Liquidity grabs
- Higher timeframe confluence
- Volume or momentum confirmation
Use higher FVG threshold (e.g., 0.8–1.0) for fewer, higher-quality zones. Lower threshold for more aggressive detection.
Disclaimer
This indicator is a technical analysis tool and should be used in conjunction with other forms of analysis. Past performance does not guarantee future results. Always use proper risk management.
IDAHL | QuantEdgeBIDAHL | QuantEdgeB
🔍 Overview
The IDAHL indicator builds adaptive, volatility-aware threshold bands from two separate ALMA lines—one smoothed from recent highs, the other from recent lows—then uses percentiles of those lines to define a dynamic “high/low” channel. Price crossing above or below that channel triggers clear long/short signals, with on-chart candle coloring, fills, optional labels and even a built-in backtest table.
✨ Key Features
• 📈 Dual ALMA Bands (with DEMA pre-smoothing)
o High ALMA: ALMA applied to DEMA-smoothed highs (high → DEMA(30) → ALMA).
o Low ALMA: ALMA applied to DEMA-smoothed lows (low → DEMA(30) → ALMA).
• 📊 Percentile Thresholds
o Computes a high threshold at the Xth percentile of the High ALMA over a lookback window.
o Computes a low threshold at the Yth percentile of the Low ALMA.
o Shifts each threshold forward by a small period to reduce repainting.
• ⚡ Dynamic Channel Logic
o When price closes above the high percentile line, the “final” threshold flips down to the low percentile line (and vice versa), creating an adaptive channel that only moves when the outer bound is violated.
o Inside the channel, the threshold holds its last value to avoid whipsaw.
• 🎨 Visual & Alerts
o Plots the two percentile lines and fills between them with a color that reflects the current regime (green for long, yellow for neutral, orange for short).
o Colors your candles to match the active signal.
o Optional “Long”/“Short” labels on confirmed flips.
o Alert conditions fire on each long/short crossover.
• 📊 On-Chart Backtest Metrics
o Toggle on a small performance table—complete with win-rate, net P/L, drawdown—from your chosen start date, without any extra code.
⚙️ How It Works
1. Adaptive Smoothing (ALMA)
o Uses ALMA (Arnaud Legoux Moving Average) for smooth, low-lag filtering. In this script, the inputs are additionally pre-smoothed with DEMA(30) to reduce noise before ALMA is applied—improving stability on highs/lows.
2. Percentile Lines
o The High ALMA series feeds a linear-interpolation percentile function to generate the upper bound; the Low ALMA produces the lower bound.
o These lines are offset by a small look-ahead (X bars) to reduce repaint behavior.
3. Channel Logic
o Breakout Flip: When the selected source (default: Close) closes above the upper bound, the active threshold “jumps” to the lower bound—locking in a new channel until price next crosses.
o Breakdown Flip: Conversely, a close below the lower bound flips the threshold to the upper bound.
4. Signal Generation
o Long while the source is above the current “final” threshold.
o Short while below.
o Neutral inside the channel before any flip.
5. Visualization & Alerts
o Dynamic fills between the two percentile lines change hue as the regime flips.
o Candles adopt the regime color.
o Optional pinned “Long”/“Short” labels at flip bars.
o Alerts on every signal crossover of the zero-based regime line.
6. Backtest Table
o From your chosen start date, a mini-table displays cumulative P/L, win rate and drawdown for this strategy—handy for quick in-chart validation.
🎯 Who Should Use It
• Breakout Traders hunting for adaptive channels that auto-recenter on new highs/lows.
• Volatility Traders who want thresholds that expand and contract with market turbulence.
• Trend-Chasers seeking a fresh take on high/low channels with built-in smoothing.
• Systematic Analysts who appreciate on-chart backtesting without leaving TradingView.
⚙️ Default Settings
• ALMA Length: 14
• Percentile Length: 35 bars
• Percentile Lookback Period (offset): 4 bars
• Upper Percentile: 92%
• Lower Percentile: 50%
• Threshold Source: Close
• Visuals: Candle coloring on, labels off by default, “Strategy” palette
• Backtest Table: on by default (toggleable)
• Start Date (Backtest): 09 Oct 2017
📌 Conclusion
IDAHL blends two smooth, low-lag ALMA filters (fed by DEMA-smoothed highs/lows) with percentile-based channel construction for a self-rewiring high/low envelope. It gives you robust breakout/breakdown signals, immediate visual context via colored fills and candles, optional labels, alerts, and even performance stats—everything you need to spot and confirm regime shifts in one compact script.
🔹 Disclaimer : Past performance is not indicative of future results. Always backtest and align settings with your risk tolerance and objectives before live trading.
🔹 Strategic Advice : Always backtest, optimize, and align parameters with your trading objectives and risk tolerance before live trading.
Gann VooDoo Lines [NPR21]GANN VooDoo Lines
Gann Square of 9 - TOS Scale Edition is a high-precision conversion of the classic ThinkOrSwim (TOS) Gann Square of 9 tool, specifically rebuilt for Pine Script v6. It is designed for traders who rely on mathematical price rotations to identify hidden support and resistance levels.
Unlike standard horizontal line tools, this version is specifically engineered to "handshake" with the TradingView price scale, ensuring that every mathematical rotation is clearly labeled on your Y-axis for instant reference.
How to Use This Script
Define Your Anchor Point:
Find a major swing high or swing low on your chart.
Open the script Settings (gear icon) and enter this value into the Manual Anchor Price field.
Select Market Direction:
Down (Support): Use this if your anchor is a Swing High. The script will calculate support levels below that price.
Up (Resistance): Use this if your anchor is a Swing Low. The script will calculate resistance levels above that price.
Adjust the Visual Scope:
Use the Extend Right and Extend Left toggles. If both are checked, the Gann levels will act as infinite "Voodoo Lines" across your entire chart history.
The "TOS Scale" Final Step (Crucial):
To see the colored price boxes on your vertical axis, Right-click the Price Scale (the numbers on the right of your chart).
Hover over Labels and ensure Indicator Value Labels is Checked.
IMPORTANT: Uncheck the option "No Overlapping Labels." Since Gann levels are mathematically precise, they can sometimes be close together; unchecking this forces TradingView to show every single level simultaneously, just like ThinkOrSwim.
Williams Fractals / Goldilocks [NPR21]📊 Williams Fractals — Goldilocks
Description
Williams Fractals — Goldilocks highlights confirmed swing highs and lows using a refined Williams Fractals approach that balances signal frequency and clarity. BUY and SELL labels mark structurally important pivot points while avoiding chart clutter. The Periods (n) setting controls how often signals appear—lower values produce more signals, higher values filter noise. Signals are non-repainting and work on any instrument and any timeframe. Best used as a market structure and confirmation tool.
🔧 How to Use (Quick Guide)
BUY labels = confirmed swing lows (potential support / pullback areas)
SELL labels = confirmed swing highs (potential resistance / exhaustion areas)
Use for structure and confirmation, not as a standalone entry system
Combine with trend direction, key levels, VWAP/EMAs, volume, or momentum
⏱️ Recommended Periods by Timeframe
The Periods (n) setting determines how many and how often labels print.
1m–3m (Scalping): n = 2
More frequent signals; captures short-term swings.
5m–15m (Intraday): n = 8-9
Balanced sensitivity; filters minor noise.
30m–1h+ (HTF/Swing): n = 15-21
Fewer, stronger pivots; highlights major structure.
Rule of thumb: Lower timeframe → lower n. Higher timeframe → higher n.
🌍 Markets & Timeframes
Not futures-only. Works well on stocks, ETFs, forex, crypto, indices, and any timeframe. Adjust n to match the market’s pace.
Hurst-Optimized Adaptive Channel [Kodexius]Hurst-Optimized Adaptive Channel (HOAC) is a regime-aware channel indicator that continuously adapts its centerline and volatility bands based on the market’s current behavior. Instead of using a single fixed channel model, HOAC evaluates whether price action is behaving more like a trend-following environment or a mean-reverting environment, then automatically selects the most suitable channel structure.
At the core of the engine is a robust Hurst Exponent estimation using R/S (Rescaled Range) analysis. The Hurst value is smoothed and compared against user-defined thresholds to classify the market regime. In trending regimes, the script emphasizes stability by favoring a slower, smoother channel when it proves more accurate over time. In mean-reversion regimes, it deliberately prioritizes a faster model to react sooner to reversion opportunities, similar in spirit to how traders use Bollinger-style behavior.
The result is a clean, professional adaptive channel with inner and outer bands, dynamic gradient fills, and an optional mean-reversion signal layer. A minimalist dashboard summarizes the detected regime, the current Hurst reading, and which internal model is currently preferred.
🔹 Features
🔸 Robust Regime Detection via Hurst Exponent (R/S Analysis)
HOAC uses a robust Hurst Exponent estimate derived from log returns and Rescaled Range analysis. The Hurst value acts as a behavioral filter:
- H > Trend Start threshold suggests trend persistence and directional continuation.
- H < Mean Reversion threshold suggests anti-persistence and a higher likelihood of reverting toward a central value.
Values between thresholds are treated as Neutral, allowing the channel to remain adaptive without forcing a hard bias.
This regime framework is designed to make the channel selection context-aware rather than purely reactive to recent volatility.
🔸 Dual Channel Engine (Fast vs Slow Models)
Instead of relying on one fixed channel, HOAC computes two independent channel candidates:
Fast model: shorter WMA basis and standard deviation window, intended to respond quickly and fit more reactive environments.
Slow model: longer WMA basis and standard deviation window, intended to reduce noise and better represent sustained directional flow.
Each model produces:
- A midline (basis)
- Outer bands (wider deviation)
- Inner bands (tighter deviation)
This structure gives you a clear core zone and an outer envelope that better represents volatility expansion.
🔸 Rolling Optimization Memory (Model Selection by Error)
HOAC includes an internal optimization layer that continuously measures how well each model fits current price action. On every bar, each model’s absolute deviation from the basis is recorded into a rolling memory window. The script then compares total accumulated error between fast and slow models and prefers the one with lower recent error.
This approach does not attempt curve fitting on multiple parameters. It focuses on a simple, interpretable metric: “Which model has tracked price more accurately over the last X bars?”
Additionally:
If the regime is Mean Reversion, the script explicitly prioritizes the fast model, ensuring responsiveness when reversals matter most.
🔸 Optional Output Smoothing (User-Selectable)
The final selected channel can be smoothed using your choice of:
- SMA
- EMA
- HMA
- RMA
This affects the plotted midline and all band outputs, allowing you to tune visual stability and responsiveness without changing the underlying decision engine.
🔸 Premium Visualization Layer (Inner Core + Outer Fade)
HOAC uses a layered band design:
- Inner bands define the core equilibrium zone around the midline.
- Outer bands define an extended volatility envelope for extremes.
Gradient fills and line styling help separate the core from the extremes while staying visually clean. The midline includes a subtle glow effect for clarity.
🔸 Adaptive Bar Tinting Strength (Regime Intensity)
Bar coloring dynamically adjusts transparency based on how far the Hurst value is from 0.5. When market behavior is more decisively trending or mean-reverting, the tint becomes more pronounced. When behavior is closer to random, the tint becomes more subtle.
🔸 Mean-Reversion Signal Layer
Mean-reversion signals are enabled when the environment is not classified as Trending:
- Buy when price crosses back above the lower outer band
- Sell when price crosses back below the upper outer band
This is intentionally a “return to channel” logic rather than a breakout logic, aligning signals with mean-reversion behavior and avoiding signals in strongly trending regimes by default.
🔸 Minimalist Dashboard (HUD)
A compact table displays:
- Current regime classification
- Smoothed Hurst value
- Which model is currently preferred (Fast or Slow)
- Trend flow direction (based on midline slope)
🔹 Calculations
1) Robust Hurst Exponent (R/S Analysis)
The script estimates Hurst using a Rescaled Range approach on log returns. It builds a returns array, computes mean, cumulative deviation range (R), standard deviation (S), then converts RS into a Hurst exponent.
calc_robust_hurst(int length) =>
float r = math.log(close / close )
float returns = array.new_float(length)
for i = 0 to length - 1
array.set(returns, i, r )
float mean = array.avg(returns)
float cumDev = 0.0
float maxCD = -1.0e10
float minCD = 1.0e10
float sumSqDiff = 0.0
for i = 0 to length - 1
float val = array.get(returns, i)
sumSqDiff += math.pow(val - mean, 2)
cumDev += (val - mean)
if cumDev > maxCD
maxCD := cumDev
if cumDev < minCD
minCD := cumDev
float R = maxCD - minCD
float S = math.sqrt(sumSqDiff / length)
float RS = (S == 0) ? 0.0 : (R / S)
float hurst = (RS > 0) ? (math.log10(RS) / math.log10(length)) : 0.5
hurst
This design avoids simplistic proxies and attempts to reflect persistence (trend tendency) vs anti-persistence (mean reversion tendency) from the underlying return structure.
2) Hurst Smoothing
Raw Hurst values can be noisy, so the script applies EMA smoothing before regime decisions.
float rawHurst = calc_robust_hurst(i_hurstLen)
float hVal = ta.ema(rawHurst, i_smoothHurst)
This stabilized hVal is the value used across regime classification, dynamic visuals, and the HUD display.
3) Regime Classification
The smoothed Hurst reading is compared to user thresholds to label the environment.
string regime = "NEUTRAL"
if hVal > i_trendZone
regime := "TRENDING"
else if hVal < i_chopZone
regime := "MEAN REV"
Higher Hurst implies more persistence, so the indicator treats it as a trend environment.
Lower Hurst implies more mean-reverting behavior, so the indicator enables MR logic and emphasizes faster adaptation.
4) Dual Channel Models (Fast and Slow)
HOAC computes two candidate channel structures in parallel. Each model is a WMA basis with volatility envelopes derived from standard deviation. Inner and outer bands are created using different multipliers.
Fast model (more reactive):
float fastBasis = ta.wma(close, 20)
float fastDev = ta.stdev(close, 20)
ChannelObj fastM = ChannelObj.new(fastBasis, fastBasis + fastDev * 2.0, fastBasis - fastDev * 2.0, fastBasis + fastDev * 1.0, fastBasis - fastDev * 1.0, math.abs(close - fastBasis))
Slow model (more stable):
float slowBasis = ta.wma(close, 50)
float slowDev = ta.stdev(close, 50)
ChannelObj slowM = ChannelObj.new(slowBasis, slowBasis + slowDev * 2.5, slowBasis - slowDev * 2.5, slowBasis + slowDev * 1.25, slowBasis - slowDev * 1.25, math.abs(close - slowBasis))
Both models store their structure in a ChannelObj type, including the instantaneous tracking error (abs(close - basis)).
5) Rolling Error Memory and Model Preference
To decide which model fits current conditions better, the script stores recent errors into rolling arrays and compares cumulative error totals.
var float errFast = array.new_float()
var float errSlow = array.new_float()
update_error(float errArr, float error, int maxLen) =>
errArr.unshift(error)
if errArr.size() > maxLen
errArr.pop()
Each bar updates both error histories and computes which model has lower recent accumulated error.
update_error(errFast, fastM.error, i_optLookback)
update_error(errSlow, slowM.error, i_optLookback)
bool preferFast = errFast.sum() < errSlow.sum()
This is an interpretable optimization approach: it does not attempt to brute-force parameters, it simply prefers the model that has tracked price more closely over the last i_optLookback bars.
6) Winner Selection Logic (Regime-Aware Hybrid)
The final model selection uses both regime and rolling error performance.
ChannelObj winner = regime == "MEAN REV" ? fastM : (preferFast ? fastM : slowM)
rawMid := winner.mid
rawUp := winner.upper
rawDn := winner.lower
rawUpInner := winner.upper_inner
rawDnInner := winner.lower_inner
In Mean Reversion, the script forces the fast model to ensure responsiveness.
Otherwise, it selects the lowest-error model between fast and slow.
7) Optional Output Smoothing
After the winner is selected, the script optionally smooths the final channel outputs using the chosen moving average type.
smooth(float src, string type, int len) =>
switch type
"SMA" => ta.sma(src, len)
"EMA" => ta.ema(src, len)
"HMA" => ta.hma(src, len)
"RMA" => ta.rma(src, len)
=> src
float finalMid = i_enableSmooth ? smooth(rawMid, i_smoothType, i_smoothLen) : rawMid
float finalUp = i_enableSmooth ? smooth(rawUp, i_smoothType, i_smoothLen) : rawUp
float finalDn = i_enableSmooth ? smooth(rawDn, i_smoothType, i_smoothLen) : rawDn
float finalUpInner = i_enableSmooth ? smooth(rawUpInner, i_smoothType, i_smoothLen) : rawUpInner
float finalDnInner = i_enableSmooth ? smooth(rawDnInner, i_smoothType, i_smoothLen) : rawDnInner
This preserves decision integrity since smoothing happens after model selection, not before.
8) Dynamic Visual Intensity From Hurst
Transparency is derived from the distance of hVal to 0.5, so stronger behavioral regimes appear with clearer tints.
int dynTrans = int(math.max(20, math.min(80, 100 - (math.abs(hVal - 0.5) * 200))))






















