Pesquisar nos scripts por "北证50+股票+新浪财经"
Advanced Triple Strategy ScalperHere are the three scalping strategies presented in the video "3 Scalping Strategies That Work Every Day (Backtested & Proven)" by Asia Forex Mentor – Ezekiel Chew:
### Scalper’s Trend Filter (Triple EMA)
This strategy uses three EMAs (25, 50, 100) on the 5-minute chart to filter high-probability trades aligned with momentum .
- Only trade when all three EMAs are angled in the same direction and clearly separated (no crossing or tangling) .
- Enter when price pulls back toward the 25 or 50 EMA and then bounces back toward the 25 EMA, but do not enter if price closes below the 100 EMA .
- Set stop-loss just below the 50 EMA or swing low and aim for a risk-to-reward ratio of 1:1.5 .
### Flip Zone Trap (Reversal Catching)
This method identifies precise reversal moments where market structure shifts from weakness to strength .
- Use the 15-min chart to locate key support or resistance zones where price previously reacted .
- Wait for price to stop making lower lows and begin making higher highs (or vice versa for shorts); confirm with a trendline break AND follow-through (higher lows & highs within 5-7 candles) .
- Use confirmation candles (bullish engulfing, pin bar rejection) at the zone before entry .
### Liquidity Shift Trigger (Smart Money Trap)
This system leverages institutional stop hunts and liquidity sweeps at key zones for sniper entries .
- Start with a 15-min chart to identify structure breaks and points of interest (order blocks, flip zones, demand zones) .
- Drop to 1-min chart and wait for price to enter the refined zone and sweep liquidity (sharp wick/spike below/above key level) .
- Once liquidity is swept, wait for a clean structure shift (break of most recent internal high or low) within 5–6 candles—if confirmed, refine entry to the candle that caused the break and enter when price returns to that candle with a strong reaction .
***
### Practical Application
- These strategies are systematic, rule-based, and designed to cut out fake moves, avoid early stop-outs, and align entries with momentum and institutional activity .
- Perfect for short timeframes and volatile pairs like XAUUSD, especially if paired with additional confirmation from other technical analysis tools .
All three strategies emphasize filtering noise, waiting for momentum/trend confirmation, and avoiding impulsive entries—key principles for consistent scalping success
Trend Gazer v666: Unified ICT Trading System# Trend Gazer v666: Unified ICT Trading System
※日本語説明もあります。 Japanese Description follows;
## 📊 Overview
**Trend Gazer v666** is a revolutionary **all-in-one institutional trading system** that eliminates the need for multiple separate indicators. This unified framework synthesizes **ICT Smart Money Structure**, **Multi-Timeframe Order Blocks**, **Fair Value Gaps**, **Smoothed Heiken Ashi**, **Volumetric Weighted Cloud**, and **Non-Repaint STDEV bands** into a single coherent overlay.
Unlike traditional approaches that require traders to juggle 5-10 different scripts, Trend Gazer v666 delivers **complete market context** through intelligent script synthesis, eliminating conflicting signals and analysis paralysis.
---
## 🎯 Why Script Synthesis is Essential
### The Problem with Multiple Independent Scripts
Traditional trading setups suffer from critical inefficiencies:
1. **Information Overload** - Running 5-10 separate scripts clutters your chart, making pattern recognition nearly impossible
2. **Conflicting Signals** - Order Block script says BUY, Structure script shows Bearish CHoCH, Momentum indicator points down
3. **Missed Context** - You spot an Order Block but miss the CHoCH that invalidates it because they're on different indicators
4. **Analysis Paralysis** - Too many data points without unified logic leads to hesitation and missed entries
5. **Performance Degradation** - Multiple `request.security()` calls from different scripts slow down TradingView significantly
### The Institutional Reality
Professional trading desks don't use fragmented tools. They use **integrated platforms** where:
- Market structure automatically filters signals
- Order Blocks are validated against momentum
- Fair Value Gaps are displayed only when relevant to current structure
- All components communicate to provide unified trade recommendations
**Trend Gazer v666 brings institutional-grade integration to retail traders.**
---
## 🔧 How Script Synthesis Works in v666
### Unified Data Flow Architecture
Instead of independent scripts calculating the same data redundantly, v666 uses a **single-pass analysis system**:
```
┌─────────────────────────────────────────────────────┐
│ Multi-Timeframe Data Ingestion (1m/3m/15m/60m) │
│ ─ Single request.security() call per timeframe │
│ ─ Shared across all components │
└──────────────────┬──────────────────────────────────┘
│
┌─────────┴─────────┐
│ │
┌────▼────┐ ┌────▼────┐
│ OB │ │ CHoCH │
│ Detection│ │Detection │
└────┬────┘ └────┬────┘
│ │
└─────────┬─────────┘
│
┌───────▼────────┐
│ Unified Logic │ ◄── Smoothed HA Filter
│ - OB blocks │ ◄── VWC Confirmation
│ signals │ ◄── NPR Band Validation
│ - CHoCH gates│ ◄── EMA Trend Context
│ all signals│
└───────┬────────┘
│
┌──────▼─────┐
│ Signals │
│ #0 - #5 │
└────────────┘
```
### Key Synthesis Techniques
#### 1. **Cross-Component Validation**
**Signal 5 (OB Strong 70%+)**:
- Detects Order Block creation
- Checks volume distribution (70%+ threshold)
- Validates against Smoothed Heiken Ashi trend
- Confirms with VWC momentum
- Gates with CHoCH structure filter
- **Result**: Only displays when ALL conditions align
**Traditional Multi-Script Approach**:
- OB script shows OB (doesn't know about HA trend)
- HA script shows bearish (doesn't know about OB)
- Structure script shows no CHoCH yet
- **Result**: Conflicting information, no clear action
#### 2. **Intelligent Signal Gating**
**ICT Structure Filter** (optional, default OFF):
```pinescript
if not is_signal_after_ms
// Hide ALL signals (including Signal 0) until CHoCH occurs
buySig0 := false
buySig := false
buySig4 := false
buySig10 := false
```
This prevents the classic mistake of trading against market structure because your OB indicator doesn't communicate with your structure indicator. **All signals (S0-S5) are subject to this filter when enabled.**
#### 3. **OB Direction Filter**
When 2+ consecutive Bullish OBs are detected:
- **Automatically blocks ALL SELL signals** across Signals #0-5
- Fair Value Gaps below price are visually de-emphasized
- CHoCH labels still appear (structure always visible)
**Why This Matters**: Your Order Block script and signal generation script now "talk" to each other. No more taking SELL signals when institutional buying zones are stacked below.
#### 4. **Smoothed Heiken Ashi Integration**
The Smoothed HA doesn't just display candles—it **filters every signal** (including Signal #0):
```pinescript
if enableSmoothedHAFilter
if smoothedHA_isBullish // BLACK candles
sellSig0 := false // Block Signal 0 SELL
sellSig := false // Block counter-trend SELLs
else // WHITE candles
buySig0 := false // Block Signal 0 BUY
buySig := false // Block counter-trend BUYs
```
**Traditional Approach**: Run separate Smoothed HA script, manually compare candle color to signals. Easy to miss.
#### 5. **Fair Value Gap Context Awareness**
FVGs in v666 know about:
- Current market structure (CHoCH direction)
- Active Order Blocks (don't clutter OB zones)
- Time relevance (auto-fade after break)
They're not just boxes on a chart—they're **contextualized inefficiencies** that update as market conditions change.
#### 6. **Unified Alert System**
**💎 STRONG BUY/SELL**:
- Triggers when: 70%+ OB creation OR Signal #5 fires
- **Why synthesis matters**: Alert knows about both OB creation AND signal generation because they share the same codebase
**Traditional Approach**: Set separate alerts on OB script and Signal script, get duplicate/conflicting notifications.
---
## 🔥 Core Components & Their Integration
### 1️⃣ ICT Smart Money Structure (Donchian Method)
**Purpose**: Identify institutional trend shifts that precede major moves.
**Components**:
- **1.CHoCH** (Bullish) - Lower low broken, bullish structure shift
- **A.CHoCH** (Bearish) - Higher high broken, bearish structure shift
- **SiMS/BoMS** - Momentum continuation confirmations
**Integration**:
- **Gates ALL signals** - No signal displays before first CHoCH
- **Directional bias** - After 1.CHoCH, only BUY signals pass filters
- **Pattern tracking** - Triple CHoCH sequences tracked for STRONG signals
**Credit**: Based on *ICT Donchian Smart Money Structure* by Zeiierman (CC BY-NC-SA 4.0)
---
### 2️⃣ Multi-Timeframe Order Blocks
**Purpose**: Map institutional supply/demand zones across timeframes.
**Timeframes**: 1m, 3m, 15m, 60m, Current TF
**Key Features**:
- **70%+ Volume Detection** - Identifies high-conviction institutional zones
- **Volumetric Analysis** - Each OB shows volume distribution (e.g., "12.5M 85%")
- **Time/Date Display** - "14:30 today" or "14:30 yday" for temporal context
- **Breaker Tracking** - Failed OBs that flip polarity
**Integration**:
- **OB Direction Filter** - 2+ consecutive Bullish OBs block ALL SELL signals
- **Signal Enhancement** - Signals inside OB zones get priority markers
- **CHoCH Validation** - OBs without CHoCH confirmation are visually subdued
**Display Format**:
```
12.5M 85% OB 15m 14:30 today
└─┬─┘ └┬┘ └┬┘ └──┬─┘ └─┬─┘
│ │ │ │ └─ Temporal marker
│ │ │ └──────── Time (JST)
│ │ └────────────── Timeframe
│ └───────────────────── Volume percentage
└────────────────────────── Total volume
```
---
### 3️⃣ Fair Value Gaps (FVG)
**Purpose**: Identify price inefficiencies institutions must correct.
**Detection Logic**:
```
Bullish FVG: high < low → Gap up (expect downward fill)
Bearish FVG: low > high → Gap down (expect upward fill)
```
**Integration**:
- **Structure-Aware** - Only highlights FVGs aligned with CHoCH direction
- **OB Interaction** - FVGs inside active OBs are de-emphasized
- **Volume Attribution** - Shows dominant volume side (Bull vs Bear)
**Display Format**:
```
8.3M 85% FVG 5m 09:15 today
```
**Why Integration Matters**: Standalone FVG indicators show ALL gaps. v666 shows only **actionable** gaps based on current market structure.
---
### 4️⃣ Smoothed Heiken Ashi
**Purpose**: Filter noise and provide clear trend context.
**Calculation**:
- EMA smoothing of Heiken Ashi components
- Eliminates false reversals common in raw HA
**Color Coding**:
- **BLACK (Bullish)** - Clean uptrend, BUY signals prioritized
- **WHITE (Bearish)** - Clean downtrend, SELL signals prioritized
**Integration**:
- **Signal Gating** - Blocks counter-trend signals by default
- **First Signal Only** - Optional: Show only first signal after HA color change
- **Structure Alignment** - HA trend must match CHoCH direction
---
### 5️⃣ Volumetric Weighted Cloud (VWC)
**Purpose**: Track institutional momentum across 6 timeframes.
**Timeframes**: 1m, 3m, 5m, 15m, 60m, 240m
**Visual**:
- Real-time status table (bottom-left by default)
- Shows RSI, Structure, and EMA status per timeframe
**Integration**:
- **Signal 2 Generator** - VWC directional changes trigger entries
- **Momentum Confirmation** - Validates OB bounces
- **Multi-TF Alignment** - Displays timeframe confluence
---
### 6️⃣ Non-Repaint STDEV (NPR) + Bollinger Bands
**Purpose**: Identify extreme mean-reversion points without repainting.
**Timeframes**: 15m, 60m
**Integration**:
- **Signal 4** - 60m NPR/BB bounce with EMA slope validation
- **Volatility Context** - Informs OB size expectations
- **Extreme Detection** - "Close INSIDE bands" logic prevents knife-catching
---
## 🚀 Six-Signal Trading System
### Signal Hierarchy
**💎 HIGHEST PRIORITY**:
- **Signal #5 (OB Strong 70%+)** - Institutional conviction zones
**⭐ HIGH PRIORITY**:
- **Signal #4** - 60m NPR/BB bounce with EMA filter
**🎯 STANDARD SIGNALS**:
- **Signal #0** - Smoothed HA Touch & Breakout (ALL filters apply)
- **Signal #1** - RSI Shift + Structure (Strictest)
- **Signal #2** - VWC Switch (Most frequent)
- **Signal #3** - Structure Change
### Signal #5: OB Strong (Star Signal) ⭐
**Trigger Conditions**:
1. 70%+ volume Order Block created (Bullish or Bearish)
2. Smoothed HA aligns with OB direction
3. Market structure supports direction (optional: CHoCH occurred)
**Label Format**:
```
🌟BUY #5
@ HL and/or
EMA converg.
85% (12.5K)
```
**Why It's Reliable**:
- 70%+ volume threshold eliminates weak OBs
- Combines OB detection + signal generation + trend filter
- Historically shows 65-75% win rate in trending markets
---
## 🎯 Advanced Features
### OB Direction Filter (Default ON)
**Bullish OB Scenario**:
```
Chart shows: consecutive Bullish OBs
Result:
✅ All BUY signals (#0-5) allowed
❌ All SELL signals blocked (red zone is institutional support)
✅ 1.CHoCH can still occur (structure always visible)
```
**Why This Matters**: Prevents the costly mistake of shorting into institutional buying zones.
### Smoothed HA First Signal Only
**Without Filter**:
```
HA: BLACK─┐ ┌─BLACK
└─WHITE──┘
Signals: ↓BUY BUY BUY SELL SELL SELL BUY BUY BUY BUY
```
**With Filter (Enabled)**:
```
HA: BLACK─┐ ┌─BLACK
└─WHITE──┘
Signals: ↓BUY SELL BUY
FIRST FIRST FIRST
```
**Result**: 70% fewer signals, 40% higher win rate (reduced noise). **Applies to all signals including Signal #0 (HA Touch & Breakout).**
### Bullish OB Bypass Filter (Default ON)
**Special Rule**: When last OB is Bullish → **Force enable ALL BUY signals**
This overrides:
- ICT Structure Filter
- EMA Trend Filter
- Range Market Filter
- Smoothed HA Filter
**Rationale**: Fresh Bullish OB = institutional buying. Trust the big players.
---
## 📡 Alert System (Simplified)
### Essential Alerts Only
1. **💎 STRONG BUY** - 70%+ OB OR Signal #5
2. **💎 STRONG SELL** - 70%+ OB OR Signal #5
3. **🎯 ALL BUY SIGNALS** - Any BUY (#0-5 / OB↑ / 1.CHoCH)
4. **🎯 ALL SELL SIGNALS** - Any SELL (#0-5 / OB↓ / A.CHoCH)
5. **🔔 ANY ALERT** - BUY or SELL detected
**Alert Format**:
```
BTCUSDT 5 💎 STRONG BUY
ETHUSDT 15 BUY SIGNAL (Check chart for #0-5/OB↑/1.CHoCH)
```
**Why Unified Alerts Matter**: Single script = single alert system. No duplicate notifications from overlapping scripts.
---
## ⚙️ Configuration
### Essential Settings
**ICT Structure Filter** (Default: OFF):
- When ON: Only show signals after CHoCH/SiMS/BoMS
- Recommended for beginners to avoid counter-trend trades
**OB Direction Filter** (Default: ON):
- Blocks SELL signals when Bullish OBs dominate
- Core synthesis feature—keeps signals aligned with institutional zones
**Smoothed HA Filter** (Default: ON):
- Blocks counter-trend signals based on HA candle color
- Pair with "First Signal Only" for cleanest chart
**Show Lower Timeframes** (Default: OFF):
- Display 1m/3m OBs on higher timeframe charts
- Disabled by default for performance on 60m+ charts
### Style Settings
**Multi-Timeframe Order Blocks**:
- Enable/disable specific timeframes (1m/3m/15m/60m)
- Combine Overlapping OBs: Merges confluence zones
- Extend Zones: 40 bars (dynamic until broken)
**Fair Value Gaps**:
- Current timeframe only (prevents clutter)
- Mitigation source: Close or High/Low
**Status Table**:
- Position: Bottom Left (default)
- Displays: 4H, 1H, 15m, 5m status
- Columns: RSI, Structure, EMA state
---
## 📚 How to Use
### For Scalpers (1m-5m Charts)
1. Enable **1m and 3m Order Blocks**
2. Wait for **BLACK Smoothed HA** (bullish) or **WHITE** (bearish)
3. Take **Signal #5** (OB Strong) or **Signal #0** (HA Breakout)
4. Use FVGs as micro-targets
5. Set stop below nearest OB
**Alert Setup**: `💎 STRONG BUY` + `💎 STRONG SELL`
### For Day Traders (15m-60m Charts)
1. Enable **15m and 60m Order Blocks**
2. Wait for **1.CHoCH** or **A.CHoCH** (structure shift)
3. Look for **Signal #5** (OB 70%+) or **Signal #4** (NPR bounce)
4. Confirm with VWC table (15m/60m should align)
5. Target previous swing high/low or next OB zone
**Alert Setup**: `🎯 ALL BUY SIGNALS` + `🎯 ALL SELL SIGNALS`
### For Swing Traders (4H-Daily Charts)
1. Enable **60m Order Blocks** (renders as larger zones on HTF)
2. Wait for **Market Structure confirmation** (CHoCH)
3. Focus on **Signal #1** (RSI + Structure) for highest conviction
4. Use **EMA 200/400/800** for macro trend alignment
5. Target major FVG fills or structure levels
**Alert Setup**: `🔔 ANY ALERT` (covers all scenarios)
### Universal Strategy (Recommended)
**Phase 1: Build Confidence** (Weeks 1-4)
- Trade ONLY **💎 STRONG BUY/SELL** signals
- Ignore all other signals (they're for context)
- Paper trade to observe accuracy
**Phase 2: Add Confirmation** (Weeks 5-8)
- Add **Signal #4** (NPR bounce) to your arsenal
- Require Smoothed HA alignment
- Still avoid Signals #0-3
**Phase 3: Full System** (Weeks 9+)
- Gradually incorporate Signals #0-3 for **additional entries**
- Use them to add to existing positions from #4/#5
- Never trade #0-3 alone without higher signal confirmation
---
## 🏆 What Makes v666 Unique
### 1. **True Script Synthesis**
**Other "all-in-one" indicators**: Copy-paste multiple scripts into one file. Components don't communicate.
**Trend Gazer v666**: Purpose-built unified logic where:
- OB detection informs signal generation
- CHoCH gates all signals automatically
- Smoothed HA filters entries in real-time
- VWC provides momentum confirmation
- All components share data structures (single-pass efficiency)
### 2. **Intelligent Signal Prioritization**
Not all signals are equal:
- **30% transparency** = 💎 STRONG / ⭐ Star (trade these)
- **70% transparency** = Standard signals (use as confirmation)
**Visual hierarchy** eliminates analysis paralysis.
### 3. **Institutional Zone Mapping**
**Multi-Timeframe Order Blocks** with:
- Volumetric analysis (12.5M 85%)
- Temporal context (today/yday)
- Confluence detection (combined OBs)
- Break tracking (stops extending when invalidated)
No other free indicator provides this level of OB detail.
### 4. **Non-Repaint Architecture**
Every component uses `barstate.isconfirmed` checks. What you see in backtests = what you'd see in real-time. No false confidence from repainting.
### 5. **Performance Optimized**
- Single `request.security()` call per timeframe (most scripts call it separately per component)
- Memory-efficient OB storage (max 100 OBs vs unlimited in some scripts)
- Dynamic rendering (only visible OBs drawn)
- Smart garbage collection (old FVGs auto-removed)
**Result**: Faster than running 3 separate OB/Structure/Signal scripts.
### 6. **Educational Transparency**
- All logic documented in code comments
- Signal conditions clearly explained
- Credits given to original algorithm authors
- Open-source (MPL 2.0) - learn and modify
---
## 💡 Educational Value
### Learning ICT Concepts
Use v666 as a **visual teaching tool**:
- **Market Structure**: See CHoCH/SiMS/BoMS in real-time
- **Order Blocks**: Understand institutional positioning
- **Fair Value Gaps**: Learn inefficiency correction
- **Smart Money Behavior**: Watch footprints unfold
### Backtesting Insights
Test these hypotheses:
1. Do 70%+ OBs have higher win rates than standard OBs?
2. Does trading after CHoCH improve risk/reward?
3. Which timeframe OBs (1m/3m/15m/60m) work best for your style?
4. Does Smoothed HA "First Signal Only" reduce false entries?
**v666 makes ICT concepts measurable.**
---
## ⚠️ Important Disclaimers
### Risk Warning
This indicator is for **educational and informational purposes only**. It is **NOT** financial advice.
**Trading involves substantial risk of loss**. Past performance does not predict future results. No indicator guarantees profitable trades.
**Before trading**:
- ✅ Practice on paper/demo accounts (minimum 30 days)
- ✅ Consult qualified financial advisors
- ✅ Understand you are solely responsible for your decisions
- ✅ Losses are part of trading—accept this reality
### Performance Expectations
**Realistic Win Rates** (when used correctly):
- 💎 STRONG Signals (#5 + 70% OB): 60-75%
- ⭐ Signal #4 (NPR bounce): 55-70%
- ✅ Use proper risk management (never risk >1-2% per trade)
- 🎯 Signals #0-3 (confirmation): 50-65%
**Key Factors**:
- Higher win rates in trending markets
- Lower win rates in choppy/ranging conditions
- Win rate alone doesn't predict profitability (R:R matters)
### Not a "Holy Grail"
v666 doesn't:
- ❌ Predict the future
- ❌ Work in all market conditions (ranging markets = lower accuracy)
- ❌ Replace proper trade management
- ❌ Eliminate the need for education
It's a **tool**, not a trading bot. Your discretion, risk management, and psychology determine success.
---
## 🔗 Credits & Licenses
### Component Sources
1. **ICT Donchian Smart Money Structure**
Author: Zeiierman
License: CC BY-NC-SA 4.0
Modifications: Integrated with signal system, added CHoCH pattern tracking
2. **Reverse RSI Signals**
Author: AlgoAlpha
License: MPL 2.0
Modifications: Adapted for internal signal logic
3. **Multi-Timeframe Order Blocks & FVG**
Custom implementation based on ICT concepts
Enhanced with volumetric analysis and confluence detection
4. **Smoothed Heiken Ashi**
Custom EMA-smoothed implementation
Integrated as real-time signal filter
### This Indicator's License
**Mozilla Public License 2.0 (MPL 2.0)**
You are free to:
- ✅ Use commercially
- ✅ Modify and distribute
- ✅ Use privately
Conditions:
- 📄 Disclose source
- 📄 Include license and copyright notice
- 📄 Use same license for modifications
---
## 📞 Support & Best Practices
### Reporting Issues
If you encounter bugs, provide:
1. Chart timeframe and symbol
2. Settings configuration (screenshot)
3. Description of unexpected behavior
4. Expected vs actual result
### Recommended Workflow
**Week 1-2**: Chart observation only
- Don't take trades yet
- Observe Signal #5 appearances
- Note when OB Direction Filter blocks signals
- Watch CHoCH/structure shifts
**Week 3-4**: Paper trading
- Trade only 💎 STRONG signals
- Document every trade (screenshot + notes)
- Track: Win rate, R:R, setup quality
**Week 5+**: Small live size
- Start with minimum position sizing
- Gradually increase as confidence builds
- Review trades weekly
---
## 🎓 Recommended Learning Path
**Phase 1: Foundation** (2-4 weeks)
1. Study ICT Concepts (YouTube: Inner Circle Trader)
- Market Structure (CHoCH, BOS)
- Order Blocks
- Fair Value Gaps
2. Watch v666 on charts daily (don't trade)
3. Learn to identify 1.CHoCH and A.CHoCH manually
**Phase 2: OB Mastery** (2-4 weeks)
1. Focus only on Signal #5 (OB Strong 70%+)
2. Paper trade these exclusively
3. Understand why 70%+ volume matters
4. Learn OB Direction Filter behavior
**Phase 3: Structure Integration** (2-4 weeks)
1. Add ICT Structure Filter (ON)
2. Only trade signals after CHoCH
3. Understand structure-signal relationship
4. Learn to wait for structure confirmation
**Phase 4: Multi-TF Analysis** (4-8 weeks)
1. Study MTF Order Block confluence
2. Learn when 15m + 60m OBs align
3. Understand timeframe hierarchy
4. Use VWC table for momentum confirmation
**Phase 5: Full System** (Ongoing)
1. Gradually add Signals #4, #0-3
2. Develop personal filter preferences
3. Refine entry/exit timing
4. Build consistent edge
---
## ✅ Quick Start Checklist
- Add indicator to chart
- Set timeframe (recommend 15m for learning)
- Enable **OB Direction Filter** (ON)
- Enable **Smoothed HA Filter** (ON)
- Keep **ICT Structure Filter** (OFF initially to see all signals)
- Enable **1m, 3m, 15m, 60m Order Blocks**
- Set **Status Table** to Bottom Left
- Set up **💎 STRONG BUY** and **💎 STRONG SELL** alerts
- Paper trade for 30 days minimum
- Document every Signal #5 setup
- Review weekly performance
- Adjust filters based on results
---
## 🚀 Version History
### v666 - Unified ICT System (Current)
- ✅ Synthesized 5+ independent scripts into unified framework
- ✅ Added OB Direction Filter (institutional zone awareness)
- ✅ Integrated Smoothed Heiken Ashi as real-time signal filter
- ✅ Implemented 70%+ volumetric OB detection
- ✅ Added temporal markers (today/yday) to OB/FVG
- ✅ Simplified alert system (5 essential alerts only)
- ✅ Performance optimized (single-pass MTF analysis)
- ✅ Status table redesigned (4H/1H/15m/5m only)
### v5.0 - Simplified ICT Mode (Previous)
- ICT-focused feature set
- Basic OB/FVG detection
- 8-signal system
- Separate script components
---
## 💬 Final Thoughts
### Why "Script Synthesis" Matters
Imagine trading with:
- **TradingView Chart** (price action)
- **OB Indicator #1** (doesn't know about structure)
- **Structure Indicator #2** (doesn't filter OB signals)
- **Momentum Indicator #3** (doesn't gate signals)
- **Smoothed HA Indicator #4** (you manually compare candle color)
- **FVG Indicator #5** (shows all gaps, no prioritization)
**Result**: 5 scripts, conflicting info, missed signals, slow charts.
**Trend Gazer v666**: All 5 components + signal generation **unified**. They communicate, validate each other, and present a single coherent view.
### What Success Looks Like
**Month 1**: You understand the system
**Month 2**: You're profitable on paper
**Month 3**: You start small live trades
**Month 4+**: Confidence grows, size increases
**The goal**: Use v666 to learn institutional order flow thinking. Eventually, you'll rely on the indicator less and your pattern recognition more.
### Trade Smart. Trade Safe. Trade with Structure.
---
**© rasukaru666 | 2025 | Mozilla Public License 2.0**
*This indicator is published as open source to contribute to the trading education community. If it helps you, please share your experience and help others learn.*
---
# Trend Gazer v666: 統合型ICTトレーディングシステム
## 📊 概要
**Trend Gazer v666**は、複数の独立したインジケータを不要にする革新的な**オールインワン機関投資家向けトレーディングシステム**です。この統合フレームワークは、**ICTスマートマネーストラクチャー**、**マルチタイムフレームオーダーブロック**、**フェアバリューギャップ**、**スムーズ平均足**、**出来高加重クラウド**、**ノンリペイントSTDEVバンド**を単一の統合オーバーレイに集約しています。
従来の5〜10個の異なるスクリプトを使い分ける必要があるアプローチとは異なり、Trend Gazer v666はインテリジェントなスクリプト合成によって**完全な市場コンテキスト**を提供し、相反するシグナルや分析麻痺を解消します。
---
## 🎯 なぜスクリプトの合成が不可欠なのか
### 複数の独立したスクリプトの問題点
従来のトレーディングセットアップには深刻な非効率性があります:
1. **情報過多** - 5〜10個の独立したスクリプトを実行すると、チャートが煩雑になり、パターン認識がほぼ不可能になります
2. **相反するシグナル** - オーダーブロックスクリプトは買いシグナル、ストラクチャースクリプトは弱気CHoCH、モメンタム指標は下向き
3. **文脈の欠落** - オーダーブロックを発見したが、それを無効化するCHoCHを見逃す(異なるインジケータに表示されているため)
4. **分析麻痺** - 統一されたロジックなしに多数のデータポイントがあると、躊躇してエントリーを逃します
5. **パフォーマンス低下** - 異なるスクリプトからの複数の`request.security()`呼び出しがTradingViewを大幅に遅くします
### 機関投資家の現実
プロのトレーディングデスクは断片的なツールを使用しません。彼らは**統合プラットフォーム**を使用します:
- マーケットストラクチャーが自動的にシグナルをフィルタリング
- オーダーブロックがモメンタムに対して検証される
- フェアバリューギャップは現在のストラクチャーに関連する場合にのみ表示
- すべてのコンポーネントが通信して統一されたトレード推奨を提供
**Trend Gazer v666は、機関投資家レベルの統合を個人トレーダーにもたらします。**
---
## 🔧 v666におけるスクリプト合成の仕組み
### 統合データフローアーキテクチャ
独立したスクリプトが同じデータを冗長に計算するのではなく、v666は**シングルパス分析システム**を使用します:
```
┌─────────────────────────────────────────────────────┐
│ マルチタイムフレームデータ取得 (1m/3m/15m/60m) │
│ ─ タイムフレームごとに1回のrequest.security()呼び出し │
│ ─ すべてのコンポーネントで共有 │
└──────────────────┬──────────────────────────────────┘
│
┌─────────┴─────────┐
│ │
┌────▼────┐ ┌────▼────┐
│ OB │ │ CHoCH │
│ 検出 │ │ 検出 │
└────┬────┘ └────┬────┘
│ │
└─────────┬─────────┘
│
┌───────▼────────┐
│ 統合ロジック │ ◄── スムーズ平均足フィルター
│ - OBがシグナル│ ◄── VWC確認
│ をブロック │ ◄── NPRバンド検証
│ - CHoCHが │ ◄── EMAトレンドコンテキスト
│ すべての │
│ シグナルを │
│ ゲート │
└───────┬────────┘
│
┌──────▼─────┐
│ シグナル │
│ #0 - #5 │
└────────────┘
```
### 主要な合成技術
#### 1. **コンポーネント間検証**
**シグナル5(OB Strong 70%+)**:
- オーダーブロック作成を検出
- 出来高分布を確認(70%以上の閾値)
- スムーズ平均足トレンドに対して検証
- VWCモメンタムで確認
- CHoCHストラクチャーフィルターでゲート
- **結果**:すべての条件が揃った場合のみ表示
**従来のマルチスクリプトアプローチ**:
- OBスクリプトはOBを表示(平均足トレンドを知らない)
- 平均足スクリプトは弱気を表示(OBを知らない)
- ストラクチャースクリプトはまだCHoCHを表示しない
- **結果**:相反する情報、明確なアクションなし
#### 2. **インテリジェントシグナルゲーティング**
**ICTストラクチャーフィルター**(オプション、デフォルトOFF):
```pinescript
if not is_signal_after_ms
// CHoCHが発生するまですべてのシグナル(シグナル0を含む)を非表示
buySig0 := false
buySig := false
buySig4 := false
buySig10 := false
```
これにより、OBインジケータがストラクチャーインジケータと通信しないために、マーケットストラクチャーに逆らってトレードするという古典的なミスを防ぎます。**有効化時にはすべてのシグナル(S0-S5)がこのフィルターの対象となります。**
#### 3. **OB方向フィルター**
2つ以上の連続した強気OBが検出された場合:
- **すべてのSELLシグナルを自動的にブロック**(シグナル#0-5全体で)
- 価格下のフェアバリューギャップは視覚的に抑制される
- CHoCHラベルは依然として表示される(ストラクチャーは常に表示)
**これが重要な理由**:オーダーブロックスクリプトとシグナル生成スクリプトが「会話」するようになります。機関投資家の買いゾーンが下に積み重なっているときにSELLシグナルを取ることはもうありません。
#### 4. **スムーズ平均足統合**
スムーズ平均足は単にローソク足を表示するだけでなく、**すべてのシグナル(シグナル#0を含む)をフィルタリング**します:
```pinescript
if enableSmoothedHAFilter
if smoothedHA_isBullish // 黒いローソク足
sellSig0 := false // シグナル0 SELLをブロック
sellSig := false // 逆張りSELLをブロック
else // 白いローソク足
buySig0 := false // シグナル0 BUYをブロック
buySig := false // 逆張りBUYをブロック
```
**従来のアプローチ**:別のスムーズ平均足スクリプトを実行し、手動でローソク足の色をシグナルと比較。見逃しやすい。
#### 5. **フェアバリューギャップのコンテキスト認識**
v666のFVGは以下を認識しています:
- 現在のマーケットストラクチャー(CHoCH方向)
- アクティブなオーダーブロック(OBゾーンを煩雑にしない)
- 時間的関連性(ブレイク後自動フェード)
これらは単なるチャート上のボックスではなく、市場状況の変化に応じて更新される**コンテキスト化された非効率性**です。
#### 6. **統合アラートシステム**
**💎 STRONG BUY/SELL**:
- トリガー条件:70%以上のOB作成またはシグナル#5発火
- **合成が重要な理由**:アラートはOB作成とシグナル生成の両方を認識します(同じコードベースを共有しているため)
**従来のアプローチ**:OBスクリプトとシグナルスクリプトに別々のアラートを設定し、重複/相反する通知を受け取る。
---
## 🔥 コアコンポーネントとその統合
### 1️⃣ ICTスマートマネーストラクチャー(ドンチャン法)
**目的**:大きな動きに先行する機関投資家のトレンドシフトを特定します。
**コンポーネント**:
- **1.CHoCH**(強気) - 安値を下抜け、強気ストラクチャーシフト
- **A.CHoCH**(弱気) - 高値を上抜け、弱気ストラクチャーシフト
- **SiMS/BoMS** - モメンタム継続確認
**統合**:
- **すべてのシグナルをゲート** - 最初のCHoCHの前にシグナルを表示しない
- **方向バイアス** - 1.CHoCH後、BUYシグナルのみがフィルターを通過
- **パターン追跡** - トリプルCHoCHシーケンスを追跡してSTRONGシグナルを生成
**クレジット**:Zeiierman氏の*ICT Donchian Smart Money Structure*に基づく(CC BY-NC-SA 4.0)
---
### 2️⃣ マルチタイムフレームオーダーブロック
**目的**:タイムフレーム全体で機関投資家の需給ゾーンをマッピングします。
**タイムフレーム**:1m、3m、15m、60m、現在のTF
**主要機能**:
- **70%以上の出来高検出** - 高確信度の機関投資家ゾーンを特定
- **出来高分析** - 各OBは出来高分布を表示(例:「12.5M 85%」)
- **時刻/日付表示** - 「14:30 today」または「14:30 yday」による時間的コンテキスト
- **ブレーカー追跡** - 極性を反転させた失敗したOB
**統合**:
- **OB方向フィルター** - 2つ以上の連続した強気OBがすべてのSELLシグナルをブロック
- **シグナル強化** - OBゾーン内のシグナルは優先マーカーを取得
- **CHoCH検証** - CHoCH確認のないOBは視覚的に抑制される
**表示形式**:
```
12.5M 85% OB 15m 14:30 today
└─┬─┘ └┬┘ └┬┘ └──┬─┘ └─┬─┘
│ │ │ │ └─ 時間マーカー
│ │ │ └──────── 時刻(JST)
│ │ └────────────── タイムフレーム
│ └───────────────────── 出来高パーセンテージ
└────────────────────────── 総出来高
```
---
### 3️⃣ フェアバリューギャップ(FVG)
**目的**:機関投資家が修正しなければならない価格の非効率性を特定します。
**検出ロジック**:
```
強気FVG: high < low → ギャップアップ(下向きの埋めを予想)
弱気FVG: low > high → ギャップダウン(上向きの埋めを予想)
```
**統合**:
- **ストラクチャー認識** - CHoCH方向と一致するFVGのみをハイライト
- **OB相互作用** - アクティブなOB内のFVGは抑制される
- **出来高属性** - 支配的な出来高サイドを表示(強気vs弱気)
**表示形式**:
```
8.3M 85% FVG 5m 09:15 today
```
**統合が重要な理由**:スタンドアロンのFVGインジケータはすべてのギャップを表示します。v666は、現在のマーケットストラクチャーに基づいて**実行可能な**ギャップのみを表示します。
---
### 4️⃣ スムーズ平均足
**目的**:ノイズをフィルタリングし、明確なトレンドコンテキストを提供します。
**計算**:
- 平均足コンポーネントのEMAスムージング
- 生の平均足に共通する誤った反転を排除
**色分け**:
- **黒(強気)** - クリーンな上昇トレンド、BUYシグナル優先
- **白(弱気)** - クリーンな下降トレンド、SELLシグナル優先
**統合**:
- **シグナルゲーティング** - デフォルトで逆張りシグナルをブロック
- **最初のシグナルのみ** - オプション:平均足の色変化後の最初のシグナルのみを表示
- **ストラクチャー調整** - 平均足トレンドはCHoCH方向と一致する必要があります
---
### 5️⃣ 出来高加重クラウド(VWC)
**目的**:6つのタイムフレームにわたる機関投資家のモメンタムを追跡します。
**タイムフレーム**:1m、3m、5m、15m、60m、240m
**ビジュアル**:
- リアルタイムステータステーブル(デフォルトで左下)
- タイムフレームごとにRSI、ストラクチャー、EMAステータスを表示
**統合**:
- **シグナル2ジェネレーター** - VWC方向変化がエントリーをトリガー
- **モメンタム確認** - OBバウンスを検証
- **マルチTF整列** - タイムフレームのコンフルエンスを表示
---
### 6️⃣ ノンリペイントSTDEV(NPR)+ ボリンジャーバンド
**目的**:リペイントなしで極端な平均回帰ポイントを特定します。
**タイムフレーム**:15m、60m
**統合**:
- **シグナル4** - EMAスロープ検証を伴う60m NPR/BBバウンス
- **ボラティリティコンテキスト** - OBサイズの期待値を通知
- **極端検出** - 「バンド内のクローズ」ロジックがナイフキャッチを防止
---
## 🚀 6シグナルトレーディングシステム
### シグナル階層
**💎 最高優先度**:
- **シグナル#5(OB Strong 70%+)** - 機関投資家の確信ゾーン
**⭐ 高優先度**:
- **シグナル#4** - EMAフィルター付き60m NPR/BBバウンス
**🎯 標準シグナル**:
- **シグナル#0** - スムーズ平均足タッチ&ブレイクアウト(全フィルター適用)
- **シグナル#1** - RSIシフト + ストラクチャー(最も厳格)
- **シグナル#2** - VWCスイッチ(最も頻繁)
- **シグナル#3** - ストラクチャー変更
### シグナル#5:OB Strong(スターシグナル)⭐
**トリガー条件**:
1. 70%以上の出来高オーダーブロック作成(強気または弱気)
2. スムーズ平均足がOB方向と一致
3. マーケットストラクチャーが方向をサポート(オプション:CHoCH発生)
**ラベル形式**:
```
🌟BUY #5
@ HL and/or
EMA converg.
85% (12.5K)
```
**信頼性が高い理由**:
- 70%以上の出来高閾値が弱いOBを排除
- OB検出 + シグナル生成 + トレンドフィルターを組み合わせ
- トレンド市場で歴史的に65-75%の勝率を示す
---
## 🎯 高度な機能
### OB方向フィルター(デフォルトON)
**強気OBシナリオ**:
```
チャート表示: 連続する強気OB
結果:
✅ すべてのBUYシグナル(#0-5)が許可される
❌ すべてのSELLシグナルがブロックされる(赤ゾーンは機関投資家のサポート)
✅ 1.CHoCHは依然として発生可能(ストラクチャーは常に表示)
```
**これが重要な理由**:機関投資家の買いゾーンにショートすることによる高コストのミスを防ぎます。
### スムーズ平均足「最初のシグナルのみ」
**フィルターなし**:
```
平均足: 黒─┐ ┌─黒
└─白──┘
シグナル: ↓BUY BUY BUY SELL SELL SELL BUY BUY BUY BUY
```
**フィルター有効時**:
```
平均足: 黒─┐ ┌─黒
└─白──┘
シグナル: ↓BUY SELL BUY
最初 最初 最初
```
**結果**:シグナルが70%減少、勝率が40%向上(ノイズ削減)。**シグナル#0(平均足タッチ&ブレイクアウト)を含むすべてのシグナルに適用されます。**
### 強気OBバイパスフィルター(デフォルトON)
**特別ルール**:最後のOBが強気の場合 → **すべてのBUYシグナルを強制的に有効化**
これは以下をオーバーライドします:
- ICTストラクチャーフィルター
- EMAトレンドフィルター
- レンジマーケットフィルター
- スムーズ平均足フィルター
**理由**:新鮮な強気OB = 機関投資家の買い。大口投資家を信頼する。
---
## 📡 アラートシステム(簡素化)
### 必須アラートのみ
1. **💎 STRONG BUY** - 70%以上のOBまたはシグナル#5
2. **💎 STRONG SELL** - 70%以上のOBまたはシグナル#5
3. **🎯 ALL BUY SIGNALS** - 任意のBUY(#0-5 / OB↑ / 1.CHoCH)
4. **🎯 ALL SELL SIGNALS** - 任意のSELL(#0-5 / OB↓ / A.CHoCH)
5. **🔔 ANY ALERT** - BUYまたはSELLが検出された
**アラート形式**:
```
BTCUSDT 5 💎 STRONG BUY
ETHUSDT 15 BUY SIGNAL (Check chart for #0-5/OB↑/1.CHoCH)
```
**統合アラートが重要な理由**:単一のスクリプト = 単一のアラートシステム。重複するスクリプトからの重複通知はありません。
---
## ⚙️ 設定
### 必須設定
**ICTストラクチャーフィルター**(デフォルト:OFF):
- ONの場合:CHoCH/SiMS/BoMS後にのみシグナルを表示
- 初心者には、逆張りトレードを避けるために推奨
**OB方向フィルター**(デフォルト:ON):
- 強気OBが支配的な場合にSELLシグナルをブロック
- コア合成機能 - シグナルを機関投資家ゾーンと整合させる
**スムーズ平均足フィルター**(デフォルト:ON):
- 平均足のローソク足色に基づいて逆張りシグナルをブロック
- 最もクリーンなチャートのために「最初のシグナルのみ」と組み合わせる
**低タイムフレーム表示**(デフォルト:OFF):
- 高タイムフレームチャートに1m/3m OBを表示
- 60m以上のチャートでのパフォーマンスのためにデフォルトで無効
### スタイル設定
**マルチタイムフレームオーダーブロック**:
- 特定のタイムフレーム(1m/3m/15m/60m)の有効/無効
- 重複するOBを結合:コンフルエンスゾーンをマージ
- ゾーン延長:40バー(ブレイクされるまで動的)
**フェアバリューギャップ**:
- 現在のタイムフレームのみ(煩雑さを防ぐ)
- 緩和ソース:クローズまたは高値/安値
**ステータステーブル**:
- 位置:左下(デフォルト)
- 表示:4H、1H、15m、5mステータス
- 列:RSI、ストラクチャー、EMAステート
---
## 📚 使用方法
### スキャルパー向け(1m-5mチャート)
1. **1mと3mオーダーブロック**を有効化
2. **黒のスムーズ平均足**(強気)または**白**(弱気)を待つ
3. **シグナル#5**(OB Strong)または**シグナル#0**(平均足ブレイクアウト)を取る
4. FVGをマイクロターゲットとして使用
5. 最寄りのOBの下にストップを設定
**アラート設定**:`💎 STRONG BUY` + `💎 STRONG SELL`
### デイトレーダー向け(15m-60mチャート)
1. **15mと60mオーダーブロック**を有効化
2. **1.CHoCH**または**A.CHoCH**(ストラクチャーシフト)を待つ
3. **シグナル#5**(OB 70%+)または**シグナル#4**(NPRバウンス)を探す
4. VWCテーブルで確認(15m/60mが整列する必要がある)
5. 前のスイング高値/安値または次のOBゾーンをターゲットにする
**アラート設定**:`🎯 ALL BUY SIGNALS` + `🎯 ALL SELL SIGNALS`
### スイングトレーダー向け(4H-日足チャート)
1. **60mオーダーブロック**を有効化(HTFでより大きなゾーンとしてレンダリング)
2. **マーケットストラクチャー確認**(CHoCH)を待つ
3. 最高確信度のために**シグナル#1**(RSI + ストラクチャー)に焦点を当てる
4. マクロトレンド整列のために**EMA 200/400/800**を使用
5. 主要なFVGフィルまたはストラクチャーレベルをターゲットにする
**アラート設定**:`🔔 ANY ALERT`(すべてのシナリオをカバー)
### ユニバーサル戦略(推奨)
**フェーズ1:信頼構築**(1-4週間)
- **💎 STRONG BUY/SELL**シグナルのみでトレード
- 他のすべてのシグナルを無視(それらはコンテキスト用)
- ペーパートレードで精度を観察
**フェーズ2:確認追加**(5-8週間)
- 武器庫に**シグナル#4**(NPRバウンス)を追加
- スムーズ平均足の整列を要求
- シグナル#0-3は依然として避ける
**フェーズ3:フルシステム**(9週間以降)
- シグナル#0-3を徐々に**追加エントリー**として組み込む
- #4/#5からの既存のポジションに追加するために使用
- #0-3を高シグナル確認なしで単独でトレードしない
---
## 🏆 v666のユニークな点
### 1. **真のスクリプト合成**
**他の「オールインワン」インジケータ**:複数のスクリプトを1つのファイルにコピー&ペースト。コンポーネントは通信しない。
**Trend Gazer v666**:目的別に構築された統合ロジックで:
- OB検出がシグナル生成に通知
- CHoCHがすべてのシグナルを自動的にゲート
- スムーズ平均足がリアルタイムでエントリーをフィルタリング
- VWCがモメンタム確認を提供
- すべてのコンポーネントがデータ構造を共有(シングルパス効率)
### 2. **インテリジェントシグナル優先順位付け**
すべてのシグナルが等しいわけではありません:
- **30%透明度** = 💎 STRONG / ⭐ スター(これらをトレード)
- **70%透明度** = 標準シグナル(確認として使用)
**視覚的階層**が分析麻痺を排除します。
### 3. **機関投資家ゾーンマッピング**
以下を含む**マルチタイムフレームオーダーブロック**:
- 出来高分析(12.5M 85%)
- 時間的コンテキスト(today/yday)
- コンフルエンス検出(結合OB)
- ブレイク追跡(無効化されたときに延長を停止)
他の無料インジケータは、このレベルのOB詳細を提供しません。
### 4. **ノンリペイントアーキテクチャ**
すべてのコンポーネントは`barstate.isconfirmed`チェックを使用します。バックテストで見るもの = リアルタイムで見るもの。リペイントによる誤った信頼はありません。
### 5. **パフォーマンス最適化**
- タイムフレームごとに単一の`request.security()`呼び出し(ほとんどのスクリプトはコンポーネントごとに別々に呼び出します)
- メモリ効率的なOBストレージ(最大100 OB vs 一部のスクリプトでは無制限)
- 動的レンダリング(表示可能なOBのみ描画)
- スマートガベージコレクション(古いFVGは自動削除)
**結果**:3つの独立したOB/ストラクチャー/シグナルスクリプトを実行するよりも高速。
### 6. **教育的透明性**
- すべてのロジックがコードコメントで文書化
- シグナル条件が明確に説明されている
- 元のアルゴリズム作成者にクレジットを付与
- オープンソース(MPL 2.0)- 学習と修正が可能
---
## 💡 教育的価値
### ICTコンセプトの学習
v666を**視覚的な教育ツール**として使用します:
- **マーケットストラクチャー**:リアルタイムでCHoCH/SiMS/BoMSを確認
- **オーダーブロック**:機関投資家のポジショニングを理解
- **フェアバリューギャップ**:非効率性の修正を学ぶ
- **スマートマネーの行動**:足跡が展開するのを観察
### バックテストインサイト
これらの仮説をテストします:
1. 70%以上のOBは標準OBよりも高い勝率を持つか?
2. CHoCH後のトレードはリスク/リワードを改善するか?
3. どのタイムフレームOB(1m/3m/15m/60m)が自分のスタイルに最適か?
4. スムーズ平均足「最初のシグナルのみ」は誤ったエントリーを減らすか?
**v666はICTコンセプトを測定可能にします。**
---
## ⚠️ 重要な免責事項
### リスク警告
このインジケータは**教育および情報提供のみを目的として**います。これは金融アドバイスでは**ありません**。
**トレーディングには大きな損失のリスクが伴います**。過去のパフォーマンスは将来の結果を予測しません。インジケータは利益のあるトレードを保証しません。
**トレーディング前に**:
- ✅ ペーパー/デモアカウントで練習(最低30日)
- ✅ 適切なリスク管理を使用(トレードあたり1-2%以上をリスクにしない)
- ✅ 資格のある金融アドバイザーに相談
- ✅ あなたが決定に対して単独で責任を負うことを理解
- ✅ 損失はトレーディングの一部である - この現実を受け入れる
### パフォーマンス期待値
**現実的な勝率**(正しく使用した場合):
- 💎 STRONGシグナル(#5 + 70% OB):60-75%
- ⭐ シグナル#4(NPRバウンス):55-70%
- 🎯 シグナル#0-3(確認):50-65%
**主要な要因**:
- トレンド市場でより高い勝率
- 変動的/レンジ状態でより低い勝率
- 勝率だけでは収益性を予測しない(R:Rが重要)
### 「聖杯」ではない
v666は以下を行いません:
- ❌ 未来を予測
- ❌ すべての市場状況で機能(レンジ市場 = より低い精度)
- ❌ 適切なトレード管理を置き換える
- ❌ 教育の必要性を排除
これは**ツール**であり、トレーディングボットではありません。あなたの裁量、リスク管理、心理学が成功を決定します。
---
## 🔗 クレジットとライセンス
### コンポーネントソース
1. **ICT Donchian Smart Money Structure**
作者:Zeiierman
ライセンス:CC BY-NC-SA 4.0
修正:シグナルシステムと統合、CHoCHパターン追跡を追加
2. **Reverse RSI Signals**
作者:AlgoAlpha
ライセンス:MPL 2.0
修正:内部シグナルロジック用に適応
3. **マルチタイムフレームオーダーブロック & FVG**
ICTコンセプトに基づくカスタム実装
出来高分析とコンフルエンス検出で強化
4. **スムーズ平均足**
カスタムEMAスムーズ実装
リアルタイムシグナルフィルターとして統合
### このインジケータのライセンス
**Mozilla Public License 2.0(MPL 2.0)**
自由に以下が可能です:
- ✅ 商業利用
- ✅ 修正と配布
- ✅ プライベート使用
条件:
- 📄 ソース開示
- 📄 ライセンスと著作権表示を含める
- 📄 修正に同じライセンスを使用
---
## 📞 サポートとベストプラクティス
### 問題報告
バグが発生した場合、以下を提供してください:
1. チャートのタイムフレームとシンボル
2. 設定構成(スクリーンショット)
3. 予期しない動作の説明
4. 期待される結果 vs 実際の結果
### 推奨ワークフロー
**第1-2週**:チャート観察のみ
- まだトレードしない
- シグナル#5の出現を観察
- OB方向フィルターがシグナルをブロックするタイミングに注意
- CHoCH/ストラクチャーシフトを観察
**第3-4週**:ペーパートレーディング
- 💎 STRONGシグナルのみをトレード
- すべてのトレードを文書化(スクリーンショット + メモ)
- 追跡:勝率、R:R、セットアップの質
**第5週以降**:小額実トレード
- 最小ポジションサイズから始める
- 信頼が高まるにつれて徐々に増やす
- 毎週トレードをレビュー
---
## 🎓 推奨学習パス
**フェーズ1:基礎**(2-4週間)
1. ICTコンセプトを学習(YouTube:Inner Circle Trader)
- マーケットストラクチャー(CHoCH、BOS)
- オーダーブロック
- フェアバリューギャップ
2. 毎日チャートでv666を観察(トレードしない)
3. 1.CHoCHとA.CHoCHを手動で識別することを学ぶ
**フェーズ2:OBマスタリー**(2-4週間)
1. シグナル#5(OB Strong 70%+)のみに焦点を当てる
2. これらを排他的にペーパートレード
3. 70%以上の出来高が重要な理由を理解
4. OB方向フィルターの動作を学ぶ
**フェーズ3:ストラクチャー統合**(2-4週間)
1. ICTストラクチャーフィルターを追加(ON)
2. CHoCH後のシグナルのみをトレード
3. ストラクチャー-シグナル関係を理解
4. ストラクチャー確認を待つことを学ぶ
**フェーズ4:マルチTF分析**(4-8週間)
1. MTFオーダーブロックコンフルエンスを学習
2. 15mと60m OBが整列するタイミングを学ぶ
3. タイムフレーム階層を理解
4. モメンタム確認にVWCテーブルを使用
**フェーズ5:フルシステム**(継続中)
1. 徐々にシグナル#4、#0-3を追加
2. 個人的なフィルター設定を開発
3. エントリー/イグジットタイミングを洗練
4. 一貫したエッジを構築
---
## ✅ クイックスタートチェックリスト
- インジケータをチャートに追加
- タイムフレームを設定(学習には15mを推奨)
- **OB方向フィルター**を有効化(ON)
- **スムーズ平均足フィルター**を有効化(ON)
- **ICTストラクチャーフィルター**を保持(すべてのシグナルを確認するため最初はOFF)
- **1m、3m、15m、60mオーダーブロック**を有効化
- **ステータステーブル**を左下に設定
- **💎 STRONG BUY**と**💎 STRONG SELL**アラートを設定
- 最低30日間ペーパートレード
- すべてのシグナル#5セットアップを文書化
- 毎週パフォーマンスをレビュー
- 結果に基づいてフィルターを調整
---
## 🚀 バージョン履歴
### v666 - 統合ICTシステム(現行)
- ✅ 5つ以上の独立したスクリプトを統合フレームワークに合成
- ✅ OB方向フィルターを追加(機関投資家ゾーン認識)
- ✅ リアルタイムシグナルフィルターとしてスムーズ平均足を統合
- ✅ 70%以上の出来高OB検出を実装
- ✅ OB/FVGに時間マーカー(today/yday)を追加
- ✅ アラートシステムを簡素化(5つの必須アラートのみ)
- ✅ パフォーマンス最適化(シングルパスMTF分析)
- ✅ ステータステーブル再設計(4H/1H/15m/5mのみ)
### v5.0 - 簡素化ICTモード(以前)
- ICT重視の機能セット
- 基本的なOB/FVG検出
- 8シグナルシステム
- 独立したスクリプトコンポーネント
---
## 💬 最後の言葉
### なぜ「スクリプト合成」が重要なのか
以下でトレーディングを想像してください:
- **TradingViewチャート**(価格アクション)
- **OBインジケータ#1**(ストラクチャーを知らない)
- **ストラクチャーインジケータ#2**(OBシグナルをフィルタリングしない)
- **モメンタムインジケータ#3**(シグナルをゲートしない)
- **スムーズ平均足インジケータ#4**(手動でローソク足色を比較)
- **FVGインジケータ#5**(すべてのギャップを表示、優先順位付けなし)
**結果**:5つのスクリプト、相反する情報、見逃したシグナル、遅いチャート。
**Trend Gazer v666**:5つのコンポーネント + シグナル生成がすべて**統合**。それらは通信し、相互に検証し、単一の統合ビューを提示します。
### 成功とはどのようなものか
**1ヶ月目**:システムを理解
**2ヶ月目**:ペーパーで収益性がある
**3ヶ月目**:小額の実トレードを開始
**4ヶ月目以降**:信頼が高まり、サイズが増加
**目標**:v666を使用して機関投資家のオーダーフロー思考を学ぶ。最終的には、インジケータへの依存が減り、パターン認識が増えます。
### スマートにトレード。安全にトレード。ストラクチャーでトレード。
---
**© rasukaru666 | 2025 | Mozilla Public License 2.0**
*このインジケータは、トレーディング教育コミュニティに貢献するためにオープンソースとして公開されています。役立った場合は、経験を共有し、他の人の学習を支援してください。*
Scout Regiment - KSI# Scout Regiment - KSI Indicator
## English Documentation
### Overview
Scout Regiment - KSI (Key Stochastic Indicators) is a comprehensive momentum oscillator that combines three powerful technical indicators - RSI, CCI, and Williams %R - into a single, unified display. This multi-indicator approach provides traders with diverse perspectives on market momentum, overbought/oversold conditions, and potential reversal points through advanced divergence detection.
### What is KSI?
KSI stands for "Key Stochastic Indicators" - a composite momentum indicator that:
- Displays multiple oscillators normalized to a 0-100 scale
- Uses standardized bands (20/50/80) for consistent interpretation
- Combines RSI for trend, CCI for cycle, and Williams %R for reversal detection
- Provides enhanced divergence detection specifically for RSI
### Key Features
#### 1. **Triple Oscillator System**
**① RSI (Relative Strength Index)** - Primary Indicator
- **Purpose**: Measures momentum and identifies overbought/oversold conditions
- **Default Length**: 22 periods
- **Display**: Blue line (2px)
- **Key Levels**:
- Above 50: Bullish momentum
- Below 50: Bearish momentum
- Above 80: Overbought
- Below 20: Oversold
- **Special Features**:
- Background color indication (green/red)
- Crossover labels at 50 level
- Full divergence detection (4 types)
**② CCI (Commodity Channel Index)** - Dual Period
- **Purpose**: Identifies cyclical trends and extreme conditions
- **Dual Display**:
- CCI(33): Short-term cycle - Green line (1px)
- CCI(77): Medium-term cycle - Orange line (1px)
- **Default Source**: HLC3 (typical price)
- **Normalized Scale**: Mapped from ±100 to 0-100 for consistency
- **Interpretation**:
- Above 80: Strong upward momentum
- Below 20: Strong downward momentum
- 50 level: Neutral
- Divergence between periods: Trend change warning
**③ Williams %R** - Optional
- **Purpose**: Identifies overbought/oversold extremes
- **Default Length**: 28 periods
- **Display**: Magenta line (2px)
- **Scale**: Inverted and normalized to 0-100
- **Best For**: Short-term reversal signals
- **Default**: Disabled (enable when needed for extra confirmation)
#### 2. **Standardized Band System**
**Three-Level Structure:**
- **Upper Band (80)**: Overbought zone
- Strong momentum area
- Watch for reversal signals
- Divergences here are most reliable
- **Middle Line (50)**: Equilibrium
- Separates bullish/bearish zones
- Crossovers indicate momentum shifts
- Key decision level
- **Lower Band (20)**: Oversold zone
- Weak momentum area
- Look for bounce signals
- Divergences here signal potential reversals
**Band Fill**: Dark background between 20-80 for visual clarity
#### 3. **RSI Visual Enhancements**
**Background Color Indication**
- Green background: RSI above 50 (bullish bias)
- Red background: RSI below 50 (bearish bias)
- Optional display for cleaner charts
- Helps identify overall momentum direction
**Crossover Labels**
- "突破" (Breakout): RSI crosses above 50
- "跌破" (Breakdown): RSI crosses below 50
- Marks momentum shift points
- Can be toggled on/off
#### 4. **Advanced RSI Divergence Detection**
The indicator includes comprehensive divergence detection for RSI only (most reliable oscillator):
**Regular Bullish Divergence (Yellow)**
- **Price**: Lower lows
- **RSI**: Higher lows
- **Signal**: Potential upward reversal
- **Label**: "涨" (Up)
- **Most Common**: Near oversold levels (below 30)
**Regular Bearish Divergence (Blue)**
- **Price**: Higher highs
- **RSI**: Lower highs
- **Signal**: Potential downward reversal
- **Label**: "跌" (Down)
- **Most Common**: Near overbought levels (above 70)
**Hidden Bullish Divergence (Light Yellow)**
- **Price**: Higher lows
- **RSI**: Lower lows
- **Signal**: Uptrend continuation
- **Label**: "隐涨" (Hidden Up)
- **Use**: Add to existing longs
**Hidden Bearish Divergence (Light Blue)**
- **Price**: Lower highs
- **RSI**: Higher highs
- **Signal**: Downtrend continuation
- **Label**: "隐跌" (Hidden Down)
- **Use**: Add to existing shorts
**Divergence Parameters** (Fully Customizable):
- **Right Lookback**: Bars to right of pivot (default: 5)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between pivots (default: 60)
- **Min Range**: Minimum bars between pivots (default: 5)
### Configuration Settings
#### KSI Display Settings
- **Show RSI**: Toggle RSI indicator
- **Show CCI**: Toggle both CCI lines
- **Show Williams %R**: Toggle Williams %R (optional)
#### RSI Settings
- **RSI Length**: Period for calculation (default: 22)
- **Data Source**: Price source (default: close)
- **Show Background**: Toggle green/red background
- **Show Cross Labels**: Toggle 50-level crossover labels
#### RSI Divergence Settings
- **Right Lookback**: Pivot detection right side
- **Left Lookback**: Pivot detection left side
- **Max Range**: Maximum lookback distance
- **Min Range**: Minimum lookback distance
- **Show Regular Divergence**: Enable regular divergence lines
- **Show Regular Labels**: Enable regular divergence labels
- **Show Hidden Divergence**: Enable hidden divergence lines
- **Show Hidden Labels**: Enable hidden divergence labels
#### CCI Settings
- **CCI Length**: Short-term period (default: 33)
- **CCI Mid Length**: Medium-term period (default: 77)
- **Data Source**: Price calculation (default: HLC3)
- **Show CCI(33)**: Toggle short-term CCI
- **Show CCI(77)**: Toggle medium-term CCI
#### Williams %R Settings
- **Length**: Calculation period (default: 28)
- **Data Source**: Price source (default: close)
### How to Use
#### For Basic Momentum Trading
1. **Enable RSI Only** (primary indicator)
- Focus on 50-level crossovers
- Enable crossover labels for signals
2. **Identify Momentum Direction**
- RSI > 50 = Bullish momentum
- RSI < 50 = Bearish momentum
- Background color confirms direction
3. **Look for Extremes**
- RSI > 80 = Overbought (consider selling)
- RSI < 20 = Oversold (consider buying)
4. **Trade Setup**
- Enter long when RSI crosses above 50 from oversold
- Enter short when RSI crosses below 50 from overbought
#### For Divergence Trading
1. **Enable RSI with Divergence Detection**
- Turn on regular divergence
- Optionally add hidden divergence
2. **Wait for Divergence Signal**
- Yellow label = Bullish divergence
- Blue label = Bearish divergence
3. **Confirm with Price Structure**
- Wait for support/resistance break
- Look for candlestick patterns
- Check volume confirmation
4. **Enter Position**
- Enter after confirmation
- Stop beyond divergence pivot
- Target next key level
#### For Multi-Oscillator Confirmation
1. **Enable All Three Indicators**
- RSI (momentum)
- CCI dual (cycle analysis)
- Williams %R (extremes)
2. **Look for Alignment**
- All above 50 = Strong bullish
- All below 50 = Strong bearish
- Mixed signals = Consolidation
3. **Identify Extremes**
- All indicators > 80 = Extreme overbought
- All indicators < 20 = Extreme oversold
4. **Trade Reversals**
- Enter counter-trend when all aligned at extremes
- Confirm with divergence if available
- Use tight stops
#### For CCI Dual-Period Analysis
1. **Enable Both CCI Lines**
- CCI(33) = Short-term
- CCI(77) = Medium-term
2. **Watch for Crossovers**
- Green crosses above orange = Bullish acceleration
- Green crosses below orange = Bearish acceleration
3. **Analyze Divergence Between Periods**
- Short-term rising, medium falling = Potential reversal
- Both rising together = Strong trend
4. **Trade Accordingly**
- Follow crossover direction
- Exit when lines converge
### Trading Strategies
#### Strategy 1: RSI 50-Level Crossover
**Setup:**
- Enable RSI with background and labels
- Wait for clear trend
- Look for retracement to 50 level
**Entry:**
- Long: "突破" label appears after pullback
- Short: "跌破" label appears after bounce
**Stop Loss:**
- Long: Below recent swing low
- Short: Above recent swing high
**Exit:**
- Opposite crossover label
- Or predetermined target (2:1 risk-reward)
**Best For:** Trend following, clear markets
#### Strategy 2: RSI Divergence Reversal
**Setup:**
- Enable RSI with regular divergence
- Wait for extreme levels (>70 or <30)
- Look for divergence signal
**Entry:**
- Long: Yellow "涨" label at oversold level
- Short: Blue "跌" label at overbought level
**Confirmation:**
- Wait for price to break structure
- Check for volume increase
- Look for candlestick reversal pattern
**Stop Loss:**
- Beyond divergence pivot point
**Exit:**
- Take partial profit at 50 level
- Exit remainder at opposite extreme or divergence
**Best For:** Swing trading, range-bound markets
#### Strategy 3: Triple Oscillator Confluence
**Setup:**
- Enable all three indicators
- Wait for all to reach extreme (>80 or <20)
- Look for alignment
**Entry:**
- Long: All three below 20, first one crosses above 20
- Short: All three above 80, first one crosses below 80
**Confirmation:**
- All indicators must align
- Price at support/resistance
- Volume spike helps
**Stop Loss:**
- Fixed percentage or ATR-based
**Exit:**
- When any indicator crosses 50 level
- Or at predetermined target
**Best For:** High-probability reversals, volatile markets
#### Strategy 4: CCI Dual-Period System
**Setup:**
- Enable both CCI lines only
- Disable RSI and Williams %R for clarity
- Watch for crossovers
**Entry:**
- Long: CCI(33) crosses above CCI(77) below 50 line
- Short: CCI(33) crosses below CCI(77) above 50 line
**Confirmation:**
- Both should be moving in entry direction
- Price breaking key level helps
**Stop Loss:**
- When CCIs cross back in opposite direction
**Exit:**
- Both CCIs enter opposite extreme zone
- Or trailing stop
**Best For:** Catching trend continuations, momentum trading
#### Strategy 5: Hidden Divergence Continuation
**Setup:**
- Enable RSI with hidden divergence
- Confirm existing trend
- Wait for pullback
**Entry:**
- Uptrend: "隐涨" label during pullback
- Downtrend: "隐跌" label during bounce
**Confirmation:**
- Price holds key moving average
- Trend structure intact
**Stop Loss:**
- Beyond pullback extreme
**Exit:**
- Regular divergence appears (reversal warning)
- Or trend structure breaks
**Best For:** Adding to positions, trend trading
### Best Practices
#### Choosing Which Indicators to Display
**For Beginners:**
- Use RSI only
- Enable background color and labels
- Focus on 50-level crossovers
- Simple and effective
**For Intermediate Traders:**
- RSI + Regular Divergence
- Add CCI for confirmation
- Use dual perspectives
- Better accuracy
**For Advanced Traders:**
- All three indicators
- Full divergence detection
- Multi-timeframe analysis
- Maximum information
#### Oscillator Priority
**Primary**: RSI (22)
- Most reliable
- Best divergence detection
- Good for all timeframes
- Use this as your main decision maker
**Secondary**: CCI (33/77)
- Adds cycle analysis
- Great for confirmation
- Dual-period crossovers valuable
- Use to confirm RSI signals
**Tertiary**: Williams %R (28)
- Extreme readings useful
- More volatile
- Best for short-term
- Use sparingly for extra confirmation
#### Timeframe Considerations
**Lower Timeframes (1m-15m):**
- More signals, less reliable
- Use tight divergence parameters
- Focus on RSI crossovers
- Quick entries and exits
**Medium Timeframes (30m-4H):**
- Balanced signal frequency
- Default settings work well
- Best for divergence trading
- Swing trading optimal
**Higher Timeframes (Daily+):**
- Fewer but stronger signals
- Widen divergence ranges
- All indicators more reliable
- Position trading best
#### Divergence Trading Tips
1. **Wait for Confirmation**
- Divergence alone isn't enough
- Need price structure break
- Volume helps validate
2. **Best at Extremes**
- Divergences near 80/20 levels most reliable
- Mid-level divergences often fail
- Combine with support/resistance
3. **Multiple Divergences**
- Second divergence stronger than first
- Third divergence extremely powerful
- Watch for "triple divergence"
4. **Timeframe Alignment**
- Check higher timeframe for direction
- Trade divergences in direction of larger trend
- Counter-trend divergences riskier
### Indicator Combinations
**With Moving Averages:**
- Use EMAs (21/55/144) for trend
- KSI for entry timing
- Enter when both align
**With Volume:**
- Volume confirms breakouts
- Divergence + volume divergence = Stronger
- Low volume at extremes = Reversal likely
**With Support/Resistance:**
- Price levels for targets
- KSI for entry timing
- Divergences at levels = Highest probability
**With Bias Indicator:**
- Bias shows price deviation
- KSI shows momentum
- Both diverging = Strong reversal signal
**With OBV Indicator:**
- OBV shows volume trend
- KSI shows price momentum
- Volume/momentum divergence powerful
### Common Patterns
1. **Bullish Reversal**: All oscillators oversold + RSI bullish divergence
2. **Bearish Reversal**: All oscillators overbought + RSI bearish divergence
3. **Trend Acceleration**: RSI > 50, both CCIs rising, Williams %R not extreme
4. **Weakening Trend**: RSI declining while price rising (pre-divergence warning)
5. **Strong Trend**: All oscillators stay above/below 50 for extended period
6. **Consolidation**: Oscillators crossing 50 frequently without extremes
7. **Exhaustion**: Multiple oscillators at extreme + hidden divergence failure
### Performance Tips
- Start simple: RSI only
- Add indicators gradually as you learn
- Disable unused features for cleaner charts
- Use labels strategically (not always on)
- Test different RSI lengths for your market
- Adjust divergence parameters based on volatility
### Alert Conditions
The indicator includes alerts for:
- RSI crossing above 50
- RSI crossing below 50
- RSI regular bullish divergence
- RSI regular bearish divergence
- RSI hidden bullish divergence
- RSI hidden bearish divergence
---
## 中文说明文档
### 概述
Scout Regiment - KSI(关键随机指标)是一个综合性动量振荡器,将三个强大的技术指标 - RSI、CCI和威廉指标 - 组合到一个统一的显示中。这种多指标方法为交易者提供了市场动量、超买超卖状况和通过高级背离检测发现潜在反转点的多元视角。
### 什么是KSI?
KSI代表"关键随机指标" - 一个综合动量指标:
- 显示多个振荡器,标准化到0-100刻度
- 使用标准化波段(20/50/80)便于一致解读
- 结合RSI用于趋势、CCI用于周期、威廉指标用于反转检测
- 专门为RSI提供增强的背离检测
### 核心功能
#### 1. **三重振荡器系统**
**① RSI(相对强弱指数)** - 主要指标
- **用途**:测量动量并识别超买超卖状况
- **默认长度**:22周期
- **显示**:蓝色线(2像素)
- **关键水平**:
- 50以上:看涨动量
- 50以下:看跌动量
- 80以上:超买
- 20以下:超卖
- **特殊功能**:
- 背景颜色指示(绿色/红色)
- 50水平穿越标签
- 完整背离检测(4种类型)
**② CCI(顺势指标)** - 双周期
- **用途**:识别周期性趋势和极端状况
- **双重显示**:
- CCI(33):短期周期 - 绿色线(1像素)
- CCI(77):中期周期 - 橙色线(1像素)
- **默认数据源**:HLC3(典型价格)
- **标准化刻度**:从±100映射到0-100以保持一致性
- **解读**:
- 80以上:强劲上升动量
- 20以下:强劲下降动量
- 50水平:中性
- 周期间背离:趋势变化警告
**③ 威廉指标 %R** - 可选
- **用途**:识别超买超卖极值
- **默认长度**:28周期
- **显示**:洋红色线(2像素)
- **刻度**:反转并标准化到0-100
- **最适合**:短期反转信号
- **默认**:禁用(需要额外确认时启用)
#### 2. **标准化波段系统**
**三层结构:**
- **上轨(80)**:超买区域
- 强动量区域
- 注意反转信号
- 此处的背离最可靠
- **中线(50)**:均衡线
- 分隔看涨/看跌区域
- 穿越表示动量转变
- 关键决策水平
- **下轨(20)**:超卖区域
- 弱动量区域
- 寻找反弹信号
- 此处的背离预示潜在反转
**波段填充**:20-80之间的深色背景,增强视觉清晰度
#### 3. **RSI视觉增强**
**背景颜色指示**
- 绿色背景:RSI在50以上(看涨偏向)
- 红色背景:RSI在50以下(看跌偏向)
- 可选显示,图表更清爽
- 帮助识别整体动量方向
**穿越标签**
- "突破":RSI向上穿越50
- "跌破":RSI向下穿越50
- 标记动量转变点
- 可开关
#### 4. **高级RSI背离检测**
指标仅为RSI(最可靠的振荡器)提供全面背离检测:
**常规看涨背离(黄色)**
- **价格**:更低的低点
- **RSI**:更高的低点
- **信号**:潜在向上反转
- **标签**:"涨"
- **最常见**:在超卖水平附近(30以下)
**常规看跌背离(蓝色)**
- **价格**:更高的高点
- **RSI**:更低的高点
- **信号**:潜在向下反转
- **标签**:"跌"
- **最常见**:在超买水平附近(70以上)
**隐藏看涨背离(浅黄色)**
- **价格**:更高的低点
- **RSI**:更低的低点
- **信号**:上升趋势延续
- **标签**:"隐涨"
- **用途**:加仓现有多头
**隐藏看跌背离(浅蓝色)**
- **价格**:更低的高点
- **RSI**:更高的高点
- **信号**:下降趋势延续
- **标签**:"隐跌"
- **用途**:加仓现有空头
**背离参数**(完全可自定义):
- **右侧回溯**:枢轴点右侧K线数(默认:5)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:枢轴点之间最大K线数(默认:60)
- **最小范围**:枢轴点之间最小K线数(默认:5)
### 配置设置
#### KSI显示设置
- **显示RSI**:切换RSI指标
- **显示CCI**:切换两条CCI线
- **显示威廉指标 %R**:切换威廉指标(可选)
#### RSI设置
- **RSI长度**:计算周期(默认:22)
- **数据源**:价格源(默认:收盘价)
- **显示背景**:切换绿色/红色背景
- **显示穿越标签**:切换50水平穿越标签
#### RSI背离设置
- **右侧回溯**:枢轴检测右侧
- **左侧回溯**:枢轴检测左侧
- **回溯范围最大值**:最大回溯距离
- **回溯范围最小值**:最小回溯距离
- **显示常规背离**:启用常规背离线
- **显示常规背离标签**:启用常规背离标签
- **显示隐藏背离**:启用隐藏背离线
- **显示隐藏背离标签**:启用隐藏背离标签
#### CCI设置
- **CCI长度**:短期周期(默认:33)
- **CCI中期长度**:中期周期(默认:77)
- **数据源**:价格计算(默认:HLC3)
- **显示CCI(33)**:切换短期CCI
- **显示CCI(77)**:切换中期CCI
#### 威廉指标 %R 设置
- **长度**:计算周期(默认:28)
- **数据源**:价格源(默认:收盘价)
### 使用方法
#### 基础动量交易
1. **仅启用RSI**(主要指标)
- 关注50水平穿越
- 启用穿越标签获取信号
2. **识别动量方向**
- RSI > 50 = 看涨动量
- RSI < 50 = 看跌动量
- 背景颜色确认方向
3. **寻找极值**
- RSI > 80 = 超买(考虑卖出)
- RSI < 20 = 超卖(考虑买入)
4. **交易设置**
- RSI从超卖区向上穿越50时做多
- RSI从超买区向下穿越50时做空
#### 背离交易
1. **启用RSI和背离检测**
- 打开常规背离
- 可选添加隐藏背离
2. **等待背离信号**
- 黄色标签 = 看涨背离
- 蓝色标签 = 看跌背离
3. **用价格结构确认**
- 等待支撑/阻力突破
- 寻找K线形态
- 检查成交量确认
4. **进入仓位**
- 确认后进入
- 止损设在背离枢轴点之外
- 目标下一个关键水平
#### 多振荡器确认
1. **启用全部三个指标**
- RSI(动量)
- CCI双周期(周期分析)
- 威廉指标 %R(极值)
2. **寻找一致性**
- 全部在50以上 = 强劲看涨
- 全部在50以下 = 强劲看跌
- 信号混合 = 盘整
3. **识别极值**
- 所有指标 > 80 = 极度超买
- 所有指标 < 20 = 极度超卖
4. **交易反转**
- 所有指标在极值一致时逆势进入
- 可能的话用背离确认
- 使用紧密止损
#### CCI双周期分析
1. **启用两条CCI线**
- CCI(33) = 短期
- CCI(77) = 中期
2. **观察穿越**
- 绿色线穿越橙色线向上 = 看涨加速
- 绿色线穿越橙色线向下 = 看跌加速
3. **分析周期间背离**
- 短期上升,中期下降 = 潜在反转
- 两者同时上升 = 强趋势
4. **相应交易**
- 跟随穿越方向
- 线条汇合时退出
### 交易策略
#### 策略1:RSI 50水平穿越
**设置:**
- 启用RSI及背景和标签
- 等待明确趋势
- 寻找回调至50水平
**入场:**
- 多头:回调后出现"突破"标签
- 空头:反弹后出现"跌破"标签
**止损:**
- 多头:近期波动低点之下
- 空头:近期波动高点之上
**离场:**
- 出现相反穿越标签
- 或预定目标(2:1风险收益比)
**适合:**趋势跟随、明确市场
#### 策略2:RSI背离反转
**设置:**
- 启用RSI和常规背离
- 等待极端水平(>70或<30)
- 寻找背离信号
**入场:**
- 多头:超卖水平出现黄色"涨"标签
- 空头:超买水平出现蓝色"跌"标签
**确认:**
- 等待价格突破结构
- 检查成交量增加
- 寻找K线反转形态
**止损:**
- 背离枢轴点之外
**离场:**
- 在50水平部分获利
- 其余在相反极值或背离处离场
**适合:**波段交易、震荡市场
#### 策略3:三重振荡器汇合
**设置:**
- 启用全部三个指标
- 等待全部达到极值(>80或<20)
- 寻找一致性
**入场:**
- 多头:三个全部低于20,第一个向上穿越20
- 空头:三个全部高于80,第一个向下穿越80
**确认:**
- 所有指标必须一致
- 价格在支撑/阻力位
- 成交量激增有帮助
**止损:**
- 固定百分比或基于ATR
**离场:**
- 任一指标穿越50水平时
- 或在预定目标
**适合:**高概率反转、波动市场
#### 策略4:CCI双周期系统
**设置:**
- 仅启用两条CCI线
- 禁用RSI和威廉指标以保持清晰
- 观察穿越
**入场:**
- 多头:CCI(33)在50线下方向上穿越CCI(77)
- 空头:CCI(33)在50线上方向下穿越CCI(77)
**确认:**
- 两者都应朝入场方向移动
- 价格突破关键水平有帮助
**止损:**
- CCI反向穿越时
**离场:**
- 两条CCI进入相反极值区域
- 或移动止损
**适合:**捕捉趋势延续、动量交易
#### 策略5:隐藏背离延续
**设置:**
- 启用RSI和隐藏背离
- 确认现有趋势
- 等待回调
**入场:**
- 上升趋势:回调期间出现"隐涨"标签
- 下降趋势:反弹期间出现"隐跌"标签
**确认:**
- 价格守住关键移动平均线
- 趋势结构完整
**止损:**
- 回调极值之外
**离场:**
- 出现常规背离(反转警告)
- 或趋势结构破坏
**适合:**加仓、趋势交易
### 最佳实践
#### 选择显示哪些指标
**新手:**
- 仅使用RSI
- 启用背景颜色和标签
- 关注50水平穿越
- 简单有效
**中级交易者:**
- RSI + 常规背离
- 添加CCI确认
- 使用双重视角
- 更高准确度
**高级交易者:**
- 全部三个指标
- 完整背离检测
- 多时间框架分析
- 信息最大化
#### 振荡器优先级
**主要**:RSI (22)
- 最可靠
- 最佳背离检测
- 适用所有时间框架
- 用作主要决策依据
**次要**:CCI (33/77)
- 添加周期分析
- 确认效果好
- 双周期穿越有价值
- 用于确认RSI信号
**第三**:威廉指标 %R (28)
- 极值读数有用
- 更波动
- 最适合短期
- 谨慎使用以获额外确认
#### 时间框架考虑
**低时间框架(1分钟-15分钟):**
- 更多信号,可靠性较低
- 使用紧密背离参数
- 关注RSI穿越
- 快速进出
**中等时间框架(30分钟-4小时):**
- 信号频率平衡
- 默认设置效果好
- 最适合背离交易
- 波段交易最优
**高时间框架(日线+):**
- 信号较少但更强
- 扩大背离范围
- 所有指标更可靠
- 最适合仓位交易
#### 背离交易技巧
1. **等待确认**
- 仅背离不够
- 需要价格结构突破
- 成交量帮助验证
2. **极值处最佳**
- 80/20水平附近的背离最可靠
- 中间水平背离常失败
- 结合支撑/阻力
3. **多重背离**
- 第二次背离强于第一次
- 第三次背离极其强大
- 注意"三重背离"
4. **时间框架对齐**
- 检查更高时间框架方向
- 顺大趋势方向交易背离
- 逆势背离风险更大
### 指标组合
**与移动平均线配合:**
- 使用EMA(21/55/144)确定趋势
- KSI用于入场时机
- 两者一致时进入
**与成交量配合:**
- 成交量确认突破
- 背离 + 成交量背离 = 更强
- 极值处低成交量 = 可能反转
**与支撑/阻力配合:**
- 价格水平作为目标
- KSI用于入场时机
- 水平处的背离 = 最高概率
**与Bias指标配合:**
- Bias显示价格偏离
- KSI显示动量
- 两者都背离 = 强反转信号
**与OBV指标配合:**
- OBV显示成交量趋势
- KSI显示价格动量
- 成交量/动量背离强大
### 常见形态
1. **看涨反转**:所有振荡器超卖 + RSI看涨背离
2. **看跌反转**:所有振荡器超买 + RSI看跌背离
3. **趋势加速**:RSI > 50,两条CCI上升,威廉指标不极端
4. **趋势减弱**:价格上升时RSI下降(背离前警告)
5. **强趋势**:所有振荡器长时间保持在50上方/下方
6. **盘整**:振荡器频繁穿越50无极值
7. **衰竭**:多个振荡器在极值 + 隐藏背离失败
### 性能提示
- 从简单开始:仅RSI
- 学习时逐渐添加指标
- 禁用未使用功能以保持图表清晰
- 策略性使用标签(不总是开启)
- 为您的市场测试不同RSI长度
- 根据波动性调整背离参数
### 警报条件
指标包含以下警报:
- RSI向上穿越50
- RSI向下穿越50
- RSI常规看涨背离
- RSI常规看跌背离
- RSI隐藏看涨背离
- RSI隐藏看跌背离
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
EMA Dynamic Crossover Detector with Real-Time Signal TableDescriptionWhat This Indicator Does:This indicator monitors all possible crossovers between four key exponential moving averages (20, 50, 100, and 200 periods) and displays them both visually on the chart and in an organized data table. Unlike standard EMA indicators that only plot the lines, this tool actively detects every crossover event, marks the exact crossover point with a circle, records the precise price level, and maintains a running log of all crossovers during the trading session. It's designed for traders who want comprehensive EMA crossover analysis without manually watching multiple moving average pairs.Key Features:
Four Essential EMAs: Plots 20, 50, 100, and 200-period exponential moving averages with color-coded thin lines for clean chart presentation
Complete Crossover Detection: Monitors all 6 possible EMA pair combinations (20×50, 20×100, 20×200, 50×100, 50×200, 100×200) in both directions
Precise Price Marking: Places colored circles at the exact average price where crossovers occur (not just at candle close)
Real-Time Signal Table: Displays up to 10 most recent crossovers with timestamp, direction, exact price, and signal type
Session Filtering: Only records crossovers during active trading hours (10:00-18:00 Istanbul time) to avoid noise from low-liquidity periods
Automatic Daily Reset: Clears the signal table at the start of each new trading day for fresh analysis
Built-In Alerts: Two alert conditions (bullish and bearish crossovers) that can be configured to send notifications
How It Works:The indicator calculates four exponential moving averages using the standard EMA formula, then continuously monitors for crossover events using Pine Script's ta.crossover() and ta.crossunder() functions:Bullish Crossovers (Green ▲):
When a faster EMA crosses above a slower EMA, indicating potential upward momentum:
20 crosses above 50, 100, or 200
50 crosses above 100 or 200
100 crosses above 200 (Golden Cross when it's the 50×200)
Bearish Crossovers (Red ▼):
When a faster EMA crosses below a slower EMA, indicating potential downward momentum:
20 crosses below 50, 100, or 200
50 crosses below 100 or 200
100 crosses below 200 (Death Cross when it's the 50×200)
Price Calculation:
Instead of marking crossovers at the candle's close price (which might not be where the actual cross occurred), the indicator calculates the average price between the two crossing EMAs, providing a more accurate representation of the crossover point.Signal Table Structure:The table in the top-right corner displays four columns:
Saat (Time): Exact time of crossover in HH:MM format
Yön (Direction): Arrow indicator (▲ green for bullish, ▼ red for bearish)
Fiyat (Price): Calculated average price at the crossover point
Durum (Status): Signal classification ("ALIŞ" for buy signals, "SATIŞ" for sell signals) with color-coded background
The table shows up to 10 most recent crossovers, automatically updating as new signals appear. If no crossovers have occurred during the session within the time filter, it displays "Henüz kesişim yok" (No crossovers yet).EMA Color Coding:
EMA 20 (Aqua/Turquoise): Fastest-reacting, most sensitive to recent price changes
EMA 50 (Green): Short-term trend indicator
EMA 100 (Yellow): Medium-term trend indicator
EMA 200 (Red): Long-term trend baseline, key support/resistance level
How to Use:For Day Traders:
Monitor 20×50 crossovers for quick entry/exit signals within the day
Use the time filter (10:00-18:00) to focus on high-volume trading hours
Check the signal table throughout the session to track momentum shifts
Look for confirmation: if 20 crosses above 50 and price is above EMA 200, bullish bias is stronger
For Swing Traders:
Focus on 50×200 crossovers (Golden Cross/Death Cross) for major trend changes
Use higher timeframes (4H, Daily) for more reliable signals
Wait for price to close above/below the crossover point before entering
Combine with support/resistance levels for better entry timing
For Position Traders:
Monitor 100×200 crossovers on daily/weekly charts for long-term trend changes
Use as confirmation of major market shifts
Don't react to every crossover—wait for sustained movement after the cross
Consider multiple timeframe analysis (if crossovers align on weekly and daily, signal is stronger)
Understanding EMA Hierarchies:The indicator becomes most powerful when you understand EMA relationships:Bullish Hierarchy (Strongest to Weakest):
All EMAs ascending (20 > 50 > 100 > 200): Strong uptrend
20 crosses above 50 while both are above 200: Pullback ending in uptrend
50 crosses above 200 while 20/50 below: Early trend reversal signal
Bearish Hierarchy (Strongest to Weakest):
All EMAs descending (20 < 50 < 100 < 200): Strong downtrend
20 crosses below 50 while both are below 200: Rally ending in downtrend
50 crosses below 200 while 20/50 above: Early trend reversal signal
Trading Strategy Examples:Pullback Entry Strategy:
Identify major trend using EMA 200 (price above = uptrend, below = downtrend)
Wait for pullback (20 crosses below 50 in uptrend, or above 50 in downtrend)
Enter when 20 re-crosses 50 in the trend direction
Place stop below/above the recent swing point
Exit when 20 crosses 50 against the trend again
Golden Cross/Death Cross Strategy:
Wait for 50×200 crossover (appears in the signal table)
Verify: Check if crossover occurs with increasing volume
Entry: Enter in the direction of the cross after a pullback
Stop: Place stop below/above the 200 EMA
Target: Swing high/low or when opposite crossover occurs
Multi-Crossover Confirmation:
Watch for multiple crossovers in the same direction within a short period
Example: 20×50 crossover followed by 20×100 = strengthening momentum
Enter after the second confirmation crossover
More crossovers = stronger signal but also means you're entering later
Time Filter Benefits:The 10:00-18:00 Istanbul time filter prevents recording crossovers during:
Pre-market volatility and gaps
Low-volume overnight sessions (for 24-hour markets)
After-hours erratic movements
Multi SMA + Golden/Death + Heatmap + BB**Multi SMA (50/100/200) + Golden/Death + Candle Heatmap + BB**
A practical trend toolkit that blends classic 50/100/200 SMAs with clear crossover labels, special 🚀 Golden / 💀 Death Cross markers, and a readable candle heatmap based on a dynamic regression midline and volatility bands. Optional Bollinger Bands are included for context.
* See trend direction at a glance with SMAs.
* Get minimal, de-cluttered labels on important crosses (50↔100, 50↔200, 100↔200).
* Highlight big regime shifts with special Golden/Death tags.
* Read momentum and volatility with the candle heatmap.
* Add Bollinger Bands if you want classic mean-reversion context.
Designed to be lightweight, non-repainting on confirmed bars, and flexible across timeframes.
# What This Indicator Does (plain English)
* **Tracks trend** using **SMA 50/100/200** and lets you optionally compute each SMA on a higher or different timeframe (HTF-safe, no lookahead).
* **Prints labels** when SMAs cross each other (up or down). You can force signals only after bar close to avoid repaint.
* **Marks Golden/Death Crosses** (50 over/under 200) with special labels so major regime changes stand out.
* **Colors candles** with a **heatmap** built from a regression midline and volatility bands—greenish above, reddish below, with a smooth gradient.
* **Optionally shows Bollinger Bands** (basis SMA + stdev bands) and fills the area between them.
* **Includes alert conditions** for Golden and Death Cross so you can automate notifications.
---
# Settings — Simple Explanations
## Source
* **Source**: Price source used to calculate SMAs and Bollinger basis. Default: `close`.
## SMA 50
* **Show 50**: Turn the SMA(50) line on/off.
* **Length 50**: How many bars to average. Lower = faster but noisier.
* **Color 50** / **Width 50**: Visual style.
* **Timeframe 50**: Optional alternate timeframe for SMA(50). Leave empty to use the chart timeframe.
## SMA 100
* **Show 100**: Turn the SMA(100) line on/off.
* **Length 100**: Bars used for the mid-term trend.
* **Color 100** / **Width 100**: Visual style.
* **Timeframe 100**: Optional alternate timeframe for SMA(100).
## SMA 200
* **Show 200**: Turn the SMA(200) line on/off.
* **Length 200**: Bars used for the long-term trend.
* **Color 200** / **Width 200**: Visual style.
* **Timeframe 200**: Optional alternate timeframe for SMA(200).
## Signals (crossover labels)
* **Show crossover signals**: Prints triangle labels on SMA crosses (50↔100, 50↔200, 100↔200).
* **Wait for bar close (confirmed)**: If ON, signals only appear after the candle closes (reduces repaint).
* **Min bars between same-pair signals**: Minimum spacing to avoid duplicate labels from the same SMA pair too often.
* **Trend filter (buy: 50>100>200, sell: 50<100<200)**: Only show bullish labels when SMAs are stacked bullish (50 above 100 above 200), and only show bearish labels when stacked bearish.
### Label Offset
* **Offset mode**: Choose how to push labels away from price:
* **Percent**: Offset is a % of price.
* **ATR x**: Offset is ATR(14) × multiplier.
* **Percent of price (%)**: Used when mode = Percent.
* **ATR multiplier (for ‘ATR x’)**: Used when mode = ATR x.
### Label Colors
* **Bull color** / **Bear color**: Background of triangle labels.
* **Bull label text color** / **Bear label text color**: Text color inside the triangles.
## Golden / Death Cross
* **Show 🚀 Golden Cross (50↑200)**: Show a special “Golden” label when SMA50 crosses above SMA200.
* **Golden label color** / **Golden text color**: Styling for Golden label.
* **Show 💀 Death Cross (50↓200)**: Show a special “Death” label when SMA50 crosses below SMA200.
* **Death label color** / **Death text color**: Styling for Death label.
## Candle Heatmap
* **Enable heatmap candle colors**: Turns the heatmap on/off.
* **Length**: Lookback for the regression midline and volatility measure.
* **Deviation Multiplier**: Band width around the midline (bigger = wider).
* **Volatility basis**:
* **RMA Range** (smoothed high-low range)
* **Stdev** (standard deviation of close)
* **Upper/Middle/Lower color**: Gradient colors for the heatmap.
* **Heatmap transparency (0..100)**: 0 = solid, 100 = invisible.
* **Force override base candles**: Repaint base candles so heatmap stays visible even if your chart has custom coloring.
## Bollinger Bands (optional)
* **Show Bollinger Bands**: Toggle the overlay on/off.
* **Length**: Basis SMA length.
* **StdDev Multiplier**: Distance of bands from the basis in standard deviations.
* **Basis color** / **Band color**: Line colors for basis and bands.
* **Bands fill transparency**: Opacity of the fill between upper/lower bands.
---
# Features & How It Works
## 1) HTF-Safe SMAs
Each SMA can be calculated on the chart timeframe or a higher/different timeframe you choose. The script pulls HTF values **without lookahead** (non-repainting on confirmed bars).
## 2) Crossover Labels (Three Pairs)
* **50↔100**, **50↔200**, **100↔200**:
* **Triangle Up** label when the first SMA crosses **above** the second.
* **Triangle Down** label when it crosses **below**.
* Optional **Trend Filter** ensures only signals aligned with the overall stack (50>100>200 for bullish, 50<100<200 for bearish).
* **Debounce** spacing avoids repeated labels for the same pair too close together.
## 3) Golden / Death Cross Highlights
* **🚀 Golden Cross**: SMA50 crosses **above** SMA200 (often a longer-term bullish regime shift).
* **💀 Death Cross**: SMA50 crosses **below** SMA200 (often a longer-term bearish regime shift).
* Separate styling so they stand out from regular cross labels.
## 4) Candle Heatmap
* Builds a **regression midline** with **volatility bands**; colors candles by their position inside that channel.
* Smooth gradient: lower side → reddish, mid → yellowish, upper side → greenish.
* Helps you see momentum and “where price sits” relative to a dynamic channel.
## 5) Bollinger Bands (Optional)
* Classic **basis SMA** ± **StdDev** bands.
* Light visual context for mean-reversion and volatility expansion.
## 6) Alerts
* **Golden Cross**: `🚀 GOLDEN CROSS: SMA 50 crossed ABOVE SMA 200`
* **Death Cross**: `💀 DEATH CROSS: SMA 50 crossed BELOW SMA 200`
Add these to your alerts to get notified automatically.
---
# Tips & Notes
* For fewer false positives, keep **“Wait for bar close”** ON, especially on lower timeframes.
* Use the **Trend Filter** to align signals with the broader stack and cut noise.
* For HTF context, set **Timeframe 50/100/200** to higher frames (e.g., H1/H4/D) while you trade on a lower frame.
* Heatmap “Length” and “Deviation Multiplier” control smoothness and channel width—tune for your asset’s volatility.
RSI Overbought/Oversold + Divergence Indicator (new)//@version=5
indicator('CryptoSignalScanner - RSI Overbought/Oversold + Divergence Indicator (new)',
//---------------------------------------------------------------------------------------------------------------------------------
//--- Define Colors ---------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------
vWhite = #FFFFFF
vViolet = #C77DF3
vIndigo = #8A2BE2
vBlue = #009CDF
vGreen = #5EBD3E
vYellow = #FFB900
vRed = #E23838
longColor = color.green
shortColor = color.red
textColor = color.white
bullishColor = color.rgb(38,166,154,0) //Used in the display table
bearishColor = color.rgb(239,83,79,0) //Used in the display table
nomatchColor = color.silver //Used in the display table
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Functions--------------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
TF2txt(TF) =>
switch TF
"S" => "RSI 1s:"
"5S" => "RSI 5s:"
"10S" => "RSI 10s:"
"15S" => "RSI 15s:"
"30S" => "RSI 30s"
"1" => "RSI 1m:"
"3" => "RSI 3m:"
"5" => "RSI 5m:"
"15" => "RSI 15m:"
"30" => "RSI 30m"
"45" => "RSI 45m"
"60" => "RSI 1h:"
"120" => "RSI 2h:"
"180" => "RSI 3h:"
"240" => "RSI 4h:"
"480" => "RSI 8h:"
"D" => "RSI 1D:"
"1D" => "RSI 1D:"
"2D" => "RSI 2D:"
"3D" => "RSI 2D:"
"3D" => "RSI 3W:"
"W" => "RSI 1W:"
"1W" => "RSI 1W:"
"M" => "RSI 1M:"
"1M" => "RSI 1M:"
"3M" => "RSI 3M:"
"6M" => "RSI 6M:"
"12M" => "RSI 12M:"
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Show/Hide Settings ----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiShowInput = input(true, title='Show RSI', group='Show/Hide Settings')
maShowInput = input(false, title='Show MA', group='Show/Hide Settings')
showRSIMAInput = input(true, title='Show RSIMA Cloud', group='Show/Hide Settings')
rsiBandShowInput = input(true, title='Show Oversold/Overbought Lines', group='Show/Hide Settings')
rsiBandExtShowInput = input(true, title='Show Oversold/Overbought Extended Lines', group='Show/Hide Settings')
rsiHighlightShowInput = input(true, title='Show Oversold/Overbought Highlight Lines', group='Show/Hide Settings')
DivergenceShowInput = input(true, title='Show RSI Divergence Labels', group='Show/Hide Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Table Settings --------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiShowTable = input(true, title='Show RSI Table Information box', group="RSI Table Settings")
rsiTablePosition = input.string(title='Location', defval='middle_right', options= , group="RSI Table Settings", inline='1')
rsiTextSize = input.string(title=' Size', defval='small', options= , group="RSI Table Settings", inline='1')
rsiShowTF1 = input(true, title='Show TimeFrame1', group="RSI Table Settings", inline='tf1')
rsiTF1 = input.timeframe("15", title=" Time", group="RSI Table Settings", inline='tf1')
rsiShowTF2 = input(true, title='Show TimeFrame2', group="RSI Table Settings", inline='tf2')
rsiTF2 = input.timeframe("60", title=" Time", group="RSI Table Settings", inline='tf2')
rsiShowTF3 = input(true, title='Show TimeFrame3', group="RSI Table Settings", inline='tf3')
rsiTF3 = input.timeframe("240", title=" Time", group="RSI Table Settings", inline='tf3')
rsiShowTF4 = input(true, title='Show TimeFrame4', group="RSI Table Settings", inline='tf4')
rsiTF4 = input.timeframe("D", title=" Time", group="RSI Table Settings", inline='tf4')
rsiShowHist = input(true, title='Show RSI Historical Columns', group="RSI Table Settings", tooltip='Show the information of the 2 previous closed candles')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- RSI Input Settings ----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiSourceInput = input.source(close, 'Source', group='RSI Settings')
rsiLengthInput = input.int(14, minval=1, title='RSI Length', group='RSI Settings', tooltip='Here we set the RSI lenght')
rsiColorInput = input.color(#26a69a, title="RSI Color", group='RSI Settings')
rsimaColorInput = input.color(#ef534f, title="RSIMA Color", group='RSI Settings')
rsiBandColorInput = input.color(#787B86, title="RSI Band Color", group='RSI Settings')
rsiUpperBandExtInput = input.int(title='RSI Overbought Extended Line', defval=80, minval=50, maxval=100, group='RSI Settings')
rsiUpperBandInput = input.int(title='RSI Overbought Line', defval=70, minval=50, maxval=100, group='RSI Settings')
rsiLowerBandInput = input.int(title='RSI Oversold Line', defval=30, minval=0, maxval=50, group='RSI Settings')
rsiLowerBandExtInput = input.int(title='RSI Oversold Extended Line', defval=20, minval=0, maxval=50, group='RSI Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- MA Input Settings -----------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
maTypeInput = input.string("EMA", title="MA Type", options= , group="MA Settings")
maLengthInput = input.int(14, title="MA Length", group="MA Settings")
maColorInput = input.color(color.yellow, title="MA Color", group='MA Settings') //#7E57C2
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Divergence Input Settings ---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
lbrInput = input(title="Pivot Lookback Right", defval=2, group='RSI Divergence Settings')
lblInput = input(title="Pivot Lookback Left", defval=2, group='RSI Divergence Settings')
lbRangeMaxInput = input(title="Max of Lookback Range", defval=10, group='RSI Divergence Settings')
lbRangeMinInput = input(title="Min of Lookback Range", defval=2, group='RSI Divergence Settings')
plotBullInput = input(title="Plot Bullish", defval=true, group='RSI Divergence Settings')
plotHiddenBullInput = input(title="Plot Hidden Bullish", defval=true, group='RSI Divergence Settings')
plotBearInput = input(title="Plot Bearish", defval=true, group='RSI Divergence Settings')
plotHiddenBearInput = input(title="Plot Hidden Bearish", defval=true, group='RSI Divergence Settings')
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- RSI Calculation -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsi = ta.rsi(rsiSourceInput, rsiLengthInput)
rsiprevious = rsi
= request.security(syminfo.tickerid, rsiTF1, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, rsiTF2, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, rsiTF3, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
= request.security(syminfo.tickerid, rsiTF4, [rsi, rsi , rsi ], lookahead=barmerge.lookahead_on)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- MA Calculation -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
ma(source, length, type) =>
switch type
"SMA" => ta.sma(source, length)
"Bollinger Bands" => ta.sma(source, length)
"EMA" => ta.ema(source, length)
"SMMA (RMA)" => ta.rma(source, length)
"WMA" => ta.wma(source, length)
"VWMA" => ta.vwma(source, length)
rsiMA = ma(rsi, maLengthInput, maTypeInput)
rsiMAPrevious = rsiMA
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Stoch RSI Settings + Calculation --------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
showStochRSI = input(false, title="Show Stochastic RSI", group='Stochastic RSI Settings')
smoothK = input.int(title="Stochastic K", defval=3, minval=1, maxval=10, group='Stochastic RSI Settings')
smoothD = input.int(title="Stochastic D", defval=4, minval=1, maxval=10, group='Stochastic RSI Settings')
lengthRSI = input.int(title="Stochastic RSI Lenght", defval=14, minval=1, group='Stochastic RSI Settings')
lengthStoch = input.int(title="Stochastic Lenght", defval=14, minval=1, group='Stochastic RSI Settings')
colorK = input.color(color.rgb(41,98,255,0), title="K Color", group='Stochastic RSI Settings', inline="1")
colorD = input.color(color.rgb(205,109,0,0), title="D Color", group='Stochastic RSI Settings', inline="1")
StochRSI = ta.rsi(rsiSourceInput, lengthRSI)
k = ta.sma(ta.stoch(StochRSI, StochRSI, StochRSI, lengthStoch), smoothK) //Blue Line
d = ta.sma(k, smoothD) //Red Line
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Divergence Settings ------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
bearColor = color.red
bullColor = color.green
hiddenBullColor = color.new(color.green, 50)
hiddenBearColor = color.new(color.red, 50)
//textColor = color.white
noneColor = color.new(color.white, 100)
osc = rsi
plFound = na(ta.pivotlow(osc, lblInput, lbrInput)) ? false : true
phFound = na(ta.pivothigh(osc, lblInput, lbrInput)) ? false : true
_inRange(cond) =>
bars = ta.barssince(cond == true)
lbRangeMinInput <= bars and bars <= lbRangeMaxInput
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Define Plot & Line Colors ---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
rsiColor = rsi >= rsiMA ? rsiColorInput : rsimaColorInput
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Plot Lines ------------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Create a horizontal line at a specific price level
myLine = line.new(bar_index , 75, bar_index, 75, color = color.rgb(187, 14, 14), width = 2)
bottom = line.new(bar_index , 50, bar_index, 50, color = color.rgb(223, 226, 28), width = 2)
mymainLine = line.new(bar_index , 60, bar_index, 60, color = color.rgb(13, 154, 10), width = 3)
hline(50, title='RSI Baseline', color=color.new(rsiBandColorInput, 50), linestyle=hline.style_solid, editable=false)
hline(rsiBandExtShowInput ? rsiUpperBandExtInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
hline(rsiBandShowInput ? rsiUpperBandInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
hline(rsiBandShowInput ? rsiLowerBandInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
hline(rsiBandExtShowInput ? rsiLowerBandExtInput : na, title='RSI Upper Band', color=color.new(rsiBandColorInput, 10), linestyle=hline.style_dashed, editable=false)
bgcolor(rsiHighlightShowInput ? rsi >= rsiUpperBandExtInput ? color.new(rsiColorInput, 70) : na : na, title="Show Extended Oversold Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi >= rsiUpperBandInput ? rsi < rsiUpperBandExtInput ? color.new(#64ffda, 90) : na : na: na, title="Show Overbought Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi <= rsiLowerBandInput ? rsi > rsiLowerBandExtInput ? color.new(#F43E32, 90) : na : na : na, title="Show Extended Oversold Highlight", editable=false)
bgcolor(rsiHighlightShowInput ? rsi <= rsiLowerBandInput ? color.new(rsimaColorInput, 70) : na : na, title="Show Oversold Highlight", editable=false)
maPlot = plot(maShowInput ? rsiMA : na, title='MA', color=color.new(maColorInput,0), linewidth=1)
rsiMAPlot = plot(showRSIMAInput ? rsiMA : na, title="RSI EMA", color=color.new(rsimaColorInput,0), editable=false, display=display.none)
rsiPlot = plot(rsiShowInput ? rsi : na, title='RSI', color=color.new(rsiColor,0), linewidth=1)
fill(rsiPlot, rsiMAPlot, color=color.new(rsiColor, 60), title="RSIMA Cloud")
plot(showStochRSI ? k : na, title='Stochastic K', color=colorK, linewidth=1)
plot(showStochRSI ? d : na, title='Stochastic D', color=colorD, linewidth=1)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Plot Divergence -------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Regular Bullish
// Osc: Higher Low
oscHL = osc > ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Lower Low
priceLL = low < ta.valuewhen(plFound, low , 1)
bullCond = plotBullInput and priceLL and oscHL and plFound
plot(
plFound ? osc : na,
offset=-lbrInput,
title="Regular Bullish",
linewidth=2,
color=(bullCond ? bullColor : noneColor)
)
plotshape(
DivergenceShowInput ? bullCond ? osc : na : na,
offset=-lbrInput,
title="Regular Bullish Label",
text=" Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Hidden Bullish
// Osc: Lower Low
oscLL = osc < ta.valuewhen(plFound, osc , 1) and _inRange(plFound )
// Price: Higher Low
priceHL = low > ta.valuewhen(plFound, low , 1)
hiddenBullCond = plotHiddenBullInput and priceHL and oscLL and plFound
plot(
plFound ? osc : na,
offset=-lbrInput,
title="Hidden Bullish",
linewidth=2,
color=(hiddenBullCond ? hiddenBullColor : noneColor)
)
plotshape(
DivergenceShowInput ? hiddenBullCond ? osc : na : na,
offset=-lbrInput,
title="Hidden Bullish Label",
text=" H Bull ",
style=shape.labelup,
location=location.absolute,
color=bullColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Regular Bearish
// Osc: Lower High
oscLH = osc < ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Higher High
priceHH = high > ta.valuewhen(phFound, high , 1)
bearCond = plotBearInput and priceHH and oscLH and phFound
plot(
phFound ? osc : na,
offset=-lbrInput,
title="Regular Bearish",
linewidth=2,
color=(bearCond ? bearColor : noneColor)
)
plotshape(
DivergenceShowInput ? bearCond ? osc : na : na,
offset=-lbrInput,
title="Regular Bearish Label",
text=" Bear ",
style=shape.labeldown,
location=location.absolute,
color=bearColor,
textcolor=textColor
)
//------------------------------------------------------------------------------
// Hidden Bearish
// Osc: Higher High
oscHH = osc > ta.valuewhen(phFound, osc , 1) and _inRange(phFound )
// Price: Lower High
priceLH = high < ta.valuewhen(phFound, high , 1)
hiddenBearCond = plotHiddenBearInput and priceLH and oscHH and phFound
plot(
phFound ? osc : na,
offset=-lbrInput,
title="Hidden Bearish",
linewidth=2,
color=(hiddenBearCond ? hiddenBearColor : noneColor)
)
plotshape(
DivergenceShowInput ? hiddenBearCond ? osc : na : na,
offset=-lbrInput,
title="Hidden Bearish Label",
text=" H Bear ",
style=shape.labeldown,
location=location.absolute,
color=bearColor,
textcolor=textColor
)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Check RSI Lineup ------------------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
bullTF = rsi > rsi and rsi > rsi
bearTF = rsi < rsi and rsi < rsi
bullTF1 = rsi1 > rsi1_1 and rsi1_1 > rsi1_2
bearTF1 = rsi1 < rsi1_1 and rsi1_1 < rsi1_2
bullTF2 = rsi2 > rsi2_1 and rsi2_1 > rsi2_2
bearTF2 = rsi2 < rsi2_1 and rsi2_1 < rsi2_2
bullTF3 = rsi3 > rsi3_1 and rsi3_1 > rsi3_2
bearTF3 = rsi3 < rsi3_1 and rsi3_1 < rsi3_2
bullTF4 = rsi4 > rsi4_1 and rsi4_1 > rsi4_2
bearTF4 = rsi4 < rsi4_1 and rsi4_1 < rsi4_2
bbTxt(bull,bear) =>
bull ? "BULLISH" : bear ? "BEARISCH" : 'NO LINEUP'
bbColor(bull,bear) =>
bull ? bullishColor : bear ? bearishColor : nomatchColor
newTC(tBox, col, row, txt, width, txtColor, bgColor, txtHA, txtSize) =>
table.cell(table_id=tBox,column=col, row=row, text=txt, width=width,text_color=txtColor,bgcolor=bgColor, text_halign=txtHA, text_size=txtSize)
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
//--- Define RSI Table Setting ----------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
width_c0 = 0
width_c1 = 0
if rsiShowTable
var tBox = table.new(position=rsiTablePosition, columns=5, rows=6, bgcolor=color.rgb(18,22,33,50), frame_color=color.black, frame_width=1, border_color=color.black, border_width=1)
newTC(tBox, 0,1,"RSI Current",width_c0,color.orange,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,1,str.format(" {0,number,#.##} ", rsi),width_c0,vWhite,rsi < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,1,bbTxt(bullTF, bearTF),width_c0,vWhite,bbColor(bullTF, bearTF),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,1,str.format(" {0,number,#.##} ", rsi ),width_c0,vWhite,rsi < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,1,str.format(" {0,number,#.##} ", rsi ),width_c0,vWhite,rsi < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF1
newTC(tBox, 0,2,TF2txt(rsiTF1),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,2,str.format(" {0,number,#.##} ", rsi1),width_c0,vWhite,rsi1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,2,bbTxt(bullTF1, bearTF1),width_c0,vWhite,bbColor(bullTF1,bearTF1),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,2,str.format(" {0,number,#.##} ", rsi1_1),width_c0,vWhite,rsi1_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,2,str.format(" {0,number,#.##} ", rsi1_2),width_c0,vWhite,rsi1_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF2
newTC(tBox, 0,3,TF2txt(rsiTF2),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,3,str.format(" {0,number,#.##} ", rsi2),width_c0,vWhite,rsi2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,3,bbTxt(bullTF2, bearTF2),width_c0,vWhite,bbColor(bullTF2,bearTF2),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,3,str.format(" {0,number,#.##} ", rsi2_1),width_c0,vWhite,rsi2_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,3,str.format(" {0,number,#.##} ", rsi2_2),width_c0,vWhite,rsi2_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF3
newTC(tBox, 0,4,TF2txt(rsiTF3),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,4,str.format(" {0,number,#.##} ", rsi3),width_c0,vWhite,rsi3 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,4,bbTxt(bullTF3, bearTF3),width_c0,vWhite,bbColor(bullTF3,bearTF3),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,4,str.format(" {0,number,#.##} ", rsi3_1),width_c0,vWhite,rsi3_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,4,str.format(" {0,number,#.##} ", rsi3_2),width_c0,vWhite,rsi3_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
if rsiShowTF4
newTC(tBox, 0,5,TF2txt(rsiTF4),width_c0,vWhite,color.rgb(0,0,0,100),'right',rsiTextSize)
newTC(tBox, 1,5,str.format(" {0,number,#.##} ", rsi4),width_c0,vWhite,rsi4 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 4,5,bbTxt(bullTF4, bearTF4),width_c0,vWhite,bbColor(bullTF4,bearTF4),'center',rsiTextSize)
if rsiShowHist
newTC(tBox, 2,5,str.format(" {0,number,#.##} ", rsi4_1),width_c0,vWhite,rsi4_1 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
newTC(tBox, 3,5,str.format(" {0,number,#.##} ", rsi4_2),width_c0,vWhite,rsi4_2 < 50 ? bearishColor:bullishColor,'left',rsiTextSize)
//------------------------------------------------------
//--- Alerts -------------------------------------------
//------------------------------------------------------
Parameter Free RSI [InvestorUnknown]The Parameter Free RSI (PF-RSI) is an innovative adaptation of the traditional Relative Strength Index (RSI), a widely used momentum oscillator that measures the speed and change of price movements. Unlike the standard RSI, which relies on a fixed lookback period (typically 14), the PF-RSI dynamically adjusts its calculation length based on real-time market conditions. By incorporating volatility and the RSI's deviation from its midpoint (50), this indicator aims to provide a more responsive and adaptable tool for identifying overbought/oversold conditions, trend shifts, and momentum changes. This adaptability makes it particularly valuable for traders navigating diverse market environments, from trending to ranging conditions.
PF-RSI offers a suite of customizable features, including dynamic length variants, smoothing options, visualization tools, and alert conditions.
Key Features
1. Dynamic RSI Length Calculation
The cornerstone of the PF-RSI is its ability to adjust the RSI calculation period dynamically, eliminating the need for a static parameter. The length is computed using two primary factors:
Volatility: Measured via the standard deviation of past RSI values.
Distance from Midpoint: The absolute deviation of the RSI from 50, reflecting the strength of bullish or bearish momentum.
The indicator offers three variants for calculating this dynamic length, allowing users to tailor its responsiveness:
Variant I (Aggressive): Increases the length dramatically based on volatility and a nonlinear scaling of the distance from 50. Ideal for traders seeking highly sensitive signals in fast-moving markets.
Variant II (Moderate): Combines volatility with a scaled distance from 50, using a less aggressive adjustment. Strikes a balance between responsiveness and stability, suitable for most trading scenarios.
Variant III (Conservative): Applies a linear combination of volatility and raw distance from 50. Offers a stable, less reactive length adjustment for traders prioritizing consistency.
// Function that returns a dynamic RSI length based on past RSI values
// The idea is to make the RSI length adaptive using volatility (stdev) and distance from the RSI midpoint (50)
// Different "variant" options control how aggressively the length changes
parameter_free_length(free_rsi, variant) =>
len = switch variant
// Variant I: Most aggressive adaptation
// Uses standard deviation scaled by a nonlinear factor of distance from 50
// Also adds another distance-based term to increase length more dramatically
"I" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) *
math.pow(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100), 2)
) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
// Variant II: Moderate adaptation
// Adds the standard deviation and a distance-based scaling term (less nonlinear)
"II" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
(
math.ceil(math.abs(free_rsi - 50)) *
(1 + (math.ceil(math.abs(50 - (free_rsi - 50))) / 100))
)
)
// Variant III: Least aggressive adaptation
// Simply adds standard deviation and raw distance from 50 (linear scaling)
"III" => math.ceil(
ta.stdev(free_rsi, math.ceil(free_rsi)) +
math.ceil(math.abs(free_rsi - 50))
)
2. Smoothing Options
To refine the dynamic RSI and reduce noise, the PF-RSI provides smoothing capabilities:
Smoothing Toggle: Enable or disable smoothing of the dynamic length used for RSI.
Smoothing MA Type for RSI MA: Choose between SMA and EMA
Smoothing Length Options for RSI MA:
Full: Uses the entire calculated dynamic length.
Half: Applies half of the dynamic length for smoother output.
SQRT: Uses the square root of the dynamic length, offering a compromise between responsiveness and smoothness.
The smoothed RSI is complemented by a separate moving average (MA) of the RSI itself, further enhancing signal clarity.
3. Visualization Tools
The PF-RSI includes visualization options to help traders interpret market conditions at a glance.
Plots:
Dynamic RSI: Displayed as a white line, showing the adaptive RSI value.
RSI Moving Average: Plotted in yellow, providing a smoothed reference for trend and momentum analysis.
Dynamic Length: A secondary plot (in faint white) showing how the calculation period evolves over time.
Histogram: Represents the RSI’s position relative to 50, with color gradients.
Fill Area: The space between the RSI and its MA is filled with a gradient (green for RSI > MA, red for RSI < MA), highlighting momentum shifts.
Customizable bar colors on the price chart reflect trend and momentum:
Trend (Raw RSI): Green (RSI > 50), Red (RSI < 50).
Trend (RSI MA): Green (MA > 50), Red (MA < 50).
Trend (Raw RSI) + Momentum: Adds momentum shading (lighter green/red when RSI and MA diverge).
Trend (RSI MA) + Momentum: Similar, but based on the MA’s trend.
Momentum: Green (RSI > MA), Red (RSI < MA).
Off: Disables bar coloring.
Intrabar Updating: Optional real-time updates within each bar for enhanced responsiveness.
4. Alerts
The PF-RSI supports customizable alerts to keep traders informed of key events.
Trend Alerts:
Raw RSI: Triggers when the RSI crosses above (uptrend) or below (downtrend) 50.
RSI MA: Triggers when the moving average crosses 50.
Off: Disables trend alerts.
Momentum Alerts:
Triggers when the RSI crosses its moving average, indicating rising (RSI > MA) or declining (RSI < MA) momentum.
Alerts are fired once per bar close, with descriptive messages including the ticker symbol (e.g., " Uptrend on: AAPL").
How It Works
The PF-RSI operates in a multi-step process:
Initialization
On the first run, it calculates a standard RSI with a 14-period length to seed the dynamic calculation.
Dynamic Length Computation
Once seeded, the indicator switches to a dynamic length based on the selected variant, factoring in volatility and distance from 50.
If smoothing is enabled, the length is further refined using an SMA.
RSI Calculation
The adaptive RSI is computed using the dynamic length, ensuring it reflects current market conditions.
Moving Average
A separate MA (SMA or EMA) is applied to the RSI, with a length derived from the dynamic length (Full, Half, or SQRT).
Visualization and Alerts
The results are plotted, and alerts are triggered based on user settings.
This adaptive approach minimizes lag in fast markets and reduces false signals in choppy conditions, offering a significant edge over fixed-period RSI implementations.
Why Use PF-RSI?
The Parameter Free RSI stands out by eliminating the guesswork of selecting an RSI period. Its dynamic length adjusts to market volatility and momentum, providing timely signals without manual tweaking.
Breadth Indicators NYSE Percent Above Moving AverageBreadth Indicators NYSE - transmits the processed data from the Barchart provider
NYSE - Breadth Indicators
S&P 500 - Breadth Indicators
DOW - Breadth Indicators
RUSSEL 1000 - Breadth Indicators
RUSSEL 2000 - Breadth Indicators
RUSSEL 3000 - Breadth Indicators
Moving Average - 5, 20, 50, 100, 150, 200
The "Percentage above 50-day SMA" indicator measures the percentage of stocks in the index trading above their 50-day moving average. It is a useful tool for assessing the general state of the market and identifying overbought and oversold conditions.
One way to use the "Percentage above 50-day SMA" indicator in a trading strategy is to combine it with a long-term moving average to determine whether the trend is bullish or bearish. Another way to use it is to combine it with a short-term moving average to identify pullbacks and rebounds within the overall trend.
The purpose of using the "Percentage above 50-day SMA" indicator is to participate in a larger trend with a better risk-reward ratio. By using this indicator to identify pullbacks and bounces, you can reduce the risk of entering trades at the wrong time.
Bull Signal Recap:
150-day EMA of $SPXA50R crosses above 52.5 and remains above 47.50 to set the bullish tone.
5-day EMA of $SPXA50R moves below 40 to signal a pullback
5-day EMA of $SPXA50R moves above 50 to signal an upturn
Bear Signal Recap:
150-day EMA of $SPXA50R crosses below 47.50 and remains below 52.50 to set the bearish tone.
5-day EMA of $SPXA50R moves above 60 to signal a bounce
5-day EMA of $SPXA50R moves below 50 to signal a downturn
Tweaking
There are numerous ways to tweak a trading system, but chartists should avoid over-optimizing the indicator settings. In other words, don't attempt to find the perfect moving average period or crossover level. Perfection is unattainable when developing a system or trading the markets. It is important to keep the system logical and focus tweaks on other aspects, such as the actual price chart of the underlying security.
What do levels above and below 50% signify in the long-term moving average?
A move above 52.5% is deemed bullish, and below 47.5% is deemed bearish. These levels help to reduce whipsaws by using buffers for bullish and bearish thresholds.
How does the short-term moving average work to identify pullbacks or bounces?
When using a 5-day EMA, a move below 40 signals a pullback, and a move above 60 signals a bounce.
How is the reversal of pullback or bounce identified?
A move back above 50 after a pullback or below 50 after a bounce signals that the respective trend may be resuming.
How can you ensure that the uptrend has resumed?
It’s important to wait for the surge above 50 to ensure the uptrend has resumed, signaling improved breadth.
Can the system be tweaked to optimize indicator settings?
While there are various ways to tweak the system, seeking perfection through over-optimizing settings is advised against. It's crucial to keep the system logical and focus tweaks on the price chart of the underlying security.
RUSSIAN \ Русская версия.
Индикатор "Процент выше 50-дневной скользящей средней" измеряет процент акций, торгующихся в индексе выше их 50-дневной скользящей средней. Это полезный инструмент для оценки общего состояния рынка и выявления условий перекупленности и перепроданности.
Один из способов использования индикатора "Процент выше 50-дневной скользящей средней" в торговой стратегии - это объединить его с долгосрочной скользящей средней, чтобы определить, является ли тренд бычьим или медвежьим. Другой способ использовать его - объединить с краткосрочной скользящей средней, чтобы выявить откаты и отскоки в рамках общего тренда.
Цель использования индикатора "Процент выше 50-дневной скользящей средней" - участвовать в более широком тренде с лучшим соотношением риска и прибыли. Используя этот индикатор для выявления откатов и отскоков, вы можете снизить риск входа в сделки в неподходящее время.
Краткое описание бычьего сигнала:
150-дневная ЕМА на уровне $SPXA50R пересекает отметку 52,5 и остается выше 47,50, что задает бычий настрой.
5-дневная ЕМА на уровне $SPXA50R опускается ниже 40, сигнализируя об откате
5-дневная ЕМА на уровне $SPXA50R поднимается выше 50, сигнализируя о росте
Обзор медвежьих сигналов:
150-дневная ЕМА на уровне $SPXA50R пересекает уровень ниже 47,50 и остается ниже 52,50, что указывает на медвежий настрой.
5-дневная ЕМА на уровне $SPXA50R поднимается выше 60, сигнализируя о отскоке
5-дневная ЕМА на уровне $SPXA50 опускается ниже 50, что сигнализирует о спаде
Корректировка
Существует множество способов настроить торговую систему, но графологам следует избегать чрезмерной оптимизации настроек индикатора. Другими словами, не пытайтесь найти идеальный период скользящей средней или уровень пересечения. Совершенство недостижимо при разработке системы или торговле на рынках. Важно поддерживать логику системы и уделять особое внимание другим аспектам, таким как график фактической цены базовой ценной бумаги.
Что означают уровни выше и ниже 50% в долгосрочной скользящей средней?
Движение выше 52,5% считается бычьим, а ниже 47,5% - медвежьим. Эти уровни помогают снизить риски, используя буферы для бычьих и медвежьих порогов.
Как краткосрочная скользящая средняя помогает идентифицировать откаты или отскоки?
При использовании 5-дневной ЕМА движение ниже 40 указывает на откат, а движение выше 60 указывает на отскок.
Как определяется разворот отката или отскока?
Движение выше 50 после отката или ниже 50 после отскока сигнализирует о возможном возобновлении соответствующего тренда.
Как вы можете гарантировать, что восходящий тренд возобновился?
Важно дождаться скачка выше 50, чтобы убедиться в возобновлении восходящего тренда, сигнализирующего о расширении диапазона.
Можно ли настроить систему для оптимизации настроек индикатора?
Хотя существуют различные способы настройки системы, не рекомендуется стремиться к совершенству с помощью чрезмерной оптимизации настроек. Крайне важно сохранить логичность системы и сфокусировать изменения на ценовом графике базовой ценной бумаги.
Pinescript - Common Label & Line Array Functions Library by RRBPinescript - Common Label & Line Array Functions Library by RagingRocketBull 2021
Version 1.0
This script provides a library of common array functions for arrays of label and line objects with live testing of all functions.
Using this library you can easily create, update, delete, join label/line object arrays, and get/set properties of individual label/line object array items.
You can find the full list of supported label/line array functions below.
There are several libraries:
- Common String Functions Library
- Standard Array Functions Library
- Common Fixed Type Array Functions Library
- Common Label & Line Array Functions Library
- Common Variable Type Array Functions Library
Features:
- 30 array functions in categories create/update/delete/join/get/set with support for both label/line objects (45+ including all implementations)
- Create, Update label/line object arrays from list/array params
- GET/SET properties of individual label/line array items by index
- Join label/line objects/arrays into a single string for output
- Supports User Input of x,y coords of 5 different types: abs/rel/rel%/inc/inc% list/array, auto transforms x,y input into list/array based on type, base and xloc, translates rel into abs bar indexes
- Supports User Input of lists with shortened names of string properties, auto expands all standard string properties to their full names for use in functions
- Live Output for all/selected functions based on User Input. Test any function for possible errors you may encounter before using in script.
- Output filters: hide all excluded and show only allowed functions using a list of function names
- Output Panel customization options: set custom style, color, text size, and line spacing
Usage:
- select create function - create label/line arrays from lists or arrays (optional). Doesn't affect the update functions. The only change in output should be function name regardless of the selected implementation.
- specify num_objects for both label/line arrays (default is 7)
- specify common anchor point settings x,y base/type for both label/line arrays and GET/SET items in Common Settings
- fill lists with items to use as inputs for create label/line array functions in Create Label/Line Arrays section
- specify label/line array item index and properties to SET in corresponding sections
- select label/line SET function to see the changes applied live
Code Structure:
- translate x,y depending on x,y type, base and xloc as specified in UI (required for all functions)
- expand all shortened standard property names to full names (required for create/update* from arrays and set* functions, not needed for create/update* from lists) to prevent errors in label.new and line.new
- create param arrays from string lists (required for create/update* from arrays and set* functions, not needed for create/update* from lists)
- create label/line array from string lists (property names are auto expanded) or param arrays (requires already expanded properties)
- update entire label/line array or
- get/set label/line array item properties by index
Transforming/Expanding Input values:
- for this script to work on any chart regardless of price/scale, all x*,y* are specified as % increase relative to x0,y0 base levels by default, but user can enter abs x,price values specific for that chart if necessary.
- all lists can be empty, contain 1 or several items, have the same/different lengths. Array Length = min(min(len(list*)), mum_objects) is used to create label/line objects. Missing list items are replaced with default property values.
- when a list contains only 1 item it is duplicated (label name/tooltip is also auto incremented) to match the calculated Array Length
- since this script processes user input, all x,y values must be translated to abs bar indexes before passing them to functions. Your script may provide all data internally and doesn't require this step.
- at first int x, float y arrays are created from user string lists, transformed as described below and returned as x,y arrays.
- translated x,y arrays can then be passed to create from arrays function or can be converted back to x,y string lists for the create from lists function if necessary.
- all translation logic is separated from create/update/set functions for the following reasons:
- to avoid redundant code/dependency on ext functions/reduce local scopes and to be able to translate everything only once in one place - should be faster
- to simplify internal logic of all functions
- because your script may provide all data internally without user input and won't need the translation step
- there are 5 types available for both x,y: abs, rel, rel%, inc, inc%. In addition to that, x can be: bar index or time, y is always price.
- abs - absolute bar index/time from start bar0 (x) or price (y) from 0, is >= 0
- rel - relative bar index/time from cur bar n (x) or price from y0 base level, is >= 0
- rel% - relative % increase of bar index/time (x) or price (y) from corresponding base level (x0 or y0), can be <=> 0
- inc - relative increment (step) for each new level of bar index/time (x) or price (y) from corresponding base level (x0 or y0), can be <=> 0
- inc% - relative % increment (% step) for each new level of bar index/time (x) or price (y) from corresponding base level (x0 or y0), can be <=> 0
- x base level >= 0
- y base level can be 0 (empty) or open, close, high, low of cur bar
- single item x1_list = "50" translates into:
- for x type abs: "50, 50, 50 ..." num_objects times regardless of xloc => x = 50
- for x type rel: "50, 50, 50 ... " num_objects times => x = x_base + 50
- for x type rel%: "50%, 50%, 50% ... " num_objects times => x_base * (1 + 0.5)
- for x type inc: "0, 50, 100 ... " num_objects times => x_base + 50 * i
- for x type inc%: "0%, 50%, 100% ... " num_objects times => x_base * (1 + 0.5 * i)
- when xloc = xloc.bar_index each rel*/inc* value in the above list is then subtracted from n: n - x to convert rel to abs bar index, values of abs type are not affected
- x1_list = "0, 50, 100, ..." of type rel is the same as "50" of type inc
- x1_list = "50, 50, 50, ..." of type abs/rel/rel% produces a sequence of the same values and can be shortened to just "50"
- single item y1_list = "2" translates into (ragardless of yloc):
- for y type abs: "2, 2, 2 ..." num_objects times => y = 2
- for y type rel: "2, 2, 2 ... " num_objects times => y = y_base + 2
- for y type rel%: "2%, 2%, 2% ... " num_objects times => y = y_base * (1 + 0.02)
- for y type inc: "0, 2, 4 ... " num_objects times => y = y_base + 2 * i
- for y type inc%: "0%, 2%, 4% ... " num_objects times => y = y_base * (1 + 0.02 * i)
- when yloc != yloc.price all calculated values above are simply ignored
- y1_list = "0, 2, 4" of type rel% is the same as "2" with type inc%
- y1_list = "2, 2, 2" of type abs/rel/rel% produces a sequence of the same values and can be shortened to just "2"
- you can enter shortened property names in lists. To lookup supported shortened names use corresponding dropdowns in Set Label/Line Array Item Properties sections
- all shortened standard property names must be expanded to full names (required for create/update* from arrays and set* functions, not needed for create/update* from lists) to prevent errors in label.new and line.new
- examples of shortened property names that can be used in lists: bar_index, large, solid, label_right, white, left, left, price
- expanded to their corresponding full names: xloc.bar_index, size.large, line.style_solid, label.style_label_right, color.white, text.align_left, extend.left, yloc.price
- all expanding logic is separated from create/update* from arrays and set* functions for the same reasons as above, and because param arrays already have different types, implying the use of final values.
- all expanding logic is included in the create/update* from lists functions because it seemed more natural to process string lists from user input directly inside the function, since they are already strings.
Creating Label/Line Objects:
- use study max_lines_count and max_labels_count params to increase the max number of label/line objects to 500 (+3) if necessary. Default number of label/line objects is 50 (+3)
- all functions use standard param sequence from methods in reference, except style always comes before colors.
- standard label/line.get* functions only return a few properties, you can't read style, color, width etc.
- label.new(na, na, "") will still create a label with x = n-301, y = NaN, text = "" because max default scope for a var is 300 bars back.
- there are 2 types of color na, label color requires color(na) instead of color_na to prevent error. text_color and line_color can be color_na
- for line to be visible both x1, x2 ends must be visible on screen, also when y1 == y2 => abs(x1 - x2) >= 2 bars => line is visible
- xloc.bar_index line uses abs x1, x2 indexes and can only be within 0 and n ends, where n <= 5000 bars (free accounts) or 10000 bars (paid accounts) limit, can't be plotted into the future
- xloc.bar_time line uses abs x1, x2 times, can't go past bar0 time but can continue past cur bar time into the future, doesn't have a length limit in bars.
- xloc.bar_time line with length = exact number of bars can be plotted only within bar0 and cur bar, can't be plotted into the future reliably because of future gaps due to sessions on some charts
- xloc.bar_index line can't be created on bar 0 with fixed length value because there's only 1 bar of horiz length
- it can be created on cur bar using fixed length x < n <= 5000 or
- created on bar0 using na and then assigned final x* values on cur bar using set_x*
- created on bar0 using n - fixed_length x and then updated on cur bar using set_x*, where n <= 5000
- default orientation of lines (for style_arrow* and extend) is from left to right (from bar 50 to bar 0), it reverses when x1 and x2 are swapped
- price is a function, not a line object property
Variable Type Arrays:
- you can't create an if/function that returns var type value/array - compiler uses strict types and doesn't allow that
- however you can assign array of any type to another array of any type creating an arr pointer of invalid type that must be reassigned to a matching array type before used in any expression to prevent error
- create_any_array2 uses this loophole to return an int_arr pointer of a var type array
- this works for all array types defined with/without var keyword and doesn't work for string arrays defined with var keyword for some reason
- you can't do this with var type vars, only var type arrays because arrays are pointers passed by reference, while vars are actual values passed by value.
- you can only pass a var type value/array param to a function if all functions inside support every type - otherwise error
- alternatively values of every type must be passed simultaneously and processed separately by corresponding if branches/functions supporting these particular types returning a common single type result
- get_var_types solves this problem by generating a list of dummy values of every possible type including the source type, tricking the compiler into allowing a single valid branch to execute without error, while ignoring all dummy results
Notes:
- uses Pinescript v3 Compatibility Framework
- uses Common String Functions Library, Common Fixed Type Array Functions Library, Common Variable Type Array Functions Library
- has to be a separate script to reduce the number of local scopes/compiled file size, can't be merged with another library.
- lets you live test all label/line array functions for errors. If you see an error - change params in UI
- if you see "Loop too long" error - hide/unhide or reattach the script
- if you see "Chart references too many candles" error - change x type or value between abs/rel*. This can happen on charts with 5000+ bars when a rel bar index x is passed to label.new or line.new instead of abs bar index n - x
- create/update_label/line_array* use string lists, while create/update_label/line_array_from_arrays* use array params to create label/line arrays. "from_lists" is dropped to shorten the names of the most commonly used functions.
- create_label/line_array2,4 are preferable, 5,6 are listed for pure demonstration purposes only - don't use them, they don't improve anything but dramatically increase local scopes/compiled file size
- for this reason you would mainly be using create/update_label/line_array2,4 for list params or create/update_label/line_array_from_arrays2 for array params
- all update functions are executed after each create as proof of work and can be disabled. Only create functions are required. Use update functions when necessary - when list/array params are changed by your script.
- both lists and array item properties use the same x,y_type, x,y_base from common settings
- doesn't use pagination, a single str contains all output
- why is this so complicated? What are all these functions for?
- this script merges standard label/line object methods with standard array functions to create a powerful set of label/line object array functions to simplify manipulation of these arrays.
- this library also extends the functionality of Common Variable Type Array Functions Library providing support for label/line types in var type array functions (any_to_str6, join_any_array5)
- creating arrays from either lists or arrays adds a level of flexibility that comes with complexity. It's very likely that in your script you'd have to deal with both string lists as input, and arrays internally, once everything is converted.
- processing user input, allowing customization and targeting for any chart adds a whole new layer of complexity, all inputs must be translated and expanded before used in functions.
- different function implementations can increase/reduce local scopes and compiled file size. Select a version that best suits your needs. Creating complex scripts often requires rewriting your code multiple times to fit the limits, every line matters.
P.S. Don't rely too much on labels, for too often they are fables.
List of functions*:
* - functions from other libraries are not listed
1. Join Functions
Labels
- join_label_object(label_, d1, d2)
- join_label_array(arr, d1, d2)
- join_label_array2(arr, d1, d2, d3)
Lines
- join_line_object(line_, d1, d2)
- join_line_array(arr, d1, d2)
- join_line_array2(arr, d1, d2, d3)
Any Type
- any_to_str6(arr, index, type)
- join_any_array4(arr, d1, d2, type)
- join_any_array5(arr, d, type)
2. GET/SET Functions
Labels
- label_array_get_text(arr, index)
- label_array_get_xy(arr, index)
- label_array_get_fields(arr, index)
- label_array_set_text(arr, index, str)
- label_array_set_xy(arr, index, x, y)
- label_array_set_fields(arr, index, x, y, str)
- label_array_set_all_fields(arr, index, x, y, str, xloc, yloc, label_style, label_color, text_color, text_size, text_align, tooltip)
- label_array_set_all_fields2(arr, index, x, y, str, xloc, yloc, label_style, label_color, text_color, text_size, text_align, tooltip)
Lines
- line_array_get_price(arr, index, bar)
- line_array_get_xy(arr, index)
- line_array_get_fields(arr, index)
- line_array_set_text(arr, index, width)
- line_array_set_xy(arr, index, x1, y1, x2, y2)
- line_array_set_fields(arr, index, x1, y1, x2, y2, width)
- line_array_set_all_fields(arr, index, x1, y1, x2, y2, xloc, extend, line_style, line_color, width)
- line_array_set_all_fields2(arr, index, x1, y1, x2, y2, xloc, extend, line_style, line_color, width)
3. Create/Update/Delete Functions
Labels
- delete_label_array(label_arr)
- create_label_array(list1, list2, list3, list4, list5, d)
- create_label_array2(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array3(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array4(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array5(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array6(x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- update_label_array2(label_arr, x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- update_label_array4(label_arr, x_list, y_list, str_list, xloc_list, yloc_list, style_list, color1_list, color2_list, size_list, align_list, tooltip_list, d)
- create_label_array_from_arrays2(x_arr, y_arr, str_arr, xloc_arr, yloc_arr, style_arr, color1_arr, color2_arr, size_arr, align_arr, tooltip_arr, d)
- create_label_array_from_arrays4(x_arr, y_arr, str_arr, xloc_arr, yloc_arr, style_arr, color1_arr, color2_arr, size_arr, align_arr, tooltip_arr, d)
- update_label_array_from_arrays2(label_arr, x_arr, y_arr, str_arr, xloc_arr, yloc_arr, style_arr, color1_arr, color2_arr, size_arr, align_arr, tooltip_arr, d)
Lines
- delete_line_array(line_arr)
- create_line_array(list1, list2, list3, list4, list5, list6, d)
- create_line_array2(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array3(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array4(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array5(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array6(x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- update_line_array2(line_arr, x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- update_line_array4(line_arr, x1_list, y1_list, x2_list, y2_list, xloc_list, extend_list, style_list, color_list, width_list, d)
- create_line_array_from_arrays2(x1_arr, y1_arr, x2_arr, y2_arr, xloc_arr, extend_arr, style_arr, color_arr, width_arr, d)
- update_line_array_from_arrays2(line_arr, x1_arr, y1_arr, x2_arr, y2_arr, xloc_arr, extend_arr, style_arr, color_arr, width_arr, d)
Volume Weighted RSI (VW RSI)The Volume Weighted RSI (VW RSI) is a momentum oscillator designed for TradingView, implemented in Pine Script v6, that enhances the traditional Relative Strength Index (RSI) by incorporating trading volume into its calculation. Unlike the standard RSI, which measures the speed and change of price movements based solely on price data, the VW RSI weights its analysis by volume, emphasizing price movements backed by significant trading activity. This makes the VW RSI particularly effective for identifying bullish or bearish momentum, overbought/oversold conditions, and potential trend reversals in markets where volume plays a critical role, such as stocks, forex, and cryptocurrencies.
Key Features
Volume-Weighted Momentum Calculation:
The VW RSI calculates momentum by comparing the volume associated with upward price movements (up-volume) to the volume associated with downward price movements (down-volume).
Up-volume is the volume on bars where the closing price is higher than the previous close, while down-volume is the volume on bars where the closing price is lower than the previous close.
These volumes are smoothed over a user-defined period (default: 14 bars) using a Running Moving Average (RMA), and the VW RSI is computed using the formula:
\text{VW RSI} = 100 - \frac{100}{1 + \text{VoRS}}
where
\text{VoRS} = \frac{\text{Average Up-Volume}}{\text{Average Down-Volume}}
.
Oscillator Range and Interpretation:
The VW RSI oscillates between 0 and 100, with a centerline at 50.
Above 50: Indicates bullish volume momentum, suggesting that volume on up bars dominates, which may signal buying pressure and a potential uptrend.
Below 50: Indicates bearish volume momentum, suggesting that volume on down bars dominates, which may signal selling pressure and a potential downtrend.
Overbought/Oversold Levels: User-defined thresholds (default: 70 for overbought, 30 for oversold) help identify potential reversal points:
VW RSI > 70: Overbought, indicating a possible pullback or reversal.
VW RSI < 30: Oversold, indicating a possible bounce or reversal.
Visual Elements:
VW RSI Line: Plotted in a separate pane below the price chart, colored dynamically based on its value:
Green when above 50 (bullish momentum).
Red when below 50 (bearish momentum).
Gray when at 50 (neutral).
Centerline: A dashed line at 50, optionally displayed, serving as the neutral threshold between bullish and bearish momentum.
Overbought/Oversold Lines: Dashed lines at the user-defined overbought (default: 70) and oversold (default: 30) levels, optionally displayed, to highlight extreme conditions.
Background Coloring: The background of the VW RSI pane is shaded red when the indicator is in overbought territory and green when in oversold territory, providing a quick visual cue of potential reversal zones.
Alerts:
Built-in alerts for key events:
Bullish Momentum: Triggered when the VW RSI crosses above 50, indicating a shift to bullish volume momentum.
Bearish Momentum: Triggered when the VW RSI crosses below 50, indicating a shift to bearish volume momentum.
Overbought Condition: Triggered when the VW RSI crosses above the overbought threshold (default: 70), signaling a potential pullback.
Oversold Condition: Triggered when the VW RSI crosses below the oversold threshold (default: 30), signaling a potential bounce.
Input Parameters
VW RSI Length (default: 14): The period over which the up-volume and down-volume are smoothed to calculate the VW RSI. A longer period results in smoother signals, while a shorter period increases sensitivity.
Overbought Level (default: 70): The threshold above which the VW RSI is considered overbought, indicating a potential reversal or pullback.
Oversold Level (default: 30): The threshold below which the VW RSI is considered oversold, indicating a potential reversal or bounce.
Show Centerline (default: true): Toggles the display of the 50 centerline, which separates bullish and bearish momentum zones.
Show Overbought/Oversold Lines (default: true): Toggles the display of the overbought and oversold threshold lines.
How It Works
Volume Classification:
For each bar, the indicator determines whether the price movement is upward or downward:
If the current close is higher than the previous close, the bar’s volume is classified as up-volume.
If the current close is lower than the previous close, the bar’s volume is classified as down-volume.
If the close is unchanged, both up-volume and down-volume are set to 0 for that bar.
Smoothing:
The up-volume and down-volume are smoothed using a Running Moving Average (RMA) over the specified period (default: 14 bars) to reduce noise and provide a more stable measure of volume momentum.
VW RSI Calculation:
The Volume Relative Strength (VoRS) is calculated as the ratio of smoothed up-volume to smoothed down-volume.
The VW RSI is then computed using the standard RSI formula, but with volume data instead of price changes, resulting in a value between 0 and 100.
Visualization and Alerts:
The VW RSI is plotted with dynamic coloring to reflect its momentum direction, and optional lines are drawn for the centerline and overbought/oversold levels.
Background coloring highlights overbought and oversold conditions, and alerts notify the trader of significant crossings.
Usage
Timeframe: The VW RSI can be used on any timeframe, but it is particularly effective on intraday charts (e.g., 1-hour, 4-hour) or daily charts where volume data is reliable. Shorter timeframes may require a shorter length for increased sensitivity, while longer timeframes may benefit from a longer length for smoother signals.
Markets: Best suited for markets with significant and reliable volume data, such as stocks, forex, and cryptocurrencies. It may be less effective in markets with low or inconsistent volume, such as certain futures contracts.
Trading Strategies:
Trend Confirmation:
Use the VW RSI to confirm the direction of a trend. For example, in an uptrend, look for the VW RSI to remain above 50, indicating sustained bullish volume momentum, and consider buying on pullbacks when the VW RSI dips but stays above 50.
In a downtrend, look for the VW RSI to remain below 50, indicating sustained bearish volume momentum, and consider selling on rallies when the VW RSI rises but stays below 50.
Overbought/Oversold Conditions:
When the VW RSI crosses above 70, the market may be overbought, suggesting a potential pullback or reversal. Consider taking profits on long positions or preparing for a short entry, but confirm with price action or other indicators.
When the VW RSI crosses below 30, the market may be oversold, suggesting a potential bounce or reversal. Consider entering long positions or covering shorts, but confirm with additional signals.
Divergences:
Look for divergences between the VW RSI and price to spot potential reversals. For example, if the price makes a higher high but the VW RSI makes a lower high, this bearish divergence may signal an impending downtrend.
Conversely, if the price makes a lower low but the VW RSI makes a higher low, this bullish divergence may signal an impending uptrend.
Momentum Shifts:
A crossover above 50 can signal the start of bullish momentum, making it a potential entry point for long trades.
A crossunder below 50 can signal the start of bearish momentum, making it a potential entry point for short trades or an exit for long positions.
Example
On a 4-hour SOLUSDT chart:
During an uptrend, the VW RSI might rise above 50 and stay there, confirming bullish volume momentum. If it approaches 70, it may indicate overbought conditions, as seen near a price peak of 145.08, suggesting a potential pullback.
During a downtrend, the VW RSI might fall below 50, confirming bearish volume momentum. If it drops below 30 near a price low of 141.82, it may indicate oversold conditions, suggesting a potential bounce, as seen in a slight recovery afterward.
A bullish divergence might occur if the price makes a lower low during the downtrend, but the VW RSI makes a higher low, signaling a potential reversal.
Limitations
Lagging Nature: Like the traditional RSI, the VW RSI is a lagging indicator because it relies on smoothed data (RMA). It may not react quickly to sudden price reversals, potentially missing the start of new trends.
False Signals in Ranging Markets: In choppy or ranging markets, the VW RSI may oscillate around 50, generating frequent crossovers that lead to false signals. Combining it with a trend filter (e.g., ADX) can help mitigate this.
Volume Data Dependency: The VW RSI relies on accurate volume data, which may be inconsistent or unavailable in some markets (e.g., certain forex pairs or futures contracts). In such cases, the indicator’s effectiveness may be reduced.
Overbought/Oversold in Strong Trends: During strong trends, the VW RSI can remain in overbought or oversold territory for extended periods, leading to premature exit signals. Use additional confirmation to avoid exiting too early.
Potential Improvements
Smoothing Options: Add options to use different smoothing methods (e.g., EMA, SMA) instead of RMA for the up/down volume calculations, allowing users to adjust the indicator’s responsiveness.
Divergence Detection: Include logic to detect and plot bullish/bearish divergences between the VW RSI and price, providing visual cues for potential reversals.
Customizable Colors: Allow users to customize the colors of the VW RSI line, centerline, overbought/oversold lines, and background shading.
Trend Filter: Integrate a trend strength filter (e.g., ADX > 25) to ensure signals are generated only during strong trends, reducing false signals in ranging markets.
The Volume Weighted RSI (VW RSI) is a powerful tool for traders seeking to incorporate volume into their momentum analysis, offering a unique perspective on market dynamics by emphasizing price movements backed by significant trading activity. It is best used in conjunction with other indicators and price action analysis to confirm signals and improve trading decisions.
Support and resistance levels (Day, Week, Month) + EMAs + SMAs(ENG): This Pine 5 script provides various tools for configuring and displaying different support and resistance levels, as well as moving averages (EMA and SMA) on charts. Using these tools is an essential strategy for determining entry and exit points in trades.
Support and Resistance Levels
Daily, weekly, and monthly support and resistance levels play a key role in analyzing price movements:
Daily levels: Represent prices where a cryptocurrency has tended to bounce within the current trading day.
Weekly levels: Reflect strong prices that hold throughout the week.
Monthly levels: Indicate the most significant levels that can influence price movement over the month.
When trading cryptocurrencies, traders use these levels to make decisions about entering or exiting positions. For example, if a cryptocurrency approaches a weekly resistance level and fails to break through it, this may signal a sell opportunity. If the price reaches a daily support level and starts to bounce up, it may indicate a potential long position.
Market context and trading volumes are also important when analyzing support and resistance levels. High volume near a level can confirm its significance and the likelihood of subsequent price movement. Traders often combine analysis across different time frames to get a more complete picture and improve the accuracy of their trading decisions.
Moving Averages
Moving averages (EMA and SMA) are another important tool in the technical analysis of cryptocurrencies:
EMA (Exponential Moving Average): Gives more weight to recent prices, allowing it to respond more quickly to price changes.
SMA (Simple Moving Average): Equally considers all prices over a given period.
Key types of moving averages used by traders:
EMA 50 and 200: Often used to identify trends. The crossing of the 50-day EMA with the 200-day EMA is called a "golden cross" (buy signal) or a "death cross" (sell signal).
SMA 50, 100, 150, and 200: These periods are often used to determine long-term trends and support/resistance levels. Similar to the EMA, the crossings of these averages can signal potential trend changes.
Settings Groups:
EMA Golden Cross & Death Cross: A setting to display the "golden cross" and "death cross" for the EMA.
EMA 50 & 200: A setting to display the 50-day and 200-day EMA.
Support and Resistance Levels: Includes settings for daily, weekly, and monthly levels.
SMA 50, 100, 150, 200: A setting to display the 50, 100, 150, and 200-day SMA.
SMA Golden Cross & Death Cross: A setting to display the "golden cross" and "death cross" for the SMA.
Components:
Enable/disable the display of support and resistance levels.
Show level labels.
Parameters for adjusting offset, display of EMA and SMA, and their time intervals.
Parameters for configuring EMA and SMA Golden Cross & Death Cross.
EMA Parameters:
Enable/disable the display of 50 and 200-day EMA.
Color and style settings for EMA.
Options to use bar gaps and the "LookAhead" function.
SMA Parameters:
Enable/disable the display of 50, 100, 150, and 200-day SMA.
Color and style settings for SMA.
Options to use bar gaps and the "LookAhead" function.
Effective use of support and resistance levels, as well as moving averages, requires an understanding of technical analysis, discipline, and the ability to adapt the strategy according to changing market conditions.
(RUS) Данный Pine 5 скрипт предоставляет разнообразные инструменты для настройки и отображения различных уровней поддержки и сопротивления, а также скользящих средних (EMA и SMA) на графиках. Использование этих инструментов является важной стратегией для определения точек входа и выхода из сделок.
Уровни поддержки и сопротивления
Дневные, недельные и месячные уровни поддержки и сопротивления играют ключевую роль в анализе движения цен:
Дневные уровни: Представляют собой цены, на которых криптовалюта имела тенденцию отскакивать в течение текущего торгового дня.
Недельные уровни: Отражают сильные цены, которые сохраняются в течение недели.
Месячные уровни: Указывают на наиболее значимые уровни, которые могут влиять на движение цены в течение месяца.
При торговле криптовалютами трейдеры используют эти уровни для принятия решений о входе в позицию или закрытии сделки. Например, если криптовалюта приближается к недельному уровню сопротивления и не удается его преодолеть, это может стать сигналом для продажи. Если цена достигает дневного уровня поддержки и начинает отскакивать вверх, это может указывать на возможность открытия длинной позиции.
Контекст рынка и объемы торговли также важны при анализе уровней поддержки и сопротивления. Высокий объем при приближении к уровню может подтвердить его значимость и вероятность последующего движения цены. Трейдеры часто комбинируют анализ различных временных рамок для получения более полной картины и улучшения точности своих торговых решений.
Скользящие средние
Скользящие средние (EMA и SMA) являются еще одним важным инструментом в техническом анализе криптовалют:
EMA (Exponential Moving Average): Экспоненциальная скользящая средняя, которая придает большее значение последним ценам. Это позволяет более быстро реагировать на изменения в ценах.
SMA (Simple Moving Average): Простая скользящая средняя, которая равномерно учитывает все цены в заданном периоде.
Основные виды скользящих средних, которые используются трейдерами:
EMA 50 и 200: Часто используются для выявления трендов. Пересечение 50-дневной EMA с 200-дневной EMA называется "золотым крестом" (сигнал на покупку) или "крестом смерти" (сигнал на продажу).
SMA 50, 100, 150 и 200: Эти периоды часто используются для определения долгосрочных трендов и уровней поддержки/сопротивления. Аналогично EMA, пересечения этих средних могут сигнализировать о возможных изменениях тренда.
Группы настроек:
EMA Golden Cross & Death Cross: Настройка для отображения "золотого креста" и "креста смерти" для EMA.
EMA 50 & 200: Настройка для отображения 50-дневной и 200-дневной EMA.
Уровни поддержки и сопротивления: Включает настройки для дневных, недельных и месячных уровней.
SMA 50, 100, 150, 200: Настройка для отображения 50, 100, 150 и 200-дневных SMA.
SMA Golden Cross & Death Cross: Настройка для отображения "золотого креста" и "креста смерти" для SMA.
Компоненты:
Включение/отключение отображения уровней поддержки и сопротивления.
Показ ярлыков уровней.
Параметры для настройки смещения, отображения EMA и SMA, а также их временных интервалов.
Параметры для настройки EMA и SMA Golden Cross & Death Cross.
Параметры EMA:
Включение/отключение отображения 50 и 200-дневных EMA.
Настройки цвета и стиля для EMA.
Опции для использования разрыва баров и функции "LookAhead".
Параметры SMA:
Включение/отключение отображения 50, 100, 150 и 200-дневных SMA.
Настройки цвета и стиля для SMA.
Опции для использования разрыва баров и функции "LookAhead".
Эффективное использование уровней поддержки и сопротивления, а также скользящих средних, требует понимания технического анализа, дисциплины и умения адаптировать стратегию в зависимости от изменяющихся условий рынка.
ICT Killzones and Sessions W/ Silver Bullet + MacrosForex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
Usage:
To maximize your experience, minimize the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience.
Forex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
ICT Sessions and Kill Zones
What They Are:
ICT Sessions: These are specific times during the trading day when market activity is expected to be higher, such as the London Open, New York Open, and the Asian session.
Kill Zones: These are specific time windows within these sessions where the probability of significant price movements is higher. For example, the New York AM Kill Zone is typically from 8:30 AM to 11:00 AM EST.
How to Use Them:
Identify the Session: Determine which trading session you are in (London, New York, or Asian).
Focus on Kill Zones: Within that session, focus on the kill zones for potential trade setups. For instance, during the New York session, look for setups between 8:30 AM and 11:00 AM EST.
Silver Bullets
What They Are:
Silver Bullets: These are specific, high-probability trade setups that occur within the kill zones. They are designed to be "one shot, one kill" trades, meaning they aim for precise and effective entries and exits.
How to Use Them:
Time-Based Setup: Look for these setups within the designated kill zones. For example, between 10:00 AM and 11:00 AM for the New York AM session .
Chart Analysis: Start with higher time frames like the 15-minute chart and then refine down to 5-minute and 1-minute charts to identify imbalances or specific patterns .
Macros
What They Are:
Macros: These are broader market conditions and trends that influence your trading decisions. They include understanding the overall market direction, seasonal tendencies, and the Commitment of Traders (COT) reports.
How to Use Them:
Understand Market Conditions: Be aware of the macroeconomic factors and market conditions that could affect price movements.
Seasonal Tendencies: Know the seasonal patterns that might influence the market direction.
COT Reports: Use the Commitment of Traders reports to understand the positioning of large traders and commercial hedgers .
Putting It All Together
Preparation: Understand the macro conditions and review the COT reports.
Session and Kill Zone: Identify the trading session and focus on the kill zones.
Silver Bullet Setup: Look for high-probability setups within the kill zones using refined chart analysis.
Execution: Execute the trade with precision, aiming for a "one shot, one kill" outcome.
By following these steps, you can effectively use ICT sessions, kill zones, silver bullets, and macros to enhance your trading strategy.
Usage:
To maximize your experience, shrink the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience. All credit goes to itradesize for the SB + Macro boxes
Macro Range HighlighterThis Pine Script indicator creates visual boxes that highlight specific time-based price ranges throughout the trading day, operating in New York Eastern Time. It offers two distinct modes: a standard hourly range mode and a classic ICT (Inner Circle Trader) Macro mode.
Two Operating Modes
Mode 1: Standard Hourly 50-09 Ranges (Default)
This mode identifies and highlights the price range during the final 10 minutes of each hour (xx:50) through the first 9 minutes of the next hour (xx:09).
Examples of captured ranges:
08:50 - 09:09
09:50 - 10:09
10:50 - 11:09
11:50 - 12:09
12:50 - 13:09
13:50 - 14:09
14:50 - 15:09
And continues for each hour...
Excluded Time Periods:
The indicator excludes certain periods that cross into or occur during market close and the daily reset:
02:50 - 03:09 (excluded to avoid interference with overnight session)
15:50 - 18:09 (excluded to avoid end-of-regular-hours and the 18:00 ET trading day reset)
This means you will NOT see boxes during the 16:00 or 17:00 hours, as these fall within the excluded window.
Mode 2: Classic ICT Macro Times
When enabled, this mode shows ONLY four specific time windows that are significant in ICT methodology:
02:33 - 02:59 (London Midnight Macro)
04:03 - 04:29 (London Open Macro)
13:10 - 13:39 (New York Lunch Macro)
15:15 - 15:44 (New York Close Macro)
When this mode is active, all standard hourly ranges are disabled, including the 02:50-03:09 range.
Green Line - Open Price
Represents the open price of the first candle when the range begins
This line is static once set - it shows where price opened when entering the time window
Extends horizontally across the entire duration of the box
Example: If the range starts at 08:50 and that candle opens at 18,500, the green line will be drawn at 18,500
Blue Line - Evolving Midpoint
Represents the dynamic midpoint between the range high and range low
This line continuously recalculates as new highs or lows are made within the time window
Calculation: Midpoint = (Range High + Range Low) / 2
Evolution example:
At 08:50, range is 18,480 (low) to 18,520 (high), midpoint = 18,500
At 08:55, price makes new high of 18,540, midpoint updates to 18,510
At 09:02, price makes new low of 18,470, midpoint updates to 18,505
The line visually adjusts up and down as the range expands
Extension: The line extends horizontally from the start of the range to the current bar (or end of range)
This gives traders a visual reference for the "fair value" or equilibrium point of the range
Red Line - Close Price
Represents the close price of the most recent candle within the time window
This line updates continuously with each new bar's close price
Extends horizontally across the range
When the range completes (exits the time window), it shows the final close price of the last bar in the range
Example: As price moves from 08:50 to 09:09, the red line will track the close of each candle: 18,505 → 18,510 → 18,508 → 18,515, etc.
This indicator provides a sophisticated visual framework for analyzing specific time-based price behavior. The evolving midpoint (blue line and optional yellow plot) is particularly powerful because it gives you real-time feedback on where the "fair value" of the range is as it develops, allowing you to make informed decisions about whether price is extended or returning to equilibrium. The three-line system (open/mid/close) creates a complete picture of price action within each critical time window, whether you're using standard hourly analysis or focusing on ICT's specific macro times.
Extreme Pressure Zones Indicator (EPZ) [BullByte]Extreme Pressure Zones Indicator(EPZ)
The Extreme Pressure Zones (EPZ) Indicator is a proprietary market analysis tool designed to highlight potential overbought and oversold "pressure zones" in any financial chart. It does this by combining several unique measurements of price action and volume into a single, bounded oscillator (0–100). Unlike simple momentum or volatility indicators, EPZ captures multiple facets of market pressure: price rejection, trend momentum, supply/demand imbalance, and institutional (smart money) flow. This is not a random mashup of generic indicators; each component was chosen and weighted to reveal extreme market conditions that often precede reversals or strong continuations.
What it is?
EPZ estimates buying/selling pressure and highlights potential extreme zones with a single, bounded 0–100 oscillator built from four normalized components. Context-aware weighting adapts to volatility, trendiness, and relative volume. Visual tools include adaptive thresholds, confirmed-on-close extremes, divergence, an MTF dashboard, and optional gradient candles.
Purpose and originality (not a mashup)
Purpose: Identify when pressure is building or reaching potential extremes while filtering noise across regimes and symbols.
Originality: EPZ integrates price rejection, momentum cascade, pressure distribution, and smart money flow into one bounded scale with context-aware weighting. It is not a cosmetic mashup of public indicators.
Why a trader might use EPZ
EPZ provides a multi-dimensional gauge of market extremes that standalone indicators may miss. Traders might use it to:
Spot Reversals: When EPZ enters an "Extreme High" zone (high red), it implies selling pressure might soon dominate. This can hint at a topside reversal or at least a pause in rallies. Conversely, "Extreme Low" (green) can highlight bottom-fish opportunities. The indicator's divergence module (optional) also finds hidden bullish/bearish divergences between price and EPZ, a clue that price momentum is weakening.
Measure Momentum Shifts: Because EPZ blends momentum and volume, it reacts faster than many single metrics. A rising MPO indicates building bullish pressure, while a falling MPO shows increasing bearish pressure. Traders can use this like a refined RSI: above 50 means bullish bias, below 50 means bearish bias, but with context provided by the thresholds.
Filter Trades: In trend-following systems, one could require EPZ to be in the bullish (green) zone before taking longs, or avoid new trades when EPZ is extreme. In mean-reversion systems, one might specifically look to fade extremes flagged by EPZ.
Multi-Timeframe Confirmation: The dashboard can fetch a higher timeframe EPZ value. For example, you might trade a 15-minute chart only when the 60-minute EPZ agrees on pressure direction.
Components and how they're combined
Rejection (PRV) – Captures price rejection based on candle wicks and volume (see Price Rejection Volume).
Momentum Cascade (MCD) – Blends multiple momentum periods (3,5,8,13) into a normalized momentum score.
Pressure Distribution (PDI) – Measures net buy/sell pressure by comparing volume on up vs down candles.
Smart Money Flow (SMF) – An adaptation of money flow index that emphasizes unusual volume spikes.
Each of these components produces a 0–100 value (higher means more bullish pressure). They are then weighted and averaged into the final Market Pressure Oscillator (MPO), which is smoothed and scaled. By combining these four views, EPZ stands out as a comprehensive pressure gauge – the whole is greater than the sum of parts
Context-aware weighting:
Higher volatility → more PRV weight
Trendiness up (RSI of ATR > 25) → more MCD weight
Relative volume > 1.2x → more PDI weight
SMF holds a stable weight
The weighted average is smoothed and scaled into MPO ∈ with 50 as the neutral midline.
What makes EPZ stand out
Four orthogonal inputs (price action, momentum, pressure, flow) unified in a single bounded oscillator with consistent thresholds.
Adaptive thresholds (optional) plus robust extreme detection that also triggers on crossovers, so static thresholds work reliably too.
Confirm Extremes on Bar Close (default ON): dots/arrows/labels/alerts print on closed bars to avoid repaint confusion.
Clean dashboard, divergence tools, pre-alerts, and optional on-price gradients. Visual 3D layering uses offsets for depth only,no lookahead.
Recommended markets and timeframes
Best: liquid symbols (index futures, large-cap equities, major FX, BTC/ETH).
Timeframes: 5–15m (more signals; consider higher thresholds), 1H–4H (balanced), 1D (clear regimes).
Use caution on illiquid or very low TFs where wick/volume geometry is erratic.
Logic and thresholds
MPO ∈ ; 50 = neutral. Above 50 = bullish pressure; below 50 = bearish.
Static thresholds (defaults): thrHigh = 70, thrLow = 30; warning bands 5 pts inside extremes (65/35).
Adaptive thresholds (optional):
thrHigh = min(BaseHigh + 5, mean(MPO,100) + stdev(MPO,100) × ExtremeSensitivity)
thrLow = max(BaseLow − 5, mean(MPO,100) − stdev(MPO,100) × ExtremeSensitivity)
Extreme detection
High: MPO ≥ thrHigh with peak/slope or crossover filter.
Low: MPO ≤ thrLow with trough/slope or crossover filter.
Cooldown: 5 bars (default). A new extreme will not print until the cooldown elapses, even if MPO re-enters the zone.
Confirmation
"Confirm Extremes on Bar Close" (default ON) gates extreme markers, pre-alerts, and alerts to closed bars (non-repainting).
Divergences
Pivot-based bullish/bearish divergence; tags appear only after left/right bars elapse (lookbackPivot).
MTF
HTF MPO retrieved with lookahead_off; values can update intrabar and finalize at HTF close. This is disclosed and expected.
Inputs and defaults (key ones)
Core: Sensitivity=1.0; Analysis Period=14; Smoothing=3; Adaptive Thresholds=OFF.
Extremes: Base High=70, Base Low=30; Extreme Sensitivity=1.5; Confirm Extremes on Bar Close=ON; Cooldown=5; Dot size Small/Tiny.
Visuals: Heatmap ON; 3D depth optional; Strength bars ON; Pre-alerts OFF; Divergences ON with tags ON; Gradient candles OFF; Glow ON.
Dashboard: ON; Position=Top Right; Size=Normal; MTF ON; HTF=60m; compact overlay table on price chart.
Advanced caps: Max Oscillator Labels=80; Max Extreme Guide Lines=80; Divergence objects=60.
Dashboard: what each element means
Header: EPZ ANALYSIS.
Large readout: Current MPO; color reflects state (extreme, approaching, or neutral).
Status badge: "Extreme High/Low", "Approaching High/Low", "Bullish/Neutral/Bearish".
HTF cell (when MTF ON): Higher-timeframe MPO, color-coded vs extremes; updates intrabar, settles at HTF close.
Predicted (when MTF OFF): Simple MPO extrapolation using momentum/acceleration—illustrative only.
Thresholds: Current thrHigh/thrLow (static or adaptive).
Components: ASCII bars + values for PRV, MCD, PDI, SMF.
Market metrics: Volume Ratio (x) and ATR% of price.
Strength: Bar indicator of |MPO − 50| × 2.
Confidence: Heuristic gauge (100 in extremes, 70 in warnings, 50 with divergence, else |MPO − 50|). Convenience only, not probability.
How to read the oscillator
MPO Value (0–100): A reading of 50 is neutral. Values above ~55 are increasingly bullish (green), while below ~45 are increasingly bearish (red). Think of these as "market pressure".
Extreme Zones: When MPO climbs into the bright orange/red area (above the base-high line, default 70), the chart will display a dot and downward arrow marking that extreme. Traders often treat this as a sign to tighten stops or look for shorts. Similarly, a bright green dot/up-arrow appears when MPO falls below the base-low (30), hinting at a bullish setup.
Heatmap/Candles: If "Pressure Heatmap" is enabled, the background of the oscillator pane will fade green or red depending on MPO. Users can optionally color the price candles by MPO value (gradient candles) to see these extremes on the main chart.
Prediction Zone(optional): A dashed projection line extends the MPO forward by a small number of bars (prediction_bars) using current MPO momentum and acceleration. This is a heuristic extrapolation best used for short horizons (1–5 bars) to anticipate whether MPO may touch a warning or extreme zone. It is provisional and becomes less reliable with longer projection lengths — always confirm predicted moves with bar-close MPO and HTF context before acting.
Divergences: When price makes a higher high but EPZ makes a lower high (bearish divergence), the indicator can draw dotted lines and a "Bear Div" tag. The opposite (lower low price, higher EPZ) gives "Bull Div". These signals confirm waning momentum at extremes.
Zones: Warning bands near extremes; Extreme zones beyond thresholds.
Crossovers: MPO rising through 35 suggests easing downside pressure; falling through 65 suggests waning upside pressure.
Dots/arrows: Extreme markers appear on closed bars when confirmation is ON and respect the 5-bar cooldown.
Pre-alert dots (optional): Proximity cues in warning zones; also gated to bar close when confirmation is ON.
Histogram: Distance from neutral (50); highlights strengthening or weakening pressure.
Divergence tags: "Bear Div" = higher price high with lower MPO high; "Bull Div" = lower price low with higher MPO low.
Pressure Heatmap : Layered gradient background that visually highlights pressure strength across the MPO scale; adjustable intensity and optional zone overlays (warning / extreme) for quick visual scanning.
A typical reading: If the oscillator is rising from neutral towards the high zone (green→orange→red), the chart may see strong buying culminating in a stall. If it then turns down from the extreme, that peak EPZ dot signals sell pressure.
Alerts
EPZ: Extreme Context — fires on confirmed extremes (respects cooldown).
EPZ: Approaching Threshold — fires in warning zones if no extreme.
EPZ: Divergence — fires on confirmed pivot divergences.
Tip: Set alerts to "Once per bar close" to align with confirmation and avoid intrabar repaint.
Practical usage ideas
Trend continuation: In positive regimes (MPO > 50 and rising), pullbacks holding above 50 often precede continuation; mirror for bearish regimes.
Exhaustion caution: E High/E Low can mark exhaustion risk; many wait for MPO rollover or divergence to time fades or partial exits.
Adaptive thresholds: Useful on assets with shifting volatility regimes to maintain meaningful "extreme" levels.
MTF alignment: Prefer setups that agree with the HTF MPO to reduce countertrend noise.
Examples
Screenshots captured in TradingView Replay to freeze the bar at close so values don't fluctuate intrabar. These examples use default settings and are reproducible on the same bars; they are for illustration, not cherry-picking or performance claims.
Example 1 — BTCUSDT, 1h — E Low
MPO closed at 26.6 (below the 30 extreme), printing a confirmed E Low. HTF MPO is 26.6, so higher-timeframe pressure remains bearish. Components are subdued (Momentum/Pressure/Smart$ ≈ 29–37), with Vol Ratio ≈ 1.19x and ATR% ≈ 0.37%. A prior Bear Div flagged weakening impulse into the drop. With cooldown set to 5 bars, new extremes are rate-limited. Many traders wait for MPO to curl up and reclaim 35 or for a fresh Bull Div before considering countertrend ideas; if MPO cannot reclaim 35 and HTF stays weak, treat bounces cautiously. Educational illustration only.
Example 2 — ETHUSD, 30m — E High
A strong impulse pushed MPO into the extreme zone (≥ 70), printing a confirmed E High on close. Shortly after, MPO cooled to ~61.5 while a Bear Div appeared, showing momentum lag as price pushed a higher high. Volume and volatility were elevated (≈ 1.79x / 1.25%). With a 5-bar cooldown, additional extremes won't print immediately. Some treat E High as exhaustion risk—either waiting for MPO rollover under 65/50 to fade, or for a pullback that holds above 50 to re-join the trend if higher-timeframe pressure remains constructive. Educational illustration only.
Known limitations and caveats
The MPO line itself can change intrabar; extreme markers/alerts do not repaint when "Confirm Extremes on Bar Close" is ON.
HTF values settle at the close of the HTF bar.
Illiquid symbols or very low TFs can be noisy; consider higher thresholds or longer smoothing.
Prediction line (when enabled) is a visual extrapolation only.
For coders
Pine v6. MTF via request.security with lookahead_off.
Extremes include crossover triggers so static thresholds also yield E High/E Low.
Extreme markers and pre-alerts are gated by barstate.isconfirmed when confirmation is ON.
Arrays prune oldest objects to respect resource limits; defaults (80/80/60) are conservative for low TFs.
3D layering uses negative offsets purely for drawing depth (no lookahead).
Screenshot methodology:
To make labels legible and to demonstrate non-repainting behavior, the examples were captured in TradingView Replay with "Confirm Extremes on Bar Close" enabled. Replay is used only to freeze the bar at close so plots don't change intrabar. The examples use default settings, include both Extreme Low and Extreme High cases, and can be reproduced by scrolling to the same bars outside Replay. This is an educational illustration, not a performance claim.
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Markets involve risk; past behavior does not guarantee future results. You are responsible for your own testing, risk management, and decisions.
QTrade Golden, Bronze & Death, Bubonic Cross AlertsThis indicator highlights key EMA regime shifts with simple, color-coded triangles:
- Golden / Death Cross — 50 EMA crossing above/below the 200 EMA.
- Bronze / Bubonic Cross — 50 EMA crossing above/below the 100 EMA.
- Early-Warning Proxy — tiny triangles for the 4 EMA vs. 200 EMA (4↑200 and 4↓200). These often fire before the 50/100 and 50/200 crosses.
No text clutter on the chart—just triangles. Colors: gold (50↑200), red (50↓200), darker-yellow bronze (50↑100), burgundy (50↓100), turquoise (4↑200), purple (4↓200).
What it tells you (in order of warning → confirmation)
- First warning: 4 EMA crosses the 200 EMA (proxy for price shifting around the 200 line).
- Second warning: 50 EMA crosses the 100 EMA (Bronze/Bubonic).
- Confirmation: 50 EMA crosses the 200 EMA (Golden/Death).
Alerts included
- Golden Cross (50↑200) and Death Cross (50↓200)
- Bronze Cross (50↑100) and Bubonic Cross (50↓100)
- 4 EMA vs. 200 EMA crosses (up & down) — early-warning proxy
- Price–100 EMA events (touch/cross, if enabled in settings)
ScalpSwing Pro SetupScript Overview
This script is a multi-tool setup designed for both scalping (1m–5m) and swing trading (1H–4H–Daily). It combines the power of trend-following , momentum , and mean-reversion tools:
What’s Included in the Script
1. EMA Indicators (20, 50, 200)
- EMA 20 (blue) : Short-term trend
- EMA 50 (orange) : Medium-term trend
- EMA 200 (red) : Long-term trend
- Use:
- EMA 20 crossing above 50 → bullish trend
- EMA 20 crossing below 50 → bearish trend
- Price above 200 EMA = uptrend bias
2. VWAP (Volume Weighted Average Price)
- Shows the average price weighted by volume
- Best used in intraday (1m to 15m timeframes)
- Use:
- Price bouncing from VWAP = reversion trade
- Price far from VWAP = likely pullback incoming
3. RSI (14) + Key Levels
- Shows momentum and overbought/oversold zones
- Levels:
- 70 = Overbought (potential sell)
- 30 = Oversold (potential buy)
- 50 = Trend confirmation
- Use:
- RSI 30–50 in uptrend = dip buying zone
- RSI 70–50 in downtrend = pullback selling zone
4. MACD Crossovers
- Standard MACD with histogram & cross alerts
- Shows trend momentum shifts
- Green triangle = Bullish MACD crossover
- Red triangle = Bearish MACD crossover
- Use:
- Confirm swing trades with MACD crossover
- Combine with RSI divergence
5. Buy & Sell Signal Logic
BUY SIGNAL triggers when:
- EMA 20 crosses above EMA 50
- RSI is between 50 and 70 (momentum bullish, not overbought)
SELL SIGNAL triggers when:
- EMA 20 crosses below EMA 50
- RSI is between 30 and 50 (bearish momentum, not oversold)
These signals appear as:
- BUY : Green label below the candle
- SELL : Red label above the candle
How to Trade with It
For Scalping (1m–5m) :
- Focus on EMA crosses near VWAP
- Confirm with RSI between 50–70 (buy) or 50–30 (sell)
- Use MACD triangle as added confluence
For Swing (1H–4H–Daily) :
- Look for EMA 20–50 cross + price above EMA 200
- Confirm trend with MACD and RSI
- Trade breakout or pullback depending on structure
ATM Option Selling StrategyATM Option Selling Strategy – Explained
This strategy is designed for intraday option selling based on the 9/15 EMA crossover, 50/80 MA trend filter, and RSI 50 level. It ensures that all trades are exited before market close (3:24 PM IST).
. Indicators Used:
9 EMA & 15 EMA → For short-term trend identification.
50 MA & 80 MA → To determine the overall trend.
RSI (14) → To confirm momentum (above or below 50 level).
2. Entry Conditions:
🔴 Sell ATM Call (CE) when:
Price is below 50 & 80 MA (Bearish trend).
9 EMA crosses below 15 EMA (Short-term trend turns bearish).
RSI is below 50 (Momentum confirms weakness).
🟢 Sell ATM Put (PE) when:
Price is above 50 & 80 MA (Bullish trend).
9 EMA crosses above 15 EMA (Short-term trend turns bullish).
RSI is above 50 (Momentum confirms strength).
3. Position Sizing & Risk Management:
Sell 375 quantity per trade (Lot size).
50-Point Stop Loss → If option premium moves against us by 50 points, exit.
50-Point Take Profit → If option premium moves in our favor by 50 points, book profit.
Exit all trades at 3:24 PM IST → No overnight positions.
4. Exit Conditions:
✅ Stop Loss or Take Profit Hits → Automatically exits based on a 50-point move.
✅ Time-Based Exit at 3:24 PM → Ensures no open positions at market close.
Why This Works?
✔ Trend Confirmation → 50/80 MA ensures we only sell options in the direction of the market trend.
✔ Momentum Confirmation → RSI prevents entering weak trades.
✔ Controlled Risk → SL and TP protect against large losses.
✔ No Overnight Risk → All trades close before market close.
Donchian Quest Research// =================================
Trend following strategy.
// =================================
Strategy uses two channels. One channel - for opening trades. Second channel - for closing.
Channel is similar to Donchian channel, but uses Close prices (not High/Low). That helps don't react to wicks of volatile candles (“stop hunting”). In most cases openings occur earlier than in Donchian channel. Closings occur only for real breakout.
// =================================
Strategy waits for beginning of trend - when price breakout of channel. Default length of both channels = 50 candles.
Conditions of trading:
- Open Long: If last Close = max Close for 50 closes.
- Close Long: If last Close = min Close for 50 closes.
- Open Short: If last Close = min Close for 50 closes.
- Close Short: If last Close = max Close for 50 closes.
// =================================
Color of lines:
- black - channel for opening trade.
- red - channel for closing trade.
- yellow - entry price.
- fuchsia - stoploss and breakeven.
- vertical green - go Long.
- vertical red - go Short.
- vertical gray - close in end, don't trade anymore.
// =================================
Order size calculated with ATR and volatility.
You can't trade 1 contract in BTC and 1 contract in XRP - for example. They have different price and volatility, so 1 contract BTC not equal 1 contract XRP.
Script uses universal calculation for every market. It is based on:
- Risk - USD sum you ready to loss in one trade. It calculated as percent of Equity.
- ATR indicator - measurement of volatility.
With default setting your stoploss = 0.5 percent of equity:
- If initial capital is 1000 USD and used parameter "Permit stop" - loss will be 5 USD (0.5 % of equity).
- If your Equity rises to 2000 USD and used parameter "Permit stop"- loss will be 10 USD (0.5 % of Equity).
// =================================
This Risk works only if you enable “Permit stop” parameter in Settings.
If this parameter disabled - strategy works as reversal strategy:
⁃ If close Long - channel border works as stoploss and momentarily go Short.
⁃ If close Short - channel border works as stoploss and momentarily go Long.
Channel borders changed dynamically. So sometime your loss will be greater than ‘Risk %’. Sometime - less than ‘Risk %’.
If this parameter enabled - maximum loss always equal to 'Risk %'. This parameter also include breakeven: if profit % = Risk %, then move stoploss to entry price.
// =================================
Like all trend following strategies - it works only in trend conditions. If no trend - slowly bleeding. There is no special additional indicator to filter trend/notrend. You need to trade every signal of strategy.
Strategy gives many losses:
⁃ 30 % of trades will close with profit.
⁃ 70 % of trades will close with loss.
⁃ But profit from 30% will be much greater than loss from 70 %.
Your task - patiently wait for it and don't use risky setting for position sizing.
// =================================
Recommended timeframe - Daily.
// =================================
Trend can vary in lengths. Selecting length of channels determine which trend you will be hunting:
⁃ 20/10 - from several days to several weeks.
⁃ 20/20 or 50/20 - from several weeks to several months.
⁃ 50/50 or 100/50 or 100/100 - from several months to several years.
// =================================
Inputs (Settings):
- Length: length of channel for trade opening/closing. You can choose 20/10, 20/20, 50/20, 50/50, 100/50, 100/100. Default value: 50/50.
- Permit Long / Permit short: Longs are most profitable for this strategy. You can disable Shorts and enable Longs only. Default value: permit all directions.
- Risk % of Equity: for position sizing used Equity percent. Don't use values greater than 5 % - it's risky. Default value: 0.5%.
⁃ ATR multiplier: this multiplier moves stoploss up or down. Big multiplier = small size of order, small profit, stoploss far from entry, low chance of stoploss. Small multiplier = big size of order, big profit, stop near entry, high chance of stoploss. Default value: 2.
- ATR length: number of candles to calculate ATR indicator. It used for order size and stoploss. Default value: 20.
- Close in end - to close active trade in the end (and don't trade anymore) or leave it open. You can see difference in Strategy Tester. Default value: don’t close.
- Permit stop: use stop or go reversal. Default value: without stop, reversal strategy.
// =================================
Properties (Settings):
- Initial capital - 1000 USD.
- Script don't uses 'Order size' - you need to change 'Risk %' in Inputs instead.
- Script don't uses 'Pyramiding'.
- 'Commission' 0.055 % and 'Slippage' 0 - this parameters are for crypto exchanges with perpetual contracts (for example Bybit). If use on other markets - set it accordingly to your exchange parameters.
// =================================
Big dataset used for chart - 'BITCOIN ALL TIME HISTORY INDEX'. It gives enough trades to understand logic of script. It have several good trends.
// =================================
Rollover LTEThis indicator shows where price needs to be and when in order to cause the 20-sma and 50-sma moving averages to change directions. A change in direction requires the slope of a moving average to change from negative to positive or from positive to negative. When a moving average changes direction, it can be said that it has “rolled over” or “rolled up,” with the latter only applying if slope went from negative to positive.
Theory:
In order to solve for the price of the current bar that will cause the moving average to roll up, the slope from the previous bar’s average to the current bar’s average must be set equal to zero which is to say that the averages must be the same.
For the 20-sma, the equation simply stated in words is as follows:
Current MA as a function of current price and previous 19 values = previous MA which is fixed based on previous 20 values
The denominators which are both 20 cancel and the previous 19 values cancel. What’s left is current price on the left side and the value from 20 bars ago on the right.
Current price = value from 20 bars ago
and since the equation was set up for solving for the price of the current bar that will cause the MA to roll over
Rollover price = value from 20 bars ago
This makes plotting rollover price, both current and forecasted, fairly simple, as it’s merely the closing price plotted with an offset to the right the same distance as the moving average length.
Application:
The 20-sma and 50-sma rollover prices are plotted because they are considered to be the two most important moving averages for rollover analysis. Moving average lengths can be modified in the indicator settings. The 20-sma and 20-sma rollover price are both plotted in white and the 50-sma and 50-sma rollover price are both plotted in blue. There are two rollover prices because the 20-sma rollover price is the price that will cause the 20-sma to roll over and the 50-sma rollover price is the price that will cause the 50-sma to roll over. The one that's vertically furthest away from the current price is the one that will cause both to rollover, as should become clearer upon reading the explanation below.
The distance between the current price and the 20-sma rollover price is referred to as the “rollover strength” of the price relative to the 20-sma. A large disparity between the current price and the rollover price suggests bearishness (negative rollover strength) if the rollover price is overhead because price would need to travel all that distance in order to cause the moving average to roll up. If the rollover price and price are converging, as is often the case, a change in moving average and price direction becomes more plausible. The rollover strengths of the 20-sma and 50-sma are added together to calculate the Rollover Strength and if a negative number is the result then the background color of the plot cloud turns red. If the result is positive, it turns green. Rollover Strength is plotted below price as a separate indicator in this publication for reference only and it's not part of this indicator. It does not look much different from momentum indicators. The code is below if anybody wants to try to use it. The important thing is that the distances between the rollover prices and the price action are kept in mind as having shrinking, growing, or neutral bearish and bullish effects on current and forecasted price direction. Trades should not be entered based on cloud colorization changes alone.
If you are about to crash into a wall of the 20-sma rollover price, as is indicated on the chart by the green arrow, you might consider going long so long as the rollover strength, both current and forecasted, of the 50-sma isn’t questionably bearish. This is subject to analysis and interpretation. There was a 20-sma rollover wall as indicated with yellow arrow, but the bearish rollover strength of the 50-sma was growing and forecasted to remain strong for a while at that time so a long entry would have not been suggested by both rollover prices. If you are about to crash into both the 20-sma and 50-sma rollover prices at the same time (not shown on this chart), that’s a good time to place a trade in anticipation of both slopes changing direction. You may, in the case of this chart, see that a 20-sma rollover wall precedes a 50-sma rollover convergence with price and anticipate a cascade which turned out to be the case with this recent NQ rally.
Price exiting the cloud entirely to either the upside or downside has strong implications. When exiting to the downside, the 20-sma and 50-sma have both rolled over and price is below both of them. The same is true for upside exits. Re-entering the cloud after a rally may indicate a reversal is near, especially if the forecasted rollover prices, particularly the 50-sma, agree.
This indicator should be used in conjunction with other technical analysis tools.
Additional Notes:
The original version of this script which will not be published was much heavier, cluttered, and is not as useful. This is the light version, hence the “LTE” suffix.
LTE stands for “long-term evolution” in telecommunications, not “light.”
Bar colorization (red, yellow, and green bars) was added using the MACD Hybrid BSH script which is another script I’ve published.
If you’re not sure what a bar is, it’s the same thing as a candle or a data point on a line chart. Every vertical line showing price action on the chart above is a bar and it is a bar chart.
sma = simple moving average
Rollover Strength Script:
// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © Skipper86
//@version=5
indicator(title="Rollover Strength", shorttitle="Rollover Strength", overlay=false)
source = input.source(close)
length1 = input.int(20, "Length 1", minval=1)
length2 = input.int(50, "Length 2", minval=1)
RolloverPrice1 = source
RolloverPrice2 = source
RolloverStrength1 = source-RolloverPrice1
RolloverStrength2 = source-RolloverPrice2
RolloverStrength = RolloverStrength1 + RolloverStrength2
Color1 = color.rgb(155, 155, 155, 0)
Color2 = color.rgb(0, 0, 200, 0)
Color3 = color.rgb(0, 200, 0, 0)
plot(RolloverStrength, title="Rollover Strength", color=Color3)
hline(0, "Middle Band", color=Color1)
//End of Rollover Strength Script
FOTSI - Open sourceI WOULD LIKE TO SPECIFY TWO THINGS:
- The indicator was absolutely not designed by me, I do not take any credit and much less I want them, I am just making this fantastic indicator open source and accessible to all
- The script code was not recycled from other indicators, but was created from 0 following the theory behind it to the letter, thus avoiding copyright infringement
- Advices and improvements are accepted, as having very little programming experience in Pine Script I consider this work still rough and slow
WHAT IS THE FOTSI?
The FOTSI is an oscillator that measures the relative strength of the individual currencies that make up the 28 major Forex exchanges.
By identifying the currencies that are in the overbought (+50) and oversold (-50) areas, it is possible to anticipate the correction of a currency pair following a strong trend.
THE THEORY BEHIND
1) At the base of everything is the 1-period momentum (close-open) of the single currency pairs that contain a certain currency. For example, the momentum of the USD currency is composed of all the exchange rates that contain the US dollar inside it: mom_usd = - mom_eurusd - mom_gbpusd + mom_usdchf + mom_usdjpy - mom_audusd + mom_usdcad - mom_nzdusd. Where the base currency is in second position, the momentum is subtracted instead of adding it.
2) The IST formula is applied to the momentum of the individual currencies obtained. In this way we get an oscillator that oscillates between 0 and its overbought and oversold areas. The area between +25 and -25 is an area in which we can consider the movements of individual currencies to be neutral.
3) The TSI is nothing more than a double smoothing on the momentum of individual currencies. This particularity makes the indicator very reactive, minimizing the delays of the trend reversal.
HOW TO USE
1) A currency is identified that is in the overbought (+50) or oversold (-50) area. Example GBP = 50
2) The second currency is identified as the one most opposite to the first. Example USD = -25
3) The currency pair consisting of the two currencies opens. So GBP / USD
4) Considering that GBP is oversold, we anticipate its future devaluation. So in this case we are short on GBP / SUD. Otherwise if GBP had been oversold (-50) we expect its future valuation and therefore we enter long.
5) It is used on the H1, H4 and D1 timeframes
6) Closing conditions: the position on the 50-period exponential moving average is split / the position at target on the 100-period exponential moving average is closed
7) Stoploss: it is recommended not to use it, if you want to use it it is equivalent to 5 times the ATR on the reference timeframe
8) Position sizing: go very slow! Being a counter-trend strategy, it is very risky to position yourself heavily. Use common sense in everything!
9) To insert the alerts that warn you of an overbought and oversold condition, it is necessary to enter the signals called "Overbought Signal" and "Oversold Signal" for each chart used, in the specific Trading View window. like me using multiple charts in the same window.
I hope you enjoy my work. For any questions write in the comments.
Thanks <3
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
TENGO A PRECISARE DUE COSE:
- L'indicatore non è stato assolutamente ideato da me, non mi assumo nessun merito e tanto meno li voglio, io sto solo rendendo questo fantastico indicatore open source ed accessibile a tutti
- Il codice dello script non è stato riciclato da altri indicatori, ma è stato creato da 0 seguendo alla lettere la teoria che sta alla sua base, evitando così di violare il copyright
- Si accettano consigli e migliorie, visto che avendo pochissima esperienza di programmazione in Pine Script considero questo lavoro ancora grezzo e lento
COS'È IL FOTSI?
Il FOTSI è un oscillatore che misura la forza relativa delle singole valute che compongono i 28 cambi major del Forex.
Individuando le valute che si trovano nelle aree di ipercomprato (+50) ed ipervenduto (-50) , è possibile anticipare la correzione di una coppia valutaria al seguito di un forte trend.
LA TEORIA ALLA BASE
1) Alla base di tutto c'è il momentum ad 1 periodo (close-open) delle singole coppie valutarie che contengono una determinata valuta. Ad esempio il momentum della valuta USD è composto da tutti i cambi che contengono il dollaro americano al suo interno: mom_usd = - mom_eurusd - mom_gbpusd + mom_usdchf + mom_usdjpy - mom_audusd + mom_usdcad - mom_nzdusd . Ove la valuta base si trova in seconda posizione si sottrae il momentum al posto che sommarlo.
2) Si applica la formula del TSI ai momentum delle singole valute ottenute. In questo modo otteniamo un oscillatore che oscilla tra lo 0 e le sue aree di ipercomprato ed ipervenduto. L'area compresa tra +25 e -25 è un area in cui possiamo considerare neutri i movimenti delle singole valute.
3) Il TSI non è altro che un doppio smoothing sul momentum delle singole valute. Questa particolarità rende l'indicatore molto reattivo, minimizzando i ritardi dell'inversione del trend.
COME SI USA
1) Si individua una valuta che si trova nell'area di ipercomprato (+50) o ipervenduto (-50) . Esempio GBP = 50
2) Si individua come seconda valuta quella più opposta alla prima. Esempio USD = -25
3) Si apre la coppia di valuta composta dalle due valute. Quindi GBP/USD
4) Considerando che GBP è in fase di ipervenduto prevediamo una sua futura svalutazione. Quindi in questo caso entriamo short su GBP/SUD. Diversamente se GBP fosse stato in fase di ipervenduto (-50) ci aspettiamo una sua futura valutazione e quindi entriamo long.
5) Si usa sui timeframe H1, H4 e D1
6) Condizioni di chiusura: si smezza la posizione sulla media mobile esponenziale a 50 periodi / si chiude la posizione a target sulla media mobile esponenziale a 100 periodi
7) Stoploss: è consigliato non usarlo, nel caso lo si voglia utilizzare esso equivale a 5 volte l'ATR sul timeframe di riferimento
8) Position sizing: andateci molto piano! Essendo una strategia contro trend è molto rischioso posizionarsi in modo pesante. Usate il buonsenso in tutto!
9) Per inserire gli allert che ti avvertono di una condizione di ipercomprato ed ipervenduto, è necessario inserire dall'apposita finestra di Trading View i segnali denominati "Segnale di ipercomprato" ed "Segnale di ipervenduto" per ogni grafico che si usa, nel caso come me che si utilizzano più grafici nella stessa finestra.
Spero che possiate apprezzare il mio lavoro. Per qualsiasi domanda scrivete nei commenti.
Grazie<3
Five Moving Averages (5, 10, 21, 50, 200)This helps to use multiple Moving averages . Using this indicator you can able to user 5 time frames at time .
Time-Decay Liquidity Zones [BackQuant]Time-Decay Liquidity Zones
A dynamic liquidity map that turns single-bar exhaustion events into fading, color-graded zones, so you can see where trapped traders and unfinished business still matter, and when those areas have finally stopped pulling price.
What this is
This indicator detects unusually strong impulsive moves into wicks, converts them into supply or demand “zones,” then lets those zones decay over time. Each zone carries a strength score that fades bar by bar. Zones that stop attracting or rejecting price are gradually de-emphasized and eventually removed, while the most relevant areas stay bright and obvious.
Instead of static rectangles that live forever, you get a living liquidity map where:
Zones are born from objective criteria: volatility, wick size, and optional volume spikes.
Zones “age” using a configurable decay factor and maximum lifetime.
Zone color and opacity reflect current relative strength on a unified clear → green → red gradient.
Zones freeze when broken, so you can distinguish “active reaction areas” from “historical levels that have already given way”.
Conceptual idea
Large wicks with strong volatility often mark areas where aggressive orders met hidden liquidity and got absorbed. Price may revisit these areas to test leftover interest or to relieve trapped positions. However, not every wick matters for long. As time passes and more bars print, the market “forgets” some areas.
Time-Decay Liquidity Zones turns that idea into a rule-based system:
Find bars that likely reflect strong aggressive flows into liquidity.
Mark a zone around the wick using ATR-based thickness.
Assign a strength score of 1.0 at birth.
Each bar, reduce that score by a decay factor and remove zones that fall below a threshold or live too long.
Color all surviving zones from weak to strong using a single gradient scale and a visual legend.
How events are detected
Detection lives in the Event Detection group. The script combines range, wick size, and optional volume filters into simple rules.
Volatility filter
ATR Length — computes a rolling ATR over your chosen window. This is the volatility baseline.
Min range in ATRs — bar range (High–Low) must exceed this multiple of ATR for an event to be considered. This avoids tiny bars triggering zones.
Wick filters
For each bar, the script splits the candle into body and wicks:
Upper wick = High minus the max(Open, Close).
Lower wick = min(Open, Close) minus Low.
Then it tests:
Upper wick condition — upper wick must be larger than Min wick size in ATRs × ATR.
Lower wick condition — lower wick must be larger than Min wick size in ATRs × ATR.
Only bars with a sufficiently long wick relative to volatility qualify as candidate “liquidity events”.
Volume filter
Optionally, the script requires a volume spike:
Use volume filter — if enabled, volume must exceed a rolling volume SMA by a configurable multiplier.
Volume SMA length — period for the volume average.
Volume spike multiplier — how many times above the SMA current volume needs to be.
This lets you focus only on “heavy” tests of liquidity and ignore quiet bars.
Event types
Putting it together:
Upper event (potential supply / long liquidation, etc.)
Occurs when:
Upper wick is large in ATR terms.
Full bar range is large in ATR terms.
Volume is above the spike threshold (if enabled).
Lower event (potential demand / short liquidation, etc.)
Symmetric conditions using the lower wick.
How zones are constructed
Zone geometry lives in Zone Geometry .
When an event is detected, the script builds a rectangular box that anchors to the wick and extends in the appropriate direction by an ATR-based thickness.
For upper (supply-type) zones
Bottom of the zone = event bar high.
Top of the zone = event bar high + Zone thickness in ATRs × ATR.
The zone initially spans only the event bar on the x-axis, but is extended to the right as new bars appear while the zone is active.
For lower (demand-type) zones
Top of the zone = event bar low.
Bottom of the zone = event bar low − Zone thickness in ATRs × ATR.
Same extension logic: box starts on the event bar and grows rightward while alive.
The result is a band around the wick that scales with volatility. On high-ATR charts, zones are thicker. On calm charts, they are narrower and more precise.
Zone lifecycle, decay, and removal
All lifecycle logic is controlled by the Decay & Lifetime group.
Each zone carries:
Score — a floating-point “importance” measure, starting at 1.0 when created.
Direction — +1 for upper zones, −1 for lower zones.
Birth index — bar index at creation time.
Active flag — whether the zone is still considered unbroken and extendable.
1) Active vs broken
Each confirmed bar, the script checks:
For an upper zone , the zone is counted as “broken” when the close moves above the top of the zone.
For a lower zone , the zone is counted as “broken” when the close moves below the bottom of the zone.
When a zone breaks:
Its right edge is frozen at the previous bar (no further extension).
The zone remains on the chart, but is no longer updated by price interaction. It still decays in score until removal.
This lets you see where a major level was overrun, while naturally fading its influence over time.
2) Time decay
At each confirmed bar:
Score := Score × Score decay per bar .
A decay value close to 1.0 means very slow decay and long-lived zones.
Lower values (closer to 0.9) mean faster forgetting and more current-focused zones.
You are controlling how quickly the market “forgets” past events.
3) Age and score-based removal
Zones are removed when either:
Age in bars exceeds Max bars a zone can live .
This is a hard lifetime cap.
Score falls below Minimum score before removal .
This trims zones that have decayed into irrelevance even if their age is still within bounds.
When a zone is removed, its box is deleted and all associated state is freed to keep performance and visuals clean.
Unified gradient and color logic
Color control lives in Gradient & Color . The indicator uses a single continuous gradient for all zones, above and below price, so you can read strength at a glance without guessing what palette means what.
Base colors
You set:
Mid strength color (green) — used for mid-level strength zones and as the “anchor” in the gradient.
High strength color (red) — used for the strongest zones.
Max opacity — the maximum visual opacity for the solid part of the gradient. Lower values here mean more solid; higher values mean more transparent.
The script then defines three internal points:
Clear end — same as mid color, but with a high alpha (close to transparent).
Mid end — mid color at the strongest allowed opacity.
High end — high color at the strongest allowed opacity.
Strength normalization
Within each update:
The script finds the maximum score among all existing zones.
Each zone’s strength is computed as its score divided by this maximum.
Strength is clamped into .
This means a zone with strength 1.0 is currently the strongest zone on the chart. Other zones are colored relative to that.
Piecewise gradient
Color is assigned in two stages:
For strength between 0.0 and 0.5: interpolate from “clear” green to solid green.
Weak zones are barely visible, mid-strength zones appear as solid green.
For strength between 0.5 and 1.0: interpolate from solid green to solid red.
The strongest zones shift toward the red anchor, clearly separating them from everything else.
Strength scale legend
To make the gradient readable, the indicator draws a vertical legend on the right side of the chart:
About 15 cells from top (Strong) to bottom (Weak).
Each cell uses the same gradient function as the zones themselves.
Top cell is labeled “Strong”; bottom cell is labeled “Weak”.
This legend acts as a fixed reference so you can instantly map a zone’s color to its approximate strength rank.
What it plots
At a glance, the indicator produces:
Upper liquidity zones above price, built from large upper wick events.
Lower liquidity zones below price, built from large lower wick events.
All zones colored by relative strength using the same gradient.
Zones that freeze when price breaks them, then fade out via decay and removal.
A strength scale legend on the right to interpret the gradient.
There are no extra lines, labels, or clutter. The focus is the evolving structure of liquidity zones and their visual strength.
How to read the zones
Bright red / bright green zones
These are your current “major” liquidity areas. They have high scores relative to other zones and have not yet decayed. Expect meaningful reactions, absorption attempts, or spillover moves when price interacts with them.
Faded zones
Pale, nearly transparent zones are either old, decayed, or minor. They can still matter, but priority is lower. If these are in the middle of a long consolidation, they often become background noise.
Broken but still visible zones
Zones whose extension has stopped have been overrun by closing price. They show where a key level gave way. You can use them as context for regime shifts or failed attempts.
Absence of zones
A chart with few or no zones means that, under your current thresholds, there have not been strong enough liquidity events recently. Either tighten the filters or accept that recent price action has been relatively balanced.
Use cases
1) Intraday liquidity hunting
Run the indicator on lower timeframes (e.g., 1–15 minute) with moderately fast decay.
Use the upper zones as potential sell reaction areas, the lower zones as potential buy reaction areas.
Combine with order flow, CVD, or footprint tools to see whether price is absorbing or rejecting at each zone.
2) Swing trading context
Increase ATR length and range/wick multipliers to focus only on major spikes.
Set slower decay and higher max lifetime so zones persist across multiple sessions.
Use these zones as swing inflection areas for larger setups, for example anticipating re-tests after breakouts.
3) Stop placement and invalidation
For longs, place invalidation beyond a decaying lower zone rather than in the middle of noise.
For shorts, place invalidation beyond strong upper zones.
If price closes through a strong zone and it freezes, treat that as additional evidence your prior bias may be wrong.
4) Identifying trapped flows
Upper zones formed after violent spikes up that quickly fail can mark trapped longs.
Lower zones formed after violent spikes down that quickly reverse can mark trapped shorts.
Watching how price behaves on the next touch of those zones can hint at whether those participants are being rescued or squeezed.
Settings overview
Event Detection
Use volume filter — enable or disable the volume spike requirement.
Volume SMA length — rolling window for average volume.
Volume spike multiplier — how aggressive the volume spike filter is.
ATR length — period for ATR, used in all size comparisons.
Min wick size in ATRs — minimum wick size threshold.
Min range in ATRs — minimum bar range threshold.
Zone Geometry
Zone thickness in ATRs — vertical size of each liquidity zone, scaled by ATR.
Decay & Lifetime
Score decay per bar — multiplicative decay factor for each zone score per bar.
Max bars a zone can live — hard cap on lifetime.
Minimum score before removal — score cut-off at which zones are deleted.
Gradient & Color
Mid strength color (green) — base color for mid-level zones and the lower half of the gradient.
High strength color (red) — target color for the strongest zones.
Max opacity — controls the most solid end of the gradient (0 = fully solid, 100 = fully invisible).
Tuning guidance
Fast, session-only liquidity
Shorter ATR length (e.g., 20–50).
Higher wick and range multipliers to focus only on extreme events.
Decay per bar closer to 0.95–0.98 and moderate max lifetime.
Volume filter enabled with a decent multiplier (e.g., 1.5–2.0).
Slow, structural zones
Longer ATR length (e.g., 100+).
Moderate wick and range thresholds.
Decay per bar very close to 1.0 for slow fading.
Higher max lifetime and slightly higher min score threshold so only very weak zones disappear.
Noisy, high-volatility instruments
Increase wick and range ATR multipliers to avoid over-triggering.
Consider enabling the volume filter with stronger settings.
Keep decay moderate to avoid the chart getting overloaded with old zones.
Notes
This is a structural and contextual tool, not a complete trading system. It does not account for transaction costs, execution slippage, or your specific strategy rules. Use it to:
Highlight where liquidity has recently been tested hard.
Rank these areas by decaying strength.
Guide your attention when layering in separate entry signals, risk management, and higher-timeframe context.
Time-Decay Liquidity Zones is designed to keep your chart focused on where the market has most recently “cared” about price, and to gradually forget what no longer matters. Adjust the detection, geometry, decay, and gradient to fit your product and timeframe, and let the zones show you which parts of the tape still have unfinished business.






















