The Charlie Method - EnhancedThe Charlie Method is a precision-engineered 15-minute confirmation tool built for disciplined traders who wait for price to come to them.
It identifies only true bullish and bearish engulfing candles, visually marking them at the moment of confirmation and delivering immediate alerts.
No repainting. No noise. No distractions.
This method is best applied at key levels, liquidity zones, and session extremes, where confirmation matters most.
Trade less. Confirm more. Execute with intent.
Индикаторы и стратегии
FVG (Visual) - Last N Bars + Delete 5 Bars After NEW TouchThis indicator shows the latest FVG visually and also indicates what type of FVG it is.
Secuencia estricta (pendiente) HMA->RSI BB"The code combines a 100-period HMA as the first condition, and an RSI smoothed by a Bollinger Band set to default parameters of 24 and 1 standard deviation. The first condition is that the price is above or below the HMA. The second condition is that the RSI moves above or below the Bollinger Bands. Depending on how the conditions align, the system takes either a short or a long position."
Al Sat Alpha Hunter System [MTF + Risk Manager]çok güzel yerlerden al sat komutu çıkıyor ve bunu size ücretsiz vermek istedim sizde faydalanın
Market State Engine V2# Market State Engine
**Deterministic Confidence-Scoring System for TradingView**
A professional-grade PineScript v5 indicator that scores market conditions from 0-100, helping traders identify high-quality trading opportunities through systematic structure analysis, VWAP positioning, order flow dynamics, and time-based context.
---
## 🎯 Overview
The **Market State Engine** is not a trading bot—it's a **noise-reduction and opportunity-ranking system** designed to filter market conditions and surface only the highest-quality setups.
Instead of blindly taking every signal, this indicator:
- ✅ **Scores** market conditions objectively (0-100 scale)
- ✅ **Filters** out low-probability setups automatically
- ✅ **Classifies** opportunities into A, A+, and A++ grades
- ✅ **Alerts** only on confirmed structure shifts with supporting context
- ✅ **Keeps the human in control** - provides intelligence, not automation
### Philosophy: Reduce Noise. Enforce Discipline. Surface Quality.
---
## 🚀 Key Features
- **Deterministic Scoring** - No black boxes, fully explainable logic
- **Multi-Factor Analysis** - Combines 4 independent market state components
- **Structure-First Approach** - Only alerts on confirmed pivot breaks
- **VWAP Mean Reversion Logic** - Directional filtering based on VWAP zones
- **Order Flow Proxy** - CVD divergence and confirmation detection
- **Session-Aware Scoring** - Prioritizes high-volume New York sessions
- **Alert De-Duplication** - One alert per unique structure shift
- **Zero Repainting** - Uses confirmed pivots only (left=2, right=2)
- **Fully Configurable** - All parameters exposed as inputs
- **Visual Feedback** - VWAP bands, setup labels, and real-time score panel
---
## 📊 Scoring System (0-100)
The Market State Engine evaluates **four independent components**, each contributing up to **25 points** for a maximum total score of **100**.
### 🎯 Component Breakdown
| Component | Max Points | Description |
|-----------|------------|-------------|
| **VWAP Context** | 25 | Measures price deviation from session VWAP |
| **Structure Shift** | 25 | Confirms pivot breakout (HARD GATE) |
| **CVD Alignment** | 25 | Detects order flow divergence/confirmation |
| **Time-of-Day** | 25 | Identifies high-probability trading sessions |
---
### 1️⃣ VWAP Context (Max 25 Points)
**Purpose:** Identifies extreme price deviations from fair value for mean-reversion opportunities.
VWAP (Volume-Weighted Average Price) is calculated session-anchored to New York market time, with standard deviation bands creating zones of opportunity.
#### Band Structure:
- **1st Band**: ±1σ from VWAP (fair value zone)
- **2nd Band**: ±2σ from VWAP (moderate deviation)
- **3rd Band**: ±3σ from VWAP (extreme deviation)
#### Scoring Logic (Exclusive):
```
Price in 3rd VWAP Band (>2σ and ≤3σ) → +25 points
Price in 2nd VWAP Band (>1σ and ≤2σ) → +15 points
Otherwise (inside 1σ or beyond 3σ) → 0 points
```
**Key Insight:** The further price stretches from VWAP, the higher the probability of mean reversion.
---
### 2️⃣ Structure Shift (Max 25 Points) — **HARD GATE**
**Purpose:** Confirms momentum shift through confirmed pivot breakouts.
⚠️ **CRITICAL:** Structure shift is **mandatory**. If no valid structure shift occurs, the **total score becomes 0** regardless of other factors.
#### Detection Method:
Uses TradingView's `ta.pivothigh()` and `ta.pivotlow()` functions with **locked parameters**:
- **Left bars**: 2
- **Right bars**: 2
- **Source**: Configurable (Wick or Body)
- **Break confirmation**: Candle close only
#### Bullish Structure Shift:
- ✅ Prior swing high exists (confirmed pivot)
- ✅ Current candle **closes above** swing high + tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or below VWAP** (lower bands)
#### Bearish Structure Shift:
- ✅ Prior swing low exists (confirmed pivot)
- ✅ Current candle **closes below** swing low - tick buffer
- ✅ Must occur in VWAP 2nd or 3rd band
- ✅ **VWAP Filter**: Price must be **at or above VWAP** (upper bands)
#### Scoring:
```
Valid structure shift → +25 points
No structure shift → Total score = 0
```
**Tick Buffer:** Default 5 ticks (configurable) - prevents false breaks from minor price noise.
---
### 3️⃣ CVD Alignment (Max 25 Points)
**Purpose:** Detects institutional order flow through volume delta analysis.
CVD (Cumulative Volume Delta) is a proxy for order flow:
```
Close > Open → +Volume (buying pressure)
Close < Open → -Volume (selling pressure)
```
#### Scoring Logic:
| Condition | Points | Description |
|-----------|--------|-------------|
| **Divergence** | +25 | Price makes higher high + CVD makes lower high (bearish)Price makes lower low + CVD makes higher low (bullish) |
| **Confirmation** | +20 | Price and CVD both make higher highs or lower lows |
| **Neutral** | 0 | No clear divergence or confirmation |
**Lookback Window:** Last 20 bars (configurable) - prevents stale divergences.
**Key Insight:** Divergences suggest weakening momentum, while confirmations validate the trend.
---
### 4️⃣ Time-of-Day Context (Max 25 Points)
**Purpose:** Prioritizes high-volume, high-volatility New York sessions.
#### Scored Sessions (America/New_York timezone):
| Session | Time Range (NY) | Points | Description |
|---------|-----------------|--------|-------------|
| **Pre-Market** | 03:00 - 04:00 | +25 | Early liquidity injection |
| **Market Open** | 09:30 - 11:30 | +25 | Highest volume period |
| **Off-Hours** | All other times | 0 | Lower probability setups |
**Key Insight:** Structure shifts during active sessions have higher follow-through probability.
---
## 🏆 Setup Classification
Setups are graded based on total score thresholds (configurable):
| Grade | Score Range | Typical Components | Quality Level |
|-------|-------------|-------------------|---------------|
| **A++ Setup** | ≥90 | All 4 factors aligned(VWAP 3rd band + Structure + CVD + Session) | Premium - Rare |
| **A+ Setup** | ≥75 | Structure + VWAP + CVD or Session(3 of 4 factors) | High - Select |
| **A Setup** | ≥60 | Structure + VWAP + Session(Minimum viable setup) | Good - Regular |
| **No Grade** | <60 | Insufficient confluence | Filtered out |
**Default Thresholds:**
- A Setup: 60 points
- A+ Setup: 75 points
- A++ Setup: 90 points
---
## 📥 Installation
### Step 1: Download the Indicator
Download the `market_state_engine.pine` file from this repository.
### Step 2: Add to TradingView
1. Open (www.tradingview.com)
2. Open the **Pine Editor** (bottom panel)
3. Click **"New"** → **"Blank indicator"**
4. Delete all default code
5. Paste the contents of `market_state_engine.pine`
6. Click **"Add to Chart"**
### Step 3: Configure for Your Symbol
1. Click the **gear icon** next to the indicator name
2. Adjust **Tick Size** for your instrument:
- ES futures: `0.25`
- NQ futures: `0.25`
- Stocks: `0.01`
3. Save settings
---
## ⚙️ Configuration
### Symbol Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Tick Size** | 0.25 | Minimum price movement for your symbol |
| **Tick Buffer Count** | 5 | Ticks beyond swing for valid break |
### VWAP Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **VWAP Band 1 (σ)** | 1.0 | 1st standard deviation multiplier |
| **VWAP Band 2 (σ)** | 2.0 | 2nd standard deviation multiplier |
| **VWAP Band 3 (σ)** | 3.0 | 3rd standard deviation multiplier |
### Session Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Session 1** | 0300-0400 | Pre-market window (NY time) |
| **Session 2** | 0930-1130 | Market open window (NY time) |
### Score Thresholds
| Parameter | Default | Description |
|-----------|---------|-------------|
| **A Setup Threshold** | 60 | Minimum score for A grade |
| **A+ Setup Threshold** | 75 | Minimum score for A+ grade |
| **A++ Setup Threshold** | 90 | Minimum score for A++ grade |
### CVD Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **CVD Divergence Lookback** | 20 | Maximum bars for divergence detection |
### Swing Settings
| Parameter | Default | Options | Description |
|-----------|---------|---------|-------------|
| **Swing Detection Method** | Wick | Wick / Body | Use high/low or open/close for pivots |
### Visual Settings
| Parameter | Default | Description |
|-----------|---------|-------------|
| **Show VWAP Bands** | ✅ | Display VWAP and standard deviation bands |
| **Show Setup Labels** | ✅ | Display setup markers on chart |
| **Show Score Panel** | ✅ | Display real-time score breakdown |
---
## 📖 How to Use
### Step 1: Apply to 1-Minute Chart
⚠️ **The indicator is locked to 1-minute timeframe** - do not use on other timeframes.
### Step 2: Understand the Visual Signals
#### Setup Labels
- **Green Triangle (▲)** - Bullish (Long) setup detected
- **Red Triangle (▼)** - Bearish (Short) setup detected
- Label shows **Grade** (A/A+/A++) and **Total Score**
#### VWAP Bands
- **Yellow Line** - Session VWAP (fair value)
- **Blue Bands** - ±1σ (fair value zone)
- **Purple Bands** - ±2σ (moderate deviation)
- **Red Bands** - ±3σ (extreme deviation)
#### Score Panel (Top Right)
Real-time breakdown of all four components:
```
Component Score
VWAP Zone 15/25
Structure 25/25
CVD 20/25
Session 25/25
TOTAL 85/100 (A+)
```
### Step 3: Interpret Signals
#### Valid Long Setup:
✅ Green triangle below candle
✅ Price in **lower VWAP bands** (below VWAP)
✅ Structure shift breaks swing high
✅ Score ≥60
#### Valid Short Setup:
✅ Red triangle above candle
✅ Price in **upper VWAP bands** (above VWAP)
✅ Structure shift breaks swing low
✅ Score ≥60
### Step 4: Set Up Alerts (See Alert Conditions section)
---
## 🚦 Signal Filters (VWAP Zone Logic)
The indicator uses **directional VWAP filtering** to prevent counter-trend signals:
### Long Signals (Green)
**Only allowed when price is AT or BELOW VWAP**
- ✅ Lower 2nd band (-2σ to -1σ)
- ✅ Lower 3rd band (-3σ to -2σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in upper bands (above VWAP)
**Logic:** Longs when price is stretched below fair value (mean reversion)
### Short Signals (Red)
**Only allowed when price is AT or ABOVE VWAP**
- ✅ Upper 2nd band (+1σ to +2σ)
- ✅ Upper 3rd band (+2σ to +3σ)
- ✅ At VWAP exactly
- ❌ **BLOCKED** in lower bands (below VWAP)
**Logic:** Shorts when price is stretched above fair value (mean reversion)
---
## 🎨 Visual Elements
### Chart Overlays
| Element | Color | Description |
|---------|-------|-------------|
| **VWAP Line** | Yellow | Session-anchored fair value |
| **±1σ Bands** | Blue | Fair value zone (no score) |
| **±2σ Bands** | Purple | Moderate deviation (15 pts) |
| **±3σ Bands** | Red | Extreme deviation (25 pts) |
| **Swing Highs** | Red ▼ | Confirmed pivot highs |
| **Swing Lows** | Green ▲ | Confirmed pivot lows |
| **Session Background** | Light Green | Active high-value session |
### Setup Labels
**Bullish Setup:**
```
A+
▲ 75
```
Green label below candle, shows grade and score
**Bearish Setup:**
```
A++
▼ 90
```
Red label above candle, shows grade and score
### Score Panel
Real-time table in top-right corner:
- Individual component scores (0-25 each)
- Total score (0-100)
- Current setup grade (A/A+/A++)
- Updates in real-time as market conditions change
---
## 🔔 Alert Conditions
### Setting Up Alerts
#### Method 1: Built-in Alert Conditions
1. Click **"Create Alert"** in TradingView
2. Select **Market State Engine** as condition
3. Choose alert type:
- **Bullish Setup** - Long signals only
- **Bearish Setup** - Short signals only
- **Any Setup** - All signals
4. Set to **"Once Per Bar Close"**
5. Configure notification method (app, email, webhook)
#### Method 2: Custom Alert Message
Alert messages include full breakdown:
```
A+ Setup Detected (Score: 85)
Components: VWAP(25) + Structure(25) + CVD(20) + Time(15)
CVD State: Confirmation
Direction: Long
Timeframe: 1m
```
### Alert Behavior
✅ **One alert per unique pivot break** - no spam
✅ **Fires on candle close only** - no repainting
✅ **Minimum score filter** - only A grade or higher (≥60)
✅ **Direction-specific** - separate bullish/bearish conditions
⚠️ **No cooldown between different pivots** - multiple alerts per session allowed if different swing levels break
---
## 🔧 Technical Details
### Timeframe Lock
- **Required**: 1-minute chart only
- **Reason**: Scoring model calibrated for 1m micro-structure
- **Future**: Multi-timeframe support planned for v2
### Timezone Configuration
- **Hard-coded**: `America/New_York`
- **Session Detection**: Uses TradingView's native session functions
- **Consistency**: All time-based logic uses NY timezone
### Swing Detection Parameters
**Locked to specification:**
- `ta.pivothigh(source, left=2, right=2)`
- `ta.pivotlow(source, left=2, right=2)`
**Implications:**
- Pivots confirmed 2 bars after formation
- No repainting - historical pivots don't move
- 4-bar minimum swing structure (2 left + pivot + 2 right)
### VWAP Calculation
- **Type**: Session-anchored (resets daily)
- **Source**: Typical price `(high + low + close) / 3`
- **Weighting**: Volume-weighted
- **Standard Deviation**: True population standard deviation
### CVD Proxy Formula
```pine
barDelta = close > open ? volume : close < open ? -volume : 0
CVD = cumulative sum of barDelta (session-reset)
```
### Performance Limits
- **Max Labels**: 500 (TradingView limit)
- **Max Bars Back**: 500
- **Memory**: Lightweight - uses only essential variables
---
## 💡 Best Practices
### 1. **Use as a Filter, Not a Strategy**
❌ Don't: Blindly take every signal
✅ Do: Use score as confluence for your existing analysis
### 2. **Higher Grades = Better Probability**
- **A Setups (60-74)**: Regular opportunities, still require discretion
- **A+ Setups (75-89)**: High-quality, multiple factors aligned
- **A++ Setups (90-100)**: Rare premium opportunities, strongest edge
### 3. **Respect the VWAP Zone Filter**
The indicator **automatically blocks**:
- Longs in upper VWAP bands (counter-trend)
- Shorts in lower VWAP bands (counter-trend)
Trust this logic - it enforces mean reversion discipline.
### 4. **Monitor the Score Panel**
Watch which components are scoring to understand **why** a setup formed:
- Missing CVD score? → No order flow confirmation
- Missing Time score? → Outside high-volume sessions
- Low VWAP score? → Weak deviation from fair value
### 5. **Combine with Risk Management**
The indicator provides **opportunity scoring**, not position sizing:
- Use stop losses based on swing structure
- Scale position size with setup grade (larger on A++, smaller on A)
- Set profit targets at VWAP or opposing band
### 6. **Session Awareness**
Prioritize signals during **active sessions**:
- **03:00-04:00 NY**: Pre-market momentum
- **09:30-11:30 NY**: Highest volume, tightest spreads
Off-hours signals (0 time score) are lower probability but still valid if other factors strong.
### 7. **Understand the Hard Gate**
If **no structure shift** occurs:
- Total score = 0
- No alerts fire
- Other components irrelevant
**Why?** Structure shift confirms momentum change - without it, there's no tradable opportunity.
### 8. **Avoid Over-Optimization**
Default settings are well-calibrated:
- Don't chase "perfect" parameters
- Test changes on historical data before live use
- Document any modifications
### 9. **Leverage Alert De-Duplication**
The indicator prevents spam automatically:
- One alert per unique swing break
- New swing levels = new alerts
- No need to manually filter notifications
### 10. **Supplement with Price Action**
Use the indicator alongside:
- Support/resistance levels
- Order flow footprint charts
- Volume profile
- Market internals (breadth, TICK, etc.)
---
## 📚 Example Scenarios
### Example 1: A++ Premium Setup (Score: 95)
```
Price: In lower 3rd VWAP band (-2.8σ) → VWAP: 25 pts
Structure: Close breaks swing high → Structure: 25 pts
CVD: Price LL + CVD HL (bullish div) → CVD: 25 pts
Time: 10:15 AM NY (market open) → Time: 25 pts
Direction: LONG (price below VWAP) → Valid
Grade: A++ (95/100)
```
**Interpretation:** All factors aligned - premium mean-reversion long opportunity.
---
### Example 2: A+ Strong Setup (Score: 80)
```
Price: In upper 2nd VWAP band (+1.5σ) → VWAP: 15 pts
Structure: Close breaks swing low → Structure: 25 pts
CVD: Price HH + CVD LH (bearish div) → CVD: 25 pts
Time: 2:00 PM NY (off-hours) → Time: 0 pts
Direction: SHORT (price above VWAP) → Valid
Grade: A+ (65/100)
```
**Interpretation:** Strong setup despite off-hours, bearish divergence adds confidence.
---
### Example 3: Filtered Setup (Score: 0)
```
Price: In upper 3rd VWAP band (+2.5σ) → VWAP: 25 pts (if allowed)
Structure: Close breaks swing high → Structure: BLOCKED
CVD: Price HH + CVD HH (confirmation) → CVD: 20 pts (if allowed)
Time: 10:00 AM NY → Time: 25 pts (if allowed)
Direction: LONG (price ABOVE VWAP) → ❌ INVALID ZONE
Grade: None (0/100) - NO ALERT
```
**Interpretation:** VWAP filter blocked long signal in upper band - prevents counter-trend trade.
---
## 🛠️ Troubleshooting
### No Signals Appearing
- ✅ Verify you're on **1-minute chart**
- ✅ Check **Tick Size** matches your symbol
- ✅ Ensure **VWAP Bands** are visible
- ✅ Wait for confirmed pivots (requires at least 5 bars of history)
### Alerts Not Firing
- ✅ Confirm alert is set to **"Once Per Bar Close"**
- ✅ Check score threshold (must be ≥60 by default)
- ✅ Verify VWAP zone filter isn't blocking signals
- ✅ Check that structure shift is actually occurring
### Score Always Zero
- ✅ No structure shift detected (hard gate active)
- ✅ Price may not be in valid VWAP zone (2nd or 3rd band)
- ✅ Insufficient swing history (wait for pivots to form)
### Too Many/Too Few Signals
**Too many signals:**
- Increase **A Setup Threshold** (e.g., 70 instead of 60)
- Increase **Tick Buffer Count** (reduces false breaks)
**Too few signals:**
- Decrease **A Setup Threshold** (e.g., 50 instead of 60)
- Decrease **Tick Buffer Count** (more sensitive to breaks)
---
## 📜 License
This indicator is provided under the **Mozilla Public License 2.0**.
---
## 🤝 Credits
Developed as a professional trading tool for systematic opportunity identification.
**Philosophy:** Reduce noise. Enforce discipline. Keep the human in control.
---
## 📞 Support
For questions, issues, or feature requests, please consult:
1. This README documentation
2. The specification document (`pinescript_market_state_engine_spec.docx`)
3. Inline code comments in `market_state_engine.pine`
---
## 🔄 Version History
**v1.0** (Current)
- Initial release
- 4-component scoring model (VWAP + Structure + CVD + Time)
- VWAP zone directional filtering
- Alert de-duplication
- Configurable inputs
- Real-time score panel
- Session-aware logic
---
## 🎓 Understanding the Numbers
### Quick Reference Card
| Score Range | Grade | Quality | Typical Use |
|-------------|-------|---------|-------------|
| 90-100 | A++ | Premium | Highest conviction trades |
| 75-89 | A+ | High | Strong probability setups |
| 60-74 | A | Good | Acceptable with discretion |
| 0-59 | None | Filtered | Skip or wait for confluence |
### Component Contribution Examples
**Minimum A Setup (60 points):**
- Structure (25) + VWAP 3rd band (25) + Time (25) = 75 ✅
**Typical A+ Setup (75 points):**
- Structure (25) + VWAP 2nd band (15) + CVD confirm (20) + Time (25) = 85 ✅
**Maximum A++ Setup (100 points):**
- Structure (25) + VWAP 3rd band (25) + CVD divergence (25) + Time (25) = 100 ✅
---
## 🎯 Final Reminder
**This is NOT a trading bot.**
**This is NOT financial advice.**
**This is a decision-support tool.**
Always:
- ✅ Use proper risk management
- ✅ Understand the logic before trading
- ✅ Backtest on your symbols
- ✅ Keep the human in control
**Happy Trading! 📈**
Time-Segmented RVOLTime-Segmented RVOL
The Mathematical Flaw in Standard RVOL
Most Relative Volume (RVOL) indicators are built on a "Linear Scaling" hypothesis. They take the daily average and divide it by the number of bars in the day. This fails to account for the "Volume Smile"—the natural tendency for volume to be heavy at the open/close and dry up during mid-day. This leads to "False Highs" every morning and "False Lows" during lunch.
The Solution: Time-Slot Memory
This script uses a high-performance array to create a 20-Day Memory for every specific minute of the trading day.
Contextual Comparison: It compares the current 10:30 AM bar only to the previous twenty 10:30 AM bars.
Pre-Market Precision: Because it compares 4:00 AM volume to historical 4:00 AM volume, it can spot "early-bird" runners hours before the opening bell, identifying unusual interest when total volume is still low.
The Coherent Momentum Tiers
We have organized the color logic into four distinct, logical tiers to assist in rapid decision-making:
Cold (Blue): RVOL < 1.0 . Volume is below the historical average for this specific time slot.
Building (Green): RVOL 1.0 – 3.0. Active participation. The stock is "Awake" and moving with healthy, sustainable interest.
High Intensity (Yellow): RVOL 3.0 – 5.0. Extreme interest. The trade is becoming "crowded"; look for increased volatility.
Parabolic/Super High (Pink): RVOL > 5.0. Massive abnormality (5x+ normal volume). Common in small-cap "pumpers" and major institutional news events.
Trading Strategy: Spotting the "In-Play" Runner
The Awake Signal: Watch for a transition from Blue to Green. This confirms the ticker is "in-play" relative to its own 20-day history.
The Breakout: Look for Yellow or Pink bars accompanied by a price breakout from a consolidation zone. High RVOL confirms the move has real conviction.
Exhaustion (White X): The script includes built-in divergence tracking. If the price makes a new high but the RVOL bars are shrinking, a "White X" will appear. This suggests "Volume Exhaustion"—the fuel is running out.
Settings
Lookback (Days): Default is 20. This acts as a "Truth Filter" to ensure the baseline remains grounded in long-term reality rather than chasing short-term noise.
Custom Thresholds: Fully adjustable levels for the Green, Yellow, and Pink tiers to suit different asset classes (Small-caps vs. Mega-caps).
Order Blocks & Breaker Blocks Destek DirencOrder Blocks & Breaker Blocks Destek Direnc Al Sat Bölgeleri
Pivot Point BouncePivot Point Bounce
(Generated by trade-pilot.app Builder)
Overview
Pivot Point Bounce is an intraday support & resistance indicator that automatically plots daily pivot levels and highlights high-probability bounce reactions from those levels during the trading session. It is designed to help traders identify areas where price is likely to react, reject, or reverse.
Daily Pivot Point Levels
The indicator calculates daily pivot points based on the previous trading day’s High, Low, and Close:
Pivot (P) – central equilibrium level
Resistance levels: R1, R2, R3
Support levels: S1, S2, S3
These levels are fixed for the entire trading day and are drawn as horizontal lines on the chart:
Pivot: yellow
Resistances: red
Supports: green
This creates a clear intraday liquidity map that updates automatically every new day.
Bounce Detection Logic
The indicator continuously monitors price interaction with pivot levels and looks for true bounce behavior, not simple touches.
A bounce is detected when:
Price touches or slightly crosses a pivot level (using an ATR-based tolerance).
The next candle closes back on the correct side of the level:
Long bounce: price touches S1, S2, or Pivot from below and closes back above with a bullish candle.
Short bounce: price touches R1, R2, or Pivot from above and closes back below with a bearish candle.
This helps filter out false breaks and focuses on real rejection from key levels.
RSI Confirmation
RSI is used as an additional confirmation layer:
Oversold RSI supports long bounces.
Overbought RSI supports short bounces.
RSI values and thresholds are fully customizable through inputs.
Session Filter
Signals are only generated inside the selected trading session (default: 09:30–16:00 New York time).
This prevents signals during low-liquidity or off-market hours.
Visual Signals & Alerts
When all conditions are met, the indicator:
Displays LONG / SHORT labels directly on the chart.
Plots directional arrows at signal candles.
Supports TradingView alerts for automated notifications.
Why This Indicator Is Useful
Clearly visualizes institutional pivot levels.
Helps identify high-probability bounce trades.
Avoids random entries in the middle of price action.
Combines structure, momentum, and time-based filtering.
Clean, readable, and optimized for intraday trading.
Anchored LRL using ZigZag AnchorAnchored Linear Regression Channel - ZigZag Pivot
The Anchored Linear Regression Channel (LRL) dynamically anchors to the most recent ZigZag pivot point, providing traders with a regression-based channel that resets with each significant price swing.
HOW IT WORKS:
This indicator combines ZigZag pivot detection with linear regression analysis. When price reverses by a specified ATR multiple, a new pivot is identified. After a minimum number of bars, the linear regression channel anchors to this pivot and projects forward to the current bar, recalculating with each new bar.
KEY FEATURES:
- Dynamic anchoring to ZigZag highs and lows
- Customizable ATR-based reversal detection
- Two standard deviation channel bands (inner and outer)
- Adjustable minimum bars before anchor reset (ideal for scalping on lower timeframes)
- Separate controls for ZigZag smoothing vs. anchor reset timing
- Color-coded regression line (up/down trend)
- Optional line extension to the right
- Fully customizable colors and line widths
- Visual label marking the anchor pivot point
INPUTS:
- ATR Reversal: Multiplier for ATR-based pivot detection (default: 2.0)
- MA Length: EMA smoothing for ZigZag calculation (default: 5)
- ATR Length: Period for ATR calculation (default: 5)
- Min Bars After Pivot: Bars required before anchor resets (default: 3, reduce to 1-2 for faster scalping)
- Channel Widths: Inner (0.70) and Outer (1.00) standard deviation multiples
- Line Colors: Customizable colors for uptrend/downtrend and channel lines
- Label Colors: Customizable background and text colors
HOW TO USE:
1. Apply the indicator to your chart
2. Adjust "Min Bars After Pivot" based on your timeframe:
- 1-minute charts: Use 1-2 bars for quick scalping entries
- 5-minute+ charts: Use 3-5 bars for more confirmation
3. Watch for the regression line color to indicate trend direction
4. Use channel bands as potential support/resistance zones
5. The label shows which pivot (high/low) the channel is anchored to
BEST PRACTICES:
- Lower timeframes (1-5 min): Use lower "Min Bars After Pivot" (1-3) for faster reaction
- Higher timeframes: Use higher values (5+) for more confirmed pivots
- Combine with price action and volume for confirmation
- Adjust ATR Reversal based on instrument volatility
NOTES:
- This indicator repaints as it recalculates with each new bar
- Channel resets when a new ZigZag pivot is confirmed
- Not suitable for backtesting strategies due to dynamic nature
- Works best on liquid instruments with clear price swings
DISCLAIMER:
This indicator is for educational and informational purposes only. It does not provide trading signals or guarantees of profitability. Past performance is not indicative of future results. Always perform your own analysis and risk management.
Gamma of Gamma - AnticipationGamma of Gamma — Anticipation Engine
What if you could detect market inflections before they become obvious? Not react to momentum — anticipate the momentum itself.
"Gamma here refers to mathematical acceleration (2nd derivative), NOT options Gamma"
Gamma of Gamma (GoG) operates one abstraction layer above conventional indicators. While RSI tells you what momentum did , GoG tells you what momentum is about to do . This is the difference between chasing price and positioning ahead of it.
Core Innovation: Traditional indicators measure first-order effects (price change) or second-order effects (momentum/acceleration). This system measures the third derivative — the rate of change of acceleration itself. When Gamma-of-Gamma reaches extremes, it signals that pressure dynamics are about to flip — often 2-5 bars before price visibly reacts.
Target Users: Discretionary traders, scalpers, and swing traders who want early positioning signals with statistical rigor. Effective on stocks, crypto, forex, and futures with meaningful volume data.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHY THIRD-DERIVATIVE ANALYSIS?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The Hierarchy of Market Information
Most traders operate at the wrong level of abstraction:
• Price → What happened (lagging)
• Momentum → How fast it happened (still lagging)
• Gamma (2nd Derivative) → How momentum is changing (coincident)
• Gamma of Gamma (3rd Derivative) → How FAST that change is changing ( leading )
The third derivative captures inflection acceleration — the mathematical signature of regime transition. When GoG reaches extreme values, the market is telegraphing that current pressure dynamics are unsustainable.
Why This Beats RSI
RSI measures momentum magnitude. GoG measures momentum trajectory .
Consider this scenario: RSI reads 70 (overbought). Is the move exhausted or just getting started? RSI cannot tell you. GoG can — because it measures whether buying pressure is accelerating into the high RSI reading (continuation likely) or decelerating despite high RSI (reversal imminent).
RSI answers: "How strong was the move?"
GoG answers: "Is the move strengthening or weakening right now ?"
The first is historical. The second is predictive.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
MATHEMATICAL FOUNDATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Layer 1: Cumulative Volume Delta (CVD)
The foundation is order flow approximation:
• Up bar (close > prior close): Volume classified as buying pressure
• Down bar (close < prior close): Volume classified as selling pressure
• CVD = Running sum of signed volume
Interpretation: Rising CVD indicates net aggressive buying. Falling CVD indicates net aggressive selling. CVD divergence from price often precedes reversals.
Layer 2: Gamma (Second Derivative)
Gamma measures acceleration of order flow:
Formula: Gamma = CVD - 2×CVD + CVD
This is the discrete second derivative — the rate of change of the rate of change. When Gamma spikes positive, buying pressure is accelerating . When Gamma spikes negative, selling pressure is accelerating.
Layer 3: Gamma of Gamma (Third Derivative)
GoG measures jerk — the acceleration of acceleration:
Formula: GoG = Gamma - 2×Gamma + Gamma
Critical insight: Extreme GoG readings indicate that current pressure dynamics are reaching an inflection point. The system is "overextended" in its current trajectory and will likely revert or reverse.
Layer 4: Z-Score Normalization
Raw GoG values are normalized against their 50-period distribution:
Formula: GoG_Z = (GoG - Mean_50) / StdDev_50
Benefit: Z-scores are regime-adaptive. A "2.0" reading always means "2 standard deviations from normal" regardless of whether you're trading a penny stock or ES futures. This makes thresholds consistent across instruments and timeframes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SIGNAL GENERATION LOGIC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Long Signal (Bullish Anticipation)
Triggers when:
• GoG Z-score < -Threshold (default -2.0)
• Volume > Average Volume × Minimum Multiple (default 1.2×)
Interpretation: Selling pressure acceleration has reached an extreme negative reading. The selling is "exhausting itself" — acceleration is peaking and will soon decelerate. Buyers are likely to step in.
Short Signal (Bearish Anticipation)
Triggers when:
• GoG Z-score > +Threshold (default +2.0)
• Volume > Average Volume × Minimum Multiple (default 1.2×)
Interpretation: Buying pressure acceleration has reached an extreme positive reading. The buying is "exhausting itself" — often occurs at blow-off tops, failed breakouts, or momentum climaxes.
Why Volume Confirmation?
Gamma acceleration in thin liquidity is meaningless noise. The volume filter ensures signals occur only when meaningful participation backs the pressure dynamics. This dramatically reduces false signals during low-activity periods.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CONFIDENCE ENGINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Not all signals are equal. The Confidence Engine quantifies signal strength:
Confidence Calculation:
Confidence = 50 + ((|Z-Score| - Threshold) / Threshold) × 100
Capped at 100%
Visual Representation:
• Small orb = Low confidence (50-65%)
• Normal orb = Medium confidence (65-80%)
• Large orb = High confidence (80-100%)
Orb transparency also adjusts — high-confidence signals appear brighter and more prominent. This creates intuitive visual hierarchy where stronger signals demand more attention.
Practical Use:
• High confidence (>80%): Consider larger position size, tighter stops
• Medium confidence (50-80%): Standard position size
• Low confidence (<50%): Reduced size or wait for confirmation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
INTEGRATED BACKTESTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Every signal system needs accountability. The onboard backtester provides real-time performance tracking:
Core Metrics:
• Total Trades
• Win Rate
• Profit Factor
• Expectancy (average P&L per trade)
• Net P&L
• Max Drawdown
• Average Win / Average Loss
Methodology:
• Positions held for configurable bar count (default 10 bars)
• Forces objective evaluation independent of discretionary exits
• Updates in real-time as new trades complete
Optimizer Mode:
Enable for parameter tuning research:
• Stability Score (0-100 points): Composite evaluation of parameter robustness
• Trade Density : Signals per 1000 bars — monitors over/under-trading
• Parameter Display : Current settings for documentation
• Robustness Rating : ROBUST / STABLE / FRAGILE / OVERFIT
Stability Scoring Breakdown:
• Win Rate ≥55%: +25 points | ≥50%: +15 points | ≥45%: +5 points
• Expectancy >0.5%: +25 points | >0.1%: +15 points | >0%: +5 points
• Total Trades ≥30: +25 points | ≥20: +15 points | ≥10: +5 points
• Profit Factor ≥1.5: +25 points | ≥1.2: +15 points | ≥1.0: +5 points
Target: 60+ points indicates stable parameters. Below 40 suggests overfitting risk.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CHART EXECUTION SIGNALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Unique feature: Entry and exit markers display directly on the price chart via force_overlay, even though the indicator runs in a separate pane.
Visual Markers:
• ▲ Green Triangle (below bar): Long entry at exact price level
• ▼ Red Triangle (above bar): Short entry at exact price level
• ✕ Gold X-Cross : Position exit after hold period
Benefit: Immediate visual correlation between GoG signals and price action. Review historical trades without switching between panes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DUAL DASHBOARD SYSTEM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Main Dashboard — Real-Time State
Displays:
• Current GoG regime (EXTREME HIGH / EXTREME LOW / NEUTRAL)
• GoG Z-Score (numerical)
• Raw GoG value
• Gamma value
• CVD (Cumulative Volume Delta)
• Volume status (Active/Low with ratio)
• Signal state (Scanning / Long Signal / Short Signal / In Position)
• Confidence meter with visual bar
• Entry price when in position
Backtest Dashboard — Performance Metrics
Displays all backtester metrics in compact format. Switches to Optimizer view when Optimizer Mode enabled.
Both dashboards feature:
• Configurable position (6 locations including Middle Left/Right)
• Adjustable text size (Tiny/Small/Normal/Large)
• Transparency control for visual integration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PARAMETER GUIDE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Calculation Settings
• GoG Extreme Threshold (default 2.0): Z-score level for signal generation. Higher = fewer but stronger signals. Range: 0.5-5.0
• Gamma Smoothing (default 3): SMA period for Gamma. Lower = more responsive, more noise. Higher = smoother, more lag. Range: 1-20
• GoG Smoothing (default 5): SMA period for GoG. Filters micro-spikes while preserving structural inflections. Range: 1-20
• Min Volume Multiple (default 1.2): Volume must exceed this multiple of 20-period average. Ensures signals have participation backing. Range: 0.5-3.0
Backtester Settings
• Backtest Hold Bars (default 10): Forced holding period for backtester evaluation. Adjust based on timeframe and trading style.
• Parameter Optimizer Mode : Enables extended metrics for tuning research.
Tuning by Timeframe
Scalping (1-5 min):
Threshold: 1.5-2.0 | Gamma Smooth: 2-3 | GoG Smooth: 3-4 | Hold: 5-8 bars
Day Trading (15-60 min):
Threshold: 2.0-2.5 | Gamma Smooth: 3-5 | GoG Smooth: 5-7 | Hold: 8-12 bars
Swing Trading (4H-Daily):
Threshold: 2.5-3.0 | Gamma Smooth: 5-7 | GoG Smooth: 7-10 | Hold: 10-15 bars
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE: PRACTICAL WORKFLOW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Step 1: Identify Regime
Watch the GoG Z-score line. Most of the time it oscillates within the neutral zone (between thresholds). This is "scanning" mode — no actionable signal.
Step 2: Wait for Extreme
When Z-score crosses threshold AND volume confirms, a signal fires. The orb appears in the indicator pane; the triangle appears on price chart.
Step 3: Assess Confidence
Check orb size and dashboard confidence reading:
• Large bright orb + 80%+ confidence = High conviction setup
• Small faint orb + <60% confidence = Requires additional confirmation
Step 4: Execute with Context
GoG signals anticipate — they don't confirm. Use price structure (support/resistance), higher timeframe trend, or other confirmation before entry.
Step 5: Manage Position
Exit markers show backtester exits. For live trading, consider:
• Time-based exit (signal's hold period)
• Opposite signal exit
• Fixed R:R targets
Step 6: Review Performance
Check Backtest Dashboard regularly. If Win Rate drops below 45% or Expectancy goes negative, reassess parameters or market conditions.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT THIS INDICATOR IS — AND ISN'T
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This Indicator IS:
✅ State-transition detector (balance → imbalance)
✅ Early warning system for momentum shifts
✅ Anticipation tool for pre-positioning
✅ Statistical framework with built-in accountability
This Indicator IS NOT:
❌ Mechanical buy/sell system (requires discretion)
❌ Trend-following indicator
❌ Reversal-only indicator
❌ Replacement for risk management
Best Use Cases:
• Detecting early reversals before obvious confirmation
• Anticipating breakouts during volatility compression
• Timing pullback entries in established trends
• Identifying exhaustion at momentum climaxes
Challenging Conditions:
• Extremely low volume environments
• News-driven gaps (no order flow to measure)
• Instruments with unreliable volume data
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ORIGINALITY STATEMENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Innovation 1: Third-Derivative Order Flow Analysis
While first and second derivatives are common, applying third-derivative (jerk) analysis to cumulative volume delta is novel. This captures inflection points that lower-order analysis misses entirely.
Innovation 2: Z-Score Adaptive Thresholds
Rather than fixed thresholds that require per-instrument tuning, z-score normalization creates self-adapting signal levels that work consistently across any liquid instrument.
Innovation 3: Confidence-Weighted Visual System
Dynamic orb sizing and transparency based on signal strength provides intuitive visual hierarchy. Stronger signals literally appear larger and brighter.
Innovation 4: Integrated Accountability
Built-in backtester with optimizer mode enables parameter validation directly on chart. No external tools or spreadsheets required.
Innovation 5: Dual-Pane Execution Visualization
Force-overlay chart signals bridge the gap between indicator pane and price action, enabling immediate visual trade review.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LIMITATIONS & DISCLAIMERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technical Limitations
• Volume classification uses bar direction (close vs prior close), not tick-level aggressor data. Precision loss estimated 10-15% vs institutional-grade data.
• CVD approximation assumes volume follows price direction. Works well in trending conditions; less precise in choppy markets.
• Backtester uses fixed hold period, not optimal exit logic. Real performance may vary with proper trade management.
Market Limitations
• Requires meaningful volume data. Avoid instruments with reported volume issues.
• Signals may cluster during high-volatility events. Not every signal should be traded.
• Anticipation signals appear early by design. Patience required — price may continue against signal briefly before reversing.
Risk Disclosure
• Trading involves risk of loss. Past performance does not guarantee future results.
• This indicator provides analysis tools, not financial advice.
• Always use proper position sizing and risk management.
• Backtest results are hypothetical and do not include slippage, commissions, or fees.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RECOMMENDED SETTINGS BY MARKET
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crypto (BTC, ETH, SOL)
Threshold: 1.8-2.2 | Gamma: 3 | GoG: 5 | Volume: 1.3x | TF: 15min-4H
Notes: Higher volatility produces more signals. Consider higher threshold to filter.
Forex Majors (EURUSD, GBPUSD)
Threshold: 2.0-2.5 | Gamma: 4 | GoG: 6 | Volume: 1.2x | TF: 5min-1H
Notes: Lower volatility requires patience. Volume proxy via tick volume works adequately.
Stocks (Large Cap)
Threshold: 2.0-2.5 | Gamma: 3-4 | GoG: 5-6 | Volume: 1.2x | TF: 15min-Daily
Notes: Real volume data provides cleanest signals. Watch for opening/closing auction distortions.
Futures (ES, NQ, CL)
Threshold: 2.0-2.3 | Gamma: 3 | GoG: 5 | Volume: 1.2x | TF: 5min-1H
Notes: Excellent volume data. Session boundaries may produce false signals — consider RTH only.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CONCLUSION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Gamma of Gamma represents a fundamental shift in signal philosophy: from reacting to momentum to anticipating momentum.
By operating at the third derivative of order flow, this system detects the mathematical signatures of regime transition — the moments when current pressure dynamics become unsustainable and reversal becomes probable.
This is not another oscillator telling you what already happened. This is an anticipation engine positioning you for what's about to happen.
Stop chasing. Start anticipating.
RSI tells you where momentum was. GoG tells you where it's going.
Taking you to school. - Dskyz , Trade with probability. Trade with anticipation. Trade with GoG
Universal Adaptive Tracking🙏🏻 Behold, this is UAT (Universal Adaptive Tracker) , with less words imma proceed how it compares with alternatives:
^^ comparison with non-adaptive quadratic regression (purple line), that has higher overshoots, less precision
^^ comparison with JMA and its adaptive gain. JMA’s gain is heavily limited, while UAT’s negative and positive gains are soft-saturated with p-order Möbius transform
This drop is inspired by, dedicated to, and made will all love towards Jurik Research , who retired in October 2k21. When some1 steps out, some1 has to step in, and that time it’s me (again xd). But there’s some history u gotta know:
Some history u gotta know:
In ~2008 dudes from forexfactory reverse engineered Jurik Moving Average
In late 1990s dudes from Jurik Research approximated the best possible adaptive tracking filter for evolution of prices via engineering miracles
Today in 2k26, me I'm gonna present to you the real mathematical objects/entities behind JMA top-edge engineered approximates. You will prolly be even more happy now then all the dem together back then.
Why all this?
When we talk about object tracking stuff, e.g. air defense, drones, missiles, projectiles, prices, etc, it all comes down to adaptive control and (Position & Velocity & Acceleration) aka PVA state space models (the real stuff many of you count as DSP ).
Why? Cuz while position (P) : (mean), or position & velocity (PV) : (linear regression) are stable enough in dem own ways, Position & Velocity & Acceleration (PVA) : (quadratic regression+) require adaptivity do be stable. And real world stuff needs PVA, due to non-linearity for starters.
So that’s why. If your goal is Really smoothing and no lag, u gotta go there. I see a lot of folks are crazy with it and want it, so here is it, for y’all. And good news, this is perfect for your favorite Moving Windows.
How to use it
The upper study:
The final filter (main state): just as you use other fast smoothers, MAs, etc, you know better than me here
You can also turn in volatility bands in script’s style settings, these do not require any adjustments
Finally, you can turn on, in the same place, separate trackers each based on negative and positive volatility exclusively. When both are almost equal, that indicates stability & persistence in markets. May sound like it’s nothing important, but I've never seen anything like it before. Also, if you'd allow your our inner mental gym hero gloriously arise, you can argue that these 2 separate trackers represent 2 fair prices (one for sellers, one for buyers). All better then 1 imaginary fair price for both (forget about it)
The lower study:
The lower study: you can analyze streams of upward of downward volatilities separately. This is incredibly powerful
You can also turn these off and turn on neg & pos intensities, and use them as trend detector, when each or both cross 1.5 (naturally neutral) threshold.
^^ Upper study with expected typical and maximum volatility bands turned On
...
The method explained
What you got in the end is non-linear, adaptive, lighting fast when needed and slow when required price tracking. All built upon real math entities/objects, not a brilliantly engineered approximation of them. No parameters to optimize, data tells it all.
... It all starts from a process model, in our cause this is...
MFPM (Mechanical Feedback Price Model)
Doesn’t make gaussian assumptions like most quant mainstream tech, accepts that innovations are Laplace “at best”, relies in L inf and L0 spaces.
I created this model neither trynna fit non-fitting ARMA / variants, nor trynna be silly assuming that price state evolution and markets are random.
Theory behind it: if no new volume comes, then price evolution would be simply guided by the feedback based on previous trading activity, pushing prices towards the midrange between 2 latest datapoints, being the main force behind so called “pullbacks” and reason why most pullbacks end just a bit past 50% of a move.
This is the Real mechanical feedback based mean reversion, that is always there in the markets no matter what, think of it as a background process that is always there, and fresh new volume deviates prices away from it. Btw, this can also be expressed as AR2 with both phis = 0.5 .
Then I separate positive and negative innovations from this model and process them separately, reflecting the asymmetry between buy and sell forces, smth that most forget. Both of these follow exponential distribution . Each stream has its own memory so here we use recursive operators . We track maximum innovations (differences between real and expected datapoints) with exponentially decaying damping factor, and keep tracking typical innovation, with the same factor.
Then we calculate what’s called in lovely audio engineering as “ crest factor ”, the difference is we don’t do RMS and stuff. But hey again we work with laplace innovations, so we keep things in L0 and L inf spirit. Then we go a couple of steps further, making this crest factor truly relative (resolution agnostic), and then, most importantly, we apply a natural saturation on it based on p-order Möbius transform, but not with arbitrary p and L, but guided by informational limits of the data. These final "intensity" parameters are what we need next to make our object tracking adaptive.
Extended Beta(2, 2) Window
This is imo the main part of this. Looking at tapering windows in DSP and how wavelets are made from derivatives of PDF functions of probability distributions, I figured that why use just one derivative? That made me come up with Universal Moving Average , that combines PDF and CDF of Beta(2, 2) distribution . And that is fine for P (position) tracking model.
Here we need PVA (position & velocity & acceleration). We can realize that everything starts from PDF, and by adding derivatives and anti-derivatives of it as factors of final window weights, we can create smth truly unique, a weightset that is non-arbitrary and naturally provides response alike quadratic regression does, But, naturally smoothed.
Why do I consider this a discovery, a primordial math object? Because x^2 itself and Beta(2, 2) based on it are the only primitives, esp out of all these dozens of DSP tapering windows, that provide you a finite amount of derivatives. You can keep differentiating Hann window until the kingdom f come, while Welch window aka Beta(2, 2) has a natural stopping point, because the 3rd derivative is 0, so we can’t use it. Symmetrically, we do 2 steps up from PDF, getting 1st and second anti-derivatives. What’s lovely, symmetrically, 3rd antiderivative even tho exist, it stops making any sense. 2nd one still makes sense, it’s smth like “potential” of probability distribution, not really discussed in mainstream open access sources.
Finally, the last part is to introduce adaptivity using these intensity exponents we’ve calculated with MFPM. We do 2 separate trackers, one using the negative intensity exponent, another one uses positive intensity exponent.
And at the end, even tho using both together is cool, the final state estimate is calculated simply as the state which intensity has higher.
^^ impulse response of our final kernel with fixed (non adaptive) intensity exponents: 1 (blue) and 2 (red). You see it's all about phase
…
And that’s all folks.
…
Actually no …
Last, not least, is the ability to add additional innovation weight to the kernel:
^^ Weighting by innovations “On”. Provides incredible tracking precision, paid with smoothness. I think this screenshot, showing what happened after the gap, and how the tracker managed to react, explains it all.
...
Live Long and Prosper, all good TradingView
∞
libhs_td6Library Overview Data for logger
This library contains test data used by library logger
import GETpacman/logger/x as logger
bollinger bandsWhat the indicator is (Generated by trade-pilot.app Builder)
This is a hybrid trend/continuation + EMA crossover signal indicator that generates LONG/SHORT entries only when multiple filters agree. It’s built to avoid “random” signals by forcing confirmation from trend direction, volatility, and risk/reward conditions, and it can also restrict signals to a specific trading session + timezone.
Main modules inside the code
1) Session filter (time-based)
The script checks if the current bar is inside the chosen session (default 09:30–16:00 New York time).
✅ Signals only trigger inSession
❌ No signals outside session
This helps you avoid entries during dead/low-quality hours.
2) Bollinger “Continuation Setup”
It calculates Bollinger Bands (default Length 20, Mult 2) and looks for a continuation pattern:
Trend detection (slope-based):
It measures the slope of the Bollinger middle band (basis).
If slope is up and price is above the basis → uptrend
If slope is down and price is below the basis → downtrend
Pullback + confirmation:
Long setup: price makes a pullback toward the middle band area (without breaking too deep) and then prints a bullish confirmation candle closing above the basis.
Short setup: same idea but reversed (pullback up + bearish confirmation candle closing below the basis).
✅ Result: signals that aim to catch trend continuation after a pullback, not random touches.
3) Stop & Target visualization (Bollinger-based)
When a continuation setup happens, the script calculates:
Stop (long): near the middle band / recent lowest lows
Stop (short): near the middle band / recent highest highs
Target (long): upper Bollinger band
Target (short): lower Bollinger band
On the chart (like in your screenshot), you see:
Bollinger Bands
Stop/target points shown as colored circles when a setup triggers
This makes it easier to visually understand the trade structure.
4) Bandwidth filter (volatility filter)
It calculates Bollinger Bandwidth (percentage width of the bands).
Signal only passes if:
Bandwidth ≥ minimum threshold (default 0.8%)
✅ Helps avoid trading when volatility is too low (chop / squeeze conditions).
5) Risk:Reward filter (quality filter)
This part estimates whether the trade has enough “room” to make sense:
Stop distance is ATR-based: ATR × multiplier
Target distance is approximated using recent swing potential:
Long: distance to recent highest high (last 10 bars)
Short: distance to recent lowest low (last 10 bars)
Then it calculates:
RR = targetDistance / stopDistance
and requires:
RR ≥ minimum RR (default 1.0)
✅ Helps filter out trades where the potential reward is too small compared to risk.
6) EMA crossover signals (secondary signal engine)
It also plots:
Fast EMA (default 20)
Slow EMA (default 50)
It generates extra signals on:
Bullish crossover (fast crosses above slow)
Bearish crossunder
So final signals can come from:
Bollinger continuation OR
EMA crossover
…but still must pass bandwidth + RR + session filters.
Final signal rule (important)
A LONG is printed only when:
(Bollinger continuation long OR EMA bullish crossover)
AND bandwidth filter passes
AND RR filter passes
AND inside session
Same logic for SHORT.
That’s why the signals are more selective.
What you see on the chart (like your screenshot)
Bollinger Bands (upper/middle/lower)
EMA fast + EMA slow
Red/green arrows for entries
“LONG/SHORT” labels on signal candles
Optional alert triggers for automation
How it helps traders
✅ Cleaner entries (trend + pullback continuation + confirmation)
✅ Less chop (volatility bandwidth filter)
✅ Better trade quality (risk/reward filter)
✅ Session control (only trade when market conditions are best)
✅ Easy visual decision making (bands, EMAs, and stop/target markers on the chart)
✅ Alerts-ready for live notifications
Small note (so you don’t get surprised)
You have an input called “Show Dashboard”, but the current code does not actually create a dashboard table (no table.new section exists). Everything else works as shown.
prnt.sc
[codapro] Elite Momentum & Smart Money Detector
Elite Momentum & Smart Money Detector
Overview
The Elite Detector is a non-repainting indicator that merges Smart Money Concepts, Adaptive Volatility-Based Momentum, and Multi-Timeframe Trend Confluence to identify high-probability trade setups. This tool helps confirm institutional intent and market pressure before triggering actionable signals.
Core Systems
Smart Money Concepts (SMC)
• Highlights institutional order blocks
• Detects equal highs/lows as liquidity zones
• Automatically cleans up outdated zones for clarity
Adaptive Momentum Engine
• Momentum calculated with volatility-adjusted smoothing
• Normalized scale from -100 to +100
• Candle coloring reflects trend strength dynamically
Squeeze Detection System
• Flags volatility contraction zones using Bollinger and Keltner channels
• Background shading highlights compression zones
• Histogram shows directional breakout pressure
Multi-Timeframe Trend Validation
• Aligns signals with higher timeframe momentum
• Built-in logic auto-selects appropriate HTF per chart
• Reduces false signals and improves timing
Signal Logic
Buy Signal appears when:
Momentum crosses from negative to positive
Squeeze condition is active
Higher timeframe confirms bullish trend
Sell Signal appears when:
Momentum crosses from positive to negative
Squeeze condition is active
Higher timeframe confirms bearish trend
All signals are non-repainting and appear only once all conditions are met.
Visual Dashboard (Top-Right Corner)
Displays real-time confirmation across five categories:
Momentum: Current trend direction and strength
Squeeze: Indicates if volatility is compressed
HTF Trend: Confirms higher-timeframe alignment
Volatility: Current volatility phase (low, normal, or high)
Signal Status: Buy, Sell, or Neutral (Wait)
Chart Visuals
Candle Colors:
• Bright green/red = Strong momentum
• Faded green/red = Weak momentum
Background Colors:
• Orange = Squeeze is active
• Clear = Normal market activity
Boxes:
• Green = Bullish order blocks
• Red = Bearish order blocks
Dashed Lines:
• Red = Equal highs (liquidity zones above)
• Green = Equal lows (liquidity zones below)
Alert Conditions
Includes three prebuilt alerts for automation and webhook systems:
Elite Buy Signal
Elite Sell Signal
Squeeze Activation
These alerts allow users to respond to market shifts in real time or integrate with automated trading workflows.
Best Practices
Wait for Confluence: Confirm all three systems (momentum, squeeze, HTF trend) before entering
Watch Order Blocks: Institutional zones often act as support/resistance
Monitor Liquidity Zones: Be cautious of stop hunts near equal highs/lows
Use Dashboard Cues: Let the HUD validate your setup
Always Use Risk Management: This tool increases probability, not certainty
Example Setup:
1. Squeeze background appears
2. Buy signal triangle confirms
3. Dashboard shows: Momentum strong up, Squeeze on, HTF trend up
4. Price bounces off green order block
→ High-probability long entry
Why It Works
This tool leverages multiple uncorrelated concepts to filter low-quality trades and highlight setups with real institutional backing:
Order Blocks and Liquidity Zones track smart money footprints
Volatility-adjusted Momentum captures real energy shifts
Multi-Timeframe Confluence confirms trades in the broader context
Non-repainting signals ensure reliability
Final Note
The Elite Detector is designed to show you:
Where smart money is positioned,
When the market is coiling for a move,
and Which direction is supported by momentum and trend.
Use it as your high-probability entry engine — across any market or timeframe.
Disclaimer
This tool was created using the CodaPro Pine Script architecture engine — designed to produce robust trading overlays, educational visuals, and automation-ready alerts. It is provided strictly for educational purposes and does not constitute financial advice. Always backtest and demo before applying to real capital.
Expanded ORBLeverages a basic ORB for the 15M and 30M, and adds levels above and below the range at 50 and 100% of the total ORB range. Be sure to adjust the time for the timeperiod you want to capture.
Simple ORB + ORB50/ORB100 with HistoryThis shows the 15M and the 30M Orb ranges. Additionally, it shows levels if the ORB were to be extended out 50% and 100%.
The Fantastic 4 - Momentum Rotation StrategyOverview
The Fantastic 4 is a tactical momentum rotation indicator. It rotates capital monthly across four carefully selected assets based on their 75-day Rate of Change (ROC), allocating only to assets with positive momentum and proportionally weighting them by their momentum strength.
This indicator tracks the strategy's historical performance, displays current allocation recommendations, and sends monthly rebalance alerts so you can easily manage your portfolio. Simply set your capital amount and the indicator shows exactly how much to invest in each asset.
Why These Four Assets?
The selection of 20-year Bonds, Gold, Russell 2000, and Emerging Markets is based on their specific volatility and decorrelation characteristics, which allow the strategy to react quickly to market shifts while providing protection during downturns.
Russell 2000 (Small Caps)
Chosen over the S&P 500 because it is more "lively" and active (Nowadays you could use also the Nasdaq). Its trends are steeper and more vertical, making it easier for a momentum indicator to catch clear trends. While the S&P 500 has more inertia, the Russell 2000 develops faster, allowing the strategy to capture gains in shorter periods.
Emerging Markets
Included because they can act like a "rocket," offering explosive growth potential while maintaining high decorrelation from developed equity markets. When emerging markets trend, they trend hard.
20-Year Bonds
Selected because they are the most decorrelated asset from equities. When a stock market crash occurs, capital typically flows into fixed income, and long-term bonds (20-year) notice this influx the most, making their price reaction more significant and easier to trade. This is the strategy's primary "safe haven."
Gold
Along with bonds, gold serves as a defensive asset providing a "shield" for the portfolio when general market conditions deteriorate. It offers additional decorrelation and crisis protection.
How the Strategy Works
The 75-Day Momentum Engine
The strategy uses a 75-day momentum lookback (roughly 3.5 months), which is considered very "agile" compared to other models like Global Equity Momentum (GEM) that use 200-day periods. This shorter window allows the strategy to:
React quickly to changes in trend
Catch upward movements in volatile assets early
Exit quickly when trends break
Monthly Rebalancing Process
At the end of each month:
Step 1: Calculate 75-day ROC for each asset
Step 2: Filter out assets with negative momentum (they receive 0% allocation)
Step 3: Distribute capital proportionally based on momentum strength
Step 4: Apply 5% minimum threshold (smaller allocations become zero)
Step 5: Apply 80% maximum cap (no single asset exceeds 80%, remainder stays in cash)
The 80% Ceiling Rule
There is an 80% investment ceiling for any single asset to prevent over-exposure. If only one asset (like bonds) has positive momentum, 80% goes to that asset and 20% remains in cash/liquidity.
Behavior in Bearish Markets
When markets turn bearish, the strategy protects capital through several mechanisms:
Automatic Risk-Off
Because the strategy only invests in assets with positive momentum, it automatically moves away from crashing equities. If an asset's trend becomes negative, the strategy stays "on the sidelines" for that asset.
The Bond Haven
During prolonged bearish periods or sudden crashes (like COVID-19), the strategy typically shifts into 20-year bonds. During the COVID-19 crash in March 2020, while global markets were collapsing, strategies like this reportedly yielded positive returns by being positioned in bonds.
Full Liquidity Option
If no assets show positive momentum, the strategy moves to 100% cash. This is rare given the decorrelation between the four assets—when equities crash, bonds and gold typically rise.
What This Indicator Does
This is a tracking and alerting tool that:
Calculates the optimal allocation based on current momentum
Shows historical monthly performance of the strategy
Simulates portfolio equity growth from your specified starting capital
Displays exact dollar amounts to invest in each asset
Sends monthly rebalance alerts with complete instructions
Detects missing data to prevent false signals
Features
Dynamic allocation table showing weights, dollar amounts, and ROC values
Monthly returns history with color-coded performance
Data availability detection with visual status indicators
Configurable alerts for rebalancing, go-to-cash, and missing data
Simulated equity curve from initial capital
Settings Guide
Assets
Configure your four ETFs. The default European ETFs are:
Asset 1 - XETR:IS04: iShares 20+ Year Treasury Bond (Bonds)
Asset 2 - XETR:GZUR: Gold ETC
Asset 3 - XETR:XRS2: Xtrackers Russell 2000 (Small Caps)
Asset 4 - XETR:XMME: Xtrackers Emerging Markets (EM)
For US markets, consider: TLT (20-year bonds), GLD (Gold), IWM (Russell 2000), EEM (Emerging Markets)
Strategy Settings
ROC Period - Momentum lookback in daily bars. Default: 75 days (~3.5 months)
Max Allocation % - Maximum weight for any single asset. Default: 80%
Min Allocation % - Threshold below which allocation becomes zero. Default: 5%
Capital
Initial Capital - Your portfolio value. The indicator calculates exact amounts for each asset based on this. Default: $20,000
Display
Table Positions - Position the allocation and history tables on screen
Months of History - How many past months to display (3-24)
Alerts
Monthly Rebalance Alert - Sends complete allocation details at month end
Go-to-Cash Alert - Alerts when all assets have negative momentum
Missing Data Alert - Warns when asset data is unavailable
How to Use
Initial Setup
Add indicator to any chart and switch to MONTHLY timeframe
Configure your four ETF tickers
Set your portfolio capital amount
Position the tables where you prefer
Setting Up Alerts
Click Alert button or press Alt+A
Set Condition to "Fanta4"
Select "Any alert() function call"
Choose notification method (Email, Push, Webhook, etc.)
Set expiration to "Open-ended"
Monthly Workflow
Receive rebalance alert at the start of each month
Alert shows exact percentages AND dollar amounts for each asset
Adjust your portfolio accordingly
No action needed during the month
Reading the Tables
Green = positive returns/momentum
Red = negative returns/momentum
Orange "N/A" = missing data
Alloc column shows weight distribution (e.g., "45/35/20/—")
Alert Message Example
Monthly alerts include:
Target month for the new allocation
Current portfolio value
Each asset's percentage AND dollar amount
Each asset's momentum (ROC) value
Cash allocation if applicable
Total return since inception
Historical Context
This strategy combines elements of:
Dual Momentum (Gary Antonacci) - Relative and absolute momentum
Global Equity Momentum (GEM) - But with shorter 75-day vs 200-day lookback
Risk parity concepts - Decorrelated asset selection
The key innovation is the specific asset selection optimized for momentum trading and the agile 75-day lookback period that allows faster reactions to trend changes.
Data Requirements
The strategy activates only when all four assets have valid price data (minimum 75 days of history). The data status row shows checkmarks for available data. Note: Some ETFs have limited history (e.g., XMME data starts June 2017).
Limitations
This is a tracking indicator, not an automated trading system
Past performance is hypothetical and does not guarantee future results
Requires all four assets to have valid data; partial allocation not supported
Monthly rebalancing may miss shorter-term momentum shifts
Transaction costs, slippage, and taxes are not included in simulation
ETF availability and liquidity vary by region
The 75-day momentum may whipsaw in choppy, trendless markets
Disclaimer
This indicator is for educational and informational purposes only. It does not constitute financial advice.
Version History
v1.0 - Initial release with momentum rotation, allocation tables, data validation, and monthly alerts


















