Canadian Dollar Currency IndexCanadian Dollar Currency Index updates in real time and doesn't close like tradingview.com's currency indexes. Based off of the Bank of Canada's CEER methodology and tracks it quite closely, although not perfectly. It seems to be higher than the Bank of Canada's index by 2 points. This could be due to using different data for the currencies and as I am not proficient in PineScript, I don't think I was able to replicate the formula exactly...? Regardless ,it works well and is more than close enough to suit one's purpose of tracking the Canadian dollar against a basket of currencies that are weighted according to the Bank of Canada's total weights (The total weight of a country j in year t is a weighted average of the their import, export and third-market competition weights). For more information on the actual Bank of Canada's index: www.bankofcanada.ca
在脚本中搜索"tradingview界面调整"
Willams %RwEMAspy
Was looking for something else when surfed into an old question
wanting %R 21 period with EMA 13 period of the %R signal
and being a rookie at this, made this code to post for them.
Tried to comment the script in such a way that other rookies
like me could make better sense of what is being done. Hope
this helps someone. I find it useful as one of my indicators for
trading.
Pinescript for tradingview.com user Tom1trader
All time frames.
Interpretation:
%R (Red) crosses above it's average (Blue) - bull
%R crosses below it's average - bear. Background
color changes green-up red-down with above crossings.
Most but not all of serious price movement takes place
from the time the %R (red) goes into oversold (or bought) and
exits again.
%R centerline crosses can also be useful.
I use various indicators and want all of the confirmation
that I can get for expectations BUT I never know what the
next bar will do and define my risks accordingly.
Momentuminator 1.0Here we have a general purpose momentum based long and short flip flop with optional profit target and maximum loss.
Program development: Boffin Hollow Lab
Author: Tarzan at tradingview.com
Release: Version 1.0 May 2016
Please Note: Past Performance is not necessarily indicative of future results
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**
*このインジケータは、トレーディング教育コミュニティに貢献するためにオープンソースとして公開されています。役立った場合は、経験を共有し、他の人の学習を支援してください。*
Multi-Timeframe TTM Squeeze Pro with alerts and screenersBased of John Carters TTM Squeeze. Must open the settings and select wether you want to match the timeframe in your chart. This must be done in the pinescreener as well otherwise results will not be correct.
---
# **Squeeze Momentum Pro – Enhanced Screener + EMA Cross Alerts**
This custom version of the Squeeze Momentum indicator expands the standard TTM-style squeeze with screening and automated alert logic so you can quickly find high-quality setups across many tickers.
---
## **What This Script Does**
This indicator plots a three-level squeeze visual similar to TTM Squeeze:
Dot meanings in this indicator
Orange dot:
Strongest squeeze – Bollinger Bands are inside the tightest Keltner level (highest volatility compression).
Red dot:
Medium squeeze – still compressed, but not as tight as orange.
Black dot:
Weak squeeze / lowest level of volatility compression.
Price is coiling, but not as tight as the higher levels.
Green dot (“Fired”):
Squeeze has released — Bollinger Bands have expanded out of the channels and momentum is moving.
A momentum histogram is plotted to show directional pressure during the squeeze.
---
## **Major Improvements Added**
### **① Screenable Conditions for Stock Scanners**
This version includes multiple `alertcondition()` flags so the script can be used as a **Pine Screener inside TradingView**.
Currently it can screen for:
✔ Price closing above the 50-SMA
✔ Presence of an **orange (strong) squeeze dot**
✔ 6/20 EMA crossover signals inside a squeeze
These can be used inside the TradingView Screener or in watchlists to automatically highlight qualifying tickers.
---
### **② 6/20 EMA Trend Signals (Filtered by Squeeze)**
A crossover system was added:
* **Bullish Signal:** 6 EMA crosses above 20 EMA
* **Bearish Signal:** 6 EMA crosses below 20 EMA
But **these signals only trigger if the market is in a red or orange squeeze**, which helps remove noise and focus on valid setups.
---
### **③ Visual Markers Under the Histogram**
Whenever an EMA crossover occurs during a squeeze:
* A **green up-triangle** is plotted for a bullish cross
* A **red down-triangle** for a bearish cross
These markers are drawn **below the histogram**, keeping the display clean while still providing quick visual cues.
---
### **④ Fully Non-Repainting Logic**
All signals and squeeze calculations are based on standard fully-resolved `ta.*` functions, making the results stable both in backtesting and real-time.
---
## **Who This Script Helps**
This version is ideal for:
* Traders who use TradingView’s screener and want automated breakout/continuation filtering
* Traders who scan large watchlists for squeeze setups
* Users who want trend confirmation during volatility compression
---
## **How to Use It**
1. Add the script to your chart
2. Open TradingView Alerts or Screener
3. Select the conditions you want, for example:
* *“Orange Squeeze Detected”*
* *“Squeeze Fire after 3 squeeze dots*
* *“4 REd Dots in a row.”*
* *“Buy Alert”*
* *“EMA 6/20 Bullish Crossover (Squeeze Only)”*
* *“Close Above 50 SMA”*
Once active, TradingView will automatically flag symbols that meet the criteria.
---
## **Summary**
This enhanced Squeeze Momentum indicator turns the standard TTM-style visual into a **true screening and alert system** by adding:
* Multi-level squeezes
* EMA trend signals
* Screener-compatible alert conditions
* Clean visual signals
* Non-repainting logic
It helps traders quickly locate high-probability setups across any watchlist or market.
Scout Regiment - D17# Scout Regiment - D17 Indicator
## English Documentation
### Overview
Scout Regiment - D17 is a comprehensive TradingView indicator that combines multiple technical analysis tools into one powerful overlay indicator. It provides traders with market structure analysis, divergence detection, volume profiling, smart money concepts, and session analysis.
### Key Features
#### 1. **EMA (Exponential Moving Averages)**
- **Purpose**: Trend identification and dynamic support/resistance levels
- **Configuration**: 13 customizable EMAs with adjustable periods
- **Default Active EMAs**: EMA 3 (21), EMA 5 (55), EMA 7 (144), EMA 8 (233)
- **Uses**: Identify trend direction, entry/exit points, and trend strength
- **Color Coding**: Different colors for easy visual distinction
#### 2. **TFMA (Timeframe Moving Averages)**
- **Purpose**: Multi-timeframe trend analysis
- **Features**:
- 3 EMAs on higher timeframes
- Dynamic labels showing trend direction
- Price difference percentage display
- Customizable timeframe settings
- **Default Settings**: 21-period timeframe with lengths 55, 144, and 233
- **Benefits**: Align trades with higher timeframe trends
#### 3. **DFMA (Daily Frame Moving Averages)**
- **Purpose**: Daily timeframe perspective on any chart
- **Features**: Similar to TFMA but specifically for daily analysis
- **Default Timeframe**: 1D (Daily)
- **Use Case**: Long-term trend confirmation and positioning
#### 4. **PMA (Price Moving Averages)**
- **Purpose**: Price channel analysis with filled areas
- **Configuration**: 7 customizable moving averages with fill zones
- **Default Lengths**: 12, 144, 169, 288, 338, 576, 676
- **Visual**: Color-filled zones between selected MAs for channel trading
#### 5. **VWAP (Volume Weighted Average Price)**
- **Purpose**: Institutional trading levels and fair value
- **Features**:
- Multiple anchor periods (Session, Week, Month, Quarter, Year, etc.)
- Standard deviation bands
- Corporate event anchoring (Earnings, Dividends, Splits)
- **Use Case**: Identify institutional support/resistance and mean reversion opportunities
#### 6. **Divergence Detector**
- **Purpose**: Identify potential trend reversals
- **Supported Indicators**: MACD, MACD Histogram, RSI, Stochastic, CCI, Williams %R, Bias, Momentum, OBV, SOBV, VWmacd, CMF, MFI, and external indicators
- **Divergence Types**:
- Regular Bullish/Bearish
- Hidden Bullish/Bearish
- **Features**:
- Automatic divergence line drawing
- Customizable detection parameters
- Color-coded alerts
#### 7. **Volume Profile & Node Detection**
- **Purpose**: Identify key price levels based on volume distribution
- **Features**:
- Volume Profile with POC (Point of Control)
- Value Area High (VAH) and Value Area Low (VAL)
- Peak and trough volume node detection
- Highest/lowest volume node highlighting
- **Lookback**: Configurable (default 377 bars)
- **Use Case**: Identify support/resistance zones and liquidity areas
#### 8. **Smart Money Concepts**
- **Purpose**: Track institutional trading patterns
- **Features**:
- Market Structure (BOS - Break of Structure, CHoCH - Change of Character)
- Internal and Swing structures
- Strong/Weak Highs and Lows
- Equal Highs/Lows detection
- Fair Value Gaps (FVG)
- **Modes**: Historical or Present (latest only)
- **Use Case**: Trade with institutional flow
#### 9. **Trading Sessions**
- **Purpose**: Analyze market behavior during different global sessions
- **Available Sessions**:
- Asian Session
- Sydney, Tokyo, Shanghai, Hong Kong
- European Session
- London, New York, NYSE
- **Features**:
- Session boxes with high/low visualization
- Real-time countdown timers
- Volume and price change tracking
- Information table with session statistics
- **Customization**: Choose which sessions to display, colors, and box styles
### How to Use
#### For Trend Following:
1. Enable EMAs 3, 5, 7, and 8
2. Use TFMA for higher timeframe confirmation
3. Look for price above/below key EMAs for trend direction
4. Use VWAP as additional confirmation
#### For Reversal Trading:
1. Enable Divergence Detector with MACD Histogram and Bias
2. Look for divergences at key support/resistance levels
3. Confirm with Smart Money CHoCH signals
4. Use Volume Profile nodes as entry/exit targets
#### For Intraday Trading:
1. Enable Trading Sessions
2. Focus on high-volume sessions (London, New York overlap)
3. Use session highs/lows as support/resistance
4. Trade Fair Value Gaps during active sessions
#### For Swing Trading:
1. Use DFMA for daily trend
2. Enable PMA for channel identification
3. Look for price reactions at volume profile value areas
4. Confirm with swing structure breaks
### Best Practices
1. **Don't Overcrowd**: Enable only the components you need for your strategy
2. **Multi-Timeframe Analysis**: Always check higher timeframe TFMA/DFMA
3. **Confluence**: Look for multiple signals confirming the same direction
4. **Volume Confirmation**: Use Volume Profile to validate price action
5. **Session Awareness**: Be aware of which session is active for volatility expectations
### Performance Optimization
- Disable unused features to improve chart loading speed
- Use "Present Mode" for Smart Money Concepts if historical data isn't needed
- Reduce Volume Profile lookback period on slower devices
### Alerts
The indicator includes alert conditions for:
- All divergence types (8 conditions)
- Smart Money structure breaks (8 conditions)
- Equal highs/lows detection
- Fair Value Gaps formation
---
## 中文说明文档
### 概述
Scout Regiment - D17 是一款综合性TradingView指标,将多个技术分析工具整合到一个强大的叠加指标中。它为交易者提供市场结构分析、背离检测、成交量分析、聪明钱概念和时区分析。
### 核心功能
#### 1. **EMA(指数移动平均线)**
- **用途**:趋势识别和动态支撑阻力位
- **配置**:13条可自定义周期的EMA
- **默认启用**:EMA 3(21)、EMA 5(55)、EMA 7(144)、EMA 8(233)
- **应用**:识别趋势方向、进出场点位和趋势强度
- **颜色编码**:不同颜色便于视觉区分
#### 2. **TFMA(时间框架移动平均线)**
- **用途**:多时间框架趋势分析
- **特点**:
- 3条更高时间框架的EMA
- 显示趋势方向的动态标签
- 价格差异百分比显示
- 可自定义时间框架设置
- **默认设置**:21周期时间框架,长度为55、144和233
- **优势**:使交易与更高时间框架趋势保持一致
#### 3. **DFMA(日线框架移动平均线)**
- **用途**:在任何图表上提供日线时间框架视角
- **特点**:与TFMA类似,但专门用于日线分析
- **默认时间框架**:1D(日线)
- **使用场景**:长期趋势确认和定位
#### 4. **PMA(价格移动平均线)**
- **用途**:价格通道分析与填充区域
- **配置**:7条可自定义的移动平均线,带填充区域
- **默认长度**:12、144、169、288、338、576、676
- **视觉效果**:选定MA之间的彩色填充区域,用于通道交易
#### 5. **VWAP(成交量加权平均价格)**
- **用途**:机构交易水平和公允价值
- **特点**:
- 多个锚定周期(交易日、周、月、季度、年等)
- 标准差波段
- 企业事件锚定(财报、分红、拆股)
- **使用场景**:识别机构支撑阻力和均值回归机会
#### 6. **背离检测器**
- **用途**:识别潜在趋势反转
- **支持指标**:MACD、MACD柱状图、RSI、随机指标、CCI、威廉指标、乖离率、动量、OBV、SOBV、VWmacd、CMF、MFI及外部指标
- **背离类型**:
- 常规看涨/看跌背离
- 隐藏看涨/看跌背离
- **特点**:
- 自动绘制背离连线
- 可自定义检测参数
- 颜色编码警报
#### 7. **成交量分布与节点检测**
- **用途**:基于成交量分布识别关键价格水平
- **特点**:
- 成交量分布图与POC(控制点)
- 价值区域高点(VAH)和低点(VAL)
- 峰值和低谷成交量节点检测
- 最高/最低成交量节点突出显示
- **回溯期**:可配置(默认377根K线)
- **使用场景**:识别支撑阻力区域和流动性区域
#### 8. **聪明钱概念**
- **用途**:追踪机构交易模式
- **特点**:
- 市场结构(BOS-突破结构、CHoCH-结构转变)
- 内部和摆动结构
- 强/弱高低点
- 等高/等低检测
- 公允价值缺口(FVG)
- **模式**:历史模式或当前模式(仅最新)
- **使用场景**:跟随机构资金流动交易
#### 9. **交易时区**
- **用途**:分析不同全球时段的市场行为
- **可用时段**:
- 亚洲时段
- 悉尼、东京、上海、香港
- 欧洲时段
- 伦敦、纽约、纽交所
- **特点**:
- 时段方框显示高低点
- 实时倒计时
- 成交量和价格变化追踪
- 时段统计信息表格
- **自定义**:选择显示哪些时段、颜色和方框样式
### 使用方法
#### 趋势跟随策略:
1. 启用EMA 3、5、7和8
2. 使用TFMA进行更高时间框架确认
3. 观察价格在关键EMA上方/下方确定趋势方向
4. 使用VWAP作为额外确认
#### 反转交易策略:
1. 启用背离检测器(MACD柱状图和乖离率)
2. 在关键支撑阻力位寻找背离
3. 用聪明钱CHoCH信号确认
4. 使用成交量分布节点作为进出场目标
#### 日内交易策略:
1. 启用交易时区
2. 关注高成交量时段(伦敦、纽约重叠时段)
3. 使用时段高低点作为支撑阻力
4. 在活跃时段交易公允价值缺口
#### 波段交易策略:
1. 使用DFMA确定日线趋势
2. 启用PMA识别通道
3. 观察价格在成交量分布价值区域的反应
4. 用摆动结构突破确认
### 最佳实践
1. **避免过度拥挤**:仅启用策略所需的组件
2. **多时间框架分析**:始终检查更高时间框架的TFMA/DFMA
3. **汇合点**:寻找多个信号确认同一方向
4. **成交量确认**:使用成交量分布验证价格行为
5. **时段意识**:了解当前活跃时段以预期波动性
### 性能优化
- 禁用未使用的功能以提高图表加载速度
- 如果不需要历史数据,对聪明钱概念使用"当前模式"
- 在较慢设备上减少成交量分布回溯期
### 警报
指标包含以下警报条件:
- 所有背离类型(8个条件)
- 聪明钱结构突破(8个条件)
- 等高/等低检测
- 公允价值缺口形成
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
HTF Candles Pro by MurshidFx# HTF Candles Pro by MurshidFx
## Professional Trading Indicator for Multi-Timeframe Market Structure Analysis
**HTF Candles Pro** is an advanced, open-source trading indicator that synthesizes Higher Timeframe (HTF) candle visualization with CISD (Change in State of Delivery) detection, providing comprehensive market structure analysis across multiple timeframes. Designed for traders at all experience levels—from scalpers to swing traders—this tool enables precise alignment of trades with higher timeframe momentum while identifying critical market structure transitions.
---
## Core Functionality
This indicator integrates three essential analytical frameworks:
- **HTF Candle Visualization** – Inspired by the innovative work of Fadi x MMT's MTF Candles indicator
- **CISD Detection System** – Algorithmic identification of significant market structure reversals
- **Intelligent Session Level Management** – Automated consolidation of overlapping session markers for enhanced chart clarity
The result is a sophisticated yet streamlined analytical tool that delivers actionable market insights with minimal visual complexity.
---
## Feature Set
### Higher Timeframe Candle Analysis
Monitor higher timeframe price action seamlessly without chart switching. The indicator employs automatic HTF selection based on current timeframe, with manual override capability.
**Components:**
- **Primary HTF Display**: Automatically positioned adjacent to current price action
- **Secondary HTF Display**: Optional dual-timeframe analysis capability
- **Adaptive Time Labeling**: Context-aware formatting (intraday times, day names, week numbers)
- **Real-Time Countdown**: Optional timer displaying remaining time until HTF candle close
- **Customizable Color Schemes**: Full color customization for bullish and bearish candles
### CISD Detection (Change in State of Delivery)
The CISD system identifies critical inflection points where market structure undergoes directional change, signaling potential trend reversals or continuations.
**Mechanism:**
- **Market Structure Monitoring**: Continuous tracking of swing highs and lows
- **Liquidity Sweep Detection**: Identification of stop-hunt patterns preceding reversals
- **Reversal Confirmation**: Validation-based CISD level plotting upon structure break confirmation
- **Clear Visual Signals**: Bullish CISD (blue) and bearish CISD (red) demarcation
- **Optimized Display**: Default 5-bar line length (adjustable) minimizes chart clutter
**Technical Definition:**
CISD occurs when price breaches structure in one direction—typically sweeping liquidity and triggering stops—then reverses to break structure in the opposite direction, indicating a fundamental shift in market delivery bias.
### Intelligent Session Level Management
Eliminates visual clutter caused by overlapping session opens at identical price levels through automated consolidation.
**Functionality:**
- **Automatic Consolidation**: Merges multiple concurrent session opens into single reference lines
- **Combined Labeling**: Creates unified labels (e.g., "Week-Day Open," "4H-Day-Week Open")
- **Enhanced Clarity**: Maintains professional chart aesthetics while preserving all relevant information
**Supported Session Intervals:**
- 30-Minute Opens
- 4-Hour Opens
- Daily Opens
- Weekly Opens
- Monthly Opens
### Advanced Market Structure Tools
**Liquidity Sweep Identification:**
Highlights price wicks extending beyond previous HTF extremes that close within range—characteristic liquidity grab patterns.
**HTF Midpoint Reference:**
Displays the 50% retracement level of the most recent completed HTF candle, serving as a key reference for entries and profit targets.
**HTF Opening Price:**
Tracks current HTF candle open price, frequently functioning as dynamic support or resistance.
**Interval Demarcation:**
Visual separators defining HTF period boundaries for enhanced temporal clarity.
### Information Dashboard
Compact, customizable dashboard displaying:
- Current symbol and active timeframe
- HTF candle countdown timer
- Active trading session (Asia/London/New York)
- Current date and time
Flexible positioning: configurable for any chart corner.
---
## Default Configuration
Optimized settings for immediate professional-grade chart presentation:
- **Secondary HTF**: Disabled (enable for multi-timeframe comparative analysis)
- **CISD Bullish Color**: Blue (#0080ff) – optimal visibility with reduced eye strain
- **CISD Line Width**: 1 pixel – subtle yet discernible
- **CISD Line Length**: 5 bars – balanced visibility without excessive clutter
- **Session Opens**: Smart consolidation enabled – eliminates overlapping labels
---
## Application Strategies
### Trend Following
1. Monitor CISD confirmations aligned with HTF trend direction
2. Utilize HTF candle color for directional bias confirmation
3. Execute entries on pullbacks to HTF midpoint or open price levels
### Reversal Trading
1. Identify counter-trend CISD formations
2. Await HTF candle close confirming new directional bias
3. Use session opens as secondary confirmation levels
### Scalping
1. Trade exclusively in HTF candle direction
2. Employ lower timeframe CISD signals for precise entry timing
3. Target HTF midpoint or subsequent session open levels
### Structure-Based Trading
1. Mark liquidity sweep levels as potential reversal zones
2. Monitor CISD formations at key session opens
3. Confirm trend changes via HTF candle closes
---
## Customization Parameters
Comprehensive customization options:
- **Color Schemes**: Independent control of bull/bear candles, borders, CISD signals, session levels
- **Dimensional Settings**: Candle width, line thickness, label sizing
- **Display Quantities**: HTF candle count (1-10 range)
- **Positioning**: Candle offset, dashboard placement, label positioning
- **Line Styles**: Solid, dashed, or dotted rendering
- **Timeframe Selection**: Manual secondary HTF specification
---
## Attribution
**HTF Candle Visualization:**
The HTF candle rendering methodology draws inspiration from Fadi x MMT's "MTF Candles" indicator. Their elegant implementation of multi-timeframe candle visualization provided valuable reference for this development. Recognition and appreciation to their contribution to the TradingView community.
**CISD Detection:**
Proprietary CISD detection algorithm engineered to identify market structure transitions with high signal clarity and reduced false positive rate.
**Session Level Consolidation:**
Custom-developed intelligent grouping system addressing the common challenge of overlapping session labels at coincident price levels.
---
## Open Source License
This indicator is released as open source for the TradingView community. Permitted uses include:
- Implementation in live trading
- Educational study for Pine Script learning
- Personal modification and customization
- Distribution among trading communities
Community contributions, improvements, and derivative works are welcomed and encouraged.
---
## Implementation Guide
1. **Installation**: Click "Add to Chart"
2. **Configuration Access**: Open indicator settings panel
3. **Initial Use**: Default settings provide optimal starting configuration
4. **Optional Features**: Enable secondary HTF for multi-timeframe analysis
5. **Theme Integration**: Adjust color schemes to match chart aesthetics
---
## Best Practices
**Timeframe Optimization:**
- 1-5 minute charts: Optimal with 15m or 1H HTF
- 15-30 minute charts: Effective with 4H HTF
- 1-4 hour charts: Suitable for Daily HTF
- Daily charts: Best utilized with Weekly/Monthly HTF
**CISD Trading Guidelines:**
- Require CISD confirmation before position entry
- Prioritize CISD signals at significant levels (session opens, HTF midpoints)
- Confirm CISD direction aligns with HTF candle bias
- Apply contextual filtering—not all CISD signals warrant trades
**Session Open Strategy:**
- Weekly opens typically provide robust support/resistance
- Daily opens offer reliable intraday reference points
- 4-Hour opens effective for short-term scalping
- Consolidated labels (e.g., "Week-Day Open") indicate confluence zones with elevated significance
---
## Technical Specifications
**Performance Optimization:**
- Intelligent object management prevents TradingView rendering limits
- Efficient array processing for session consolidation
- Proper memory management through systematic object deletion
- Consistent performance across all timeframe ranges
**Compatibility:**
- Universal timeframe support
- Optimized for all market types (forex, stocks, crypto, futures)
- Minimal computational overhead
---
## Support & Development
**Feedback Channels:**
- Comment section for user feedback and suggestions
- Bug reports and feature requests welcomed
- Community-driven enhancement consideration
**Documentation:**
- Well-commented source code for learning purposes
- Clear section organization for easy navigation
- Comprehensive type definitions for structural clarity
- Educational value for market structure concept understanding
---
## Version Information
**Version:** 1.0 (Initial Release)
**License:** Open Source
**Category:** Multi-Timeframe Analysis | Market Structure
**Compatibility:** All Timeframes
**Language:** Pine Script v5
---
**For optimal results:**
- Provide feedback through comments
- Share with trading communities
- Submit enhancement suggestions
- Report technical issues for resolution
**Professional Support:**
Available through comment section for technical inquiries, implementation questions, and feature requests.
---
*Developed for the TradingView trading community | Professional-grade market structure analysis | Open source contribution*
Ross Cameron 5 Pillars FilterFirst, I am not Ross Cameron. This indicator is based on his five pillars of stock selection.
ROSS CAMERON 5 PILLARS MOMENTUM FILTER
🎯 OVERVIEW
This indicator automatically checks if the current symbol meets Ross Cameron's famous "5 Pillars" stock selection criteria from Warrior Trading - a proven methodology for identifying high-probability momentum day trading setups.
📊 ROSS CAMERON'S 5 PILLARS
1️⃣ RELATIVE VOLUME ≥5x (Automated ✅)
• Compares current volume to 30-day average
• Minimum 5x confirms institutional/retail interest
• High RVol = high liquidity and momentum potential
2️⃣ DAILY % CHANGE ≥10% (Automated ✅)
• Stock must already be showing momentum
• Default threshold: 10% up from previous close
• Confirms demand is already present
3️⃣ NEWS CATALYST (Manual Check ⚠️)
• Breaking news justifies the price movement
• Look for: earnings, FDA approvals, partnerships, contracts
• 🔥 icon flags stocks with ≥15% momentum (likely news-driven)
4️⃣ PRICE RANGE $1-$20 (Automated ✅)
• Sweet spot for retail trader momentum
• Highly volatile small-cap stocks
• Accessible price range for position building
5️⃣ FLOAT <10 MILLION SHARES (Automated ✅)
• Low float creates supply/demand imbalances
• Enables explosive 50-100%+ intraday moves
• Automatically checked when data available
• Shows actual float with ✅/❌ indicator
🚀 KEY FEATURES
✅ GREEN BACKGROUND HIGHLIGHT
• Visual alert when ALL automated criteria are met
• Instantly identify potential setups while scanning watchlist
📋 DETAILED BREAKDOWN TABLE
• Shows pass/fail status for each pillar
• Displays actual values (RVol, %, Float, etc.)
• Color-coded for quick interpretation
🔥 STRONG MOMENTUM INDICATOR
• Highlights stocks ≥15% (likely have news catalyst)
• Helps prioritize which stocks to research first
🔔 BUILT-IN ALERTS
• "Ross Cameron Criteria Met" - All automated criteria pass
• "Strong Momentum Alert" - Stock showing explosive movement
⚙️ FULLY CUSTOMIZABLE
• Adjust all thresholds to your trading style
• Configurable table position and display
• Toggle volume spike filter on/off
💡 HOW TO USE
BEST WORKFLOW:
1. Build a watchlist of small-cap stocks using TradingView's Stock Screener
2. Add this indicator to your charts
3. Flip through your watchlist - look for GREEN BACKGROUNDS
4. Check the table for detailed breakdown of each pillar
5. VERIFY NEWS CATALYST (required for Pillar 3)
6. If float shows N/A, verify manually on Finviz
7. Execute your trading plan with proper risk management
OPTIMAL TIMING:
• Pre-Market (8:00-9:30 AM ET) - Identify gap-up candidates
• Morning Session (9:30 AM-12:00 PM ET) - Prime momentum window
• Avoid lunch hour (12:00-2:00 PM ET) - Low volume, choppy
ALERT SETUP:
1. Click "Create Alert" on your chart
2. Select "Ross Cameron Criteria Met" condition
3. Get notified when new setups appear real-time
⚙️ CUSTOMIZABLE SETTINGS
PILLAR 1 - RELATIVE VOLUME:
• Min RVol: 5.0x (Ross's minimum, increase for more selective)
• RVol Period: 30 days (industry standard)
PILLAR 2 - MOMENTUM:
• Min Daily %: 10% (increase to 15% for stronger setups)
PILLAR 3 - CATALYST:
• Strong Momentum %: 15% (threshold for 🔥 indicator)
PILLAR 4 - PRICE RANGE:
• Min Price: $1.00 (adjust based on account size)
• Max Price: $20.00 (Ross's sweet spot)
PILLAR 5 - FLOAT:
• Max Float: 10M shares (ultra-aggressive traders use 5M)
ADDITIONAL FILTERS:
• Volume Spike: 2x (Warrior Trading standard)
• Confirms intraday momentum continuation
📈 INTERPRETATION GUIDE
✅ GREEN BACKGROUND = GO!
• All automated criteria are met
• Check news catalyst before trading
• Verify setup on chart (not overextended)
• Follow your risk management plan
❌ NO GREEN BACKGROUND = WAIT
• At least one criterion failed
• Check table to see which pillar(s) failed
• May become valid later if momentum increases
🔥 FLAME ICON = HIGH PRIORITY
• Stock showing very strong momentum (≥15%)
• Likely has significant news catalyst
• Research news IMMEDIATELY
• Often the best setups of the day
⚠️ N/A FOR FLOAT = MANUAL CHECK
• TradingView doesn't have float data for this symbol
• Verify on Finviz.com or similar
• If float >10M, setup is invalid per Ross's criteria
📚 RECOMMENDED STRATEGIES
GAP AND GO:
• Stock gaps up 10%+ on news
• Enters above gap high with volume
• Targets: 20-50% gains
VWAP BOUNCE:
• Pullback to VWAP support
• Enters on bounce with volume confirmation
• Tight stop below VWAP
HIGH OF DAY BREAKOUT:
• New HOD with volume surge
• Momentum continuation play
• Trail stop as it runs
ABCD PATTERN:
• Classic reversal pattern
• Enters on D-point breakout
• Target: A-B distance from C
⚠️ RISK WARNINGS
• DAY TRADING IS HIGHLY RISKY - Most day traders lose money
• This indicator finds setups - YOUR EXECUTION determines success
• Always use proper risk management (1-2% risk per trade)
• Never trade without stop losses
• Paper trade extensively before using real money
• Past performance does not guarantee future results
🔧 TECHNICAL DETAILS
• Pine Script v6
• Works on any timeframe (calculates daily metrics automatically)
• Compatible with TradingView Free, Pro, Premium
• No repainting - all calculations based on confirmed data
• Efficient code - minimal lag
📊 DATA SOURCES
• Relative Volume: Calculated from 30-day volume average
• Daily %: Previous day's close vs current price
• Float: TradingView's shares_outstanding_float data
• Volume Spike: 20-period volume moving average
🎯 WHO THIS IS FOR
IDEAL FOR:
✅ Day traders focused on momentum strategies
✅ Traders who follow Ross Cameron/Warrior Trading methodology
✅ Small-cap stock traders ($1-$20 range)
✅ Scalpers and swing traders seeking high-volatility setups
NOT IDEAL FOR:
❌ Long-term investors
❌ Large-cap stock traders
❌ Options-only traders
❌ Traders who don't monitor news catalysts
💬 USAGE TIPS
1. COMBINE WITH OTHER TOOLS
• Use alongside your charting/technical analysis
• Verify pattern setups (bull flags, ABCD, etc.)
• Check Level 2 / Time & Sales for confirmation
2. MAINTAIN A WATCHLIST
• Update daily with fresh small-cap movers
• Use Finviz Gap Scanner as starting point
• Focus on sectors with momentum
3. RISK MANAGEMENT IS KEY
• Never risk more than 1-2% per trade
• Use 2:1 minimum profit/loss ratio
• Cut losses quickly, let winners run
• Position size based on volatility (ATR)
4. TRACK YOUR RESULTS
• Keep a trading journal
• Note which setups work best for you
• Refine criteria based on your data
• Continuous improvement mindset
📝 DISCLAIMER
This indicator is for EDUCATIONAL PURPOSES ONLY. It is not investment advice, a recommendation to buy/sell securities, or a guarantee of profits. Trading involves substantial risk of loss. Always:
• Conduct your own research and due diligence
• Consult with a licensed financial advisor
• Never risk money you cannot afford to lose
• Understand that most day traders lose money
• Practice in a simulator before trading real money
The creator of this indicator is not affiliated with Ross Cameron or Warrior Trading. This is an independent implementation of publicly available trading methodology.
📈 SUPPORT & FEEDBACK
If you find this indicator helpful, please:
• Give it a thumbs up 👍
• Leave a comment with your experience
• Share with other momentum traders
• Follow for updates and new indicators
For questions or suggestions, leave a comment below!
---
🏆 HAPPY TRADING! Remember: The indicator finds opportunities, but YOUR discipline, risk management, and execution determine your success.
#DayTrading #Momentum #RossCameron #WarriorTrading #SmallCaps #GapAndGo #Scalping #StockScreener
Multi-Symbol EMA Crossover Scanner with Multi-Timeframe AnalysisDescription
What This Indicator Does:
This indicator is a comprehensive market scanner that monitors up to 10 symbols simultaneously across 4 different timeframes (15-minute, 1-hour, 4-hour, and daily) to detect exponential moving average (EMA) crossovers in real-time. Instead of manually checking multiple charts and timeframes for EMA crossover signals, this scanner automatically does the work for you and presents all detected signals in a clean, organized table that updates continuously throughout the trading session.
Key Features:
Multi-Symbol Monitoring: Scan up to 10 different symbols at once (stocks, forex, crypto, or any TradingView symbol)
Multi-Timeframe Analysis: Simultaneously tracks 4 timeframes (15m, 1H, 4H, 1D) with toggle options to enable/disable each
Comprehensive EMA Pairs: Detects crossovers between all major EMA combinations: 20×50, 20×100, 20×200, 50×100, 50×200, and 100×200
Real-Time Signal Feed: Displays the most recent signals in a sorted table (newest first) with timestamp, direction, price, and EMA pair information
Session Filter: Built-in time filter (default 10:00-18:00) to focus on specific trading hours and avoid pre-market/after-hours noise
Pagination System: Navigate through signals using a page selector when you have more signals than fit in one view
Signal Statistics: Footer displays total signals, bullish/bearish breakdown, and page navigation hints
Customizable Display: Choose table position (4 corners), signals per page (5-20), and maximum signal history (10-100)
How It Works:
The scanner uses the request.security() function to fetch EMA data from multiple symbols and timeframes simultaneously. For each symbol-timeframe combination, it calculates four exponential moving averages (20, 50, 100, and 200 periods) and monitors for crossovers:
Bullish Crossovers (▲ Green):
Faster EMA crosses above slower EMA
Indicates potential upward momentum
Common entry signals for long positions
Bearish Crossovers (▼ Red):
Faster EMA crosses below slower EMA
Indicates potential downward momentum
Common entry signals for short positions or exits
The scanner prioritizes crossovers involving faster EMAs (20×50) over slower ones (100×200), as faster crossovers typically generate more frequent signals. Each detected crossover is stored with its timestamp, allowing the scanner to sort signals chronologically and remove duplicates within the same timeframe.
Signal Table Columns:
Sym: Symbol name (abbreviated, e.g., "ASELS" instead of "BIST:ASELS")
TF: Timeframe where the crossover occurred (15m, 1h, 4h, 1D)
⏰: Exact time of the crossover (HH:MM format in Istanbul timezone)
↕: Direction indicator (▲ bullish green / ▼ bearish red)
₺: Price level where the crossover occurred (average of the two EMAs)
MA: Which EMA pair crossed (e.g., "20×50", "50×200")
How to Use:
For Day Traders:
Enable 15m and 1h timeframes
Monitor symbols from your watchlist
Use crossovers as entry timing signals in the direction of the larger trend
Adjust the time filter to match your trading session (e.g., market open to 2 hours before close)
For Swing Traders:
Enable 4h and 1D timeframes
Focus on 50×200 and 100×200 crossovers (golden/death crosses)
Look for multiple timeframe confluence (same symbol showing bullish crossovers on both 4h and 1D)
Use as a pre-market scanner to identify potential setups for the day
For Multi-Market Traders:
Mix symbols from different markets (stocks, forex, crypto)
Use the scanner to identify which markets are showing the most momentum
Track relative strength by comparing crossover frequency across symbols
Identify rotation opportunities when one asset shows bullish signals while another shows bearish
Setup Recommendations:
Default BIST (Turkish Stock Market) Setup:
The code comes pre-configured with 10 popular BIST stocks:
ASELS, EKGYO, THYAO, AKBNK, PGSUS, ASTOR, OTKAR, ALARK, ISCTR, BIMAS
For US Stocks:
Replace with symbols like: NASDAQ:AAPL, NASDAQ:TSLA, NASDAQ:NVDA, NYSE:JPM, etc.
For Forex:
Use pairs like: FX:EURUSD, FX:GBPUSD, FX:USDJPY, OANDA:XAUUSD, etc.
For Crypto:
Use exchanges like: BINANCE:BTCUSDT, COINBASE:ETHUSD, BINANCE:SOLUSDT, etc.
Settings Guide:
Symbol List (10 inputs):
Enter any valid TradingView symbol in "EXCHANGE:TICKER" format
Use symbols you actively trade or monitor
Mix different asset classes if desired
Timeframe Toggles:
15 Minutes: High-frequency signals, best for day trading
1 Hour: Balanced frequency, good for intraday swing trades
4 Hours: Lower frequency, quality swing trade signals
1 Day: Low frequency, major trend changes only
Time Filter:
Start Hour (10): Beginning of your trading session
End Hour (18): End of your trading session
Prevents signals during low-liquidity periods
Adjust to match your market's active hours
Display Settings:
Table Position: Choose corner placement (doesn't interfere with other indicators)
Max Signals (40): Total historical signals to keep in memory
Signals Per Page (10): How many rows to show at once
Page Number: Navigate through signal history (auto-adjusts to available pages)
What Makes This Original:
Multi-symbol scanners exist on TradingView, but this indicator's originality comes from:
Comprehensive EMA Pair Coverage: Most scanners focus on 1-2 EMA pairs, this monitors 6 different combinations simultaneously
Unified Multi-Timeframe View: Presents signals from 4 timeframes in a single, chronologically sorted feed rather than separate panels
Session-Aware Filtering: Built-in time filter prevents signal overload from 24-hour markets
Smart Pagination: Handles large signal volumes gracefully with page navigation instead of scrolling
Signal Deduplication: Prevents the same crossover from appearing multiple times if it persists across several bars
Price-at-Cross Recording: Captures the exact price where the crossover occurred, not just that it happened
Real-Time Statistics: Live tracking of bullish vs bearish signal distribution
Trading Strategy Examples:
Trend Confirmation Strategy:
Find a symbol showing bullish crossover on 1D (major trend change)
Wait for pullback
Enter when 1h shows bullish crossover (confirmation)
Exit when 1h shows bearish crossover
Multi-Timeframe Confluence:
Look for symbols appearing multiple times with same direction
Example: ASELS shows ▲ on both 4h and 1D = strong bullish signal
Avoid symbols showing conflicting signals (▲ on 1h but ▼ on 4h)
Rotation Scanner:
Monitor 10+ symbols from the same sector
Identify which are turning bullish (▲) first
Enter leaders, avoid laggards
Rotate out when crossovers turn bearish (▼)
Important Considerations:
Not a Complete System: EMA crossovers should be confirmed with price action, volume, and support/resistance analysis
Whipsaw Risk: During consolidation, EMAs can cross back and forth frequently (especially on 15m timeframe)
Lag: EMAs are lagging indicators; crossovers occur after the move has already begun
False Signals: More common during sideways markets; work best in trending environments
Symbol Limits: TradingView has limits on request.security() calls; this scanner uses 40 calls (10 symbols × 4 timeframes)
Performance: On lower-end devices, scanning 10 symbols across 4 timeframes may cause slight delays in chart updates
Best Practices:
Start with 5 symbols and 2 timeframes, then expand as you get comfortable
Use in conjunction with a main chart for price context
Don't trade every signal—filter for high-quality setups
Backtest your favorite EMA pairs on your symbols to understand their reliability
Adjust the time filter to exclude lunch hours if your market has low midday volume
Check the footer statistics—if you're getting 50+ signals per day, tighten your time filter or reduce symbols
Technical Notes:
Uses lookahead=barmerge.lookahead_off to prevent future data leakage
Signals are stored in arrays and sorted by timestamp (newest first)
Automatic daily reset clears old signals to prevent memory buildup
Table dynamically resizes based on signal count
All times displayed in Europe/Istanbul timezone (configurable in code)
Smart VWAP FVG SystemSmart VWAP FVG System - Professional Multi-Filter Trading Indicator
📊 OVERVIEW
The Smart VWAP FVG System is an advanced multi-layered trading indicator that combines institutional volume analysis, multi-timeframe VWAP trend confirmation, and Fair Value Gap detection to identify high-probability trade entries. This indicator uses a sophisticated filtering mechanism where signals appear only when multiple independent confirmation criteria align simultaneously.
Recommended Timeframe: 5-minute (M5) or higher. The indicator works best on M5, M15, and M30 charts for intraday trading.
🎯 ORIGINALITY & PURPOSE
This indicator is original because it combines three distinct analytical methods into a unified decision-making system:
Market Profile Volume Analysis - Identifies institutional accumulation/distribution zones
Dual VWAP Filtering - Confirms trend direction using two independent VWAP calculations
Fair Value Gap Detection - Validates institutional interest through price inefficiency zones
The key innovation is the directional filter system: the primary Market Profile generates BUY-ONLY or SELL-ONLY states based on higher timeframe value area reversals, which then controls which signals from the main system are displayed. This creates a multi-timeframe confluence that significantly reduces false signals.
Unlike simple indicator mashups, each component serves a specific purpose:
Market Profile → Direction bias (trend filter)
Primary VWAP (Session) → Short-term trend confirmation
Secondary VWAP (Week) → Medium-term trend confirmation
FVG Detection → Institutional activity validation
🔧 HOW IT WORKS
1. Primary Market Profile Filter (Higher Timeframe)
The indicator calculates Market Profile on a higher timeframe (default: 1 hour) to determine the overall market structure:
Value Area High (VAH): Top 70% of volume distribution
Value Area Low (VAL): Bottom 70% of volume distribution
Point of Control (POC): Price level with highest volume
When price reaches VAH and reverses down → SELL-ONLY mode activated
When price reaches VAL and reverses up → BUY-ONLY mode activated
This higher timeframe filter ensures you're trading in the direction of institutional flow.
2. Dual VWAP System
Two independent VWAP calculations provide multi-timeframe trend confirmation:
Primary VWAP (Session-based): Resets daily, tracks intraday momentum
Secondary VWAP (Week-based): Resets weekly, confirms longer-term trend
Filter Logic:
BUY signals require: Price > Primary VWAP AND Price > Secondary VWAP
SELL signals require: Price < Primary VWAP AND Price < Secondary VWAP
This dual confirmation prevents counter-trend trades during ranging conditions.
3. Fair Value Gap (FVG) Detection
FVG zones identify price inefficiencies where institutional orders were executed rapidly:
Bullish FVG: Gap between candle .high and candle .low (upward imbalance)
Bearish FVG: Gap between candle .high and candle .low (downward imbalance)
The indicator monitors recent FVG formation (lookback: 50 bars) and requires:
Bullish FVG present for BUY signals
Bearish FVG present for SELL signals
FVG zones are displayed as colored boxes and automatically marked as "mitigated" when price fills the gap.
4. Main Trading Signal Logic
The secondary Market Profile (default: 1 hour) generates the actual trading signals:
BUY Signal Conditions:
Price reaches Value Area Low
Reversal pattern confirmed (minimum 1 bar)
Price > Primary VWAP
Price > Secondary VWAP (if filter enabled)
Recent Bullish FVG detected (if filter enabled)
Primary MP Filter = BUY-ONLY or NEUTRAL
SELL Signal Conditions:
Price reaches Value Area High
Reversal pattern confirmed (minimum 1 bar)
Price < Primary VWAP
Price < Secondary VWAP (if filter enabled)
Recent Bearish FVG detected (if filter enabled)
Primary MP Filter = SELL-ONLY or NEUTRAL
All conditions must be TRUE simultaneously for a signal to appear.
📈 VISUAL ELEMENTS
On Chart:
🟢 Green Triangle (▲) = BUY Signal
🔴 Red Triangle (▼) = SELL Signal
🟦 Blue horizontal lines = Value Area zones
🟡 Yellow line = Point of Control (POC)
🟩 Green boxes = Bullish FVG zones
🟥 Red boxes = Bearish FVG zones
🔵 Blue line = Primary VWAP (Session)
⚪ White line = Secondary VWAP (Week)
Info Panel (Top Right):
Real-time status display showing:
Filter Direction (BUY ONLY / SELL ONLY / NEUTRAL)
Active timeframes for both MP filters
FVG filter status and count
VWAP positions (ABOVE/BELOW)
Signal enablement status
Alert status
⚙️ KEY SETTINGS
MP/TPO Filter Settings (Primary Indicator)
MP Filter Time Frame: 60 minutes (controls directional bias)
Filter Value Area %: 70% (standard Market Profile calculation)
Filter Alert Distance: 1 bar
Filter Min Bars for Reversal: 1 bar
Filter Alert Zone Margin: 0.01 (1%)
FVG Filter Settings
Use FVG Filter: Enabled (toggle on/off)
FVG Timeframe: 60 minutes (1 hour)
FVG Filter Mode: Both (require bullish FVG for BUY, bearish for SELL)
FVG Lookback Period: 50 bars (how far back to search)
Show FVG Formation Signals: Optional visual markers
Max FVG on Chart: 50 zones
Show Mitigated FVG: Display filled gaps
Market Profile Settings
Higher Time Frame: 60 minutes (for main signals)
Percent for Value Area: 70%
Show POC Line: Enabled
Keep Old MPs: Enabled (maintain historical profiles)
Primary VWAP Filter
Use Primary VWAP Filter: Enabled
Primary VWAP Anchor Period: Session (resets daily)
Primary VWAP Source: HLC3 (typical price)
Secondary VWAP Filter
Use Secondary VWAP Filter: Enabled
Secondary VWAP Anchor Period: Week (resets weekly)
Secondary VWAP Filter Mode: Both
Secondary VWAP Line Color: White
Trading Signals
Show Trading Signals on Chart: Enabled
Show SELL Signals: Enabled
Show BUY Signals: Enabled
Alert Distance: 1 bar
Min Bars for Reversal: 1 bar
Alert Zone Margin: 0.01 (1%)
Retest Search Period: 20 bars
Min Bars Between Retests: 5 bars
Show Only Retests: Disabled
Alert Settings
Enable Trading Notifications: Enabled
VAH Reversal Alert: Enabled (SELL signals)
VAL Reversal Alert: Enabled (BUY signals)
Time Filter Settings
Filter Alerts By Time: Optional (exclude specific hours)
⚠️ IMPORTANT WARNINGS & LIMITATIONS
1. Repainting Behavior
CRITICAL: This indicator uses lookahead=barmerge.lookahead_on to access higher timeframe data immediately for FVG detection. This is necessary to provide real-time FVG zone visualization but has the following implications:
FVG zones may shift slightly until the higher timeframe candle closes
FVG detection signals are preliminary until HTF bar confirmation
The main trading signals (triangles) appear on confirmed bars and do not repaint
Best Practice: Always wait for the current timeframe bar to close before acting on signals. The filter status and FVG zones are informational but may adjust as new data arrives.
2. Minimum Timeframe
Do NOT use on timeframes below 5 minutes (M5)
Recommended: M5, M15, M30 for intraday trading
Higher timeframes (H1, H4) can also be used but will generate fewer signals
3. Multiple Filters Can Block Signals
By design, this indicator is conservative. When all filters are enabled:
Signals appear ONLY when all conditions align
You may see extended periods with no signals
This is intentional to reduce false positives
If you see no signals:
Check the Info Panel to see which filters are failing
Consider adjusting FVG lookback period
Temporarily disable FVG filter to test
Verify VWAP filters match current market trend
4. Market Profile Limitations
Market Profile requires sufficient volume data
Low-volume instruments may produce unreliable profiles
Value Areas update only on higher timeframe bar close
Works best on liquid markets (major forex pairs, indices, crypto)
📖 HOW TO USE
Step 1: Add to Chart
Apply indicator to M5 or higher timeframe chart
Ensure chart shows volume data
Use standard candles (NOT Heikin Ashi, Renko, etc.)
Step 2: Configure Settings
Primary MP Filter TF: Set to 60 (1 hour) minimum, or 240 (4 hour) for swing trading
Main MP TF: Set to 60 (1 hour) for intraday signals
FVG Timeframe: Match or exceed main MP timeframe
Leave other settings at default initially
Step 3: Understand the Info Panel
Monitor the top-right panel:
FILTER STATUS: Shows current directional bias
NEUTRAL = Both signals allowed
BUY ONLY = Only green triangles will appear
SELL ONLY = Only red triangles will appear
FVG Filter: Shows if bullish/bearish gaps detected recently
VWAP positions: Confirms trend alignment
Step 4: Take Signals
For BUY Signal (Green Triangle ▲):
Wait for green triangle to appear
Check Info Panel shows ✓ for BUY signals
Confirm current bar has closed
Enter long position
Stop loss: Below recent VAL or swing low
Target: Previous Value Area High or 1.5-2× risk
For SELL Signal (Red Triangle ▼):
Wait for red triangle to appear
Check Info Panel shows ✓ for SELL signals
Confirm current bar has closed
Enter short position
Stop loss: Above recent VAH or swing high
Target: Previous Value Area Low or 1.5-2× risk
Step 5: Risk Management
Risk per trade: Maximum 1-2% of account equity
Position sizing: Adjust based on stop loss distance
Avoid trading: During major news events or time filter periods
Multiple confirmations: Look for confluence with price action (support/resistance, trendlines)
🎓 UNDERLYING CONCEPTS
Market Profile Theory
Developed by J. Peter Steidlmayer in the 1980s, Market Profile organizes price and volume data to identify:
Value Areas: Where 70% of trading activity occurred
POC: Price level with highest acceptance (most volume)
Imbalances: When price moves away from value quickly
This indicator uses TPO (Time Price Opportunity) calculation method to build the volume profile distribution.
VWAP (Volume Weighted Average Price)
VWAP represents the average price weighted by volume, showing where institutional traders are positioned:
Price above VWAP = Bullish (institutions accumulated lower)
Price below VWAP = Bearish (institutions distributed higher)
Using dual VWAP (Session + Week) creates multi-timeframe trend alignment.
Fair Value Gaps (FVG)
Also known as "imbalance" or "inefficiency," FVG occurs when:
Price moves so rapidly that a gap forms in the candlestick structure
Indicates institutional order flow (large market orders)
Price often returns to "fill" these gaps (rebalance)
The 3-candle FVG pattern (gap between candle and candle ) is widely used in ICT (Inner Circle Trader) methodology and Smart Money Concepts.
🔍 CREDITS & CODE ATTRIBUTION
This indicator builds upon established technical analysis concepts and combines multiple methodologies:
1. Market Profile / TPO Calculation
Concept Origin: J. Peter Steidlmayer (Chicago Board of Trade, 1980s)
Code Inspiration: TradingView's public domain Market Profile examples
Modifications: Custom filtering logic for directional bias, dual timeframe implementation
2. VWAP Calculation
Concept Origin: Standard financial instrument (widely used since 1980s)
Code Base: TradingView built-in ta.vwap() function (public domain)
Modifications: Dual VWAP system with independent anchor periods, custom filtering modes
3. Fair Value Gap Detection
Concept Origin: Inner Circle Trader (ICT) / Smart Money Concepts methodology
Code Implementation: Original implementation based on 3-candle gap pattern
Features: Multi-timeframe detection, automatic mitigation tracking, visual zone display
4. Pine Script Framework
Language: Pine Script v6 (TradingView)
Built-in Functions Used:
ta.vwap() - Volume weighted average price
request.security() - Higher timeframe data access
ta.change() - Period detection
ta.cum() - Cumulative volume
time() - Timestamp functions
Note: All code is original implementation. While concepts are based on established trading methodologies, the combination, filtering logic, and execution are unique to this indicator.
📊 RECOMMENDED INSTRUMENTS
Best Performance:
Major Forex Pairs (EURUSD, GBPUSD, USDJPY)
Stock Indices (ES, NQ, SPX, DAX)
Major Cryptocurrencies (BTCUSD, ETHUSD)
Liquid Stocks (high daily volume)
Avoid:
Low-volume altcoins
Illiquid stocks
Exotic forex pairs with wide spreads
⚡ PERFORMANCE TIPS
Start Conservative: Enable all filters initially
Reduce Filters Gradually: If too few signals, disable Secondary VWAP filter first
Match Timeframes: Keep MP Filter TF and FVG TF at same value
Backtest First: Review historical performance on your preferred instrument/timeframe
Combine with Price Action: Look for support/resistance confluence
Use Time Filter: Avoid low-liquidity hours (optional setting)
🚫 WHAT THIS INDICATOR DOES NOT DO
Does not guarantee profits - No trading system is 100% accurate
Does not predict the future - Based on historical patterns
Does not replace risk management - Always use stop losses
Does not work on all instruments - Requires volume data and liquidity
Does not provide exact entry/exit prices - Signals are zones, not precise levels
Does not account for fundamentals - Purely technical analysis
📜 DISCLAIMER
This indicator is provided for educational and informational purposes only. It is not financial advice, and past performance does not guarantee future results.
Trading Risk Warning:
All trading involves risk of loss
You can lose more than your initial investment (leverage products)
Only trade with capital you can afford to lose
Always use appropriate position sizing and risk management
Consider seeking advice from a licensed financial advisor
Technical Limitations:
Indicator may repaint FVG zones until HTF bar closes
Signals are based on historical patterns that may not repeat
Market conditions change and no system works in all environments
Volume data quality varies by exchange/broker
By using this indicator, you acknowledge these risks and agree that the author bears no responsibility for trading losses.
📞 SUPPORT & UPDATES
Questions? Comment on this publication
Issues? Describe the problem with chart screenshot
Feature Requests? Suggest improvements in comments
Updates: Will be published as new versions using TradingView's update feature
📝 VERSION HISTORY
Version 1.0 (Current)
Initial public release
Multi-filter system: MP + Dual VWAP + FVG
Directional bias filter
Real-time info panel
Comprehensive alert system
Time-based filtering
Thank you for using Smart VWAP FVG System!
Happy Trading! 📈
EMA + RSI Autotrade Webhook - VarunOverview
The EMA + RSI Autotrade Webhook is a powerful trend-following indicator designed for automated crypto futures trading. This indicator combines the reliability of Exponential Moving Average (EMA) crossovers with RSI momentum filtering to generate high-probability buy and sell signals optimized for webhook integration with crypto exchanges like Delta Exchange, Binance Futures, and Bybit.Key Features
Simple & Effective: Uses proven EMA 9/21 crossover strategy
RSI Momentum Filter: Eliminates low-probability trades in ranging markets
Webhook Ready: Two clean alerts (LONG Entry, SHORT Entry) for seamless automation
Exchange Compatible: Works with Delta Exchange, 3Commas, Alertatron, and other webhook platforms
Zero Lag Signals: Real-time alerts on crossover confirmation
Visual Clarity: Clean chart markers for easy signal identification
How It Works
Entry Signals:
LONG Entry: Triggers when EMA 9 crosses above EMA 21 AND RSI is above 52 (bullish momentum confirmed)
SHORT Entry: Triggers when EMA 9 crosses under EMA 21 AND RSI is below 48 (bearish momentum confirmed)
Technical Components:
Fast EMA: 9-period (tracks short-term price action)
Slow EMA: 21-period (identifies primary trend)
RSI: 14-period (confirms momentum strength)
RSI Long Threshold: 52 (filters weak bullish signals)
RSI Short Threshold: 48 (filters weak bearish signals)
Best Use Cases
Crypto Futures Trading: Bitcoin, Ethereum, Altcoin perpetual contracts
Automated Trading Bots: Integration with Delta Exchange webhooks, TradingView alerts
Timeframes: Optimized for 15-minute charts (works on 5min-1H)
Markets: Trending crypto markets with clear directional moves
Risk Management: Best used with 1-2% stop loss per trade (managed externally)
Webhook Automation Setup
Add indicator to your TradingView chart
Create alerts for "LONG Entry" and "SHORT Entry"
Configure webhook URL from your exchange (Delta Exchange, Binance, etc.)
Use alert message: Entry LONG {{ticker}} @ {{close}} or Entry SHORT {{ticker}} @ {{close}}
Exchange automatically reverses positions on opposite signals
Advantages
✅ No manual trading required - fully automated
✅ Eliminates emotional trading decisions
✅ Catches trending moves early with EMA crossovers
✅ RSI filter reduces whipsaws in choppy markets
✅ Works 24/7 without monitoring
✅ Simple two-alert system (easy to manage)
✅ Compatible with multiple exchanges via webhooksStrategy Philosophy
This indicator follows a trend-following with momentum confirmation approach. By waiting for both EMA crossover AND RSI confirmation, it ensures you're entering trades with genuine momentum behind them, not just random price noise. The tight RSI thresholds (52/48) keep you aligned with the prevailing trend.Recommended Settings
Timeframe: 15-minute (primary), 5-minute (scalping), 1-hour (swing)
Markets: BTC/USDT, ETH/USDT, high-liquidity altcoin perpetuals
Position Sizing: 100% capital per signal (exchange manages reversals)
Stop Loss: 2% (managed via exchange or external bot)
Leverage: 1-2x for conservative approach, up to 5x for aggressive
Important Notes
⚠️ This indicator generates entry signals only - position reversals are handled automatically by your exchange
⚠️ Always backtest on historical data before live trading
⚠️ Use proper risk management and position sizing
⚠️ Best performance in trending markets; may generate false signals in tight ranges
⚠️ Requires TradingView Premium or higher for webhook functionalityTags
cryptocurrency futures automated-trading ema-crossover rsi webhook delta-exchange tradingview-alerts trend-following momentum bitcoin ethereum crypto-bot algo-trading 15-minute-strategy
Pinbar MTF - No Repaint# Pinbar MTF - No Repaint Indicator
## Complete Technical Documentation
---
## 📊 Overview
**Pinbar MTF (Multi-Timeframe) - No Repaint** is a professional-grade TradingView Pine Script indicator designed to detect high-probability pinbar reversal patterns with advanced filtering systems. The indicator is specifically engineered to be **100% non-repainting**, making it reliable for both live trading and backtesting.
### Key Features
✅ **Non-Repainting** - Signals only appear AFTER bar closes, never disappear
✅ **Three-Layer Filter System** - ATR, SWING, and RSI filters
✅ **Automatic SL/TP Calculation** - Based on risk:reward ratios
✅ **Real-time Alerts** - TradingView notifications for all signals
✅ **Visual Trade Management** - Lines, labels, and areas for entries, stops, and targets
✅ **Backtesting Ready** - Reliable historical data for strategy testing
---
## 🎯 What is a Pinbar?
A **Pinbar (Pin Bar/Pinocchio Bar)** is a single candlestick pattern that indicates a potential price reversal:
### Bullish Pinbar (BUY Signal)
- **Long lower wick** (rejection of lower prices)
- **Small body at the top** of the candle
- Shows buyers rejected sellers' attempt to push price down
- Forms at support levels or swing lows
- Entry signal for LONG positions
### Bearish Pinbar (SELL Signal)
- **Long upper wick** (rejection of higher prices)
- **Small body at the bottom** of the candle
- Shows sellers rejected buyers' attempt to push price up
- Forms at resistance levels or swing highs
- Entry signal for SHORT positions
---
## 🔧 How the Indicator Works
### 1. **Pinbar Detection Logic**
The indicator analyzes the **previous closed bar ** to identify pinbar patterns:
```
Bullish Pinbar Requirements:
- Lower wick > 72% of total candle range (adjustable)
- Upper wick < 28% of total candle range
- Close > Open (bullish candle body)
Bearish Pinbar Requirements:
- Upper wick > 72% of total candle range (adjustable)
- Lower wick < 28% of total candle range
- Close < Open (bearish candle body)
```
**Why check ?** By analyzing the previous completed bar, we ensure the pattern is fully formed and won't change, preventing repainting.
---
### 2. **Three-Layer Filter System**
#### 🔍 **Filter #1: ATR (Average True Range) Filter**
- **Purpose**: Ensures the pinbar has significant size
- **Function**: Only signals if pinbar range ≥ ATR value
- **Benefit**: Filters out small, insignificant pinbars
- **Settings**:
- Enable/Disable toggle
- ATR Period (default: 7)
**Example**: If ATR = 50 pips, only pinbars with 50+ pip range will signal.
---
#### 🔍 **Filter #2: SWING Filter** (Always Active)
- **Purpose**: Confirms pinbar forms at swing highs/lows
- **Function**: Validates the pinbar is an absolute high/low
- **Benefit**: Identifies true reversal points
- **Settings**:
- Swing Candles (default: 3)
**How it works**:
- For bullish pinbar: Checks if low is lowest of past 3 bars
- For bearish pinbar: Checks if high is highest of past 3 bars
**Example**: With 3 swing candles, a bullish pinbar must have the lowest low among the last 3 bars.
---
#### 🔍 **Filter #3: RSI (Relative Strength Index) Filter**
- **Purpose**: Confirms momentum conditions
- **Function**: Prevents signals in extreme momentum zones
- **Benefit**: Avoids counter-trend trades
- **Settings**:
- Enable/Disable toggle
- RSI Period (default: 7)
- RSI Source (Close, Open, High, Low, HL2, HLC3, OHLC4)
- Overbought Level (default: 70)
- Oversold Level (default: 30)
**Logic**:
- Bullish Pinbar: Only signals if RSI < 70 (not overbought)
- Bearish Pinbar: Only signals if RSI > 30 (not oversold)
---
### 3. **Stop Loss Calculation**
Two methods available:
#### Method A: ATR-Based Stop Loss (Recommended)
```
Bullish Pinbar:
SL = Pinbar Low - (1 × ATR)
Bearish Pinbar:
SL = Pinbar High + (1 × ATR)
```
**Benefit**: Dynamic stops that adapt to market volatility
#### Method B: Fixed Pips Stop Loss
```
Bullish Pinbar:
SL = Pinbar Low - (Fixed Pips)
Bearish Pinbar:
SL = Pinbar High + (Fixed Pips)
```
**Settings**:
- Calculate Stop with ATR (toggle)
- Stop Pips without ATR (default: 5)
---
### 4. **Take Profit Calculation**
Take Profit is calculated based on Risk:Reward ratio:
```
Bullish Trade:
TP = Entry + (Entry - SL) × Risk:Reward Ratio
Bearish Trade:
TP = Entry - (SL - Entry) × Risk:Reward Ratio
```
**Example**:
- Entry: 1.2000
- SL: 1.1950 (50 pip risk)
- RR: 2:1
- TP: 1.2100 (100 pip reward = 50 × 2)
**Settings**:
- Risk:Reward Ratio (default: 1.0, range: 0.1 to 10.0)
---
## 📈 Visual Elements
### On-Chart Displays
1. **Signal Markers**
- 🟢 **Green Triangle Up** = Bullish Pinbar (BUY)
- 🔴 **Red Triangle Down** = Bearish Pinbar (SELL)
- Placed directly on the pinbar candle
2. **Entry Labels**
- Green "BUY" label with entry price
- Red "SELL" label with entry price
- Shows exact entry level
3. **Stop Loss Lines**
- 🔴 Red horizontal line
- "SL" label
- Extends 20 bars forward
4. **Take Profit Lines**
- 🟢 Green horizontal line
- "TP" label
- Extends 20 bars forward
5. **Risk/Reward Areas** (Optional)
- Red shaded box = Risk zone (Entry to SL)
- Green shaded box = Reward zone (Entry to TP)
- Visual risk:reward visualization
6. **Info Table** (Top Right)
- Displays current settings
- Shows filter status (ON/OFF)
- Real-time RSI value
- Quick reference panel
---
## 🔔 Alert System
Three alert types available:
### 1. Combined Alert: "Pinbar Signal (Any Direction)"
- Fires for BOTH bullish and bearish pinbars
- **Best for**: General monitoring
- **Message**: "Pinbar Signal Detected on {TICKER} at {PRICE}"
### 2. Bullish Alert: "Bullish Pinbar Alert"
- Fires ONLY for BUY signals
- **Best for**: Long-only strategies
- **Message**: "BUY Signal on {TICKER} at {PRICE}"
### 3. Bearish Alert: "Bearish Pinbar Alert"
- Fires ONLY for SELL signals
- **Best for**: Short-only strategies
- **Message**: "SELL Signal on {TICKER} at {PRICE}"
---
## ⚙️ Input Parameters Reference
### **Filters Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| ATR Filter on Pinbar Range? | ✅ ON | Boolean | Enable/disable ATR filter |
| ATR Period | 7 | 1+ | Lookback period for ATR calculation |
| Swing Candles | 3 | 1+ | Bars to check for swing high/low |
| RSI Filter on Pinbar? | ❌ OFF | Boolean | Enable/disable RSI filter |
| RSI Period | 7 | 2+ | Lookback period for RSI calculation |
| RSI Source | Close | Multiple | Price data for RSI (Close/Open/High/Low/etc) |
| RSI Overbought Level | 70 | 50-100 | Upper threshold for RSI filter |
| RSI Oversold Level | 30 | 0-50 | Lower threshold for RSI filter |
### **Pinbar Detection Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Shadow % vs Body | 72 | 50-95 | Minimum wick size as % of total range |
### **Visualization Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Show SL and TP Lines? | ✅ ON | Boolean | Display stop loss and take profit lines |
| Show SL and TP Area? | ❌ OFF | Boolean | Show shaded risk/reward boxes |
### **Risk Management Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Risk:Reward Ratio | 1.0 | 0.1-10.0 | Target profit vs risk (1.0 = 1:1, 2.0 = 1:2) |
| Calculate Stop with ATR? | ✅ ON | Boolean | Use ATR for stop calculation |
| Stop Pips without ATR | 5 | 1+ | Fixed pip stop when ATR disabled |
---
## 🚫 Non-Repainting Architecture
### What is Repainting?
**Repainting** occurs when an indicator's historical signals differ from what appeared in real-time. This makes backtesting unreliable and can lead to false confidence in a strategy.
### How This Indicator Prevents Repainting
1. **Closed Bar Analysis**
- All calculations use ` ` offset (previous bar)
- Only analyzes COMPLETED candles
- Signals appear on the bar AFTER the pinbar closes
2. **Confirmed Swing Points**
- Waits for sufficient bar history before signaling
- Only checks historical bars that cannot change
- Prevents premature swing detection
3. **Static Alert Timing**
- Alerts fire only after bar completion
- No conditional logic that changes historically
- Same results in replay mode and live trading
### Verification Method
To verify non-repainting behavior:
1. Apply indicator to chart
2. Note signal locations and prices
3. Refresh browser / reload chart
4. **Signals remain in exact same locations**
---
## 💼 Trading Strategy Guidelines
### Entry Rules
**For Bullish Pinbar (LONG):**
1. Wait for green triangle to appear
2. Enter at close of pinbar (shown in label)
3. Alternative: Enter on break of pinbar high
4. Place stop loss at red SL line
5. Set target at green TP line
**For Bearish Pinbar (SHORT):**
1. Wait for red triangle to appear
2. Enter at close of pinbar (shown in label)
3. Alternative: Enter on break of pinbar low
4. Place stop loss at red SL line
5. Set target at green TP line
### Risk Management
- **Position Sizing**: Risk only 1-2% of account per trade
- **Stop Loss**: Always use the calculated SL (never move it wider)
- **Take Profit**: Use calculated TP or trail stop after 1:1 RR
- **Multiple Timeframes**: Confirm signals on higher timeframe
### Best Practices
✅ **DO:**
- Wait for bar to close before entering
- Trade in direction of higher timeframe trend
- Use on liquid markets with clear support/resistance
- Combine with price action analysis
- Keep a trading journal
❌ **DON'T:**
- Enter before bar closes (prevents seeing full pattern)
- Trade against strong trends
- Ignore the filters (they improve win rate)
- Risk more than 2% per trade
- Trade every signal (be selective)
---
## 📊 Backtesting & Data Export
### Available Data Points
The indicator exports these values for strategy development:
| Output | Description |
|--------|-------------|
| Bullish Signal | 1 = BUY signal, 0 = No signal |
| Bearish Signal | 1 = SELL signal, 0 = No signal |
| Bull SL | Stop loss level for long trades |
| Bull TP | Take profit level for long trades |
| Bull Entry | Entry price for long trades |
| Bear SL | Stop loss level for short trades |
| Bear TP | Take profit level for short trades |
| Bear Entry | Entry price for short trades |
### How to Use in Strategy
These values can be accessed by Pine Script strategies using:
```pine
indicator_values = request.security(syminfo.tickerid, timeframe.period,
)
```
---
## 🎓 Understanding the Filters
### Why Use Multiple Filters?
Single-indicator systems often generate too many false signals. This indicator uses a **confluence approach**:
1. **Pinbar Pattern** = Price rejection detected
2. **+ SWING Filter** = Rejection at key level
3. **+ ATR Filter** = Significant move
4. **+ RSI Filter** = Favorable momentum
**Result**: Higher probability setups with better risk:reward
### Filter Optimization
**Conservative Settings** (Fewer, Higher Quality Signals):
- ATR Filter: ON
- Swing Candles: 5
- RSI Filter: ON
- Shadow %: 75%
**Aggressive Settings** (More Signals, More Noise):
- ATR Filter: OFF
- Swing Candles: 2
- RSI Filter: OFF
- Shadow %: 65%
**Balanced Settings** (Recommended):
- ATR Filter: ON
- Swing Candles: 3
- RSI Filter: OFF (or ON for trending markets)
- Shadow %: 72%
---
## 🔍 Troubleshooting
### "No Signals Appearing"
**Possible Causes:**
1. Filters are too strict
2. No pinbars forming on chart
3. Insufficient bar history
**Solutions:**
- Reduce Shadow % to 65%
- Reduce Swing Candles to 2
- Disable ATR or RSI filters temporarily
- Check that chart has enough data loaded
### "Too Many Signals"
**Solutions:**
- Enable ATR filter
- Increase Swing Candles to 4-5
- Enable RSI filter
- Increase Shadow % to 75-80%
### "Signals Appearing Late"
**This is normal behavior!** The indicator:
- Analyzes previous closed bar
- Signals appear on the bar AFTER the pinbar
- This is what prevents repainting
- Signal latency is 1 bar (by design)
---
## 📝 Technical Specifications
**Indicator Type:** Overlay (displays on price chart)
**Pine Script Version:** 5
**Max Labels:** 500
**Max Lines:** 500
**Repainting:** None (100% non-repainting)
**Data Window Values:** 8 exported values
**Alert Types:** 3 (Combined, Bullish, Bearish)
**Performance:**
- Lightweight script (fast execution)
- Works on all timeframes
- Compatible with all markets (Forex, Crypto, Stocks, Futures)
- No data snooping bias
---
## 🎯 Use Cases
### 1. **Swing Trading**
- Timeframe: Daily, 4H
- Filter Settings: All enabled
- Best for: Catching major reversals
### 2. **Day Trading**
- Timeframe: 15m, 1H
- Filter Settings: ATR + SWING only
- Best for: Intraday reversals
### 3. **Scalping**
- Timeframe: 5m, 15m
- Filter Settings: SWING only (aggressive)
- Best for: Quick reversals (requires experience)
### 4. **Position Trading**
- Timeframe: Weekly, Daily
- Filter Settings: All enabled + high RR (2:1 or 3:1)
- Best for: Long-term trend reversal catches
---
## 🏆 Advantages Over Other Pinbar Indicators
✅ **Guaranteed Non-Repainting** - Many pinbar indicators repaint; this one never does
✅ **Automatic SL/TP** - No manual calculation needed
✅ **Multi-Layer Filtering** - Reduces false signals significantly
✅ **Visual Trade Management** - Clear entry, stop, and target levels
✅ **Flexible Configuration** - Adaptable to any trading style
✅ **Alert System** - Never miss a setup
✅ **Backtesting Ready** - Reliable historical data
✅ **Professional Grade** - Suitable for live trading
---
## 📚 Educational Resources
### Recommended Reading on Pinbars
- "The Pin Bar Trading Strategy" by Nial Fuller
- "Price Action Trading" by Al Brooks
- TradingView Education: Price Action Patterns
### Practice Recommendations
1. Paper trade signals for 20+ trades before live trading
2. Backtest on different timeframes and markets
3. Keep detailed records of all trades
4. Analyze winning vs losing setups
5. Refine filter settings based on results
---
## ⚖️ Disclaimer
This indicator is a tool for technical analysis and does not guarantee profits. Trading involves substantial risk of loss. Past performance is not indicative of future results.
- Always use proper risk management
- Never risk more than you can afford to lose
- Consider your trading experience and objectives
- Seek independent financial advice if needed
---
## 📧 Version Information
**Current Version:** 1.0
**Last Updated:** 2024
**Compatibility:** TradingView Pine Script v5
**Status:** Production Ready
---
## 🔄 Future Enhancements (Potential)
Possible future additions:
- Multi-timeframe confirmation option
- Volume filter integration
- Customizable color schemes
- Win rate statistics display
- Partial profit taking levels
- Trailing stop functionality
---
## 📖 Quick Start Guide
### 5-Minute Setup
1. **Add to Chart**
- Open TradingView
- Go to Pine Editor
- Paste the code
- Click "Add to Chart"
2. **Configure Settings**
- Open indicator settings (gear icon)
- Start with default settings
- Enable "Show SL and TP Lines"
3. **Set Alert**
- Right-click indicator name
- Click "Add Alert"
- Select "Pinbar Signal (Any Direction)"
- Configure notification method
4. **Test**
- Scroll back on chart
- Verify signals make sense
- Check that signals don't repaint
5. **Trade** (After Practice!)
- Wait for alert
- Verify signal quality
- Enter, place SL/TP
- Manage trade
---
## 🎯 Final Thoughts
The **Pinbar MTF - No Repaint** indicator is designed for serious traders who value:
- **Reliability** over flashy signals
- **Quality** over quantity
- **Honesty** over false promises
This indicator will NOT:
- Make you rich overnight
- Win every trade
- Replace proper trading education
This indicator WILL:
- Identify high-probability reversal setups
- Save you analysis time
- Provide consistent, non-repainting signals
- Help you develop a systematic trading approach
**Success in trading comes from:**
1. Proper education (60%)
2. Risk management (30%)
3. Technical tools like this indicator (10%)
Use this tool as part of a complete trading plan, not as a standalone solution.
Candle Breakout StrategyShort description (one-liner)
Candle Breakout Strategy — identifies a user-specified candle (UTC time), draws its high/low range, then enters on breakouts with configurable stop-loss, take-profit (via Risk:Reward) and optional alerts.
Full description (ready-to-paste)
Candle Breakout Strategy
Version 1.0 — Strategy script (Pine v5)
Overview
The Candle Breakout Strategy automatically captures a single "range candle" at a user-specified UTC time, draws its high/low as a visible box and dashed level lines, and waits for a breakout. When price closes above the range high it enters a Long; when price closes below the range low it enters a Short. Stop-loss is placed at the opposite range boundary and take-profit is calculated with a user-configurable Risk:Reward multiplier. Alerts for entries can be enabled.
This strategy is intended for breakout style trading where a clearly defined intraday range is established at a fixed time. It is simple, transparent and easy to adapt to multiple symbols and timeframes.
How it works (step-by-step)
On every bar the script checks the current UTC time.
When the first bar that matches the configured Target Hour:Target Minute (UTC) appears, the script records that candle’s high and low. This defines the breakout range.
A box and dashed lines are drawn on the chart to display the range and extended to the right while the range is active.
The script then waits for price to close outside the box:
Close > Range High → Long entry
Close < Range Low → Short entry
When an entry triggers:
Stop-loss = opposite range boundary (range low for longs, range high for shorts).
Take-profit = entry ± (risk × Risk:Reward). Risk is computed as the distance between entry price and stop-loss.
After entry the range becomes inactive (waitingForBreakout = false) until the next configured target time.
Inputs / Parameters
Target Hour (UTC) — the hour (0–23) in UTC when the range candle is detected.
Target Minute — minute (0–59) of the target candle.
Risk:Reward Ratio — multiplier for computing take profit from risk (0.5–10). Example: 2 means TP = entry + 2×risk.
Enable Alerts — turn on/off entry alerts (string message sent once per bar when an entry occurs).
Show Last Box Only (internal behavior) — when enabled the previous box is deleted at the next range creation so only the most recent range is visible (default behavior in the script).
Visuals & On-chart Info
A semi-transparent blue box shows the recorded range and extends to the right while active.
Dashed horizontal lines mark the range high and low.
On-chart shapes: green triangle below bar for Long signals, red triangle above bar for Short signals.
An information table (top-right) displays:
Target Time (UTC)
Active Range (Yes / No)
Range High
Range Low
Risk:Reward
Alerts
If Enable Alerts is on, the script sends an alert with the following formats when an entry occurs:
Long alert:
🟢 LONG SIGNAL
Entry Price:
Stop Loss:
Take Profit:
Short alert:
🔴 SHORT SIGNAL
Entry Price:
Stop Loss:
Take Profit:
Use TradingView's alert dialog to create alerts based on the script — select the script’s alert condition or use the alert() messages.
Recommended usage & tips
Timeframe: This strategy works on any timeframe but the definition of "candle at target time" depends on the chart timeframe. For intraday breakout styles, use 1m — 60m charts depending on the session you want to capture.
Target Time: Choose a time that is meaningful for the instrument (e.g., market open, economic release, session overlap). All times are handled in UTC.
Position Sizing: The script’s example uses strategy.percent_of_equity with 100% default — change default_qty_value or strategy settings to suit your risk management.
Filtering: Consider combining this breakout with trend filters (EMA, ADX, etc.) to reduce false breakouts.
Backtesting: Always backtest over a sufficiently large and recent sample. Pay attention to slippage and commission settings in TradingView’s strategy tester.
Known behavior & limitations
The script registers the breakout on close outside the recorded range. If you prefer intrabar breakout rules (e.g., high/low breach without close), you must adjust the condition accordingly.
The recorded range is taken from a single candle at the exact configured UTC time. If there are missing bars or the chart timeframe doesn't align, the intended candle may differ — choose the target time and chart timeframe consistently.
Only a single active position is allowed at a time (the script checks strategy.position_size == 0 before entries).
Example setups
EURUSD (Forex): Target Time 07:00 UTC — captures London open range.
Nifty / Index: Target Time 09:15 UTC — captures local session open range.
Crypto: Target Time 00:00 UTC — captures daily reset candle for breakout.
Risk disclaimer
This script is educational and provided as-is. Past performance is not indicative of future results. Use proper risk management, test on historical data, and consider slippage and commissions. Do not trade real capital without sufficient testing.
Change log
v1.0 — Initial release: range capture, box and level drawing, long/short entry by close breakout, SL at opposite boundary, TP via Risk:Reward, alerts, info table.
If you want, I can also:
Provide a short README version (2–3 lines) for the TradingView “Short description” field.
Add a couple of suggested alert templates for the TradingView alert dialog (if you want alerts that include variable placeholders).
Convert the disclaimer into multiple language versions.
COT Index Indicator 1) One‑liner
My version of the OTC COT Index indicator: a 0–120 oscillator built from CFTC COT data that shows where Commercial, Noncommercial, and Nonreportable net positions sit relative to recent extremes.
2) Short paragraph
This is my version of the OTC COT Index indicator. It converts CFTC Commitments of Traders (COT) net positions into a normalized 0–120 oscillator for each trader group—Commercials, Noncommercials, and Nonreportables—so you can quickly see when positioning is near recent highs or lows. Data comes from TradingView’s official COT library and supports both “Futures Only” and “Futures and Options” reports.
3) Compact bullets
What: My version of the OTC COT Index indicator
Why: Quickly spot when trader groups are near positioning extremes
Data: CFTC COT via TradingView/LibraryCOT/2; Futures Only or Futures & Options
How: Index = 120 × (Current − Min) ÷ (Max − Min) over a configurable lookback
Plots: Commercials (blue), Noncommercials (orange), Nonreportables (red)
Lines: Overbought, Midline, Oversold, optional 0/100, upper/lower bounds
Note: Values are relative to the chosen window; not trading advice
4) Publication‑ready (sections)
Overview
My version of the OTC COT Index indicator. It turns CFTC COT positioning into a 0–120 oscillator per trader group (Commercials, Noncommercials, Nonreportables) to highlight relative extremes.
Data source
CFTC Commitments of Traders via TradingView’s official library (TradingView/LibraryCOT/2).
Supports “Futures Only” and “Futures and Options.”
Method
Net positions = Longs − Shorts.
Index = 120 × (Current Net − Min(Net, Lookback)) ÷ (Max(Net, Lookback) − Min(Net, Lookback)).
Inputs
Weeks Look Back (normalization window)
Weeks Look Back for Historical Hi/Los (longer reference)
Report Type selection
Visuals
Three indexes by trader group, plus reference levels (OB/OS, Midline, optional 0/100).
Notes
Some symbols map to specific CFTC codes for reliability.
If no relevant COT data exists for the symbol, the script reports it clearly.
If you want this adapted to a specific platform’s character limits (e.g., TradingView’s publish dialog), tell me the target length and I’ll trim it to fit.
Index of Civilization DevelopmentIndex of Civilization Development Indicator
This Pine Script (version 6) creates a custom technical indicator for TradingView, titled Index of Civilization Development. It generates a composite index by averaging normalized stock market performances from a selection of global country indices. The normalization is relative to each index's 100-period simple moving average (SMA), scaled to a percentage (100% baseline). This allows for a comparable "development" or performance metric across diverse markets, potentially highlighting trends in global economic or "civilizational" progress based on equity markets.The indicator plots as a single line in a separate pane (non-overlay) and is designed to handle up to 40 symbols to respect TradingView's request.security() call limits.Key FeaturesComposite Index Calculation: Fetches the previous bar's close (close ) and its 100-period SMA for each selected symbol.
Normalizes each: (close / SMA(100)) * 100.
Averages the valid normalizations (ignores invalid/NA data) to produce a single "Index (%)" value.
Symbol Selection Modes:Top N Countries: Selects from a predefined list of the top 50 global stock indices (by market cap/importance, e.g., SPX for USA, SHCOMP for China). Options: Top 5, 15, 25, or 50.
Democratic Countries: ~38 symbols from democracies (e.g., SPX, NI225, NIFTY; based on democracy indices ≥6/10, including flawed/parliamentary systems).
Dictatorships: ~12 symbols from authoritarian/hybrid regimes (e.g., SHCOMP, TASI, IMOEX; scores <6/10).
Customization:Line color (default: blue).
Line width (1-5, default: 2).
Line style: Solid line (default), Stepline, or Circles.
Data Handling:Uses request.security() with lookahead enabled for real-time accuracy, gaps off, and invalid symbol ignoring.
Runs calculations on every bar, with max_bars_back=2000 for historical depth.
Arrays are populated only on the first bar (barstate.isfirst) for efficiency.
Predefined Symbol Lists (Examples)Top 50: SPX (USA), SHCOMP (China), NI225 (Japan), ..., BAX (Bahrain).
Democratic: Focuses on free-market democracies like USA, Japan, UK, Canada, EU nations, Australia, etc.
Dictatorships: Authoritarian markets like China, Saudi Arabia, Russia, Turkey, etc.
Usage TipsAdd to any chart (e.g., daily/weekly timeframe) to view the composite line.
Ideal for macro analysis: Compare democratic vs. authoritarian performance, or track "top world" equity health.
Potential Limitations: Relies on TradingView's symbol availability; some exotic indices (e.g., KWSEIDX) may fail if not supported. The 40-symbol cap prevents errors.
Interpretation: Values >100 indicate above-trend performance; <100 suggest underperformance relative to recent averages.
This script blends financial data with geopolitical categorization for a unique "civilization index" perspective on global markets. For modifications, ensure symbol tickers match TradingView's format.
Tchwella Stocks Custom WatermarkThis Pine Script v5 indicator adds a customizable watermark to TradingView charts, displaying key stock information while allowing for flexible positioning and formatting.
📌 Features & Functionality:
✅ Custom Positioning:
• Fixed to the top-left corner.
• Adjustable spacing ensures the text is properly aligned.
✅ Displayed Information (Configurable):
• Company Name & Market Cap (Optional: Shows dynamically calculated market cap)
• Stock Ticker & Timeframe
• Industry & Sector
✅ Customization Options:
• Font Size: Huge, Large, Normal, Small
• Text Color & Transparency: Adjustable
• Proper Left Alignment for a clean, structured display
• Vertical Offset Tweaks to move text down for better visibility
✅ Optimized Table Layout:
• Uses table.new() for persistent placement.
• Added an empty row to fine-tune positioning, ensuring the watermark doesn’t overlap key chart areas.
🔧 Use Case:
Designed for traders who want a clear, customizable stock watermark to enhance their charting experience without obstructing price action.
Feb 1
Release Notes
Updated version: now you can decide your location for the watermark
Micha Stocks Custom Watermark (MSWM) – TradingView Script
This Pine Script v5 indicator adds a customizable watermark to TradingView charts, displaying key stock information while allowing for flexible positioning and formatting.
📌 Features & Functionality:
✅ Custom Positioning:
• Fixed to the top-left corner.
• Adjustable spacing ensures the text is properly aligned.
✅ Displayed Information (Configurable):
• Company Name & Market Cap (Optional: Shows dynamically calculated market cap)
• Stock Ticker & Timeframe
• Industry & Sector
✅ Customization Options:
• Font Size: Huge, Large, Normal, Small
• Text Color & Transparency: Adjustable
• Proper Left Alignment for a clean, structured display
• Vertical Offset Tweaks to move text down for better visibility
✅ Optimized Table Layout:
• Uses table.new() for persistent placement.
• Added an empty row to fine-tune positioning, ensuring the watermark doesn’t overlap key chart areas.
🔧 Use Case:
Designed for traders who want a clear, customizable stock watermark to enhance their charting experience without obstructing price action.
Feb 7
Release Notes
Micha Stocks Custom Watermark – Updated Version 🚀
This updated Micha Stocks Custom Watermark script enhances your TradingView experience by adding an ATR-based volatility signal alongside the existing customizable stock watermark.
🆕 New Features & Improvements:
✅ ATR (14-Day) with Dynamic Volatility Indicator
• Displays the ATR value and its percentage relative to price.
• Includes a color-coded volatility signal:
• 🔴 High Volatility (Above user-defined Red Threshold)
• 🟡 Moderate Volatility (Between Red & Yellow Thresholds)
• 🟢 Low Volatility (Below user-defined Yellow Threshold)
✅ Fully Customizable ATR Thresholds
• Users can set their own ATR % levels for Red, Yellow, and Green signals.
✅ Improved Watermark Customization
• Users can still adjust the position, size, and color of the watermark.
• Includes Company Name, Ticker, Market Cap, Industry, and Sector.
• ATR can be turned on/off in settings for flexibility.
🔧 How to Use:
1️⃣ Go to Indicator Settings → Enable or Disable ATR Display
2️⃣ Adjust ATR % Thresholds to fit your volatility preference
3️⃣ Customize Text Position, Color, and Size to match your chart setup
This update makes it easier to quickly assess market volatility while keeping a clean and professional chart layout.
💡 Why Use This Indicator?
• Effortlessly track key stock info without cluttering your chart.
• Quickly identify volatile conditions using ATR percentage signals.
• Adjust settings on the fly to match your trading strategy.
📢 Update Now & Enjoy a Smarter Charting Experience!
AI Trading Alerts v6 — SL/TP + Confidence + Panel (Fixed)Overview
This Pine Script is designed to identify high-probability trading opportunities in Forex, commodities, and crypto markets. It combines EMA trend filters, RSI, and Stochastic RSI, with automatic stop-loss (SL) & take-profit (TP) suggestions, and provides a confidence panel to quickly assess the trade setup strength.
It also includes TradingView alert conditions so you can set up notifications for Long/Short setups and EMA crosses.
⚙️ Features
EMA Trend Filter
Uses EMA 50, 100, 200 for trend confirmation.
Bull trend = EMA50 > EMA100 > EMA200
Bear trend = EMA50 < EMA100 < EMA200
RSI Filter
Bullish trades require RSI > 50
Bearish trades require RSI < 50
Stochastic RSI Filter
Prevents entries during overbought/oversold extremes.
Bullish entry only if %K and %D < 80
Bearish entry only if %K and %D > 20
EMA Proximity Check
Price must be near EMA50 (within ATR × adjustable multiplier).
Signals
Continuation Signals:
Long if all bullish conditions align.
Short if all bearish conditions align.
Cross Events:
Long Cross when price crosses above EMA50 in bull trend.
Short Cross when price crosses below EMA50 in bear trend.
Automatic SL/TP Suggestions
SL size adjusts depending on asset:
Gold/Silver (XAU/XAG): 5 pts
Bitcoin/Ethereum: 100 pts
FX pairs (default): 20 pts
TP = SL × Risk:Reward ratio (default 1:2).
Confidence Score (0–4)
Based on conditions met (trend, RSI, Stoch, EMA proximity).
Labels:
Strongest (4/4)
Strong (3/4)
Medium (2/4)
Low (1/4)
Visual Panel on Chart
Shows ✅/❌ for each condition (trend, RSI, Stoch, EMA proximity, signal now).
Confidence row with color-coded strength.
Alerts
Long Setup
Short Setup
Long Cross
Short Cross
🖥️ How to Use
1. Add the Script
Open TradingView → Pine Editor.
Paste the full script.
Click Add to chart.
Save as "AI Trading Alerts v6 — SL/TP + Confidence + Panel".
2. Configure Inputs
EMA Lengths: Default 50/100/200 (works well for swing trading).
RSI Length: 14 (standard).
Stochastic Length/K/D: Default 14/3/3.
Risk:Reward Ratio: Default 2.0 (can change to 1.5, 3.0, etc.).
EMA Proximity Threshold: Default 0.20 × ATR (adjust to be stricter/looser).
3. Read the Panel
Top-right of chart, you’ll see ✅ or ❌ for:
Trend → Are EMAs aligned?
RSI → Above 50 (bull) or below 50 (bear)?
Stoch OK → Not extreme?
Near EMA50 → Close enough to EMA50?
Above/Below OK → Price position vs. EMA50 matches trend?
Signal Now → Entry triggered?
Confidence row:
🟢 Green = Strongest
🟩 Light green = Strong
🟧 Orange = Medium
🟨 Yellow = Low
⬜ Gray = None
4. Alerts Setup
Go to TradingView Alerts (⏰ icon).
Choose the script under “Condition”.
Select alert type:
Long Setup
Short Setup
Long Cross
Short Cross
Set notification method (popup, sound, email, mobile).
Click Create.
Now TradingView will notify you automatically when signals appear.
5. Example Workflow
Wait for Confidence = Strong/Strongest.
Check if market session supports volatility (e.g., XAU in London/NY).
Review SL/TP suggestions:
Long → Entry: current price, SL: close - risk_pts, TP: close + risk_pts × RR.
Short → Entry: current price, SL: close + risk_pts, TP: close - risk_pts × RR.
Adjust based on your own price action analysis.
📊 Best Practices
Use on H1 + D1 combo → align higher timeframe bias with intraday entries.
Risk only 1–2% of account per trade (position sizing required).
Filter with market sessions (Asia, Europe, US).
Strongest signals work best with trending pairs (e.g., XAUUSD, USDJPY, BTCUSD).
The Best Strategy Template[LuciTech]Hello Traders,
This is a powerful and flexible strategy template designed to help you create, backtest, and deploy your own custom trading strategies. This template is not a ready-to-use strategy but a framework that simplifies the development process by providing a wide range of pre-built features and functionalities.
What It Does
The LuciTech Strategy Template provides a robust foundation for building your own automated trading strategies. It includes a comprehensive set of features that are essential for any serious trading strategy, allowing you to focus on your unique trading logic without having to code everything from scratch.
Key Features
The LuciTech Strategy Template integrates several powerful features to enhance your strategy development:
•
Advanced Risk Management: This includes robust controls for defining your Risk Percentage per Trade, setting a precise Risk-to-Reward Ratio, and implementing an intelligent Breakeven Stop-Loss mechanism that automatically adjusts your stop to the entry price once a specified profit threshold is reached. These elements are crucial for capital preservation and consistent profitability.
•
Flexible Stop-Loss Options: The template offers adaptable stop-loss calculation methods, allowing you to choose between ATR-Based Stop-Loss, which dynamically adjusts to market volatility, and Candle-Based Stop-Loss, which uses structural price points from previous candles. This flexibility ensures the stop-loss strategy aligns with diverse trading styles.
•
Time-Based Filtering: Optimize your strategy's performance by restricting trading activity to specific hours of the day. This feature allows you to avoid unfavorable market conditions or focus on periods of higher liquidity and volatility relevant to your strategy.
•
Customizable Webhook Alerts: Stay informed with advanced notification capabilities. The template supports sending detailed webhook alerts in various JSON formats (Standard, Telegram, Concise Telegram) to external platforms, facilitating real-time monitoring and potential integration with automated trading systems.
•
Comprehensive Visual Customization: Enhance your analytical clarity with extensive visual options. You can customize the colors of entry, stop-loss, and take-profit lines, and effectively visualize market inefficiencies by displaying and customizing Fair Value Gap (FVG) boxes directly on your chart.
How It Does It
The LuciTech Strategy Template is meticulously crafted using Pine Script, TradingView's powerful and expressive programming language. The underlying architecture is designed for clarity and modularity, allowing for straightforward integration of your unique trading signals. At its core, the template operates by taking user-defined entry and exit conditions and then applying a sophisticated layer of risk management, position sizing, and trade execution logic.
For instance, when a longCondition or shortCondition is met, the template dynamically calculates the appropriate position size. This calculation is based on your specified risk_percent of equity and the stop_distance (the distance between your entry price and the calculated stop-loss level). This ensures that each trade adheres to your predefined risk parameters, a critical component of disciplined trading.
The flexibility in stop-loss calculation is achieved through a switch statement that evaluates the sl_type input. Whether you choose an ATR-based stop, which adapts to market volatility, or a candle-based stop, which uses structural price points, the template seamlessly integrates these methods. The ATR calculation itself is further refined by allowing various smoothing methods (RMA, SMA, EMA, WMA), providing granular control over how volatility is measured.
Time-based filtering is implemented by comparing the current bar's time with user-defined start_hour, start_minute, end_hour, and end_minute inputs. This allows the strategy to activate or deactivate trading during specific market sessions or periods of the day, a valuable tool for optimizing performance and avoiding unfavorable conditions.
Furthermore, the template incorporates advanced webhook alert functionality. When a trade is executed, a customizable JSON message is formatted based on your webhook_format selection (Standard, Telegram, or Concise Telegram) and sent via alert function. This enables seamless integration with external services for real-time notifications or even automated trade execution through third-party platforms.
Visual feedback is paramount for understanding strategy behavior. The template utilizes plot and fill functions to clearly display entry prices, stop-loss levels, and take-profit targets directly on the chart. Customizable colors for these elements, along with dedicated options for Fair Value Gap (FVG) boxes, enhance the visual analysis during backtesting and live trading, making it easier to interpret the strategy's actions.
How It's Original
The LuciTech Strategy Template distinguishes itself in the crowded landscape of TradingView scripts through its unique combination of integrated, advanced risk management features, highly flexible stop-loss methodologies, and sophisticated alerting capabilities, all within a user-friendly and modular framework. While many templates offer basic entry/exit signal integration, LuciTech goes several steps further by providing a robust, ready-to-use infrastructure for managing the entire trade lifecycle once a signal is generated.
Unlike templates that might require users to piece together various risk management components or code complex stop-loss logic from scratch, LuciTech offers these critical functionalities out-of-the-box. The inclusion of dynamic position sizing based on a user-defined risk percentage, a configurable risk-to-reward ratio, and an intelligent breakeven mechanism significantly elevates its utility. This comprehensive approach to capital preservation and profit targeting is a cornerstone of professional trading and is often overlooked or simplified in generic templates.
Furthermore, the template's provision for multiple stop-loss calculation types—ATR-based for volatility adaptation, and candle-based for structural support/resistance—demonstrates a deep understanding of diverse trading strategies. The underlying code for these calculations is already implemented, saving developers considerable time and effort. The subtle yet powerful inclusion of FVG (Fair Value Gap) related inputs also hints at advanced price action concepts, offering a sophisticated layer of analysis and execution that is not commonly found in general-purpose templates.
The advanced webhook alerting system, with its support for various JSON formats tailored for platforms like Telegram, showcases an originality in catering to the needs of modern, automated trading setups. This moves beyond simple TradingView pop-up alerts, enabling seamless integration with external systems for real-time trade monitoring and execution. This level of external connectivity and customizable data output is a significant differentiator.
In essence, the LuciTech Strategy Template is original not just in its individual features, but in how these features are cohesively integrated to form a powerful, opinionated, yet highly adaptable system. It empowers traders to focus their creative energy on developing their core entry/exit signals, confident that the underlying framework will handle the complexities of risk management, trade execution, and external communication with precision and flexibility. It's a comprehensive solution designed to accelerate the development of robust and professional trading strategies.
How to Modify the Logic to Apply Your Strategy
The LuciTech Strategy Template is designed with modularity in mind, making it exceptionally straightforward to integrate your unique trading strategy logic. The template provides a clear separation between the core strategy management (risk, position sizing, exits) and the entry signal generation. This allows you to easily plug in your own buy and sell conditions without altering the robust underlying framework.
Here’s a step-by-step guide on how to adapt the template to your specific trading strategy:
1.
Locate the Strategy Logic Section:
Open the Pine Script editor in TradingView and navigate to the section clearly marked with the comment //Strategy Logic Example:. This is where the template’s placeholder entry conditions (a simple moving average crossover) are defined.
2.
Define Your Custom Entry Conditions:
Within this section, you will find variables such as longCondition and shortCondition. These are boolean variables that determine when a long or short trade should be initiated. Replace the existing example logic with your own custom buy and sell conditions. Your conditions can be based on any combination of indicators, price action patterns, candlestick formations, or other market analysis techniques. For example, if your strategy involves a combination of RSI and MACD, you would define longCondition as (rsi > 50 and macd_line > signal_line) and shortCondition as (rsi < 50 and macd_line < signal_line).
3.
Leverage the Template’s Built-in Features:
Once your longCondition and shortCondition are defined, the rest of the template automatically takes over. The integrated risk management module will calculate the appropriate position size based on your Risk % input and the chosen Stop Loss Type. The Risk:Reward ratio will determine your take-profit levels, and the Breakeven at R feature will manage your stop-loss dynamically. The time filter (Use Time Filter) will ensure your trades only occur within your specified hours, and the webhook alerts will notify you of trade executions.
Unusual Moves Detector# Unusual Moves Detector
A TradingView indicator that detects and alerts users to unusual price movements based on ATR (Average True Range) and volume analysis. This indicator is designed to identify price action that deviates significantly from normal market behavior.
## Features
### Core Detection Mechanisms
- **ATR-Based Volatility Detection**: Identifies price movements that exceed normal volatility levels
- **Volume Analysis**: Optional volume spike detection to confirm unusual moves
- **Signal Persistence Tracking**: Monitors how many signals occur within a lookback period
### Visual Indicators
- **Up/Down Arrows**: Green triangles for unusual upward moves, red triangles for downward moves
- **Signal Strength Labels**: Numbers showing how many signals occurred in the lookback period
- **Real-time Metrics Table**: Displays current ATR and volume ratios
### Customizable Parameters
1. **ATR Period** (default: 14)
- Length for Average True Range calculation
- Affects volatility measurement sensitivity
2. **Volume MA Period** (default: 20)
- Period for volume moving average
- Used in volume spike detection
3. **ATR Multiplier** (default: 2.0)
- How many times the ATR to trigger a signal
- Higher values = less sensitive to price moves
4. **Volume Multiplier** (default: 2.0)
- How many times the average volume to consider "high volume"
- Higher values = less sensitive to volume spikes
5. **Include Volume Analysis** (default: true)
- Toggle volume confirmation requirement
- When disabled, only price volatility matters
6. **Signal Lookback Period** (default: 5)
- How many bars to look back for signal counting
- Affects signal strength calculation
### Alert System
- **Upward Movement Alerts**: Triggers when unusual upward price action is detected
- **Downward Movement Alerts**: Triggers when unusual downward price action is detected
- **Customizable Alert Messages**: Can be configured in TradingView's alert system
### Information Display
Real-time metrics table shows:
- Current ATR value
- Volume ratio (current volume / average volume)
- Net signal count (up signals - down signals)
## Installation
1. Open TradingView's Pine Script Editor
2. Create a new indicator
3. Copy and paste the indicator code
4. Click "Add to Chart" to apply the indicator
## Usage Guide
### Basic Setup
1. Add the indicator to your chart
2. Adjust parameters based on your trading timeframe and style
3. Configure alerts if desired
### Parameter Tuning Tips
- **For More Signals**: Lower the ATR and Volume multipliers
- **For Fewer Signals**: Increase the multipliers
- **For Trend Following**: Increase the lookback period
- **For Quick Signals**: Decrease the lookback period
### Alert Setup
1. Click the indicator settings
2. Go to "Create Alert"
3. Choose either up or down move condition
4. Configure alert settings (sound, notification, etc.)
## Backtesting Compatibility
- Fully compatible with TradingView's backtesting engine
- All calculations use historical data only
- No forward-looking data or repainting
## Technical Details
- Written in Pine Script v6
- Optimized for real-time calculation
- Uses native TradingView functions for performance
- Compatible with all timeframes
## Performance Considerations
- Lightweight computation using built-in functions
- Efficient memory usage with variable optimization
- Real-time calculation with minimal lag
## Support and Contribution
Feel free to modify and improve the indicator according to your needs. The code is well-commented for easy understanding and modification.
## License
Free to use and modify for personal and commercial purposes.
## Disclaimer
This indicator is for informational purposes only. Always conduct your own analysis and consider multiple factors when making trading decisions.
Heikin Ashi Overlay SuiteHeikin Ashi Overlay Suite is designed to give traders more control and clarity when working with Heikin Ashi candles — whether you're analyzing trend strength, reducing chart noise, or simply improving your visual read of market momentum. It works by layering multiple types of HA overlays and color systems on top of your standard candlestick chart — without switching chart types. With dynamic gradient coloring, smoothing options, and a predictive line tool, this script helps you see not just what the current trend is, but how strong it is, and what it would take to reverse it.
Heikin Ashi candles help reduce noise but this script goes further by:
➡️adding color intelligence that shows trend strength using a streak counter
➡️uses smoothing logic to clean up chop and whipsaws
➡️introduces a predictive close line — a subtle but powerful guide for anticipating trend flips before they happen
Everything is configurable: colors, candle sources, overlays, predictive tools, and line styles. It’s built for traders who want visual speed, but don’t want to sacrifice signal quality.
At its core, the script offers two powerful dropdown controls:
💥HA Color Scheme (Colors Regular Candles) — Applies Heikin Ashi-derived coloring to your regular candles based on trend direction or streak strength. This gives you instant visual context without switching to a separate chart type.
💥HA Candle Overlay Mode — Overlays actual Heikin Ashi-style candles directly on top of your chart, using your preferred source:
➡️Custom HA candles using internal formula logic
➡️TradingView’s built-in Heikin Ashi source with your own colors
➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
🎨 Custom + Gradient HA Coloring🎨
See trend strength at a glance:
➡️1–4 bar streaks → lighter tone
➡️5–8 bars → medium tone
➡️9+ bars → bold tone, ideal for momentum-based entries, exits, or scaling strategies
→ Choose from:
➡️Your own custom color set
➡️A simple 2-color base mode
➡️Or a 3-level gradient for progressive trend analysis (using the streak counter)
🏛️ TradingView Official Heikin Ashi Overlay
Prefer native HA candles but want your own colors?
This mode plots TradingView's Heikin Ashi source, with your personal bullish/bearish color scheme.
➡️Ensures consistency with built-in charts while still leveraging your visual style.
🌊 Smoothed Heikin Ashi Candles — Clarity in Chaos🌊
These aren’t your standard HA candles. Smoothed Heikin Ashi uses a two-step EMA process to transform chaotic price action into a cleaner, slower-moving trend structure:
🔹 First, it smooths the raw OHLC data using EMA — filtering out minor price fluctuations.
🔹 Then, it applies the Heikin Ashi transformation on top of the smoothed data.
🔹 Finally, it applies a second EMA smoothing pass to the HA values — creating ultra-smooth candles.
📈 What You See:
Trends appear more fluid and consistent.
Choppy ranges and fakeouts are visually suppressed.
Minor pullbacks within a trend are de-emphasized, helping you avoid premature exits.
🎯 Best For:
Swing traders looking to stay in positions longer.
Intraday traders dealing with volatile or noisy instruments.
Anyone who wants a "trend map" overlay without the distractions of raw price action.
✅ Reduces whipsaws
✅ Delivers high-contrast trend zones
✅ Makes reversals more visually apparent (but with a slight lag)
📍 Predictive Close Line📍
Shows where the real close must land to flip the current HA candle's color.
✅ Use it like predictive support/resistance
✅ Know if the trend is actually at risk
✅Visualize potential fakeouts or confirmation
Color-coded based on current HA direction (bullish, bearish, or neutral).
📈 Tick by tick & bar-to-bar Plots📈
Provides 2 plot types:
1)1 plot that tracks a bar tick by tick
2)another plot that tracks the close from bar to bar
For the bar to bar plot, you can choose between 2 options:
✅Full Plot — continuous line colored by HA trend
✅Recent Segments — color just the last few bars (configurable) to reduce chart clutter
✅ Customize width, number of bars, and visibility
➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
📘 How to Use this script📘
Imagine you're watching a choppy 15-minute chart on a volatile crypto pair — price action is messy, and it’s hard to tell if a trend is forming or just noise.
Here’s how to cut through the chaos using Heikin Ashi Overlay Suite:
🔹 Step 1: Enable "Smoothed HA Candles"
Start by turning on the smoothed candles. You’ll immediately notice the noise fades, and broader directional moves become easier to follow. It's like switching from static to clean trend zones.
🧠 Why: Smoothed HA uses a double EMA process that filters out small reversals and lets larger moves stand out. Perfect for sideways or jittery charts.
🔹 Step 2: Watch the Color Gradient Build
As the smoothed candles begin to align in one direction, the gradient coloring (1–4, 5–8, 9+ streaks) gives you an at-a-glance visual of how strong the trend is.
✅ If you see 9+ same-colored candles? You’re likely in a mature trend.
✅ If it resets often? You’re in chop — consider staying out.
🔹 Step 3: Use the Predictive Close Line for Anticipation
Now here’s the edge — this line tells you where the candle would have to close to flip colors.
📉 If price is hovering just above it during a bullish run — momentum may be weakening.
📈 If price bounces off it — the trend may be strengthening.
This is excellent for confirming entries, exits, or spotting early warning signs.
🔹 Step 4: Switch Between Candle Modes as Needed
You can flip between:
✅ Custom HA: Gradient candles with your colors
✅ TradingView HA: The official source with your styling
✅ None: Just color regular candles using the HA logic
Use what fits your style — everything is modular.
🔹 Step 5: Tune It to Your Chart
Lastly, tweak streak thresholds (currently only can do this within the source code), smoothing lengths, and line styles to match your timeframe and strategy.
🎯 Tailor The Settings to Fit Your Trading Style🎯
🔹 🧪 Scalper (1–5 min charts)
If you’re trading fast intraday moves, you want quicker responsiveness and less lag.
Try these settings:
🔸Smoothing Lengths: Use lower values (e.g. len = 3, len2 = 5)
🔸Candle Mode: Use Custom HA or TV’s HA for real-time color flips
🔸Predictive Close Line: Great for ultra-fast anticipation of color reversals
🔸Line Mode: Use Recent Segments mode to track short bursts of trend
🔸Colors: Use high-contrast, opaque colors for clarity
✅ These settings help you catch micro-trends and flip signals faster, while still filtering out the worst of the noise.
🔹 🧪 Swing Trader (30m–4h charts and beyond)
If you’re looking for multi-hour or multi-day trend confirmation, prioritize clarity and staying in moves longer.
Recommended setup:
🔸Smoothing Lengths: Medium to high values (e.g. len = 8, len2 = 21)
🔸Candle Mode: Use Smoothed HA Candles to block out intrabar chop
🔸Gradient Colors: Enable to visualize trend maturity and strength
🔸Predictive Close Line: Helps confirm trend continuation or spot early reversals
🔸Line Mode: Use Full Plot Line for clean HA-based trend tracking
✅ These settings give you a calm, clean view of the bigger picture — ideal for holding positions longer and avoiding early exits.
🔧 This script isn’t just a chart overlay — it’s a visual trend engine.🔧
Ideal For:
🔶 Trend-followers who want clean, color-coded confirmation
🔶 Reversal traders spotting exhaustion via predictive flips
🔶 Scalpers filtering noise with lighter smoothing
🔶 Swing traders using smoothed visuals to hold longer
📌 Final Note
Heikin Ashi Overlay Pro is designed to help you see momentum, trend shifts, and market structure with greater clarity — not to predict price on its own. For best results:
✔️ Combine with support/resistance, moving averages, or price action patterns
✔️ Use Predictive Close as a confirmation tool, not a signal generator
✔️ Pair gradient colors with structure to gauge trend maturity
✔️ Always zoom out and check higher timeframes for context
🧠 Use this as part of a layered approach — not a standalone system.
🙏 Credits🙏
⚡HA logic based on SimpleCryptoLife
⚡Smoothed HA concept adapted from a script by Jackvmk
💡💡💡Turn logic into clarity. Structure into trades. And uncertainty into confidence.💡💡💡
Trend Score HTF (Raw Data) Pine Screener📘 Trend Score HTF (Raw Data) Pine Screener — Indicator Guide
This indicator tracks price action using a custom cumulative Trend Score (TS) system. It helps you visualize trend momentum, detect early reversals, confirm direction changes, and screen for entries across large watchlists like SPX500 using TradingView’s Pine Script Screener (beta).
⸻
🔧 What This Indicator Does
• Assigns a +1 or -1 score when price breaks the previous high or low
• Accumulates these scores into a real-time tsScore
• Detects early warnings (primed flips) and trend changes (confirmed flips)
• Supports alerts and labels for visual and automated trading
• Designed to work inside the Pine Screener so you can filter hundreds of tickers live
⸻
⚙️ Recommended Settings (for Beginners)
When adding the indicator to your chart:
Go to the “Inputs” tab at the top of the settings panel.
Then:
• Uncheck “Confirm flips on bar close”
• Check “Accumulate TS Across Flips? (ON = non-reset, OFF = reset)”
This setup allows you to see trend changes immediately without waiting for bar closes and lets the trend score build continuously over time, making it easier to follow long trends.
⸻
🧠 Core Logic
Start Date
Select a meaningful historical start date — for example: 2020-01-01. This provides long-term context for trend score calculation.
Per-Bar Delta (Δ) Calculation
The indicator scores each bar based on breakout behavior:
If the bar breaks only the previous high, Δ = +1
If it breaks only the previous low, Δ = -1
If it breaks both the high and low, Δ = 0
If it breaks neither, Δ = 0
This filters out wide-range or indecisive candles during volatility.
Cumulative Trend Score
Each bar’s delta is added to the running tsScore.
When it rises, bullish pressure is building.
When it falls, bearish pressure is increasing.
Trend Flip Logic
A bullish flip happens when tsScore rises by +3 from the lowest recent point.
A bearish flip happens when tsScore falls by -3 from the highest recent point.
These flips update the active trend direction between bullish and bearish.
⸻
⚠️ What Is a “Primed” Flip?
A primed flip is a signal that the current trend is about to flip — just one point away.
A primed bullish flip means the trend is currently bearish, but the tsScore only needs +1 more to flip. If the next bar breaks the previous high (without breaking the low), it will trigger a bullish flip.
A primed bearish flip means the trend is currently bullish, but the tsScore only needs -1 more to flip. If the next bar breaks the previous low (without breaking the high), it will trigger a bearish flip.
Primed flips are plotted one bar ahead of the current bar. They act like forecasts and give you a head start.
⸻
✅ What Is a “Confirmed” Flip?
A confirmed flip is the first bar of a new trend direction.
A confirmed bullish flip appears when a bearish trend officially flips into a new bullish trend.
A confirmed bearish flip appears when a bullish trend officially flips into a new bearish trend.
These signals are reliable and great for entries, trend filters, or reversals.
⸻
🖼 Visual Cues
The trend score (tsScore) line shows the accumulated trend strength.
A Δ histogram shows the daily price contribution: +1 for breaking highs, -1 for breaking lows, 0 otherwise.
A green background means the chart is in a bullish trend.
A red background means the chart is in a bearish trend.
A ⬆ label signals a primed bullish flip is possible on the next bar.
A ⬇ label signals a primed bearish flip is possible on the next bar.
A ✅ means a bullish flip just confirmed.
A ❌ means a bearish flip just confirmed.
⸻
🔔 Alerts You Can Use
The indicator includes these built-in alerts:
• Primed Bullish Flip — watch for possible bullish reversal tomorrow
• Primed Bearish Flip — watch for possible bearish reversal tomorrow
• Bullish Confirmed — official entry into new uptrend
• Bearish Confirmed — official entry into new downtrend
You can set these alerts in TradingView to monitor across your chart or watchlist.
⸻
📈 How to Use in TradingView Pine Screener
Step 1: Create your own watchlist — for example, SPX500
Step 2: Favorite this indicator so it shows up in the screener
Step 3: Go to TradingView → Products → Screeners → Pine (Beta)
Step 4: Select this indicator and choose a condition, like “Bullish Confirmed”
Step 5: Click Scan
You’ll instantly see stocks that just flipped trends or are close to doing so.
⸻
⏰ When to Use the Screener
Use this screener after market close or before the next open to avoid intraday noise.
During the day, if a candle breaks both the high and low, the delta becomes 0, which may cancel a flip or primed signal.
Results during regular trading hours can change frequently. For best results, scan during stable periods like pre-market or after-hours.
⸻
🧪 Real-World Examples
SWK
NVR
WMT
UNH
Each of these examples shows clean, structured trend transitions detected in advance or confirmed with precision.
PLTR: complicated case primed for bullish (but we don't when it will flip)
⚠️ Risk Disclaimer & Trend Context
A confirmed bullish signal does not guarantee an immediate price increase. Price may continue to consolidate or even pull back after a bullish flip.
Likewise, a primed bullish signal does not always lead to confirmation. It simply means the conditions are close — but if the next bar breaks both the high and low, or breaks only the low, the flip will be canceled.
On the other side, a confirmed bearish signal does not mean the market will crash. If the overall trend is bullish (for example, tsScore has been rising for weeks), then a bearish flip may just represent a short-term pullback — not a trend reversal.
You always need to consider the overall market structure. If the long-term trend is bullish, it’s usually smarter to wait for bullish confirmation signals. Bearish flips in that context are often just dips — not opportunities to short.
This indicator gives you context, not predictions. It’s a tool for alignment — not absolute outcomes. Use it to follow structure, not fight it.
Support and Resistance levels from Options DataINTRODUCTION
This script is designed to visualize key support and resistance levels derived from options data on TradingView charts. It overlays lines, labels, and boxes to highlight levels such as Put Walls (gamma support), Call Walls (gamma resistance), Gamma Flip points, Vanna levels, and more.
These levels are intended to help traders identify potential areas of price magnetism, reversal, or breakout based on options market dynamics. All calculations and visualizations are based on user-provided data pasted into the input field, as Pine Script cannot directly fetch external options data due to platform limitations (explained below).
For convenience, my website allows users to interact with a bot that will generate the string for up to 30 tickers at once getting nearly real-time data on demand (data is cached for 15min). With the output string pasted into this indicator, it's a bliss to shuffle through your portfolio and see those levels for each ticker.
The script is open-source under TradingView's terms, allowing users to study, modify, and improve it. It draws inspiration from common options-derived metrics like gamma exposure and vanna, which are widely discussed in financial literature. No external code is copied without rights; all logic is original or based on standard mathematical formulas.
How the Options Levels Are Calculated
The levels displayed by this script are not computed within Pine Script itself—instead, they rely on pre-calculated values provided by the user (via a pasted data string). These values are derived from options chain data fetched from financial APIs (e.g., using libraries like yfinance in Python). Here's a step-by-step overview of how these levels are generally calculated externally before being input into the script:
Fetching Options Data:
Historical and current options chain data for a ticker (e.g., strikes, open interest, volume, implied volatility, expirations) is retrieved for near-term expirations (e.g., up to 90 days).
Current stock price is obtained from recent history.
Gamma Support (Put Wall) and Resistance (Call Wall):
Gamma Calculation: For each option, gamma (the rate of change of delta) is computed using the Black-Scholes formula:
gamma = N'(d1) / (S * sigma * sqrt(T))
where S is the stock price, K is the strike, T is time to expiration (in years), sigma is implied volatility, r is the risk-free rate (e.g., 0.0445), and N'(d1) is the normal probability density function.
Weighted gamma is multiplied by open interest and aggregated by strike.
The Put Wall is the strike below the current price with the highest weighted gamma from puts (acting as support).
The Call Wall is the strike above the current price with the highest weighted gamma from calls (acting as resistance).
Short-term versions focus on strikes closer to the money (e.g., within 10-15% of the price).
Gamma Flip Level:
Net dealer gamma exposure (GEX) is calculated across all strikes:
GEX = sum (gamma * OI * 100 * S^2 * sign * decay)
where sign is +1 for calls/-1 for puts, and decay is 1 / sqrt(T).
The flip point is the price where net GEX changes sign (from positive to negative or vice versa), interpolated between strikes.
Vanna Levels:
Vanna (sensitivity of delta to volatility) is calculated:
vanna = -N'(d1) * d2 / sigma
where d2 = d1 - sigma * sqrt(T).
Weighted by open interest, the highest positive and negative vanna strikes are identified.
Other Levels:
S1/R1: Significant strikes with high combined open interest and volume (80% OI + 20% volume), below/above price for support/resistance.
Implied Move: ATM implied volatility scaled by S * sigma * sqrt(d/365) (e.g., for 7 days).
Call/Put Ratio: Total call contracts divided by put contracts (OI + volume).
IV Percentage: Average ATM implied volatility.
Options Activity Level: Average contracts per unique strike, binned into levels (0-4).
Stop Loss: Dynamically set below the lowest support (e.g., Put Wall, Gamma Flip), adjusted by IV (tighter in low IV).
Fib Target: 1.618 extension from Put Wall to Call Wall range.
Previous day levels are stored for comparison (e.g., to detect Call Wall movement >2.5% for alerts).
Effect as Support and Resistance in Technical Trading
Options levels like gamma walls influence price action due to market maker hedging:
Put Wall (Gamma Support): High put gamma below price creates a "magnet" effect—market makers buy stock as price falls, providing support. Traders might look for bounces here as entry points for longs.
Call Wall (Gamma Resistance): High call gamma above price leads to selling pressure from hedging, acting as resistance. Rejections here could signal trims, sells or even shorts.
Gamma Flip: Where gamma exposure flips sign, often a volatility pivot—crossing it can accelerate moves (bullish above, bearish below).
Vanna Levels: Positive/negative vanna indicate volatility sensitivity; crosses may signal regime shifts.
Implied Move: Shows expected range; prices outside suggest overextension.
S1/R1 and Fib Target: Volume/OI clusters act as classic S/R; Fib extensions project upside targets post-breakout.
In trading, these are not guarantees—combine with TA (e.g., volume, trends). High activity levels imply stronger effects; low CP ratio suggests bearish sentiment. Alerts trigger on proximities/crosses for awareness, not advice.
Limitations of the TradingView Platform for Data Pulling
TradingView's Pine Script is sandboxed for security and performance:
No direct internet access or API calls (e.g., can't fetch yfinance data in-script).
Limited to chart data/symbol info; no real-time options chains.
Inputs are static per load; updates require manual pasting.
Caching isn't persistent across sessions.
This prevents dynamic data pulling, ensuring scripts remain lightweight but requiring external tools for fresh data.
Creative Solution for On-Demand Data Pulling
To overcome these limitations, users can use external tools or scripts (e.g., Python-based) to fetch and compute levels on demand. The tool processes tickers, generates a formatted string (e.g., "TICKER:level1,level2,...;TIMESTAMP:unix;"), and users paste it into the script's input. This keeps data fresh without violating platform rules, as computation happens off-platform. For example, run a local script to query APIs and output the string—adaptable for any ticker.
Script Functionality Breakdown
Inputs: Custom data string (parsed for levels/timestamp); toggles for short-term/previous/Vanna/stop loss; style options (colors, transparency).
Parsing: Extracts levels for the chart symbol; gets timestamp for "updated ago" display.
Drawing: Lines/labels for levels; boxes for gamma zones/implied move; clears old elements on updates.
Info Panel: Top-right summary with metrics (CP ratio, IV, distances, activity); emojis for quick status.
Alerts: Conditions for proximities, crosses, bounces (e.g., 0.5% bounce from Put Wall).
Performance: Uses vars for persistence; efficient for real-time.
This script is educational—test thoroughly. Not financial advice; past performance isn't indicative of future results. Feedback welcome via TradingView comments.
Markov Chain [3D] | FractalystWhat exactly is a Markov Chain?
This indicator uses a Markov Chain model to analyze, quantify, and visualize the transitions between market regimes (Bull, Bear, Neutral) on your chart. It dynamically detects these regimes in real-time, calculates transition probabilities, and displays them as animated 3D spheres and arrows, giving traders intuitive insight into current and future market conditions.
How does a Markov Chain work, and how should I read this spheres-and-arrows diagram?
Think of three weather modes: Sunny, Rainy, Cloudy.
Each sphere is one mode. The loop on a sphere means “stay the same next step” (e.g., Sunny again tomorrow).
The arrows leaving a sphere show where things usually go next if they change (e.g., Sunny moving to Cloudy).
Some paths matter more than others. A more prominent loop means the current mode tends to persist. A more prominent outgoing arrow means a change to that destination is the usual next step.
Direction isn’t symmetric: moving Sunny→Cloudy can behave differently than Cloudy→Sunny.
Now relabel the spheres to markets: Bull, Bear, Neutral.
Spheres: market regimes (uptrend, downtrend, range).
Self‑loop: tendency for the current regime to continue on the next bar.
Arrows: the most common next regime if a switch happens.
How to read: Start at the sphere that matches current bar state. If the loop stands out, expect continuation. If one outgoing path stands out, that switch is the typical next step. Opposite directions can differ (Bear→Neutral doesn’t have to match Neutral→Bear).
What states and transitions are shown?
The three market states visualized are:
Bullish (Bull): Upward or strong-market regime.
Bearish (Bear): Downward or weak-market regime.
Neutral: Sideways or range-bound regime.
Bidirectional animated arrows and probability labels show how likely the market is to move from one regime to another (e.g., Bull → Bear or Neutral → Bull).
How does the regime detection system work?
You can use either built-in price returns (based on adaptive Z-score normalization) or supply three custom indicators (such as volume, oscillators, etc.).
Values are statistically normalized (Z-scored) over a configurable lookback period.
The normalized outputs are classified into Bull, Bear, or Neutral zones.
If using three indicators, their regime signals are averaged and smoothed for robustness.
How are transition probabilities calculated?
On every confirmed bar, the algorithm tracks the sequence of detected market states, then builds a rolling window of transitions.
The code maintains a transition count matrix for all regime pairs (e.g., Bull → Bear).
Transition probabilities are extracted for each possible state change using Laplace smoothing for numerical stability, and frequently updated in real-time.
What is unique about the visualization?
3D animated spheres represent each regime and change visually when active.
Animated, bidirectional arrows reveal transition probabilities and allow you to see both dominant and less likely regime flows.
Particles (moving dots) animate along the arrows, enhancing the perception of regime flow direction and speed.
All elements dynamically update with each new price bar, providing a live market map in an intuitive, engaging format.
Can I use custom indicators for regime classification?
Yes! Enable the "Custom Indicators" switch and select any three chart series as inputs. These will be normalized and combined (each with equal weight), broadening the regime classification beyond just price-based movement.
What does the “Lookback Period” control?
Lookback Period (default: 100) sets how much historical data builds the probability matrix. Shorter periods adapt faster to regime changes but may be noisier. Longer periods are more stable but slower to adapt.
How is this different from a Hidden Markov Model (HMM)?
It sets the window for both regime detection and probability calculations. Lower values make the system more reactive, but potentially noisier. Higher values smooth estimates and make the system more robust.
How is this Markov Chain different from a Hidden Markov Model (HMM)?
Markov Chain (as here): All market regimes (Bull, Bear, Neutral) are directly observable on the chart. The transition matrix is built from actual detected regimes, keeping the model simple and interpretable.
Hidden Markov Model: The actual regimes are unobservable ("hidden") and must be inferred from market output or indicator "emissions" using statistical learning algorithms. HMMs are more complex, can capture more subtle structure, but are harder to visualize and require additional machine learning steps for training.
A standard Markov Chain models transitions between observable states using a simple transition matrix, while a Hidden Markov Model assumes the true states are hidden (latent) and must be inferred from observable “emissions” like price or volume data. In practical terms, a Markov Chain is transparent and easier to implement and interpret; an HMM is more expressive but requires statistical inference to estimate hidden states from data.
Markov Chain: states are observable; you directly count or estimate transition probabilities between visible states. This makes it simpler, faster, and easier to validate and tune.
HMM: states are hidden; you only observe emissions generated by those latent states. Learning involves machine learning/statistical algorithms (commonly Baum–Welch/EM for training and Viterbi for decoding) to infer both the transition dynamics and the most likely hidden state sequence from data.
How does the indicator avoid “repainting” or look-ahead bias?
All regime changes and matrix updates happen only on confirmed (closed) bars, so no future data is leaked, ensuring reliable real-time operation.
Are there practical tuning tips?
Tune the Lookback Period for your asset/timeframe: shorter for fast markets, longer for stability.
Use custom indicators if your asset has unique regime drivers.
Watch for rapid changes in transition probabilities as early warning of a possible regime shift.
Who is this indicator for?
Quants and quantitative researchers exploring probabilistic market modeling, especially those interested in regime-switching dynamics and Markov models.
Programmers and system developers who need a probabilistic regime filter for systematic and algorithmic backtesting:
The Markov Chain indicator is ideally suited for programmatic integration via its bias output (1 = Bull, 0 = Neutral, -1 = Bear).
Although the visualization is engaging, the core output is designed for automated, rules-based workflows—not for discretionary/manual trading decisions.
Developers can connect the indicator’s output directly to their Pine Script logic (using input.source()), allowing rapid and robust backtesting of regime-based strategies.
It acts as a plug-and-play regime filter: simply plug the bias output into your entry/exit logic, and you have a scientifically robust, probabilistically-derived signal for filtering, timing, position sizing, or risk regimes.
The MC's output is intentionally "trinary" (1/0/-1), focusing on clear regime states for unambiguous decision-making in code. If you require nuanced, multi-probability or soft-label state vectors, consider expanding the indicator or stacking it with a probability-weighted logic layer in your scripting.
Because it avoids subjectivity, this approach is optimal for systematic quants, algo developers building backtested, repeatable strategies based on probabilistic regime analysis.
What's the mathematical foundation behind this?
The mathematical foundation behind this Markov Chain indicator—and probabilistic regime detection in finance—draws from two principal models: the (standard) Markov Chain and the Hidden Markov Model (HMM).
How to use this indicator programmatically?
The Markov Chain indicator automatically exports a bias value (+1 for Bullish, -1 for Bearish, 0 for Neutral) as a plot visible in the Data Window. This allows you to integrate its regime signal into your own scripts and strategies for backtesting, automation, or live trading.
Step-by-Step Integration with Pine Script (input.source)
Add the Markov Chain indicator to your chart.
This must be done first, since your custom script will "pull" the bias signal from the indicator's plot.
In your strategy, create an input using input.source()
Example:
//@version=5
strategy("MC Bias Strategy Example")
mcBias = input.source(close, "MC Bias Source")
After saving, go to your script’s settings. For the “MC Bias Source” input, select the plot/output of the Markov Chain indicator (typically its bias plot).
Use the bias in your trading logic
Example (long only on Bull, flat otherwise):
if mcBias == 1
strategy.entry("Long", strategy.long)
else
strategy.close("Long")
For more advanced workflows, combine mcBias with additional filters or trailing stops.
How does this work behind-the-scenes?
TradingView’s input.source() lets you use any plot from another indicator as a real-time, “live” data feed in your own script (source).
The selected bias signal is available to your Pine code as a variable, enabling logical decisions based on regime (trend-following, mean-reversion, etc.).
This enables powerful strategy modularity : decouple regime detection from entry/exit logic, allowing fast experimentation without rewriting core signal code.
Integrating 45+ Indicators with Your Markov Chain — How & Why
The Enhanced Custom Indicators Export script exports a massive suite of over 45 technical indicators—ranging from classic momentum (RSI, MACD, Stochastic, etc.) to trend, volume, volatility, and oscillator tools—all pre-calculated, centered/scaled, and available as plots.
// Enhanced Custom Indicators Export - 45 Technical Indicators
// Comprehensive technical analysis suite for advanced market regime detection
//@version=6
indicator('Enhanced Custom Indicators Export | Fractalyst', shorttitle='Enhanced CI Export', overlay=false, scale=scale.right, max_labels_count=500, max_lines_count=500)
// |----- Input Parameters -----| //
momentum_group = "Momentum Indicators"
trend_group = "Trend Indicators"
volume_group = "Volume Indicators"
volatility_group = "Volatility Indicators"
oscillator_group = "Oscillator Indicators"
display_group = "Display Settings"
// Common lengths
length_14 = input.int(14, "Standard Length (14)", minval=1, maxval=100, group=momentum_group)
length_20 = input.int(20, "Medium Length (20)", minval=1, maxval=200, group=trend_group)
length_50 = input.int(50, "Long Length (50)", minval=1, maxval=200, group=trend_group)
// Display options
show_table = input.bool(true, "Show Values Table", group=display_group)
table_size = input.string("Small", "Table Size", options= , group=display_group)
// |----- MOMENTUM INDICATORS (15 indicators) -----| //
// 1. RSI (Relative Strength Index)
rsi_14 = ta.rsi(close, length_14)
rsi_centered = rsi_14 - 50
// 2. Stochastic Oscillator
stoch_k = ta.stoch(close, high, low, length_14)
stoch_d = ta.sma(stoch_k, 3)
stoch_centered = stoch_k - 50
// 3. Williams %R
williams_r = ta.stoch(close, high, low, length_14) - 100
// 4. MACD (Moving Average Convergence Divergence)
= ta.macd(close, 12, 26, 9)
// 5. Momentum (Rate of Change)
momentum = ta.mom(close, length_14)
momentum_pct = (momentum / close ) * 100
// 6. Rate of Change (ROC)
roc = ta.roc(close, length_14)
// 7. Commodity Channel Index (CCI)
cci = ta.cci(close, length_20)
// 8. Money Flow Index (MFI)
mfi = ta.mfi(close, length_14)
mfi_centered = mfi - 50
// 9. Awesome Oscillator (AO)
ao = ta.sma(hl2, 5) - ta.sma(hl2, 34)
// 10. Accelerator Oscillator (AC)
ac = ao - ta.sma(ao, 5)
// 11. Chande Momentum Oscillator (CMO)
cmo = ta.cmo(close, length_14)
// 12. Detrended Price Oscillator (DPO)
dpo = close - ta.sma(close, length_20)
// 13. Price Oscillator (PPO)
ppo = ta.sma(close, 12) - ta.sma(close, 26)
ppo_pct = (ppo / ta.sma(close, 26)) * 100
// 14. TRIX
trix_ema1 = ta.ema(close, length_14)
trix_ema2 = ta.ema(trix_ema1, length_14)
trix_ema3 = ta.ema(trix_ema2, length_14)
trix = ta.roc(trix_ema3, 1) * 10000
// 15. Klinger Oscillator
klinger = ta.ema(volume * (high + low + close) / 3, 34) - ta.ema(volume * (high + low + close) / 3, 55)
// 16. Fisher Transform
fisher_hl2 = 0.5 * (hl2 - ta.lowest(hl2, 10)) / (ta.highest(hl2, 10) - ta.lowest(hl2, 10)) - 0.25
fisher = 0.5 * math.log((1 + fisher_hl2) / (1 - fisher_hl2))
// 17. Stochastic RSI
stoch_rsi = ta.stoch(rsi_14, rsi_14, rsi_14, length_14)
stoch_rsi_centered = stoch_rsi - 50
// 18. Relative Vigor Index (RVI)
rvi_num = ta.swma(close - open)
rvi_den = ta.swma(high - low)
rvi = rvi_den != 0 ? rvi_num / rvi_den : 0
// 19. Balance of Power (BOP)
bop = (close - open) / (high - low)
// |----- TREND INDICATORS (10 indicators) -----| //
// 20. Simple Moving Average Momentum
sma_20 = ta.sma(close, length_20)
sma_momentum = ((close - sma_20) / sma_20) * 100
// 21. Exponential Moving Average Momentum
ema_20 = ta.ema(close, length_20)
ema_momentum = ((close - ema_20) / ema_20) * 100
// 22. Parabolic SAR
sar = ta.sar(0.02, 0.02, 0.2)
sar_trend = close > sar ? 1 : -1
// 23. Linear Regression Slope
lr_slope = ta.linreg(close, length_20, 0) - ta.linreg(close, length_20, 1)
// 24. Moving Average Convergence (MAC)
mac = ta.sma(close, 10) - ta.sma(close, 30)
// 25. Trend Intensity Index (TII)
tii_sum = 0.0
for i = 1 to length_20
tii_sum += close > close ? 1 : 0
tii = (tii_sum / length_20) * 100
// 26. Ichimoku Cloud Components
ichimoku_tenkan = (ta.highest(high, 9) + ta.lowest(low, 9)) / 2
ichimoku_kijun = (ta.highest(high, 26) + ta.lowest(low, 26)) / 2
ichimoku_signal = ichimoku_tenkan > ichimoku_kijun ? 1 : -1
// 27. MESA Adaptive Moving Average (MAMA)
mama_alpha = 2.0 / (length_20 + 1)
mama = ta.ema(close, length_20)
mama_momentum = ((close - mama) / mama) * 100
// 28. Zero Lag Exponential Moving Average (ZLEMA)
zlema_lag = math.round((length_20 - 1) / 2)
zlema_data = close + (close - close )
zlema = ta.ema(zlema_data, length_20)
zlema_momentum = ((close - zlema) / zlema) * 100
// |----- VOLUME INDICATORS (6 indicators) -----| //
// 29. On-Balance Volume (OBV)
obv = ta.obv
// 30. Volume Rate of Change (VROC)
vroc = ta.roc(volume, length_14)
// 31. Price Volume Trend (PVT)
pvt = ta.pvt
// 32. Negative Volume Index (NVI)
nvi = 0.0
nvi := volume < volume ? nvi + ((close - close ) / close ) * nvi : nvi
// 33. Positive Volume Index (PVI)
pvi = 0.0
pvi := volume > volume ? pvi + ((close - close ) / close ) * pvi : pvi
// 34. Volume Oscillator
vol_osc = ta.sma(volume, 5) - ta.sma(volume, 10)
// 35. Ease of Movement (EOM)
eom_distance = high - low
eom_box_height = volume / 1000000
eom = eom_box_height != 0 ? eom_distance / eom_box_height : 0
eom_sma = ta.sma(eom, length_14)
// 36. Force Index
force_index = volume * (close - close )
force_index_sma = ta.sma(force_index, length_14)
// |----- VOLATILITY INDICATORS (10 indicators) -----| //
// 37. Average True Range (ATR)
atr = ta.atr(length_14)
atr_pct = (atr / close) * 100
// 38. Bollinger Bands Position
bb_basis = ta.sma(close, length_20)
bb_dev = 2.0 * ta.stdev(close, length_20)
bb_upper = bb_basis + bb_dev
bb_lower = bb_basis - bb_dev
bb_position = bb_dev != 0 ? (close - bb_basis) / bb_dev : 0
bb_width = bb_dev != 0 ? (bb_upper - bb_lower) / bb_basis * 100 : 0
// 39. Keltner Channels Position
kc_basis = ta.ema(close, length_20)
kc_range = ta.ema(ta.tr, length_20)
kc_upper = kc_basis + (2.0 * kc_range)
kc_lower = kc_basis - (2.0 * kc_range)
kc_position = kc_range != 0 ? (close - kc_basis) / kc_range : 0
// 40. Donchian Channels Position
dc_upper = ta.highest(high, length_20)
dc_lower = ta.lowest(low, length_20)
dc_basis = (dc_upper + dc_lower) / 2
dc_position = (dc_upper - dc_lower) != 0 ? (close - dc_basis) / (dc_upper - dc_lower) : 0
// 41. Standard Deviation
std_dev = ta.stdev(close, length_20)
std_dev_pct = (std_dev / close) * 100
// 42. Relative Volatility Index (RVI)
rvi_up = ta.stdev(close > close ? close : 0, length_14)
rvi_down = ta.stdev(close < close ? close : 0, length_14)
rvi_total = rvi_up + rvi_down
rvi_volatility = rvi_total != 0 ? (rvi_up / rvi_total) * 100 : 50
// 43. Historical Volatility
hv_returns = math.log(close / close )
hv = ta.stdev(hv_returns, length_20) * math.sqrt(252) * 100
// 44. Garman-Klass Volatility
gk_vol = math.log(high/low) * math.log(high/low) - (2*math.log(2)-1) * math.log(close/open) * math.log(close/open)
gk_volatility = math.sqrt(ta.sma(gk_vol, length_20)) * 100
// 45. Parkinson Volatility
park_vol = math.log(high/low) * math.log(high/low)
parkinson = math.sqrt(ta.sma(park_vol, length_20) / (4 * math.log(2))) * 100
// 46. Rogers-Satchell Volatility
rs_vol = math.log(high/close) * math.log(high/open) + math.log(low/close) * math.log(low/open)
rogers_satchell = math.sqrt(ta.sma(rs_vol, length_20)) * 100
// |----- OSCILLATOR INDICATORS (5 indicators) -----| //
// 47. Elder Ray Index
elder_bull = high - ta.ema(close, 13)
elder_bear = low - ta.ema(close, 13)
elder_power = elder_bull + elder_bear
// 48. Schaff Trend Cycle (STC)
stc_macd = ta.ema(close, 23) - ta.ema(close, 50)
stc_k = ta.stoch(stc_macd, stc_macd, stc_macd, 10)
stc_d = ta.ema(stc_k, 3)
stc = ta.stoch(stc_d, stc_d, stc_d, 10)
// 49. Coppock Curve
coppock_roc1 = ta.roc(close, 14)
coppock_roc2 = ta.roc(close, 11)
coppock = ta.wma(coppock_roc1 + coppock_roc2, 10)
// 50. Know Sure Thing (KST)
kst_roc1 = ta.roc(close, 10)
kst_roc2 = ta.roc(close, 15)
kst_roc3 = ta.roc(close, 20)
kst_roc4 = ta.roc(close, 30)
kst = ta.sma(kst_roc1, 10) + 2*ta.sma(kst_roc2, 10) + 3*ta.sma(kst_roc3, 10) + 4*ta.sma(kst_roc4, 15)
// 51. Percentage Price Oscillator (PPO)
ppo_line = ((ta.ema(close, 12) - ta.ema(close, 26)) / ta.ema(close, 26)) * 100
ppo_signal = ta.ema(ppo_line, 9)
ppo_histogram = ppo_line - ppo_signal
// |----- PLOT MAIN INDICATORS -----| //
// Plot key momentum indicators
plot(rsi_centered, title="01_RSI_Centered", color=color.purple, linewidth=1)
plot(stoch_centered, title="02_Stoch_Centered", color=color.blue, linewidth=1)
plot(williams_r, title="03_Williams_R", color=color.red, linewidth=1)
plot(macd_histogram, title="04_MACD_Histogram", color=color.orange, linewidth=1)
plot(cci, title="05_CCI", color=color.green, linewidth=1)
// Plot trend indicators
plot(sma_momentum, title="06_SMA_Momentum", color=color.navy, linewidth=1)
plot(ema_momentum, title="07_EMA_Momentum", color=color.maroon, linewidth=1)
plot(sar_trend, title="08_SAR_Trend", color=color.teal, linewidth=1)
plot(lr_slope, title="09_LR_Slope", color=color.lime, linewidth=1)
plot(mac, title="10_MAC", color=color.fuchsia, linewidth=1)
// Plot volatility indicators
plot(atr_pct, title="11_ATR_Pct", color=color.yellow, linewidth=1)
plot(bb_position, title="12_BB_Position", color=color.aqua, linewidth=1)
plot(kc_position, title="13_KC_Position", color=color.olive, linewidth=1)
plot(std_dev_pct, title="14_StdDev_Pct", color=color.silver, linewidth=1)
plot(bb_width, title="15_BB_Width", color=color.gray, linewidth=1)
// Plot volume indicators
plot(vroc, title="16_VROC", color=color.blue, linewidth=1)
plot(eom_sma, title="17_EOM", color=color.red, linewidth=1)
plot(vol_osc, title="18_Vol_Osc", color=color.green, linewidth=1)
plot(force_index_sma, title="19_Force_Index", color=color.orange, linewidth=1)
plot(obv, title="20_OBV", color=color.purple, linewidth=1)
// Plot additional oscillators
plot(ao, title="21_Awesome_Osc", color=color.navy, linewidth=1)
plot(cmo, title="22_CMO", color=color.maroon, linewidth=1)
plot(dpo, title="23_DPO", color=color.teal, linewidth=1)
plot(trix, title="24_TRIX", color=color.lime, linewidth=1)
plot(fisher, title="25_Fisher", color=color.fuchsia, linewidth=1)
// Plot more momentum indicators
plot(mfi_centered, title="26_MFI_Centered", color=color.yellow, linewidth=1)
plot(ac, title="27_AC", color=color.aqua, linewidth=1)
plot(ppo_pct, title="28_PPO_Pct", color=color.olive, linewidth=1)
plot(stoch_rsi_centered, title="29_StochRSI_Centered", color=color.silver, linewidth=1)
plot(klinger, title="30_Klinger", color=color.gray, linewidth=1)
// Plot trend continuation
plot(tii, title="31_TII", color=color.blue, linewidth=1)
plot(ichimoku_signal, title="32_Ichimoku_Signal", color=color.red, linewidth=1)
plot(mama_momentum, title="33_MAMA_Momentum", color=color.green, linewidth=1)
plot(zlema_momentum, title="34_ZLEMA_Momentum", color=color.orange, linewidth=1)
plot(bop, title="35_BOP", color=color.purple, linewidth=1)
// Plot volume continuation
plot(nvi, title="36_NVI", color=color.navy, linewidth=1)
plot(pvi, title="37_PVI", color=color.maroon, linewidth=1)
plot(momentum_pct, title="38_Momentum_Pct", color=color.teal, linewidth=1)
plot(roc, title="39_ROC", color=color.lime, linewidth=1)
plot(rvi, title="40_RVI", color=color.fuchsia, linewidth=1)
// Plot volatility continuation
plot(dc_position, title="41_DC_Position", color=color.yellow, linewidth=1)
plot(rvi_volatility, title="42_RVI_Volatility", color=color.aqua, linewidth=1)
plot(hv, title="43_Historical_Vol", color=color.olive, linewidth=1)
plot(gk_volatility, title="44_GK_Volatility", color=color.silver, linewidth=1)
plot(parkinson, title="45_Parkinson_Vol", color=color.gray, linewidth=1)
// Plot final oscillators
plot(rogers_satchell, title="46_RS_Volatility", color=color.blue, linewidth=1)
plot(elder_power, title="47_Elder_Power", color=color.red, linewidth=1)
plot(stc, title="48_STC", color=color.green, linewidth=1)
plot(coppock, title="49_Coppock", color=color.orange, linewidth=1)
plot(kst, title="50_KST", color=color.purple, linewidth=1)
// Plot final indicators
plot(ppo_histogram, title="51_PPO_Histogram", color=color.navy, linewidth=1)
plot(pvt, title="52_PVT", color=color.maroon, linewidth=1)
// |----- Reference Lines -----| //
hline(0, "Zero Line", color=color.gray, linestyle=hline.style_dashed, linewidth=1)
hline(50, "Midline", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
hline(-50, "Lower Midline", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
hline(25, "Upper Threshold", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
hline(-25, "Lower Threshold", color=color.gray, linestyle=hline.style_dotted, linewidth=1)
// |----- Enhanced Information Table -----| //
if show_table and barstate.islast
table_position = position.top_right
table_text_size = table_size == "Tiny" ? size.tiny : table_size == "Small" ? size.small : size.normal
var table info_table = table.new(table_position, 3, 18, bgcolor=color.new(color.white, 85), border_width=1, border_color=color.gray)
// Headers
table.cell(info_table, 0, 0, 'Category', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.blue, 70))
table.cell(info_table, 1, 0, 'Indicator', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.blue, 70))
table.cell(info_table, 2, 0, 'Value', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.blue, 70))
// Key Momentum Indicators
table.cell(info_table, 0, 1, 'MOMENTUM', text_color=color.purple, text_size=table_text_size, bgcolor=color.new(color.purple, 90))
table.cell(info_table, 1, 1, 'RSI Centered', text_color=color.purple, text_size=table_text_size)
table.cell(info_table, 2, 1, str.tostring(rsi_centered, '0.00'), text_color=color.purple, text_size=table_text_size)
table.cell(info_table, 0, 2, '', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 1, 2, 'Stoch Centered', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 2, 2, str.tostring(stoch_centered, '0.00'), text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 0, 3, '', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 1, 3, 'Williams %R', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 2, 3, str.tostring(williams_r, '0.00'), text_color=color.red, text_size=table_text_size)
table.cell(info_table, 0, 4, '', text_color=color.orange, text_size=table_text_size)
table.cell(info_table, 1, 4, 'MACD Histogram', text_color=color.orange, text_size=table_text_size)
table.cell(info_table, 2, 4, str.tostring(macd_histogram, '0.000'), text_color=color.orange, text_size=table_text_size)
table.cell(info_table, 0, 5, '', text_color=color.green, text_size=table_text_size)
table.cell(info_table, 1, 5, 'CCI', text_color=color.green, text_size=table_text_size)
table.cell(info_table, 2, 5, str.tostring(cci, '0.00'), text_color=color.green, text_size=table_text_size)
// Key Trend Indicators
table.cell(info_table, 0, 6, 'TREND', text_color=color.navy, text_size=table_text_size, bgcolor=color.new(color.navy, 90))
table.cell(info_table, 1, 6, 'SMA Momentum %', text_color=color.navy, text_size=table_text_size)
table.cell(info_table, 2, 6, str.tostring(sma_momentum, '0.00'), text_color=color.navy, text_size=table_text_size)
table.cell(info_table, 0, 7, '', text_color=color.maroon, text_size=table_text_size)
table.cell(info_table, 1, 7, 'EMA Momentum %', text_color=color.maroon, text_size=table_text_size)
table.cell(info_table, 2, 7, str.tostring(ema_momentum, '0.00'), text_color=color.maroon, text_size=table_text_size)
table.cell(info_table, 0, 8, '', text_color=color.teal, text_size=table_text_size)
table.cell(info_table, 1, 8, 'SAR Trend', text_color=color.teal, text_size=table_text_size)
table.cell(info_table, 2, 8, str.tostring(sar_trend, '0'), text_color=color.teal, text_size=table_text_size)
table.cell(info_table, 0, 9, '', text_color=color.lime, text_size=table_text_size)
table.cell(info_table, 1, 9, 'Linear Regression', text_color=color.lime, text_size=table_text_size)
table.cell(info_table, 2, 9, str.tostring(lr_slope, '0.000'), text_color=color.lime, text_size=table_text_size)
// Key Volatility Indicators
table.cell(info_table, 0, 10, 'VOLATILITY', text_color=color.yellow, text_size=table_text_size, bgcolor=color.new(color.yellow, 90))
table.cell(info_table, 1, 10, 'ATR %', text_color=color.yellow, text_size=table_text_size)
table.cell(info_table, 2, 10, str.tostring(atr_pct, '0.00'), text_color=color.yellow, text_size=table_text_size)
table.cell(info_table, 0, 11, '', text_color=color.aqua, text_size=table_text_size)
table.cell(info_table, 1, 11, 'BB Position', text_color=color.aqua, text_size=table_text_size)
table.cell(info_table, 2, 11, str.tostring(bb_position, '0.00'), text_color=color.aqua, text_size=table_text_size)
table.cell(info_table, 0, 12, '', text_color=color.olive, text_size=table_text_size)
table.cell(info_table, 1, 12, 'KC Position', text_color=color.olive, text_size=table_text_size)
table.cell(info_table, 2, 12, str.tostring(kc_position, '0.00'), text_color=color.olive, text_size=table_text_size)
// Key Volume Indicators
table.cell(info_table, 0, 13, 'VOLUME', text_color=color.blue, text_size=table_text_size, bgcolor=color.new(color.blue, 90))
table.cell(info_table, 1, 13, 'Volume ROC', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 2, 13, str.tostring(vroc, '0.00'), text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 0, 14, '', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 1, 14, 'EOM', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 2, 14, str.tostring(eom_sma, '0.000'), text_color=color.red, text_size=table_text_size)
// Key Oscillators
table.cell(info_table, 0, 15, 'OSCILLATORS', text_color=color.purple, text_size=table_text_size, bgcolor=color.new(color.purple, 90))
table.cell(info_table, 1, 15, 'Awesome Osc', text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 2, 15, str.tostring(ao, '0.000'), text_color=color.blue, text_size=table_text_size)
table.cell(info_table, 0, 16, '', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 1, 16, 'Fisher Transform', text_color=color.red, text_size=table_text_size)
table.cell(info_table, 2, 16, str.tostring(fisher, '0.000'), text_color=color.red, text_size=table_text_size)
// Summary Statistics
table.cell(info_table, 0, 17, 'SUMMARY', text_color=color.black, text_size=table_text_size, bgcolor=color.new(color.gray, 70))
table.cell(info_table, 1, 17, 'Total Indicators: 52', text_color=color.black, text_size=table_text_size)
regime_color = rsi_centered > 10 ? color.green : rsi_centered < -10 ? color.red : color.gray
regime_text = rsi_centered > 10 ? "BULLISH" : rsi_centered < -10 ? "BEARISH" : "NEUTRAL"
table.cell(info_table, 2, 17, regime_text, text_color=regime_color, text_size=table_text_size)
This makes it the perfect “indicator backbone” for quantitative and systematic traders who want to prototype, combine, and test new regime detection models—especially in combination with the Markov Chain indicator.
How to use this script with the Markov Chain for research and backtesting:
Add the Enhanced Indicator Export to your chart.
Every calculated indicator is available as an individual data stream.
Connect the indicator(s) you want as custom input(s) to the Markov Chain’s “Custom Indicators” option.
In the Markov Chain indicator’s settings, turn ON the custom indicator mode.
For each of the three custom indicator inputs, select the exported plot from the Enhanced Export script—the menu lists all 45+ signals by name.
This creates a powerful, modular regime-detection engine where you can mix-and-match momentum, trend, volume, or custom combinations for advanced filtering.
Backtest regime logic directly.
Once you’ve connected your chosen indicators, the Markov Chain script performs regime detection (Bull/Neutral/Bear) based on your selected features—not just price returns.
The regime detection is robust, automatically normalized (using Z-score), and outputs bias (1, -1, 0) for plug-and-play integration.
Export the regime bias for programmatic use.
As described above, use input.source() in your Pine Script strategy or system and link the bias output.
You can now filter signals, control trade direction/size, or design pairs-trading that respect true, indicator-driven market regimes.
With this framework, you’re not limited to static or simplistic regime filters. You can rigorously define, test, and refine what “market regime” means for your strategies—using the technical features that matter most to you.
Optimize your signal generation by backtesting across a universe of meaningful indicator blends.
Enhance risk management with objective, real-time regime boundaries.
Accelerate your research: iterate quickly, swap indicator components, and see results with minimal code changes.
Automate multi-asset or pairs-trading by integrating regime context directly into strategy logic.
Add both scripts to your chart, connect your preferred features, and start investigating your best regime-based trades—entirely within the TradingView ecosystem.
References & Further Reading
Ang, A., & Bekaert, G. (2002). “Regime Switches in Interest Rates.” Journal of Business & Economic Statistics, 20(2), 163–182.
Hamilton, J. D. (1989). “A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle.” Econometrica, 57(2), 357–384.
Markov, A. A. (1906). "Extension of the Limit Theorems of Probability Theory to a Sum of Variables Connected in a Chain." The Notes of the Imperial Academy of Sciences of St. Petersburg.
Guidolin, M., & Timmermann, A. (2007). “Asset Allocation under Multivariate Regime Switching.” Journal of Economic Dynamics and Control, 31(11), 3503–3544.
Murphy, J. J. (1999). Technical Analysis of the Financial Markets. New York Institute of Finance.
Brock, W., Lakonishok, J., & LeBaron, B. (1992). “Simple Technical Trading Rules and the Stochastic Properties of Stock Returns.” Journal of Finance, 47(5), 1731–1764.
Zucchini, W., MacDonald, I. L., & Langrock, R. (2017). Hidden Markov Models for Time Series: An Introduction Using R (2nd ed.). Chapman and Hall/CRC.
On Quantitative Finance and Markov Models:
Lo, A. W., & Hasanhodzic, J. (2009). The Heretics of Finance: Conversations with Leading Practitioners of Technical Analysis. Bloomberg Press.
Patterson, S. (2016). The Man Who Solved the Market: How Jim Simons Launched the Quant Revolution. Penguin Press.
TradingView Pine Script Documentation: www.tradingview.com
TradingView Blog: “Use an Input From Another Indicator With Your Strategy” www.tradingview.com
GeeksforGeeks: “What is the Difference Between Markov Chains and Hidden Markov Models?” www.geeksforgeeks.org
What makes this indicator original and unique?
- On‑chart, real‑time Markov. The chain is drawn directly on your chart. You see the current regime, its tendency to stay (self‑loop), and the usual next step (arrows) as bars confirm.
- Source‑agnostic by design. The engine runs on any series you select via input.source() — price, your own oscillator, a composite score, anything you compute in the script.
- Automatic normalization + regime mapping. Different inputs live on different scales. The script standardizes your chosen source and maps it into clear regimes (e.g., Bull / Bear / Neutral) without you micromanaging thresholds each time.
- Rolling, bar‑by‑bar learning. Transition tendencies are computed from a rolling window of confirmed bars. What you see is exactly what the market did in that window.
- Fast experimentation. Switch the source, adjust the window, and the Markov view updates instantly. It’s a rapid way to test ideas and feel regime persistence/switch behavior.
Integrate your own signals (using input.source())
- In settings, choose the Source . This is powered by input.source() .
- Feed it price, an indicator you compute inside the script, or a custom composite series.
- The script will automatically normalize that series and process it through the Markov engine, mapping it to regimes and updating the on‑chart spheres/arrows in real time.
Credits:
Deep gratitude to @RicardoSantos for both the foundational Markov chain processing engine and inspiring open-source contributions, which made advanced probabilistic market modeling accessible to the TradingView community.
Special thanks to @Alien_Algorithms for the innovative and visually stunning 3D sphere logic that powers the indicator’s animated, regime-based visualization.
Disclaimer
This tool summarizes recent behavior. It is not financial advice and not a guarantee of future results.






















