RSI Based Automatic Supply and DemandA script that draws supply and demand zones based on the RSI indicator. For example if RSI is under 30 a supply zone is drawn on the chart and extended for as long as there isn't a new crossunder 30. Same goes for above 70. The threshold which by default is set to 30, which means 30 is added to 0 and subtracted from 100 to give us the classic 30/70 threshold on RSI, can be set in the indicator settings.
By only plotting the Demand Below Supply Above indicator you get automatic SD level that is updated every time RSI reaches either 30 or 70. If you plot the Resistance Zone / Support Zone you get an indicator that extends the zone instead of overwrite the earlier zone. Due to the zone being extended the chart can get a bit messy if there isn't a clear range going on.
There is also a "confirmation bars" setting where you can tell the script how many bars under over 30 / 70 you want before a zone is drawn.
Here is an image of only using the "Demand Below / Supply Above" plot.
As you can see, this could be useful "Price Flow" indicator, where we would only short if a zone appears below another zone, or long if two zones in a row are going up, like stairs.
Buscar en scripts para "demand"
Leg Out Candle V2.0The Script marks candles that could be considered as a leg out of a supply/demand and are bigger than the previous ones based on the adjustable lookback value. There is also the option to adjust the threshold ob the body to wick ratio of the leg out candle. The lowest value is 50% because anything lower would be a basing candle.
MA Crossover with Demand/Supply Zones + Stop Loss/Take ProfitStop Loss and Take Profit Inputs:
Added stopLossPerc and takeProfitPerc as inputs to allow the user to define the stop loss and take profit levels as a percentage of the entry price.
Stop Loss and Take Profit Calculation:
For long positions, the stop loss is calculated as strategy.position_avg_price * (1 - stopLossPerc), and the take profit is calculated as strategy.position_avg_price * (1 + takeProfitPerc).
For short positions, the stop loss is calculated as strategy.position_avg_price * (1 + stopLossPerc), and the take profit is calculated as strategy.position_avg_price * (1 - takeProfitPerc).
Exit Strategy:
Added strategy.exit to define the stop loss and take profit levels for each trade. The from_entry parameter ensures that the exit is tied to the specific entry order.
Flexibility:
The stop loss and take profit levels are dynamic and adjust based on the entry price of the trade.
How It Works:
When a buy signal is generated (MA crossover near a demand zone), the strategy enters a long position and sets a stop loss and take profit level based on the input percentages.
When a sell signal is generated (MA crossunder near a supply zone), the strategy enters a short position and sets a stop loss and take profit level based on the input percentages.
The trade will exit automatically if either the stop loss or take profit level is hit.
Example:
If the entry price for a long position is $100, and the stop loss is set to 1% while the take profit is set to 2%:
Stop loss level =
100
∗
(
1
−
0.01
)
=
100∗(1−0.01)=99
Take profit level =
100
∗
(
1
+
0.02
)
=
100∗(1+0.02)=102
Notes:
You can adjust the stopLossPerc and takeProfitPerc inputs to suit your risk management preferences.
Always backtest the strategy to ensure the stop loss and take profit levels are appropriate for your trading instrument and timeframe.
Supply and Demand ZonesSupply/demand
Best for swings
One can also use the same for intraday by using daily zones
Supply & DemandWe can think of imbalanced as a signal of a huge order being filled.
For those who do not know what imbalanced candle are, an imbalanced candles are formed when the price move with force in a direction.
Taking the last 3 candles, when the wicks the of 1st and 3rd candle does not fully overlap the middle one, an imbalanced candle is formed.
Usually when a huge hands place its order it never gets filled entirely and the price usually comes back to this zone to fulfil the remaining order.
This indicator highlight range defined by previous high and low pivot right before an imbalanced candle.
Zones highlighted become zones to watch to enter a trade and become either supply or demand zone.
Engulfing Detector (Supply and Demand)Bullish and bearish engulfing candles marked with horizontal lines around engulfed candle.
This indicator can be used to assist in locating potential supply and demand zones.
The fresh zones will be of green and red line colors and the tested zone lines are grey in color.
Trend Gazer v5# Trend Gazer v5: Professional Multi-Timeframe ICT Analysis System
## 📊 Overview
**Trend Gazer v5** is a comprehensive institutional-grade trading system that synthesizes multiple proven methodologies into a unified analytical framework. This indicator combines **ICT (Inner Circle Trader) concepts**, **Smart Money Structure**, **Order Block detection**, **Fair Value Gaps**, and **volumetric analysis** to provide traders with high-probability trade setups backed by institutional footprints.
Unlike fragmented indicators that force traders to switch between multiple tools, Trend Gazer v5 delivers a **holistic market view** in a single overlay, eliminating analysis paralysis and enabling confident decision-making.
---
## 🎯 Why This Combination is Necessary
### The Problem with Single-Concept Indicators
Traditional indicators suffer from three critical flaws:
1. **Isolated Context** - Price action, volume, and structure are analyzed separately, creating conflicting signals
2. **Timeframe Blindness** - Single-timeframe analysis misses institutional activity occurring across multiple timeframes
3. **Lagging Confirmation** - Waiting for one indicator to confirm another causes missed entries and late exits
### The Institutional Trading Reality
Professional traders and institutions operate across **multiple dimensions simultaneously**:
- **Structural Context**: Where are we in the market cycle? (CHoCH, SiMS, BoMS)
- **Order Flow**: Where is institutional supply and demand concentrated? (Order Blocks)
- **Inefficiencies**: Where are price imbalances that must be filled? (Fair Value Gaps)
- **Momentum Context**: Is volume expanding or contracting? (VWC/TBOSI)
- **Mean Reversion Points**: Where do institutions expect rebounds? (NPR/BB, EMAs)
**Trend Gazer v5 unifies these dimensions**, creating a complete picture of market microstructure that individual indicators cannot provide.
---
## 🔬 Core Analytical Framework
### 1️⃣ ICT Donchian Smart Money Structure
**Purpose**: Identify institutional market structure shifts that precede major moves.
**Components**:
- **CHoCH (Change of Character)** - Market structure break signaling trend exhaustion
- `1.CHoCH` (Bullish) - Lower low broken, shift to bullish structure
- `A.CHoCH` (Bearish) - Higher high broken, shift to bearish structure
- **SiMS (Shift in Market Structure)** - Initial structure shift (2nd occurrence)
- **BoMS (Break of Market Structure)** - Continuation structure (3rd+ occurrence)
**Why It's Essential**:
Retail traders react to price changes. Institutions **create** price changes by breaking structure. By detecting these shifts using **Donchian channels** (the purest form of high/low tracking), we identify the exact moments when institutional bias changes.
**Credit**: Based on *ICT Donchian Smart Money Structure* by Zeiierman (CC BY-NC-SA 4.0)
---
### 2️⃣ Multi-Timeframe Order Block Detection
**Purpose**: Map institutional supply/demand zones where price is likely to reverse.
**Methodology**:
Order Blocks represent the **last opposite-direction candle** before a strong move. These zones indicate where institutions accumulated (bullish OB) or distributed (bearish OB) positions.
**Multi-Timeframe Coverage**:
- **1-minute**: Scalping zones for day traders
- **3-minute**: Short-term swing zones
- **15-minute**: Intraday institutional zones
- **60-minute**: Daily swing zones
- **Current TF**: Dynamic adaptation to any chart timeframe
**Key Features**:
- **Bounce Detection** - Identifies when price rebounds from OB zones (Signal 7: 🎯 OB Bounce)
- **Breaker Tracking** - Monitors when OBs are violated, converting bullish OBs to resistance and vice versa
- **Visual Rendering** - Color-coded boxes with transparency showing OB strength
- **OB Direction Filter** - Blocks contradictory signals (no SELL in bullish OB, no BUY in bearish OB)
**Why MTF Order Blocks Matter**:
A 60-minute Order Block represents institutional positioning at a larger timeframe. When combined with a 3-minute entry signal, you're trading **with** the big players, not against them.
---
### 3️⃣ Fair Value Gap (FVG) Detection
**Purpose**: Identify price inefficiencies that institutional traders must eventually fill.
**What Are FVGs?**:
Fair Value Gaps occur when price moves so rapidly that it leaves an **imbalance** - a gap between the high of one candle and the low of the candle two bars later (or vice versa). Institutions view these as inefficient pricing that must be corrected.
**Detection Logic**:
```
Bullish FVG: high < low → Gap up = Bearish imbalance (expect downward fill)
Bearish FVG: low > high → Gap down = Bullish imbalance (expect upward fill)
```
**Visual Design**:
- **Bullish FVG**: Green boxes (support zones where price should bounce)
- **Bearish FVG**: Red boxes (resistance zones where price should reject)
- **Mitigation Tracking**: FVGs disappear when filled, signaling completion
- **Volume Attribution**: Each FVG tracks associated buying/selling volume
**Why FVGs Are Critical**:
Institutions operate on **efficiency**. Gaps represent inefficiency. When price returns to fill a gap, it's not random - it's institutional traders **correcting market inefficiency**. Trading into FVG fills offers exceptional risk/reward.
---
### 4️⃣ Volumetric Weighted Cloud (VWC/TBOSI)
**Purpose**: Detect momentum shifts and trend strength using volume-weighted price action.
**Mechanism**:
VWC applies **volatility weighting** to moving averages, creating a dynamic cloud that expands during high-volatility trends and contracts during consolidation.
**Multi-Timeframe Analysis**:
- **1m, 3m, 5m**: Micro-scalping momentum
- **15m**: Intraday trend confirmation
- **60m, 240m**: Swing trade trend validation
**Signal Generation**:
- **VWC Switch (Signal 2)**: When cloud color flips (red → green or green → red), indicating momentum reversal
- **VWC Status Table**: Real-time display of trend direction across all timeframes
**Why Volume-Weighting Matters**:
Traditional moving averages treat all bars equally. VWC gives **more weight to high-volume bars**, ensuring that signals reflect actual institutional participation, not low-volume noise.
---
### 5️⃣ Non-Repaint STDEV (NPR) & Bollinger Bands
**Purpose**: Identify extreme mean-reversion points without repainting.
**Problem with Traditional Indicators**:
Many indicators **repaint** - they change past values when new data arrives, making backtests misleading. NPR uses **lookahead bias prevention** to ensure signals remain fixed.
**Configuration**:
- **15-minute NPR/BB**: Intraday volatility bands
- **60-minute NPR/BB**: Swing trade extremes
- **Multiple Kernel Options**: Exponential, Simple, Double Exponential, Triple Exponential for different smoothing profiles
**Signal Logic (Signal 8)**:
- **BUY**: Price closes **inside** lower band (not just touching it) → Extreme oversold with institutional absorption likely
- **SELL**: Price closes **inside** upper band → Extreme overbought with institutional distribution likely
**Why NPR is Superior**:
Repainting indicators give traders false confidence in backtests. NPR ensures every signal you see in history is **exactly** what a trader would have seen in real-time.
---
### 6️⃣ 💎 STRONG CHoCH Pattern Detection
**Purpose**: Identify the highest-probability setups when multiple CHoCH confirmations align within a tight timeframe.
**Pattern Logic**:
**STRONG BUY Pattern**:
```
1.CHoCH → A.CHoCH → 1.CHoCH (within 20 bars)
```
This sequence indicates:
1. Initial bullish structure shift
2. Bearish retest (pullback)
3. **Renewed bullish confirmation** - Institutions are re-accumulating after shaking out weak hands
**STRONG SELL Pattern**:
```
A.CHoCH → 1.CHoCH → A.CHoCH (within 20 bars)
```
This sequence indicates:
1. Initial bearish structure shift
2. Bullish retest (dead cat bounce)
3. **Renewed bearish confirmation** - Institutions are re-distributing after trapping longs
**Visual Display**:
```
💎 BUY
```
- **0% transparency** (fully opaque) - Maximum visual priority
- Displayed **immediately** when pattern completes (no additional signal required)
- Independent of Market Structure filter (pattern itself is the confirmation)
**Why STRONG Signals Are Different**:
- **Triple Confirmation**: Three structure shifts eliminate false breakouts
- **Tight Timeframe**: 20-bar window ensures institutional conviction, not random noise
- **Automatic Display**: No waiting for price action - the pattern itself triggers the alert
- **Historical Validation**: This specific sequence has proven to precede major institutional moves
**Risk Management**:
STRONG signals offer the best risk/reward because:
1. Stop loss can be placed beyond the middle CHoCH (tight risk)
2. Target can be set at next major structure level (large reward)
3. Pattern failure is immediately evident (quick exit if wrong)
---
### 7️⃣ Multi-EMA Framework
**Purpose**: Provide dynamic support/resistance and trend context.
**EMA Configuration**:
- **EMA 7**: Micro-trend (scalping)
- **EMA 20**: Short-term trend
- **EMA 50**: Institutional pivot (Signal 6: EMA50 Bounce)
- **EMA 100**: Mid-term trend filter
- **EMA 200**: Major institutional support/resistance
- **EMA 400, 800**: Macro trend context
**Visual Fills**:
- Color-coded fills between EMAs create **visual trend strength zones**
- Convergence = consolidation
- Divergence = trending market
**Why 7 EMAs?**:
Each EMA represents a different **participant timeframe**:
- EMA 7/20: Day traders and scalpers
- EMA 50/100: Swing traders
- EMA 200/400/800: Position traders and institutions
When all EMAs align, **all participant types agree on direction** - the highest-probability trend trades.
---
## 🚀 8-Signal Trading System
Trend Gazer v5 employs **8 distinct signal conditions** (all enabled by default), each designed to capture different market regimes:
### ⭐ Signal Hierarchy & Trading Philosophy
**IMPORTANT**: Not all signals are created equal. The indicator displays a hierarchy of signal quality:
**PRIMARY SIGNALS (Trade These)**:
- 💎 **STRONG BUY/SELL** - Triple-confirmed CHoCH patterns (highest priority)
- 🌟 **Star Signals (S7, S8)** - High-probability institutional zone reactions
- Signal 7: Order Block Bounce
- Signal 8: 60m NPR/BB Bounce
**AUXILIARY SIGNALS (Confirmation & Context)**:
- **Signals 1-6** - Use these as:
- **Confirmation** for Star Signals (when multiple signals align)
- **Context** for understanding market conditions
- **Early warnings** of potential moves (validate before trading)
- **Additional filters** (e.g., "only trade Star Signals that also have Signal 1")
**Trading Recommendation**:
- **Conservative Traders**: Trade ONLY 💎 STRONG and 🌟 Star Signals
- **Moderate Traders**: Trade Star Signals + validated auxiliary signals (2+ signal confirmation)
- **Active Traders**: Use all signals with proper risk management
The visual transparency system reinforces this hierarchy:
- 0% transparent = STRONG (💎) - Highest conviction
- 50% transparent = Star (🌟) + OB signals - High quality
- 70% transparent = Auxiliary (S1-S6) - Supplementary information
### Signal 1: RSI Shift + Structure (AND Logic)
**Strictest Signal** - Requires both RSI momentum confirmation AND structure change.
- **Use Case**: High-conviction trades in trending markets
- **Frequency**: Least frequent, highest accuracy
### Signal 2: VWC Switch (OR Logic)
**Most Frequent Signal** - Triggers on any VWC color flip across monitored timeframes.
- **Use Case**: Capturing early momentum shifts
- **Frequency**: Most frequent, good for active traders
### Signal 3: Structure Change
**Bar Color Change with RSI Confirmation** - Detects when candle color shifts with supporting RSI.
- **Use Case**: Trend continuation trades
- **Frequency**: Moderate
### Signal 4: BB Breakout + RSI
**Bollinger Band Breakout Reversal** - Price breaks band then immediately reverses.
- **Use Case**: Fade false breakouts
- **Frequency**: Moderate, excellent risk/reward
### Signal 5: BB/EMA50 Break
**Aggressive Breakout Signal** - Price breaks both BB and EMA50 simultaneously.
- **Use Case**: Momentum breakout trades
- **Frequency**: Moderate-high
### Signal 6: EMA50 Bounce Reversal
**Mean Reversion at EMA50** - Price touches EMA50 and bounces.
- **Use Case**: Trading pullbacks in strong trends
- **Frequency**: Moderate, reliable
### Signal 7: 🌟 OB Bounce (Star Signal)
**Order Block Bounce** - Price enters OB zone and reverses.
- **Use Case**: Institutional zone reactions
- **Frequency**: Low, but extremely high quality
- **Special Features**:
- 🎯 **OB Bounce Label**: `🌟 🎯 BUY/SELL ` - Actual Signal 7 bounce from visible OB
- 📍 **In OB Label**: `📍 BUY/SELL ` - Other signals (S1-6, S8) occurring inside an OB zone
- **OB Direction Filter**: Blocks contradictory signals (no SELL in bullish OB, no BUY in bearish OB)
### Signal 8: 🌟 60m NPR/BB Bounce (Star Signal)
**Extreme Mean-Reversion** - Price closes **inside** 60m NPR/BB bands at extremes.
- **Use Case**: Capturing institutional absorption at extremes
- **Frequency**: Low, exceptional win rate
- **Special Logic**: Candle close must be **INSIDE** bands, not just touching (prevents false breakouts)
### 💎 STRONG Signals (Bonus)
**CHoCH Pattern Completion** - Triple-confirmed structure shifts.
- **STRONG BUY**: `1.CHoCH → A.CHoCH → 1.CHoCH (≤20 bars)`
- **STRONG SELL**: `A.CHoCH → 1.CHoCH → A.CHoCH (≤20 bars)`
- **Display**: Immediate upon pattern completion (independent signal)
- **Use Case**: Highest-conviction institutional trend shifts
---
## 🎨 Visual Design Philosophy
### Signal Hierarchy via Transparency
**0% Transparency (Opaque)**:
- 💎 **STRONG BUY/SELL** - Highest priority, institutional pattern confirmation
**50% Transparency**:
- 🌟 **Star Signals** (S7, S8) - High-quality mean reversion
- 🎯 **OB Bounce** - Institutional zone reaction
- 📍 **In OB** - Enhanced signal in institutional zone
- **CHoCH Labels** (1.CHoCH, A.CHoCH) - Structure shift markers
**70% Transparency**:
- **Regular Signals** (S1-S6) - Standard trade setups
This visual hierarchy ensures traders **instantly recognize** high-priority setups without analysis paralysis.
### Color Scheme: Japanese Candlestick Convention
**Bullish = Red | Bearish = Blue/Green**
This follows traditional Japanese candlestick methodology where:
- **Red (Yang)**: Positive energy, rising prices, bullish
- **Blue/Green (Yin)**: Negative energy, falling prices, bearish
While Western conventions often reverse this, we maintain **ICT and institutional conventions** for consistency with professional trading rooms.
---
## 📡 Alert System
### Any Alert (Automatic)
**8 Events Monitored**:
1. 💎 **STRONG BUY** - Pattern: `1.CHoCH → A.CHoCH → 1.CHoCH`
2. 💎 **STRONG SELL** - Pattern: `A.CHoCH → 1.CHoCH → A.CHoCH`
3. ⭐ **Star BUY** - Signal 7 or 8
4. ⭐ **Star SELL** - Signal 7 or 8
5. 📍 **BUY (in OB)** - Any signal inside Bullish Order Block
6. 📍 **SELL (in OB)** - Any signal inside Bearish Order Block
7. **Bullish CHoCH** - Market structure shift to bullish
8. **Bearish CHoCH** - Market structure shift to bearish
**Format**: `TICKER TIMEFRAME EventName`
**Example**: `BTCUSDT 5 💎 STRONG BUY`
### Individual alertcondition() Options
Create custom alerts for specific events:
- BUY/SELL Signals (all or filtered)
- Star Signals Only (S7/S8)
- STRONG Signals Only (💎)
- CHoCH Events Only
- Bullish/Bearish CHoCH separately
---
## ⚙️ Configuration & Settings
### ICT Structure Filter (DEFAULT ON ⭐)
**Enable Structure Filter**: Display signals ONLY after CHoCH/SiMS/BoMS
- **Purpose**: Filter out noise by requiring institutional confirmation
- **Recommendation**: Keep enabled for disciplined trading
**Show Structure Labels (DEFAULT ON ⭐)**: Display CHoCH/SiMS/BoMS labels
- **Purpose**: Visual confirmation of market structure state
- **Labels**:
- `1.CHoCH` (Red background, white text) - Bullish structure shift
- `A.CHoCH` (Blue background, white text) - Bearish structure shift
- `2.SMS` / `B.SMS` (Red/Blue text) - Shift in Market Structure (2nd occurrence)
- `3.BMS` / `C.BMS` (Red/Blue text) - Break of Market Structure (3rd+ occurrence)
**Structure Period**: Default 3 bars (ICT standard)
### Order Block Configuration
**Enable Multi-Timeframe OBs**: Detect OBs from multiple timeframes simultaneously
**Mitigation Options**:
- Close - OB invalidated when candle closes through it
- Wick - OB invalidated when wick touches it
- 50% - OB invalidated when 50% of zone is violated
**Show OBs from**:
- Current Timeframe (always)
- 1m, 3m, 15m, 60m (selectable)
### Fair Value Gap Settings
**Show FVGs**: Enable/disable FVG rendering
**Mitigation Source**: Wick, Close, or 50% fill
**Color Customization**: Bullish FVG (green), Bearish FVG (red)
### Signal Filters
**Show ONLY Star Signals (DEFAULT OFF)**:
- When ON: Display only S7 (OB Bounce) and S8 (NPR/BB Bounce)
- When OFF: Display all signals S1-S8 (DEFAULT)
- **Use Case**: Focus on highest-quality setups, ignore noise
### Visual Settings
**EMA Display**: Toggle individual EMAs on/off
**VWC Cloud**: Enable/disable volumetric cloud
**NPR/BB Bands**: Show/hide 15m and 60m bands
**Status Table**: Real-time VWC status across all timeframes
---
## 📚 How to Use
### For Scalpers (1m-5m Charts)
1. Enable **1m and 3m Order Blocks**
2. Watch for **Signal 2 (VWC Switch)** or **Signal 5 (BB/EMA50 Break)**
3. Confirm with **1m/3m MTF OB** as support/resistance
4. Use **FVGs** for micro-target setting
5. Set alerts for **Star BUY/SELL** for highest-quality scalps
### For Day Traders (15m-60m Charts)
1. Enable **15m and 60m Order Blocks**
2. Wait for **CHoCH** to establish bias
3. Trade **Signal 7 (OB Bounce)** or **Signal 8 (60m NPR/BB Bounce)**
4. Use **EMA 50/100** as dynamic stop placement
5. Set alerts for **💎 STRONG BUY/SELL** for major moves
### For Swing Traders (4H-Daily Charts)
1. Enable **60m Order Blocks** (will render as larger zones on HTF)
2. Wait for **Market Structure confirmation** (CHoCH)
3. Focus on **Signal 1 (RSI Shift + Structure)** for highest conviction
4. Use **EMA 200/400/800** for macro trend alignment
5. Set alerts for **Bullish/Bearish CHoCH** to catch structure shifts early
### Universal Strategy (Recommended Approach)
1. **Focus on Primary Signals First** - Build your track record with 💎 STRONG and 🌟 Star Signals only
2. **Wait for Market Structure** - Never trade against CHoCH direction
3. **Use Auxiliary Signals for Confirmation** - When a Star Signal appears, check if auxiliary signals (S1-6) also confirm
4. **Respect Order Blocks** - Fade signals that contradict OB direction
5. **Use FVGs for Targets** - Price gravitates toward unfilled gaps
6. **Gradually Incorporate Auxiliary Signals** - Once profitable with primary signals, experiment with validated auxiliary setups
### Signal Quality Statistics (Typical Observation)
Based on common market behavior patterns:
**💎 STRONG Signals**:
- Frequency: Rare (1-3 per week on daily charts)
- Win Rate: Very High (70-85% when proper risk management applied)
- Risk/Reward: Excellent (1:3 to 1:5+ typical)
**🌟 Star Signals (S7, S8)**:
- Frequency: Moderate (2-5 per day on lower timeframes)
- Win Rate: High (60-75% when aligned with structure)
- Risk/Reward: Good (1:2 to 1:4 typical)
**Auxiliary Signals (S1-6)**:
- Frequency: High (multiple per hour on active timeframes)
- Win Rate: Moderate (50-65% standalone, higher when used as confirmation)
- Risk/Reward: Variable (1:1 to 1:3 typical)
**Key Insight**: Trading only primary signals reduces trade frequency but dramatically improves consistency and psychological ease.
---
## 🏆 What Makes This Indicator Unique
### 1. **True Multi-Timeframe Integration**
Most "MTF" indicators simply display data from other timeframes. Trend Gazer v5 **synthesizes** MTF data into unified signals, eliminating conflicting information.
### 2. **Non-Repainting Architecture**
All signals are fixed at bar close. What you see in backtests is exactly what you'd see in real-time.
### 3. **Institutional Focus**
Every component is designed around institutional behavior:
- Where they accumulate (Order Blocks)
- When they shift (CHoCH)
- What they must fix (FVGs)
- How they create momentum (VWC)
### 4. **Complete Transparency**
- **Open Source** - Full code visibility
- **Credited Sources** - All borrowed concepts attributed
- **No Black Boxes** - Every calculation is documented
### 5. **Flexible Yet Focused**
- **8 Signal Types** - Adapts to any market regime
- **Default Settings Optimized** - Works immediately without tweaking
- **Optional Filters** - "Show ONLY Star Signals" for disciplined traders
### 6. **Professional Alert System**
- **8-event Any Alert** - Never miss institutional moves
- **Individual alertconditions** - Customize to your strategy
- **Formatted Messages** - Ticker + Timeframe + Event for instant context
---
## 📖 Educational Value
### Learning ICT Concepts
This indicator serves as a **visual teaching tool** for:
- **Market Structure**: See CHoCH/SiMS/BoMS in real-time
- **Order Blocks**: Understand where institutions positioned
- **Fair Value Gaps**: Learn how inefficiencies are filled
- **Smart Money Behavior**: Watch institutional footprints unfold
### Backtesting & Strategy Development
Use Trend Gazer v5 to:
1. **Validate ICT Concepts** - Do OB bounces really work? Test it.
2. **Optimize Entry Timing** - Which signals work best in your market?
3. **Develop Filters** - Combine signals for your edge
4. **Build Strategies** - Export signals to Pine Script strategies
---
## ⚠️ Disclaimer
This indicator is for **educational and informational purposes only**. It should not be considered as financial advice or a recommendation to buy or sell any financial instrument.
**Trading involves substantial risk of loss**. Past performance is not indicative of future results. No indicator, regardless of sophistication, can guarantee profitable trades.
**Always:**
- Conduct your own research
- Use proper risk management (1-2% risk per trade)
- Consult with qualified financial advisors
- Practice on paper/demo accounts before live trading
- Understand that you are solely responsible for your trading decisions
---
## 🔗 Credits & Licenses
### Original Code Sources
1. **ICT Donchian Smart Money Structure**
- Author: Zeiierman
- License: CC BY-NC-SA 4.0
- Modifications: Integrated with multi-signal system, added CHoCH pattern detection
2. **Reverse RSI Signals**
- Author: AlgoAlpha
- License: MPL 2.0
- Modifications: Adapted for internal signal logic
3. **Volumetric Weighted Cloud (VWC/TBOSI)**
- Original concept adapted for multi-timeframe analysis
- Enhanced with MTF table display
4. **Order Block & FVG Detection**
- Based on ICT concepts
- Custom implementation with MTF support
### This Indicator's License
**Mozilla Public License 2.0 (MPL 2.0)**
You are free to:
- ✅ Use commercially
- ✅ Modify and distribute
- ✅ Use privately
- ✅ Patent use
Under conditions:
- 📄 Disclose source
- 📄 License and copyright notice
- 📄 Same license for modifications
---
## 📞 Support & Community
### Reporting Issues
If you encounter bugs or have feature suggestions, please provide:
1. Chart timeframe and symbol
2. Settings configuration
3. Screenshot of the issue
4. Expected vs actual behavior
### Best Practices
- Start with default settings
- Gradually enable/disable features to understand each component
- Use demo account for at least 30 days before live trading
- Combine with proper risk management
---
## 🚀 Version History
### v5.0 - Simplified ICT Mode (Current)
- ✅ Removed all unused filters and features
- ✅ Enabled all 8 signals by default
- ✅ Added 💎 STRONG CHoCH pattern detection
- ✅ Enhanced OB Bounce labeling system
- ✅ Added FVG detection and visualization
- ✅ Improved alert system (8 events)
- ✅ Optimized performance (faster rendering)
- ✅ Added comprehensive DESCRIPTION documentation
### v4.2 - ICT Mode with EMA Convergence Filter (Deprecated)
- Legacy version with EMA convergence features (removed for simplicity)
### v4.0 - Pure ICT Mode (Deprecated)
- Initial ICT-focused release
---
## 🎓 Recommended Learning Resources
To fully leverage this indicator, study:
1. **ICT Concepts** (Inner Circle Trader - YouTube)
- Market Structure
- Order Blocks
- Fair Value Gaps
- Liquidity Concepts
2. **Smart Money Concepts (SMC)**
- Change of Character (CHoCH)
- Break of Structure (BOS)
- Liquidity Sweeps
3. **Volume Spread Analysis (VSA)**
- Effort vs Result
- Supply vs Demand
- Volume Climax
4. **Risk Management**
- Position Sizing
- R-Multiple Theory
- Win Rate vs Risk/Reward Balance
---
## ✅ Quick Start Checklist
- Add indicator to chart
- Verify **Enable Structure Filter** is ON
- Verify **Show Structure Labels** is ON
- Enable desired MTF Order Blocks (1m, 3m, 15m, 60m)
- Enable FVG display
- Set up **Any Alert** for all 8 events
- Paper trade for 30 days minimum
- Document your trades (screenshots + notes)
- Review performance weekly
- Adjust filters based on your strategy
---
## 💡 Final Thoughts
**Trend Gazer v5 is not a "magic button" indicator.** It's a professional analytical framework that requires education, practice, and discipline.
The best traders don't use indicators to **tell them what to do**. They use indicators to **confirm what they already see** in price action.
Use this tool to:
- ✅ Confirm your analysis
- ✅ Filter out low-probability setups
- ✅ Identify institutional footprints
- ✅ Time entries with precision
Avoid using it to:
- ❌ Trade blindly without understanding context
- ❌ Ignore risk management
- ❌ Revenge trade after losses
- ❌ Replace education with automation
**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 v5: プロフェッショナル・マルチタイムフレームICT分析システム
## 📊 概要
**Trend Gazer v5** は、複数の実証済み手法を統合した分析フレームワークを提供する、包括的な機関投資家グレードの取引システムです。このインジケーターは、**ICT(Inner Circle Trader)コンセプト**、**スマートマネー構造**、**オーダーブロック検知**、**フェアバリューギャップ**、および**出来高分析**を組み合わせて、機関投資家の足跡に裏打ちされた高確率の取引セットアップをトレーダーに提供します。
断片的なインジケーターは、トレーダーに複数のツールを切り替えることを強いますが、Trend Gazer v5は**包括的な市場ビュー**を単一のオーバーレイで提供し、分析麻痺を排除して自信ある意思決定を可能にします。
---
## 🎯 なぜこの組み合わせが必要なのか
### 単一コンセプトインジケーターの問題点
従来のインジケーターは3つの致命的な欠陥を抱えています:
1. **孤立したコンテキスト** - 価格、出来高、構造が個別に分析され、矛盾するシグナルを生成
2. **タイムフレームの盲目性** - 単一タイムフレーム分析は、複数のタイムフレームで発生する機関投資家の活動を見逃す
3. **遅れた確認** - あるインジケーターが別のインジケーターの確認を待つことで、エントリーを逃し、エグジットが遅れる
### 機関投資家の取引実態
プロのトレーダーや機関投資家は、**複数の次元を同時に**操作します:
- **構造的コンテキスト**: 市場サイクルのどこにいるのか?(CHoCH、SiMS、BoMS)
- **オーダーフロー**: 機関投資家の需要と供給が集中しているのはどこか?(オーダーブロック)
- **非効率性**: 埋めなければならない価格の不均衡はどこか?(フェアバリューギャップ)
- **モメンタムコンテキスト**: 出来高は拡大しているか縮小しているか?(VWC/TBOSI)
- **平均回帰ポイント**: 機関投資家がリバウンドを期待する場所はどこか?(NPR/BB、EMA)
**Trend Gazer v5はこれらの次元を統合**し、個別のインジケーターでは提供できない市場マイクロ構造の完全な全体像を作成します。
---
## 🔬 コア分析フレームワーク
### 1️⃣ ICT ドンチャン・スマートマネー構造
**目的**: 大きな動きに先行する機関投資家の市場構造シフトを識別する。
**コンポーネント**:
- **CHoCH (Change of Character / 性質の変化)** - トレンド疲弊を示す市場構造のブレイク
- `1.CHoCH`(強気) - 直近安値のブレイク、強気構造へのシフト
- `A.CHoCH`(弱気) - 直近高値のブレイク、弱気構造へのシフト
- **SiMS (Shift in Market Structure / 市場構造のシフト)** - 初期構造シフト(2回目の発生)
- **BoMS (Break of Market Structure / 市場構造のブレイク)** - 継続構造(3回目以降の発生)
**なぜ不可欠なのか**:
小売トレーダーは価格変化に反応します。機関投資家は構造を破ることで価格変化を**作り出します**。**ドンチャンチャネル**(高値/安値追跡の最も純粋な形式)を使用してこれらのシフトを検出することで、機関投資家のバイアスが変化する正確な瞬間を特定します。
**クレジット**: Zeiierman氏の*ICT Donchian Smart Money Structure*に基づく(CC BY-NC-SA 4.0)
---
### 2️⃣ マルチタイムフレーム・オーダーブロック検知
**目的**: 価格が反転する可能性が高い機関投資家の需給ゾーンをマッピングする。
**方法論**:
オーダーブロックは、強い動きの前の**最後の反対方向ローソク足**を表します。これらのゾーンは、機関投資家がポジションを蓄積(強気OB)または分配(弱気OB)した場所を示します。
**マルチタイムフレームカバレッジ**:
- **1分足**: デイトレーダー向けスキャルピングゾーン
- **3分足**: 短期スイングゾーン
- **15分足**: イントラデイ機関投資家ゾーン
- **60分足**: デイリースイングゾーン
- **現在のTF**: 任意のチャートタイムフレームへの動的適応
**主要機能**:
- **バウンス検知** - OBゾーンから価格がリバウンドする時を識別(シグナル7: 🎯 OBバウンス)
- **ブレーカー追跡** - OBが破られた時を監視し、強気OBを抵抗に、弱気OBをサポートに変換
- **ビジュアルレンダリング** - OBの強度を示す透明度付きの色分けされたボックス
- **OB方向フィルター** - 矛盾するシグナルをブロック(強気OBでSELLなし、弱気OBでBUYなし)
**なぜMTFオーダーブロックが重要か**:
60分足のオーダーブロックは、より大きなタイムフレームでの機関投資家のポジショニングを表します。3分足のエントリーシグナルと組み合わせることで、大口プレイヤーと**同じ方向**で取引することになります。
---
### 3️⃣ フェアバリューギャップ(FVG)検知
**目的**: 機関投資家が最終的に埋めなければならない価格の非効率性を識別する。
**FVGとは何か?**:
フェアバリューギャップは、価格があまりにも急速に動いて**不均衡**を残す時に発生します - 1本のローソク足の高値と2本後のローソク足の安値の間のギャップ(またはその逆)。機関投資家はこれらを修正されなければならない非効率的な価格設定と見なします。
**検知ロジック**:
```
強気FVG: high < low → ギャップアップ = 弱気の不均衡(下方フィル予想)
弱気FVG: low > high → ギャップダウン = 強気の不均衡(上方フィル予想)
```
**ビジュアルデザイン**:
- **強気FVG**: 緑のボックス(価格がバウンドすべきサポートゾーン)
- **弱気FVG**: 赤のボックス(価格が拒否されるべき抵抗ゾーン)
- **ミティゲーション追跡**: FVGは埋められると消え、完了を示す
- **出来高帰属**: 各FVGは関連する買い/売り出来高を追跡
**なぜFVGが重要か**:
機関投資家は**効率性**で動きます。ギャップは非効率性を表します。価格がギャップを埋めるために戻る時、それはランダムではありません - 機関投資家が**市場の非効率性を修正**しているのです。FVGフィルへの取引は卓越したリスク/リワードを提供します。
---
### 4️⃣ 出来高加重クラウド(VWC/TBOSI)
**目的**: 出来高加重プライスアクションを使用してモメンタムシフトとトレンド強度を検出する。
**メカニズム**:
VWCは移動平均に**ボラティリティ加重**を適用し、高ボラティリティトレンド中に拡大し、コンソリデーション中に縮小する動的クラウドを作成します。
**マルチタイムフレーム分析**:
- **1m、3m、5m**: マイクロスキャルピングモメンタム
- **15m**: イントラデイトレンド確認
- **60m、240m**: スイングトレードトレンド検証
**シグナル生成**:
- **VWCスイッチ(シグナル2)**: クラウドの色が反転した時(赤→緑または緑→赤)、モメンタム反転を示す
- **VWCステータステーブル**: 全タイムフレームのトレンド方向のリアルタイム表示
**なぜ出来高加重が重要か**:
従来の移動平均はすべてのバーを等しく扱います。VWCは**高出来高バーに重みを与え**、シグナルが低出来高のノイズではなく、実際の機関投資家の参加を反映することを保証します。
---
### 5️⃣ ノンリペイントSTDEV(NPR)&ボリンジャーバンド
**目的**: リペイントなしで極端な平均回帰ポイントを識別する。
**従来のインジケーターの問題点**:
多くのインジケーターは**リペイント**します - 新しいデータが到着すると過去の値を変更し、バックテストを誤解させます。NPRは**先読みバイアス防止**を使用して、シグナルが固定されたままであることを保証します。
**設定**:
- **15分足NPR/BB**: イントラデイボラティリティバンド
- **60分足NPR/BB**: スイングトレード極値
- **複数のカーネルオプション**: 指数、単純、二重指数、三重指数 - 異なる平滑化プロファイル
**シグナルロジック(シグナル8)**:
- **BUY**: 価格が下部バンドの**内側**でクローズ(触れるだけではない)→ 極端な売られ過ぎで機関投資家の吸収が可能性高い
- **SELL**: 価格が上部バンドの**内側**でクローズ → 極端な買われ過ぎで機関投資家の分配が可能性高い
**なぜNPRが優れているか**:
リペイントインジケーターはトレーダーにバックテストで誤った自信を与えます。NPRは、履歴で見るすべてのシグナルが、トレーダーがリアルタイムで見たであろうもの**そのもの**であることを保証します。
---
### 6️⃣ 💎 STRONG CHoChパターン検知
**目的**: 短い時間枠内で複数のCHoCH確認が整列した時の最高確率セットアップを識別する。
**パターンロジック**:
**STRONG BUYパターン**:
```
1.CHoCH → A.CHoCH → 1.CHoCH(20バー以内)
```
このシーケンスは以下を示します:
1. 初期強気構造シフト
2. 弱気リテスト(プルバック)
3. **更新された強気確認** - 機関投資家は弱い手を振り落とした後に再蓄積中
**STRONG SELLパターン**:
```
A.CHoCH → 1.CHoCH → A.CHoCH(20バー以内)
```
このシーケンスは以下を示します:
1. 初期弱気構造シフト
2. 強気リテスト(デッドキャットバウンス)
3. **更新された弱気確認** - 機関投資家はロングを罠にかけた後に再分配中
**ビジュアル表示**:
```
💎 BUY
```
- **0%透明度**(完全不透明) - 最大の視覚的優先度
- パターン完成時に**即座に**表示(追加シグナル不要)
- 市場構造フィルターから独立(パターン自体が確認)
**なぜSTRONGシグナルが異なるか**:
- **三重確認**: 3つの構造シフトが誤ったブレイクアウトを排除
- **短い時間枠**: 20バーウィンドウがランダムなノイズではなく、機関投資家の確信を保証
- **自動表示**: 価格アクションを待たない - パターン自体がアラートをトリガー
- **歴史的検証**: この特定のシーケンスは主要な機関投資家の動きに先行することが証明されている
**リスク管理**:
STRONGシグナルは最高のリスク/リワードを提供します:
1. ストップロスは中央のCHoCHの外に配置可能(タイトなリスク)
2. ターゲットは次の主要構造レベルに設定可能(大きなリワード)
3. パターン失敗は即座に明らか(間違っていればクイックエグジット)
---
### 7️⃣ マルチEMAフレームワーク
**目的**: ダイナミックなサポート/レジスタンスとトレンドコンテキストを提供する。
**EMA設定**:
- **EMA 7**: マイクロトレンド(スキャルピング)
- **EMA 20**: 短期トレンド
- **EMA 50**: 機関投資家のピボット(シグナル6: EMA50バウンス)
- **EMA 100**: 中期トレンドフィルター
- **EMA 200**: 主要な機関投資家のサポート/レジスタンス
- **EMA 400、800**: マクロトレンドコンテキスト
**ビジュアルフィル**:
- EMA間の色分けされたフィルが**ビジュアルトレンド強度ゾーン**を作成
- 収束 = コンソリデーション
- 発散 = トレンド市場
**なぜ7つのEMAか?**:
各EMAは異なる**参加者タイムフレーム**を表します:
- EMA 7/20: デイトレーダーとスキャルパー
- EMA 50/100: スイングトレーダー
- EMA 200/400/800: ポジショントレーダーと機関投資家
すべてのEMAが整列した時、**すべての参加者タイプが方向に同意**している - 最高確率のトレンド取引です。
---
## 🚀 8シグナル取引システム
Trend Gazer v5は**8つの異なるシグナル条件**(すべてデフォルトで有効)を採用しており、それぞれが異なる市場レジームを捕捉するように設計されています:
### ⭐ シグナル階層&取引哲学
**重要**: すべてのシグナルが同じではありません。インジケーターはシグナル品質の階層を表示します:
**プライマリーシグナル(これを取引する)**:
- 💎 **STRONG BUY/SELL** - 三重CHoChパターン(最優先)
- 🌟 **スターシグナル(S7、S8)** - 高確率の機関投資家ゾーン反応
- シグナル7: オーダーブロックバウンス
- シグナル8: 60m NPR/BBバウンス
**補助シグナル(確認とコンテキスト)**:
- **シグナル1-6** - これらを以下として使用:
- スターシグナルの**確認**(複数のシグナルが整列した時)
- 市場状況を理解するための**コンテキスト**
- 潜在的な動きの**早期警告**(取引前に検証)
- **追加フィルター**(例:「シグナル1も出ているスターシグナルのみ取引」)
**取引推奨**:
- **保守的トレーダー**: 💎 STRONGと🌟スターシグナル**のみ**取引
- **中程度トレーダー**: スターシグナル + 検証された補助シグナル(2+シグナル確認)
- **アクティブトレーダー**: 適切なリスク管理ですべてのシグナルを使用
視覚的透明度システムはこの階層を強化します:
- 0%透明度 = STRONG(💎) - 最高の確信
- 50%透明度 = スター(🌟)+ OBシグナル - 高品質
- 70%透明度 = 補助(S1-S6) - 補足情報
### シグナル1: RSIシフト + 構造(ANDロジック)
**最も厳格なシグナル** - RSIモメンタム確認と構造変化の両方が必要。
- **使用例**: トレンド市場での高確信取引
- **頻度**: 最も少ない、最高の精度
- **分類**:
### シグナル2: VWCスイッチ(ORロジック)
**最も頻繁なシグナル** - 監視されているタイムフレームでのVWC色反転でトリガー。
- **使用例**: 早期モメンタムシフトの捕捉
- **頻度**: 最も頻繁、アクティブトレーダーに適している
- **分類**:
### シグナル3: 構造変化
**バーカラー変化とRSI確認** - RSIサポートでローソク足の色がシフトする時を検出。
- **使用例**: トレンド継続取引
- **頻度**: 中程度
- **分類**:
### シグナル4: BBブレイクアウト + RSI
**ボリンジャーバンドブレイクアウト反転** - 価格がバンドを破った後すぐに反転。
- **使用例**: 誤ったブレイクアウトをフェード
- **頻度**: 中程度、優れたリスク/リワード
- **分類**:
### シグナル5: BB/EMA50ブレイク
**積極的ブレイクアウトシグナル** - 価格がBBとEMA50を同時にブレイク。
- **使用例**: モメンタムブレイクアウト取引
- **頻度**: 中〜高
- **分類**:
### シグナル6: EMA50バウンス反転
**EMA50での平均回帰** - 価格がEMA50に触れてバウンス。
- **使用例**: 強いトレンドでのプルバック取引
- **頻度**: 中程度、信頼性あり
- **分類**:
### シグナル7: 🌟 OBバウンス(スターシグナル)
**オーダーブロックバウンス** - 価格がOBゾーンに入って反転。
- **使用例**: 機関投資家ゾーン反応
- **頻度**: 低いが、極めて高品質
- **分類**:
- **特別機能**:
- 🎯 **OBバウンスラベル**: `🌟 🎯 BUY/SELL ` - 可視OBからの実際のシグナル7バウンス
- 📍 **In OBラベル**: `📍 BUY/SELL ` - OBゾーン内で発生する他のシグナル(S1-6、S8)
- **OB方向フィルター**: 矛盾するシグナルをブロック(強気OBでSELLなし、弱気OBでBUYなし)
### シグナル8: 🌟 60m NPR/BBバウンス(スターシグナル)
**極端な平均回帰** - 価格が60m NPR/BBバンドの極値で**内側に**クローズ。
- **使用例**: 極値での機関投資家の吸収を捕捉
- **頻度**: 低い、卓越した勝率
- **分類**:
- **特別ロジック**: ローソク足のクローズがバンドの**内側**でなければならない(触れるだけではダメ、誤ったブレイクアウトを防止)
### 💎 STRONGシグナル(ボーナス)
**CHoChパターン完成** - 三重確認された構造シフト。
- **STRONG BUY**: `1.CHoCH → A.CHoCH → 1.CHoCH(≤20バー)`
- **STRONG SELL**: `A.CHoCH → 1.CHoCH → A.CHoCH(≤20バー)`
- **表示**: パターン完成時に即座(独立したシグナル)
- **分類**:
- **使用例**: 最高確信の機関投資家トレンドシフト
---
## 🎨 ビジュアルデザイン哲学
### 透明度によるシグナル階層
**0%透明度(不透明)**:
- 💎 **STRONG BUY/SELL** - 最優先、機関投資家パターン確認
**50%透明度**:
- 🌟 **スターシグナル**(S7、S8) - 高品質平均回帰
- 🎯 **OBバウンス** - 機関投資家ゾーン反応
- 📍 **In OB** - 機関投資家ゾーン内の強化されたシグナル
- **CHoChラベル**(1.CHoCH、A.CHoCH) - 構造シフトマーカー
**70%透明度**:
- **通常シグナル**(S1-S6) - 標準取引セットアップ
この視覚的階層により、トレーダーは分析麻痺なしに高優先度セットアップを**即座に認識**できます。
### カラースキーム: 日本式ローソク足慣例
**強気 = 赤 | 弱気 = 青/緑**
これは伝統的な日本式ローソク足方法論に従います:
- **赤(陽)**: ポジティブエネルギー、上昇価格、強気
- **青/緑(陰)**: ネガティブエネルギー、下降価格、弱気
西洋の慣例はしばしばこれを逆にしますが、プロの取引ルームとの一貫性のために**ICTと機関投資家の慣例**を維持します。
---
## 📡 アラートシステム
### Any Alert(自動)
**8つのイベントを監視**:
1. 💎 **STRONG BUY** - パターン: `1.CHoCH → A.CHoCH → 1.CHoCH`
2. 💎 **STRONG SELL** - パターン: `A.CHoCH → 1.CHoCH → A.CHoCH`
3. ⭐ **Star BUY** - シグナル7または8
4. ⭐ **Star SELL** - シグナル7または8
5. 📍 **BUY (in OB)** - 強気オーダーブロック内の任意のシグナル
6. 📍 **SELL (in OB)** - 弱気オーダーブロック内の任意のシグナル
7. **Bullish CHoCH** - 強気への市場構造シフト
8. **Bearish CHoCH** - 弱気への市場構造シフト
**フォーマット**: `TICKER TIMEFRAME EventName`
**例**: `BTCUSDT 5 💎 STRONG BUY`
### 個別alertcondition()オプション
特定のイベントのカスタムアラートを作成:
- BUY/SELLシグナル(すべてまたはフィルタリング)
- スターシグナルのみ(S7/S8)
- STRONGシグナルのみ(💎)
- CHoChイベントのみ
- 強気/弱気CHoCH個別
---
## ⚙️ 設定と設定
### ICT構造フィルター(デフォルトON ⭐)
**構造フィルターを有効化**: CHoCH/SiMS/BoMS後のシグナル**のみ**表示
- **目的**: 機関投資家の確認を要求することでノイズをフィルター
- **推奨**: 規律ある取引のために有効のままにする
**構造ラベルを表示(デフォルトON ⭐)**: CHoCH/SiMS/BoMSラベルを表示
- **目的**: 市場構造状態の視覚的確認
- **ラベル**:
- `1.CHoCH`(赤背景、白テキスト) - 強気構造シフト
- `A.CHoCH`(青背景、白テキスト) - 弱気構造シフト
- `2.SMS` / `B.SMS`(赤/青テキスト) - 市場構造のシフト(2回目)
- `3.BMS` / `C.BMS`(赤/青テキスト) - 市場構造のブレイク(3回目以降)
**構造期間**: デフォルト3バー(ICT標準)
### オーダーブロック設定
**マルチタイムフレームOBを有効化**: 複数のタイムフレームから同時にOBを検出
**ミティゲーションオプション**:
- Close - ローソク足がクローズで通過した時にOB無効化
- Wick - ウィックが触れた時にOB無効化
- 50% - ゾーンの50%が侵害された時にOB無効化
**OBを表示**:
- 現在のタイムフレーム(常に)
- 1m、3m、15m、60m(選択可能)
### フェアバリューギャップ設定
**FVGを表示**: FVGレンダリングを有効/無効
**ミティゲーションソース**: Wick、Close、または50%フィル
**カラーカスタマイゼーション**: 強気FVG(緑)、弱気FVG(赤)
### シグナルフィルター
**スターシグナルのみ表示(デフォルトOFF)**:
- ONの時: S7(OBバウンス)とS8(NPR/BBバウンス)のみ表示
- OFFの時: すべてのシグナルS1-S8を表示(デフォルト)
- **使用例**: 最高品質のセットアップに集中し、ノイズを無視
### ビジュアル設定
**EMA表示**: 個別のEMAをオン/オフ切り替え
**VWCクラウド**: 出来高クラウドを有効/無効
**NPR/BBバンド**: 15mと60mバンドを表示/非表示
**ステータステーブル**: すべてのタイムフレームでのリアルタイムVWCステータス
---
## 📚 使用方法
### スキャルパー向け(1m-5m チャート)
1. **1mと3mオーダーブロック**を有効化
2. **シグナル2(VWCスイッチ)**または**シグナル5(BB/EMA50ブレイク)**を監視
3. サポート/レジスタンスとして**1m/3m MTF OB**で確認
4. マイクロターゲット設定に**FVG**を使用
5. 最高品質のスキャルプのために**Star BUY/SELL**のアラートを設定
### デイトレーダー向け(15m-60m チャート)
1. **15mと60mオーダーブロック**を有効化
2. バイアスを確立するために**CHoCH**を待つ
3. **シグナル7(OBバウンス)**または**シグナル8(60m NPR/BBバウンス)**を取引
4. ダイナミックストップ配置に**EMA 50/100**を使用
5. 主要な動きのために**💎 STRONG BUY/SELL**のアラートを設定
### スイングトレーダー向け(4H-日足 チャート)
1. **60mオーダーブロック**を有効化(HTFでより大きなゾーンとしてレンダリング)
2. **市場構造確認**(CHoCH)を待つ
3. 最高確信のために**シグナル1(RSIシフト + 構造)**に集中
4. マクロトレンド整列のために**EMA 200/400/800**を使用
5. 構造シフトを早期に捕捉するために**Bullish/Bearish CHoCH**のアラートを設定
### ユニバーサル戦略(推奨アプローチ)
1. **まずプライマリーシグナルに集中** - 💎 STRONGと🌟スターシグナル**のみ**でトラックレコードを構築
2. **市場構造を待つ** - CHoCH方向に逆らって取引しない
3. **補助シグナルを確認に使用** - スターシグナルが現れたら、補助シグナル(S1-6)も確認するかチェック
4. **オーダーブロックを尊重** - OB方向と矛盾するシグナルをフェード
5. **ターゲットにFVGを使用** - 価格は埋められていないギャップに引き寄せられる
6. **徐々に補助シグナルを組み込む** - プライマリーシグナルで利益が出たら、検証された補助セットアップを実験
### シグナル品質統計(典型的な観察)
一般的な市場行動パターンに基づく:
**💎 STRONGシグナル**:
- 頻度: まれ(日足チャートで週1-3回)
- 勝率: 非常に高い(適切なリスク管理適用時70-85%)
- リスク/リワード: 優秀(典型的に1:3から1:5+)
**🌟 スターシグナル(S7、S8)**:
- 頻度: 中程度(短期足で1日2-5回)
- 勝率: 高い(構造と整列時60-75%)
- リスク/リワード: 良好(典型的に1:2から1:4)
**補助シグナル(S1-6)**:
- 頻度: 高い(活発なタイムフレームで1時間に複数回)
- 勝率: 中程度(単独で50-65%、確認として使用時はより高い)
- リスク/リワード: 変動(典型的に1:1から1:3)
**重要な洞察**: プライマリーシグナルのみの取引は取引頻度を減らしますが、一貫性と心理的容易さを劇的に改善します。
---
## 🏆 このインジケーターのユニークな点
### 1. **真のマルチタイムフレーム統合**
ほとんどの「MTF」インジケーターは単に他のタイムフレームからデータを表示するだけです。Trend Gazer v5はMTFデータを統一されたシグナルに**合成**し、矛盾する情報を排除します。
### 2. **ノンリペイント・アーキテクチャ**
すべてのシグナルはバークローズで固定されます。バックテストで見るものは、リアルタイムで見るであろうもの**そのもの**です。
### 3. **機関投資家フォーカス**
すべてのコンポーネントは機関投資家の行動を中心に設計されています:
- どこで蓄積するか(オーダーブロック)
- いつシフトするか(CHoCH)
- 何を修正しなければならないか(FVG)
- どのようにモメンタムを作り出すか(VWC)
### 4. **完全な透明性**
- **オープンソース** - 完全なコード可視性
- **クレジットされたソース** - すべての借用コンセプトが帰属
- **ブラックボックスなし** - すべての計算が文書化
### 5. **柔軟だが焦点を絞った**
- **8シグナルタイプ** - 任意の市場レジームに適応
- **最適化されたデフォルト設定** - 調整なしですぐに動作
- **オプションフィルター** - 規律あるトレーダーのための「スターシグナルのみ表示」
### 6. **プロフェッショナルアラートシステム**
- **8イベントAny Alert** - 機関投資家の動きを見逃さない
- **個別alertconditions** - あなたの戦略にカスタマイズ
- **フォーマットされたメッセージ** - 即座のコンテキストのためのTicker + Timeframe + Event
---
## 📖 教育的価値
### ICT概念の学習
このインジケーターは以下のための**視覚的教育ツール**として機能します:
- **市場構造**: CHoCH/SiMS/BoMSをリアルタイムで見る
- **オーダーブロック**: 機関投資家がどこでポジショニングしたかを理解
- **フェアバリューギャップ**: 非効率性がどのように埋められるかを学ぶ
- **スマートマネー行動**: 機関投資家の足跡が展開するのを観察
### バックテスティングと戦略開発
Trend Gazer v5を使用して:
1. **ICT概念を検証** - OBバウンスは本当に機能するか?テストする。
2. **エントリータイミングを最適化** - あなたの市場でどのシグナルが最も機能するか?
3. **フィルターを開発** - あなたのエッジのためにシグナルを組み合わせる
4. **戦略を構築** - シグナルをPine Scriptストラテジーにエクスポート
---
## ⚠️ 免責事項
このインジケーターは**教育および情報提供のみを目的**としています。金融アドバイスではありません。
**リスク警告**:
- 取引には重大な損失リスクが伴い、すべての投資家に適しているわけではありません
- 過去のパフォーマンスは将来の結果を**示すものではありません**
- どのインジケーターも利益ある取引を保証することはできません
- あなたは自分の取引決定に対して単独で責任を負います
**取引前に**:
- 自分自身の調査とデューデリジェンスを実施
- 資格のある金融アドバイザーに相談
- 適切なリスク管理を使用(取引あたり1-2%以上リスクを取らない)
- ライブ取引前にペーパー/デモアカウントで練習
- 損失は取引の一部であることを理解
このインジケーターによって提供される情報は、投資アドバイス、金融アドバイス、取引アドバイス、またはその他の種類のアドバイスを構成するものではありません。インジケーターの出力をそのように扱うべきではありません。作成者は、あなたが任意の暗号通貨、証券、または商品を買い、売り、または保有すべきであると推奨するものではありません。常に自分自身の調査を行い、専門的なアドバイスを求めてください。
このソフトウェアは、明示的または黙示的を問わず、いかなる種類の保証もなく「現状のまま」提供されます。
---
## 🔗 クレジットとライセンス
### 原作コードソース
1. **ICT Donchian Smart Money Structure**
- 作者: Zeiierman
- ライセンス: CC BY-NC-SA 4.0
- 変更: マルチシグナルシステムと統合、CHoChパターン検知を追加
2. **Reverse RSI Signals**
- 作者: AlgoAlpha
- ライセンス: MPL 2.0
- 変更: 内部シグナルロジックに適応
3. **Volumetric Weighted Cloud(VWC/TBOSI)**
- 元のコンセプトをマルチタイムフレーム分析に適応
- MTFテーブル表示で強化
4. **Order Block & FVG Detection**
- ICTコンセプトに基づく
- MTFサポートでカスタム実装
### このインジケーターのライセンス
**Mozilla Public License 2.0(MPL 2.0)**
以下が自由です:
- ✅ 商用利用
- ✅ 変更と配布
- ✅ 私的使用
- ✅ 特許使用
条件:
- 📄 ソースを開示
- 📄 ライセンスと著作権表示
- 📄 変更に同じライセンス
---
## 📞 サポートとコミュニティ
### 問題の報告
バグに遭遇したり機能提案がある場合は、以下を提供してください:
1. チャートタイムフレームとシンボル
2. 設定構成
3. 問題のスクリーンショット
4. 期待される動作と実際の動作
### ベストプラクティス
- デフォルト設定で開始
- 各コンポーネントを理解するために段階的に機能を有効/無効化
- ライブ取引前に少なくとも30日間デモアカウントを使用
- 適切なリスク管理と組み合わせる
---
## 🚀 バージョン履歴
### v5.0 - Simplified ICT Mode(現在)
- ✅ すべての未使用フィルターと機能を削除
- ✅ すべての8シグナルをデフォルトで有効化
- ✅ 💎 STRONG CHoChパターン検知を追加
- ✅ OBバウンスラベリングシステムを強化
- ✅ FVG検知と可視化を追加
- ✅ アラートシステムを改善(8イベント)
- ✅ パフォーマンスを最適化(より速いレンダリング)
- ✅ 包括的なDESCRIPTIONドキュメントを追加
### v4.2 - ICT Mode with EMA Convergence Filter(非推奨)
- EMA収束機能を持つレガシーバージョン(シンプルさのために削除)
### v4.0 - Pure ICT Mode(非推奨)
- 初期ICTフォーカスリリース
---
## 🎓 推奨学習リソース
このインジケーターを完全に活用するために、以下を学習してください:
1. **ICTコンセプト**(Inner Circle Trader - YouTube)
- 市場構造
- オーダーブロック
- フェアバリューギャップ
- 流動性コンセプト
2. **スマートマネーコンセプト(SMC)**
- Change of Character(CHoCH)
- Break of Structure(BOS)
- Liquidity Sweeps
3. **Volume Spread Analysis(VSA)**
- Effort vs Result
- Supply vs Demand
- Volume Climax
4. **リスク管理**
- ポジションサイジング
- R-Multiple理論
- 勝率vsリスク/リワードバランス
---
## ✅ クイックスタートチェックリスト
- チャートにインジケーターを追加
- **構造フィルターを有効化**がONであることを確認
- **構造ラベルを表示**がONであることを確認
- 希望するMTFオーダーブロックを有効化(1m、3m、15m、60m)
- FVG表示を有効化
- すべての8イベントのために**Any Alert**を設定
- 最低30日間ペーパートレード
- 取引を文書化(スクリーンショット + ノート)
- 週次でパフォーマンスをレビュー
- あなたの戦略に基づいてフィルターを調整
---
## 💡 最後の考え
**Trend Gazer v5は「魔法のボタン」インジケーターではありません。**教育、練習、規律を必要とするプロフェッショナル分析フレームワークです。
最高のトレーダーは、インジケーターを使って**何をすべきかを教えてもらいません**。インジケーターを使って、プライスアクションで**既に見ているものを確認**します。
このツールを使用して:
- ✅ 分析を確認
- ✅ 低確率セットアップをフィルターアウト
- ✅ 機関投資家の足跡を識別
- ✅ エントリーを精密にタイミング
使用を避けるべき:
- ❌ コンテキストを理解せずに盲目的に取引
- ❌ リスク管理を無視
- ❌ 損失後にリベンジトレード
- ❌ 教育を自動化に置き換える
**スマートに取引しましょう。安全に取引しましょう。構造を持って取引しましょう。**
---
**© rasukaru666 | 2025 | Mozilla Public License 2.0**
*このインジケーターは、取引教育コミュニティに貢献するためにオープンソースとして公開されています。役立つ場合は、あなたの経験を共有して他の人が学ぶのを助けてください。*
Fear & Greed Index (Zeiierman)█ Overview
The Fear & Greed Index is an indicator that provides a comprehensive view of market sentiment. By analyzing various market factors such as market momentum, stock price strength, stock price breadth, put and call options, junk bond demand, market volatility, and safe haven demand, the Index can depict the overall emotions driving market behavior, categorizing them into two main sentiments: Fear and Greed.
Fear: Indicates a market scenario where investors are scared, possibly leading to a sell-off or a stagnant market. In such conditions, the indicator helps in identifying potential buying opportunities as assets may be undervalued.
Greed: Represents a state where investors are overly confident and buying aggressively, which can lead to inflated asset prices. The indicator in such cases can signal overbought conditions, advising caution or potential short opportunities.
█ How It Works
The Fear & Greed Index is an aggregate of seven distinct indicators, each gauging a specific dimension of stock market activity. These indicators include market momentum, stock price strength, stock price breadth, put and call options, junk bond demand, market volatility, and safe haven demand. The Index assesses the deviation of each individual indicator from its average, in relation to its typical fluctuations. In compiling the final score, which ranges from 0 to 100, the Index assigns equal weight to each indicator. A score of 100 denotes the highest level of Greed, while a score of 0 represents the utmost level of fear.
S&P 500's Momentum: The Index monitors the S&P 500's position relative to its 125-day moving average. Positive momentum (price above the average) signals growing confidence among investors (Greed), while negative momentum (price below the average) indicates rising fear.
Stock Price Strength: By comparing the number of stocks hitting 52-week highs to those at 52-week lows on the NYSE, the Index gauges market breadth. An extreme number of highs indicates Greed, whereas an extreme number of lows suggests Fear.
Stock Price Breadth (Market Volume): Using the McClellan Volume Summation Index, which considers the volume of advancing versus declining stocks, the Index assesses whether the market is broadly participating in a trend, or if a smaller subset of stocks is driving it.
Put and Call Options: The put/call ratio helps gauge investor sentiment. A rising ratio, particularly above 1, indicates increasing fear, as more investors are buying puts to protect against a decline. A falling ratio suggests growing confidence.
Market Volatility (VIX): The VIX measures expected market volatility. Higher values generally indicate Fear, while lower values point to Greed. The Fear & Greed Index compares the VIX to its 50-day moving average to understand its trend.
Safe Haven Demand: The performance of stocks versus bonds over a 20-day period helps understand where investors are putting their money. Bonds outperforming stocks is a sign of Fear, while the opposite suggests Greed.
Junk Bond Demand: By comparing the yields on junk bonds to safer investment-grade bonds, the Index gauges risk appetite. A narrower yield spread suggests Greed (investors are taking more risk), while a wider spread indicates Fear.
The Fear & Greed Index combines these components, scales, and averages them to produce a single value between 0 (Extreme Fear) and 100 (Extreme Greed).
█ How to Use
The Fear & Greed Index serves as a tool to evaluate the prevailing sentiments in the market. Investors, often driven by emotions, can react impulsively, and sentiment indicators like the Fear & Greed Index aim to highlight these emotional states, helping investors recognize personal biases that might impact their investment choices. When integrated with fundamental analysis and additional analytical instruments, the Index becomes a valuable resource for understanding and interpreting market moods and tendencies.
The Fear & Greed Index operates on the principle that excessive fear can result in stocks trading well below their intrinsic values,
while uncontrolled Greed can push prices above what they should be.
-----------------
Disclaimer
The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!
VPA ANALYSIS VPA Analysis provide the indications for various conditions as per the Volume Spread Analysis concept. The various legends are provided below
LEGEND DETAILS
UT1 - Upthrust Bar: This will be widespread Bar on high Volume closing on the low. This normally happens after an up move. Here the smart money move the price to the High and then quickly brings to the Low trapping many retail trader who rushed into in order not to miss the bullish move. This is a bearish Signal
UT2 -Upthrust Bar Confirmation: A widespread Down Bar following a Upthrust Bar. This confirms the weakness of the Upthrust Bar. Expect the stock to move down
Confirms . This is a Bearish Signal
PUT - Pseudo Upthrust: An Upthrust Bar in bar action but the volume remains average. This still indicates weakness. Indicate Possible Bearishness
PUC -Pseudo Upthrust Confirmation: widespread Bar after a pseudo–Upthrust Bar confirms the weakness of the Pseudo Upthrust Bar
Confirms Bearishness
BC - Buying Climax: A very wide Spread bar on ultra-High Volume closing at the top. Such a Bar indicates the climatic move in an uptrend. This Bar traps many retailers as the uptrend ends and reverses quickly. Confirms Bearishness
TC - Trend Change: This Indicates a possible Trend Change in an uptrend. Indicates Weakness
SEC- Sell Condition: This bar indicates confluence of some bearish signals. Possible end of Uptrend and start of Downtrend soon. Bearish Signal
UT - Upthrust Condition: When multiple bearish signals occur, the legend is printed in two lines. The Legend “UT” indicates that an upthrust condition is present. Bearish Signal
ND - No demand in uptrend: This bar indicates that there is no demand. In an uptrend this indicates weakness. Bearish Signal
ND - No Demand: This bar indicates that there is no demand. This can occur in any part of the Trend. In all place other than in an uptrend this just indicates just weakness
ED - Effort to Move Down: Widespread Bar closing down on High volume or above average volume . The smart money is pushing the prices down. Bearish Signal
EDF - Effort to Move Down Failed: Widespread / above average spread Bar closing up on High volume or above average volume appearing after ‘Effort to move down” bar.
This indicates that the Effort to move the pries down has failed. Bullish signal
SV - Stopping Volume: A high volume medium to widespread Bar closing in the upper middle part in a down trend indicates that smart money is buying. This is an indication that the down trend is likely to end soon. Indicates strength
ST1 - Strength Returning 1: Strength seen returning after a down trend. High volume adds to strength. Indicates Strength
ST2 - Strength Returning 2: Strength seen returning after a down trend. High volume adds to strength.
BYC - Buy Condition: This bar indicates confluence of some bullish signals Possible end of downtrend and start of uptrend soon. Indicates Strength
EU - Effort to Move Up: Widespread Bar closing up on High volume or above average volume . The smart money is pushing the prices up. Bullish Signal
EUF - Effort to Move Up Failed: Widespread / above average spread Bar closing down on High volume or above average volume appearing after ‘Effort to move up” bar.
This indicates that the Effort to move the pries up has failed. Bearish Signal
LVT- Low Volume Test: A low volume bar dipping into previous supply area and closing in the upper part of the Bar. A successful test is a positive sign. Indicates Strength
ST(after a LVT ) - Strength after Successful Low Volume Test: An up Bar closing near High after a Test confirms strength. Bullish Signal
RUT - Reverse Upthrust Bar: This will be a widespread Bar on high Volume closing on the high is a Down Trend. Here the buyers have become active and move the prices from the low to High. The down Move is likely to end and up trend likely to start soon. indicates Strength
NS - No supply Bar: This bar indicates that there is no supply. This is a sign of strength especially in a down trend. Indicates strength
ST - Strength Returns: When multiple bullish signals occur, the legend is printed in two lines. The Legend “ST” indicates that an condition of strength other than the condition mentioned in the second line is present. Bullish Signals
BAR COLORS
Green- Bullish / Strength
Red - Bearish / weakness
Blue / White - Sentiment Changing from bullish to Bearish and Vice Versa
Polynomial Regression Bands + Channel [DW]This is an experimental study designed to calculate polynomial regression for any order polynomial that TV is able to support.
This study aims to educate users on polynomial curve fitting, and the derivation process of Least Squares Moving Averages (LSMAs).
I also designed this study with the intent of showcasing some of the capabilities and potential applications of TV's fantastic new array functions.
Polynomial regression is a form of regression analysis in which the relationship between the independent variable x and the dependent variable y is modeled as a polynomial of nth degree (order).
For clarification, linear regression can also be described as a first order polynomial regression. The process of deriving linear, quadratic, cubic, and higher order polynomial relationships is all the same.
In addition, although deriving a polynomial regression equation results in a nonlinear output, the process of solving for polynomials by least squares is actually a special case of multiple linear regression.
So, just like in multiple linear regression, polynomial regression can be solved in essentially the same way through a system of linear equations.
In this study, you are first given the option to smooth the input data using the 2 pole Super Smoother Filter from John Ehlers.
I chose this specific filter because I find it provides superior smoothing with low lag and fairly clean cutoff. You can, of course, implement your own filter functions to see how they compare if you feel like experimenting.
Filtering noise prior to regression calculation can be useful for providing a more stable estimation since least squares regression can be rather sensitive to noise.
This is especially true on lower sampling lengths and higher degree polynomials since the regression output becomes more "overfit" to the sample data.
Next, data arrays are populated for the x-axis and y-axis values. These are the main datasets utilized in the rest of the calculations.
To keep the calculations more numerically stable for higher periods and orders, the x array is filled with integers 1 through the sampling period rather than using current bar numbers.
This process can be thought of as shifting the origin of the x-axis as new data emerges.
This keeps the axis values significantly lower than the 10k+ bar values, thus maintaining more numerical stability at higher orders and sample lengths.
The data arrays are then used to create a pseudo 2D matrix of x power sums, and a vector of x power*y sums.
These matrices are a representation the system of equations that need to be solved in order to find the regression coefficients.
Below, you'll see some examples of the pattern of equations used to solve for our coefficients represented in augmented matrix form.
For example, the augmented matrix for the system equations required to solve a second order (quadratic) polynomial regression by least squares is formed like this:
(∑x^0 ∑x^1 ∑x^2 | ∑(x^0)y)
(∑x^1 ∑x^2 ∑x^3 | ∑(x^1)y)
(∑x^2 ∑x^3 ∑x^4 | ∑(x^2)y)
The augmented matrix for the third order (cubic) system is formed like this:
(∑x^0 ∑x^1 ∑x^2 ∑x^3 | ∑(x^0)y)
(∑x^1 ∑x^2 ∑x^3 ∑x^4 | ∑(x^1)y)
(∑x^2 ∑x^3 ∑x^4 ∑x^5 | ∑(x^2)y)
(∑x^3 ∑x^4 ∑x^5 ∑x^6 | ∑(x^3)y)
This pattern continues for any n ordered polynomial regression, in which the coefficient matrix is a n + 1 wide square matrix with the last term being ∑x^2n, and the last term of the result vector being ∑(x^n)y.
Thanks to this pattern, it's rather convenient to solve the for our regression coefficients of any nth degree polynomial by a number of different methods.
In this script, I utilize a process known as LU Decomposition to solve for the regression coefficients.
Lower-upper (LU) Decomposition is a neat form of matrix manipulation that expresses a 2D matrix as the product of lower and upper triangular matrices.
This decomposition method is incredibly handy for solving systems of equations, calculating determinants, and inverting matrices.
For a linear system Ax=b, where A is our coefficient matrix, x is our vector of unknowns, and b is our vector of results, LU Decomposition turns our system into LUx=b.
We can then factor this into two separate matrix equations and solve the system using these two simple steps:
1. Solve Ly=b for y, where y is a new vector of unknowns that satisfies the equation, using forward substitution.
2. Solve Ux=y for x using backward substitution. This gives us the values of our original unknowns - in this case, the coefficients for our regression equation.
After solving for the regression coefficients, the values are then plugged into our regression equation:
Y = a0 + a1*x + a1*x^2 + ... + an*x^n, where a() is the ()th coefficient in ascending order and n is the polynomial degree.
From here, an array of curve values for the period based on the current equation is populated, and standard deviation is added to and subtracted from the equation to calculate the channel high and low levels.
The calculated curve values can also be shifted to the left or right using the "Regression Offset" input
Changing the offset parameter will move the curve left for negative values, and right for positive values.
This offset parameter shifts the curve points within our window while using the same equation, allowing you to use offset datapoints on the regression curve to calculate the LSMA and bands.
The curve and channel's appearance is optionally approximated using Pine's v4 line tools to draw segments.
Since there is a limitation on how many lines can be displayed per script, each curve consists of 10 segments with lengths determined by a user defined step size. In total, there are 30 lines displayed at once when active.
By default, the step size is 10, meaning each segment is 10 bars long. This is because the default sampling period is 100, so this step size will show the approximate curve for the entire period.
When adjusting your sampling period, be sure to adjust your step size accordingly when curve drawing is active if you want to see the full approximate curve for the period.
Note that when you have a larger step size, you will see more seemingly "sharp" turning points on the polynomial curve, especially on higher degree polynomials.
The polynomial functions that are calculated are continuous and differentiable across all points. The perceived sharpness is simply due to our limitation on available lines to draw them.
The approximate channel drawings also come equipped with style inputs, so you can control the type, color, and width of the regression, channel high, and channel low curves.
I also included an input to determine if the curves are updated continuously, or only upon the closing of a bar for reduced runtime demands. More about why this is important in the notes below.
For additional reference, I also included the option to display the current regression equation.
This allows you to easily track the polynomial function you're using, and to confirm that the polynomial is properly supported within Pine.
There are some cases that aren't supported properly due to Pine's limitations. More about this in the notes on the bottom.
In addition, I included a line of text beneath the equation to indicate how many bars left or right the calculated curve data is currently shifted.
The display label comes equipped with style editing inputs, so you can control the size, background color, and text color of the equation display.
The Polynomial LSMA, high band, and low band in this script are generated by tracking the current endpoints of the regression, channel high, and channel low curves respectively.
The output of these bands is similar in nature to Bollinger Bands, but with an obviously different derivation process.
By displaying the LSMA and bands in tandem with the polynomial channel, it's easy to visualize how LSMAs are derived, and how the process that goes into them is drastically different from a typical moving average.
The main difference between LSMA and other MAs is that LSMA is showing the value of the regression curve on the current bar, which is the result of a modelled relationship between x and the expected value of y.
With other MA / filter types, they are typically just averaging or frequency filtering the samples. This is an important distinction in interpretation. However, both can be applied similarly when trading.
An important distinction with the LSMA in this script is that since we can model higher degree polynomial relationships, the LSMA here is not limited to only linear as it is in TV's built in LSMA.
Bar colors are also included in this script. The color scheme is based on disparity between source and the LSMA.
This script is a great study for educating yourself on the process that goes into polynomial regression, as well as one of the many processes computers utilize to solve systems of equations.
Also, the Polynomial LSMA and bands are great components to try implementing into your own analysis setup.
I hope you all enjoy it!
--------------------------------------------------------
NOTES:
- Even though the algorithm used in this script can be implemented to find any order polynomial relationship, TV has a limit on the significant figures for its floating point outputs.
This means that as you increase your sampling period and / or polynomial order, some higher order coefficients will be output as 0 due to floating point round-off.
There is currently no viable workaround for this issue since there isn't a way to calculate more significant figures than the limit.
However, in my humble opinion, fitting a polynomial higher than cubic to most time series data is "overkill" due to bias-variance tradeoff.
Although, this tradeoff is also dependent on the sampling period. Keep that in mind. A good rule of thumb is to aim for a nice "middle ground" between bias and variance.
If TV ever chooses to expand its significant figure limits, then it will be possible to accurately calculate even higher order polynomials and periods if you feel the desire to do so.
To test if your polynomial is properly supported within Pine's constraints, check the equation label.
If you see a coefficient value of 0 in front of any of the x values, reduce your period and / or polynomial order.
- Although this algorithm has less computational complexity than most other linear system solving methods, this script itself can still be rather demanding on runtime resources - especially when drawing the curves.
In the event you find your current configuration is throwing back an error saying that the calculation takes too long, there are a few things you can try:
-> Refresh your chart or hide and unhide the indicator.
The runtime environment on TV is very dynamic and the allocation of available memory varies with collective server usage.
By refreshing, you can often get it to process since you're basically just waiting for your allotment to increase. This method works well in a lot of cases.
-> Change the curve update frequency to "Close Only".
If you've tried refreshing multiple times and still have the error, your configuration may simply be too demanding of resources.
v4 drawing objects, most notably lines, can be highly taxing on the servers. That's why Pine has a limit on how many can be displayed in the first place.
By limiting the curve updates to only bar closes, this will significantly reduce the runtime needs of the lines since they will only be calculated once per bar.
Note that doing this will only limit the visual output of the curve segments. It has no impact on regression calculation, equation display, or LSMA and band displays.
-> Uncheck the display boxes for the drawing objects.
If you still have troubles after trying the above options, then simply stop displaying the curve - unless it's important to you.
As I mentioned, v4 drawing objects can be rather resource intensive. So a simple fix that often works when other things fail is to just stop them from being displayed.
-> Reduce sampling period, polynomial order, or curve drawing step size.
If you're having runtime errors and don't want to sacrifice the curve drawings, then you'll need to reduce the calculation complexity.
If you're using a large sampling period, or high order polynomial, the operational complexity becomes significantly higher than lower periods and orders.
When you have larger step sizes, more historical referencing is used for x-axis locations, which does have an impact as well.
By reducing these parameters, the runtime issue will often be solved.
Another important detail to note with this is that you may have configurations that work just fine in real time, but struggle to load properly in replay mode.
This is because the replay framework also requires its own allotment of runtime, so that must be taken into consideration as well.
- Please note that the line and label objects are reprinted as new data emerges. That's simply the nature of drawing objects vs standard plots.
I do not recommend or endorse basing your trading decisions based on the drawn curve. That component is merely to serve as a visual reference of the current polynomial relationship.
No repainting occurs with the Polynomial LSMA and bands though. Once the bar is closed, that bar's calculated values are set.
So when using the LSMA and bands for trading purposes, you can rest easy knowing that history won't change on you when you come back to view them.
- For those who intend on utilizing or modifying the functions and calculations in this script for their own scripts, I included debug dialogues in the script for all of the arrays to make the process easier.
To use the debugs, see the "Debugs" section at the bottom. All dialogues are commented out by default.
The debugs are displayed using label objects. By default, I have them all located to the right of current price.
If you wish to display multiple debugs at once, it will be up to you to decide on display locations at your leisure.
When using the debugs, I recommend commenting out the other drawing objects (or even all plots) in the script to prevent runtime issues and overlapping displays.
Langlands-Operadic Möbius Vortex (LOMV)Langlands-Operadic Möbius Vortex (LOMV)
Where Pure Mathematics Meets Market Reality
A Revolutionary Synthesis of Number Theory, Category Theory, and Market Dynamics
🎓 THEORETICAL FOUNDATION
The Langlands-Operadic Möbius Vortex represents a groundbreaking fusion of three profound mathematical frameworks that have never before been combined for market analysis:
The Langlands Program: Harmonic Analysis in Markets
Developed by Robert Langlands (Fields Medal recipient), the Langlands Program creates bridges between number theory, algebraic geometry, and harmonic analysis. In our indicator:
L-Function Implementation:
- Utilizes the Möbius function μ(n) for weighted price analysis
- Applies Riemann zeta function convergence principles
- Calculates quantum harmonic resonance between -2 and +2
- Measures deep mathematical patterns invisible to traditional analysis
The L-Function core calculation employs:
L_sum = Σ(return_val × μ(n) × n^(-s))
Where s is the critical strip parameter (0.5-2.5), controlling mathematical precision and signal smoothness.
Operadic Composition Theory: Multi-Strategy Democracy
Category theory and operads provide the mathematical framework for composing multiple trading strategies into a unified signal. This isn't simple averaging - it's mathematical composition using:
Strategy Composition Arity (2-5 strategies):
- Momentum analysis via RSI transformation
- Mean reversion through Bollinger Band mathematics
- Order Flow Polarity Index (revolutionary T3-smoothed volume analysis)
- Trend detection using Directional Movement
- Higher timeframe momentum confirmation
Agreement Threshold System: Democratic voting where strategies must reach consensus before signal generation. This prevents false signals during market uncertainty.
Möbius Function: Number Theory in Action
The Möbius function μ(n) forms the mathematical backbone:
- μ(n) = 1 if n is a square-free positive integer with even number of prime factors
- μ(n) = -1 if n is a square-free positive integer with odd number of prime factors
- μ(n) = 0 if n has a squared prime factor
This creates oscillating weights that reveal hidden market periodicities and harmonic structures.
🔧 COMPREHENSIVE INPUT SYSTEM
Langlands Program Parameters
Modular Level N (5-50, default 30):
Primary lookback for quantum harmonic analysis. Optimized by timeframe:
- Scalping (1-5min): 15-25
- Day Trading (15min-1H): 25-35
- Swing Trading (4H-1D): 35-50
- Asset-specific: Crypto 15-25, Stocks 30-40, Forex 35-45
L-Function Critical Strip (0.5-2.5, default 1.5):
Controls Riemann zeta convergence precision:
- Higher values: More stable, smoother signals
- Lower values: More reactive, catches quick moves
- High frequency: 0.8-1.2, Medium: 1.3-1.7, Low: 1.8-2.3
Frobenius Trace Period (5-50, default 21):
Galois representation lookback for price-volume correlation:
- Measures harmonic relationships in market flows
- Scalping: 8-15, Day Trading: 18-25, Swing: 25-40
HTF Multi-Scale Analysis:
Higher timeframe context prevents trading against major trends:
- Provides market bias and filters signals
- Improves win rates by 15-25% through trend alignment
Operadic Composition Parameters
Strategy Composition Arity (2-5, default 4):
Number of algorithms composed for final signal:
- Conservative: 4-5 strategies (higher confidence)
- Moderate: 3-4 strategies (balanced approach)
- Aggressive: 2-3 strategies (more frequent signals)
Category Agreement Threshold (2-5, default 3):
Democratic voting minimum for signal generation:
- Higher agreement: Fewer but higher quality signals
- Lower agreement: More signals, potential false positives
Swiss-Cheese Mixing (0.1-0.5, default 0.382):
Golden ratio φ⁻¹ based blending of trend factors:
- 0.382 is φ⁻¹, optimal for natural market fractals
- Higher values: Stronger trend following
- Lower values: More contrarian signals
OFPI Configuration:
- OFPI Length (5-30, default 14): Order Flow calculation period
- T3 Smoothing (3-10, default 5): Advanced exponential smoothing
- T3 Volume Factor (0.5-1.0, default 0.7): Smoothing aggressiveness control
Unified Scoring System
Component Weights (sum ≈ 1.0):
- L-Function Weight (0.1-0.5, default 0.3): Mathematical harmony emphasis
- Galois Rank Weight (0.1-0.5, default 0.2): Market structure complexity
- Operadic Weight (0.1-0.5, default 0.3): Multi-strategy consensus
- Correspondence Weight (0.1-0.5, default 0.2): Theory-practice alignment
Signal Threshold (0.5-10.0, default 5.0):
Quality filter producing:
- 8.0+: EXCEPTIONAL signals only
- 6.0-7.9: STRONG signals
- 4.0-5.9: MODERATE signals
- 2.0-3.9: WEAK signals
🎨 ADVANCED VISUAL SYSTEM
Multi-Dimensional Quantum Aura Bands
Five-layer resonance field showing market energy:
- Colors: Theme-matched gradients (Quantum purple, Holographic cyan, etc.)
- Expansion: Dynamic based on score intensity and volatility
- Function: Multi-timeframe support/resistance zones
Morphism Flow Portals
Category theory visualization showing market topology:
- Green/Cyan Portals: Bullish mathematical flow
- Red/Orange Portals: Bearish mathematical flow
- Size/Intensity: Proportional to signal strength
- Recursion Depth (1-8): Nested patterns for flow evolution
Fractal Grid System
Dynamic support/resistance with projected L-Scores:
- Multiple Timeframes: 10, 20, 30, 40, 50-period highs/lows
- Smart Spacing: Prevents level overlap using ATR-based minimum distance
- Projections: Estimated signal scores when price reaches levels
- Usage: Precise entry/exit timing with mathematical confirmation
Wick Pressure Analysis
Rejection level prediction using candle mathematics:
- Upper Wicks: Selling pressure zones (purple/red lines)
- Lower Wicks: Buying pressure zones (purple/green lines)
- Glow Intensity (1-8): Visual emphasis and line reach
- Application: Confluence with fractal grid creates high-probability zones
Regime Intensity Heatmap
Background coloring showing market energy:
- Black/Dark: Low activity, range-bound markets
- Purple Glow: Building momentum and trend development
- Bright Purple: High activity, strong directional moves
- Calculation: Combines trend, momentum, volatility, and score intensity
Six Professional Themes
- Quantum: Purple/violet for general trading and mathematical focus
- Holographic: Cyan/magenta optimized for cryptocurrency markets
- Crystalline: Blue/turquoise for conservative, stability-focused trading
- Plasma: Gold/magenta for high-energy volatility trading
- Cosmic Neon: Bright neon colors for maximum visibility and aggressive trading
📊 INSTITUTIONAL-GRADE DASHBOARD
Unified AI Score Section
- Total Score (-10 to +10): Primary decision metric
- >5: Strong bullish signals
- <-5: Strong bearish signals
- Quality ratings: EXCEPTIONAL > STRONG > MODERATE > WEAK
- Component Analysis: Individual L-Function, Galois, Operadic, and Correspondence contributions
Order Flow Analysis
Revolutionary OFPI integration:
- OFPI Value (-100% to +100%): Real buying vs selling pressure
- Visual Gauge: Horizontal bar chart showing flow intensity
- Momentum Status: SHIFTING, ACCELERATING, STRONG, MODERATE, or WEAK
- Trading Application: Flow shifts often precede major moves
Signal Performance Tracking
- Win Rate Monitoring: Real-time success percentage with emoji indicators
- Signal Count: Total signals generated for frequency analysis
- Current Position: LONG, SHORT, or NONE with P&L tracking
- Volatility Regime: HIGH, MEDIUM, or LOW classification
Market Structure Analysis
- Möbius Field Strength: Mathematical field oscillation intensity
- CHAOTIC: High complexity, use wider stops
- STRONG: Active field, normal position sizing
- MODERATE: Balanced conditions
- WEAK: Low activity, consider smaller positions
- HTF Trend: Higher timeframe bias (BULL/BEAR/NEUTRAL)
- Strategy Agreement: Multi-algorithm consensus level
Position Management
When in trades, displays:
- Entry Price: Original signal price
- Current P&L: Real-time percentage with risk level assessment
- Duration: Bars in trade for timing analysis
- Risk Level: HIGH/MEDIUM/LOW based on current exposure
🚀 SIGNAL GENERATION LOGIC
Balanced Long/Short Architecture
The indicator generates signals through multiple convergent pathways:
Long Entry Conditions:
- Score threshold breach with algorithmic agreement
- Strong bullish order flow (OFPI > 0.15) with positive composite signal
- Bullish pattern recognition with mathematical confirmation
- HTF trend alignment with momentum shifting
- Extreme bullish OFPI (>0.3) with any positive score
Short Entry Conditions:
- Score threshold breach with bearish agreement
- Strong bearish order flow (OFPI < -0.15) with negative composite signal
- Bearish pattern recognition with mathematical confirmation
- HTF trend alignment with momentum shifting
- Extreme bearish OFPI (<-0.3) with any negative score
Exit Logic:
- Score deterioration below continuation threshold
- Signal quality degradation
- Opposing order flow acceleration
- 10-bar minimum between signals prevents overtrading
⚙️ OPTIMIZATION GUIDELINES
Asset-Specific Settings
Cryptocurrency Trading:
- Modular Level: 15-25 (capture volatility)
- L-Function Precision: 0.8-1.3 (reactive to price swings)
- OFPI Length: 10-20 (fast correlation shifts)
- Cascade Levels: 5-7, Theme: Holographic
Stock Index Trading:
- Modular Level: 25-35 (balanced trending)
- L-Function Precision: 1.5-1.8 (stable patterns)
- OFPI Length: 14-20 (standard correlation)
- Cascade Levels: 4-5, Theme: Quantum
Forex Trading:
- Modular Level: 35-45 (smooth trends)
- L-Function Precision: 1.6-2.1 (high smoothing)
- OFPI Length: 18-25 (disable volume amplification)
- Cascade Levels: 3-4, Theme: Crystalline
Timeframe Optimization
Scalping (1-5 minute charts):
- Reduce all lookback parameters by 30-40%
- Increase L-Function precision for noise reduction
- Enable all visual elements for maximum information
- Use Small dashboard to save screen space
Day Trading (15 minute - 1 hour):
- Use default parameters as starting point
- Adjust based on market volatility
- Normal dashboard provides optimal information density
- Focus on OFPI momentum shifts for entries
Swing Trading (4 hour - Daily):
- Increase lookback parameters by 30-50%
- Higher L-Function precision for stability
- Large dashboard for comprehensive analysis
- Emphasize HTF trend alignment
🏆 ADVANCED TRADING STRATEGIES
The Mathematical Confluence Method
1. Wait for Fractal Grid level approach
2. Confirm with projected L-Score > threshold
3. Verify OFPI alignment with direction
4. Enter on portal signal with quality ≥ STRONG
5. Exit on score deterioration or opposing flow
The Regime Trading System
1. Monitor Aether Flow background intensity
2. Trade aggressively during bright purple periods
3. Reduce position size during dark periods
4. Use Möbius Field strength for stop placement
5. Align with HTF trend for maximum probability
The OFPI Momentum Strategy
1. Watch for momentum shifting detection
2. Confirm with accelerating flow in direction
3. Enter on immediate portal signal
4. Scale out at Fibonacci levels
5. Exit on flow deceleration or reversal
⚠️ RISK MANAGEMENT INTEGRATION
Mathematical Position Sizing
- Use Galois Rank for volatility-adjusted sizing
- Möbius Field strength determines stop width
- Fractal Dimension guides maximum exposure
- OFPI momentum affects entry timing
Signal Quality Filtering
- Trade only STRONG or EXCEPTIONAL quality signals
- Increase position size with higher agreement levels
- Reduce risk during CHAOTIC Möbius field periods
- Respect HTF trend alignment for directional bias
🔬 DEVELOPMENT JOURNEY
Creating the LOMV was an extraordinary mathematical undertaking that pushed the boundaries of what's possible in technical analysis. This indicator almost didn't happen. The theoretical complexity nearly proved insurmountable.
The Mathematical Challenge
Implementing the Langlands Program required deep research into:
- Number theory and the Möbius function
- Riemann zeta function convergence properties
- L-function analytical continuation
- Galois representations in finite fields
The mathematical literature spans decades of pure mathematics research, requiring translation from abstract theory to practical market application.
The Computational Complexity
Operadic composition theory demanded:
- Category theory implementation in Pine Script
- Multi-dimensional array management for strategy composition
- Real-time democratic voting algorithms
- Performance optimization for complex calculations
The Integration Breakthrough
Bringing together three disparate mathematical frameworks required:
- Novel approaches to signal weighting and combination
- Revolutionary Order Flow Polarity Index development
- Advanced T3 smoothing implementation
- Balanced signal generation preventing directional bias
Months of intensive research culminated in breakthrough moments when the mathematics finally aligned with market reality. The result is an indicator that reveals market structure invisible to conventional analysis while maintaining practical trading utility.
🎯 PRACTICAL IMPLEMENTATION
Getting Started
1. Apply indicator with default settings
2. Select appropriate theme for your markets
3. Observe dashboard metrics during different market conditions
4. Practice signal identification without trading
5. Gradually adjust parameters based on observations
Signal Confirmation Process
- Never trade on score alone - verify quality rating
- Confirm OFPI alignment with intended direction
- Check fractal grid level proximity for timing
- Ensure Möbius field strength supports position size
- Validate against HTF trend for bias confirmation
Performance Monitoring
- Track win rate in dashboard for strategy assessment
- Monitor component contributions for optimization
- Adjust threshold based on desired signal frequency
- Document performance across different market regimes
🌟 UNIQUE INNOVATIONS
1. First Integration of Langlands Program mathematics with practical trading
2. Revolutionary OFPI with T3 smoothing and momentum detection
3. Operadic Composition using category theory for signal democracy
4. Dynamic Fractal Grid with projected L-Score calculations
5. Multi-Dimensional Visualization through morphism flow portals
6. Regime-Adaptive Background showing market energy intensity
7. Balanced Signal Generation preventing directional bias
8. Professional Dashboard with institutional-grade metrics
📚 EDUCATIONAL VALUE
The LOMV serves as both a practical trading tool and an educational gateway to advanced mathematics. Traders gain exposure to:
- Pure mathematics applications in markets
- Category theory and operadic composition
- Number theory through Möbius function implementation
- Harmonic analysis via L-function calculations
- Advanced signal processing through T3 smoothing
⚖️ RESPONSIBLE USAGE
This indicator represents advanced mathematical research applied to market analysis. While the underlying mathematics are rigorously implemented, markets remain inherently unpredictable.
Key Principles:
- Use as part of comprehensive trading strategy
- Implement proper risk management at all times
- Backtest thoroughly before live implementation
- Understand that past performance does not guarantee future results
- Never risk more than you can afford to lose
The mathematics reveal deep market structure, but successful trading requires discipline, patience, and sound risk management beyond any indicator.
🔮 CONCLUSION
The Langlands-Operadic Möbius Vortex represents a quantum leap forward in technical analysis, bringing PhD-level pure mathematics to practical trading while maintaining visual elegance and usability.
From the harmonic analysis of the Langlands Program to the democratic composition of operadic theory, from the number-theoretic precision of the Möbius function to the revolutionary Order Flow Polarity Index, every component works in mathematical harmony to reveal the hidden order within market chaos.
This is more than an indicator - it's a mathematical lens that transforms how you see and understand market structure.
Trade with mathematical precision. Trade with the LOMV.
*"Mathematics is the language with which God has written the universe." - Galileo Galilei*
*In markets, as in nature, profound mathematical beauty underlies apparent chaos. The LOMV reveals this hidden order.*
— Dskyz, Trade with insight. Trade with anticipation.
$TUBR: 7-25-99 Moving Average7, 25, and 99 Period Moving Averages
This indicator plots three moving averages: the 7-period, 25-period, and 99-period Simple Moving Averages (SMA). These moving averages are widely used to smooth out price action and help traders identify trends over different time frames. Let's break down the significance of these specific moving averages from both supply and demand perspectives and a price action perspective.
1. Supply and Demand Perspective:
- 7-period Moving Average (Short-Term) :
The 7-period moving average represents the short-term sentiment in the market. It captures the rapid fluctuations in price and is heavily influenced by recent supply and demand changes. Traders often look to the 7-period SMA for immediate price momentum, with price moving above or below this line signaling short-term strength or weakness.
- Bullish Supply/Demand : When price is above the 7-period SMA, it suggests that buyers are currently in control and demand is higher than supply. Conversely, price falling below this line indicates that supply is overpowering demand, leading to a short-term downtrend.
Is current price > average price in past 7 candles (depending on timeframe)? This will tell you how aggressive buyers are in short term.
- Key Supply/Demand Zones : The 7-period SMA often acts as dynamic support or resistance in a trending market, where traders might use it to enter or exit positions based on how price interacts with this level.
- 25-period Moving Average (Medium-Term) :
The 25-period SMA smooths out more of the noise compared to the 7-period, providing a more stable indication of intermediate trends. This moving average is often used to gauge the market's supply and demand balance over a broader timeframe than the short-term 7-period SMA.
- Supply/Demand Balance : The 25-period SMA reflects the medium-term equilibrium between supply and demand. A crossover between the price and the 25-period SMA may indicate a shift in this balance. When price sustains above the 25-period SMA, it shows that demand is strong enough to maintain an upward trend. Conversely, if the price stays below it, supply is likely exceeding demand.
Is current price > average price in past 25 candles (depending on timeframe)? This will tell you how aggressive buyers are in mid term.
- Momentum Shift : Crossovers between the 7-period and 25-period SMAs can indicate momentum shifts between short-term and medium-term demand. For example, if the 7-period crosses above the 25-period, it often signifies growing short-term demand relative to the medium-term trend, signaling potential buy opportunities. What this crossover means is that if 7MA > 25MA that means in past 7 candles average price is more than past 25 candles.
- 99-period Moving Average (Long-Term):
The 99-period SMA represents the long-term trend and reflects the market's supply and demand over an extended period. This moving average filters out short-term fluctuations and highlights the market's overall trajectory.
- Long-Term Supply/Demand Dynamics : The 99-period SMA is slower to react to changes in supply and demand, providing a more stable view of the market's overall trend. Price staying above this line shows sustained demand dominance, while price consistently staying below reflects ongoing supply pressure.
Is current price > average price in past 99 candles (depending on timeframe)? This will tell you how aggressive buyers are in long term.
- Market Trend Confirmation : When both the 7-period and 25-period SMAs are above the 99-period SMA, it signals a strong bullish trend with demand outweighing supply across all timeframes. If all three SMAs are below the 99-period SMA, it points to a bear market where supply is overpowering demand in both the short and long term.
2. Price Action Perspective :
- 7-period Moving Average (Short-Term Trends):
The 7-period moving average closely tracks price action, making it highly responsive to quick shifts in price. Traders often use it to confirm short-term reversals or continuations in price action. In an uptrend, price typically stays above the 7-period SMA, whereas in a downtrend, price stays below it.
- Short-Term Price Reversals : Crossovers between the price and the 7-period SMA often indicate short-term reversals. When price breaks above the 7-period SMA after staying below it, it suggests a potential bullish reversal. Conversely, a price breakdown below the 7-period SMA could signal a bearish reversal.
- 25-period Moving Average (Medium-Term Trends) :
The 25-period SMA helps identify the medium-term price action trend. It balances short-term volatility and longer-term stability, providing insight into the more persistent trend. Price pullbacks to the 25-period SMA during an uptrend can act as a buying opportunity for trend traders, while pullbacks during a downtrend may offer shorting opportunities.
- Pullback and Continuation: In trending markets, price often retraces to the 25-period SMA before continuing in the direction of the trend. For instance, if the price is in a bullish trend, traders may look for support at the 25-period SMA for potential continuation trades.
- 99-period Moving Average (Long-Term Trend and Market Sentiment ):
The 99-period SMA is the most critical for identifying the overall market trend. Price consistently trading above the 99-period SMA indicates long-term bullish momentum, while price staying below the 99-period SMA suggests bearish sentiment.
- Trend Confirmation : Price action above the 99-period SMA confirms long-term upward momentum, while price action below it confirms a downtrend. The space between the shorter moving averages (7 and 25) and the 99-period SMA gives a sense of the strength or weakness of the trend. Larger gaps between the 7 and 99 SMAs suggest strong bullish momentum, while close proximity indicates consolidation or potential reversals.
- Price Action in Trending Markets : Traders often use the 99-period SMA as a dynamic support/resistance level. In strong trends, price tends to stay on one side of the 99-period SMA for extended periods, with breaks above or below signaling major changes in market sentiment.
Why These Numbers Matter:
7-Period MA : The 7-period moving average is a popular choice among short-term traders who want to capture quick momentum changes. It helps visualize immediate market sentiment and is often used in conjunction with price action to time entries or exits.
- 25-Period MA: The 25-period MA is a key indicator for swing traders. It balances sensitivity and stability, providing a clearer picture of the intermediate trend. It helps traders stay in trades longer by filtering out short-term noise, while still being reactive enough to detect reversals.
- 99-Period MA : The 99-period moving average provides a broad view of the market's direction, filtering out much of the short- and medium-term noise. It is crucial for identifying long-term trends and assessing whether the market is bullish or bearish overall. It acts as a key reference point for longer-term trend followers, helping them stay with the broader market sentiment.
Conclusion:
From a supply and demand perspective, the 7, 25, and 99-period moving averages help traders visualize shifts in the balance between buyers and sellers over different time horizons. The price action interaction with these moving averages provides valuable insight into short-term momentum, intermediate trends, and long-term market sentiment. Using these three MAs together gives a more comprehensive understanding of market conditions, helping traders align their strategies with prevailing trends across various timeframes.
------------- RULE BASED SYSTEM ---------------
Overview of the Rule-Based System:
This system will use the following moving averages:
7-period MA: Represents short-term price action.
25-period MA: Represents medium-term price action.
99-period MA: Represents long-term price action.
1. Trend Identification Rules:
Bullish Trend:
The 7-period MA is above the 25-period MA, and the 25-period MA is above the 99-period MA.
This structure shows that short, medium, and long-term trends are aligned in an upward direction, indicating strong bullish momentum.
Bearish Trend:
The 7-period MA is below the 25-period MA, and the 25-period MA is below the 99-period MA.
This suggests that the market is in a downtrend, with bearish momentum dominating across timeframes.
Neutral/Consolidation:
The 7-period MA and 25-period MA are flat or crossing frequently with the 99-period MA, and they are close to each other.
This indicates a sideways or consolidating market where there’s no strong trend direction.
2. Entry Rules:
Bullish Entry (Buy Signals):
Primary Buy Signal:
The price crosses above the 7-period MA, AND the 7-period MA is above the 25-period MA, AND the 25-period MA is above the 99-period MA.
This indicates the start of a new upward trend, with alignment across the short, medium, and long-term trends.
Pullback Buy Signal (for trend continuation):
The price pulls back to the 25-period MA, and the 7-period MA remains above the 25-period MA.
This indica
tes that the pullback is a temporary correction in an uptrend, and buyers may re-enter the market as price approaches the 25-period MA.
You can further confirm the signal by waiting for price action (e.g., bullish candlestick patterns) at the 25-period MA level.
Breakout Buy Signal:
The price crosses above the 99-period MA, and the 7-period and 25-period MAs are also both above the 99-period MA.
This confirms a strong bullish breakout after consolidation or a long-term downtrend.
Bearish Entry (Sell Signals):
Primary Sell Signal:
The price crosses below the 7-period MA, AND the 7-period MA is below the 25-period MA, AND the 25-period MA is below the 99-period MA.
This indicates the start of a new downtrend with alignment across the short, medium, and long-term trends.
Pullback Sell Signal (for trend continuation):
The price pulls back to the 25-period MA, and the 7-period MA remains below the 25-period MA.
This indicates that the pullback is a temporary retracement in a downtrend, providing an opportunity to sell as price meets resistance at the 25-period MA.
Breakdown Sell Signal:
The price breaks below the 99-period MA, and the 7-period and 25-period MAs are also below the 99-period MA.
This confirms a strong bearish breakdown after consolidation or a long-term uptrend reversal.
3. Exit Rules:
Bullish Exit (for long positions):
Short-Term Exit:
The price closes below the 7-period MA, and the 7-period MA starts crossing below the 25-period MA.
This indicates weakening momentum in the uptrend, suggesting an exit from the long position.
Stop-Loss Trigger:
The price falls below the 99-period MA, signaling the breakdown of the long-term trend.
This can act as a final exit signal to minimize losses if the long-term uptrend is invalidated.
Bearish Exit (for short positions):
Short-Term Exit:
The price closes above the 7-period MA, and the 7-period MA starts crossing above the 25-period MA.
This indicates a potential weakening of the downtrend and signals an exit from the short position.
Stop-Loss Trigger:
The price breaks above the 99-period MA, invalidating the bearish trend.
This signals that the market may be reversing to the upside, and exiting short positions would be prudent.
CNN Fear and Greed IndexThe “CNN Fear and Greed Index” indicator in this context is designed to gauge market sentiment based on a combination of several fundamental indicators. Here’s a breakdown of how this indicator works and what it represents:
Components of the Indicator:
1. Stock Price Momentum:
• Calculates the momentum of the S&P 500 index relative to its 125-day moving average. Momentum is essentially the rate of acceleration or deceleration of price movements over time.
2. Stock Price Strength:
• Measures the breadth of the market by comparing the number of stocks hitting 52-week highs versus lows. This provides insights into the overall strength or weakness of the market trend.
3. Stock Price Breadth:
• Evaluates the volume of shares trading on the rise versus the falling volume. Higher volume on rising days suggests positive market breadth, while higher volume on declining days indicates negative breadth.
4. Put and Call Options Ratio (Put/Call Ratio):
• This ratio indicates the sentiment of investors in the options market. A higher put/call ratio typically signals increased bearish sentiment (more puts relative to calls) and vice versa.
5. Market Volatility (VIX):
• Also known as the “fear gauge,” the VIX measures the expected volatility in the market over the next 30 days. Higher VIX values indicate higher expected volatility and often correlate with increased fear or uncertainty in the market.
6. Safe Haven Demand:
• Compares the returns of stocks (represented by S&P 500) versus safer investments like 10-year Treasury bonds. Higher returns on bonds relative to stocks suggest a flight to safety or risk aversion.
7. Junk Bond Demand:
• Measures the spread between yields on high-yield (junk) bonds and investment-grade bonds. Widening spreads may indicate increasing risk aversion as investors demand higher yields for riskier bonds.
Normalization and Weighting:
• Normalization: Each component is normalized to a scale of 0 to 100 using a function that adjusts the range based on historical highs and lows of the respective indicator.
• Weighting: The user can adjust the relative importance (weight) of each component using input parameters. This customization allows for different interpretations of market sentiment based on which factors are considered more influential.
Fear and Greed Index Calculation:
• The Fear and Greed Index is calculated as a weighted average of all normalized components. This index provides a single numerical value that summarizes the overall sentiment of the market based on the selected indicators.
Usage:
• Visualization: The indicator plots the Fear and Greed Index and its components on the chart. This allows traders and analysts to visually assess the sentiment trends over time.
• Analysis: Changes in the Fear and Greed Index can signal shifts in market sentiment. For example, a rising index may indicate increasing greed and potential overbought conditions, while a falling index may suggest increasing fear and potential oversold conditions.
• Customization: Traders can customize the indicator by adjusting the weights assigned to each component based on their trading strategies and market insights.
By integrating multiple fundamental indicators into a single index, the “CNN Fear and Greed Index” provides a comprehensive snapshot of market sentiment, helping traders make informed decisions about market entry, exit, and risk management strategies.
Trading Toolkit - Comprehensive AnalysisTrading Toolkit – Comprehensive Analysis
A unified trading analysis toolkit with four sections:
📊 Company Info
Fundamentals, market cap, sector, and earnings countdown.
📅 Performance
Date‑range analysis with key metrics.
🎯 Market Sentiment
CNN‑style Fear & Greed Index (7 components) + 150‑SMA positioning.
🛡️ Risk Levels
ATR/MAD‑based stop‑loss and take‑profit calculations.
Key Features
CNN‑style Fear & Greed approximation using:
Momentum: S&P 500 vs 125‑DMA
Price Strength: NYSE 52‑week highs vs lows
Market Breadth: McClellan Volume Summation (Up/Down volume)
Put/Call Ratio: 5‑day average (inverted)
Volatility: VIX vs 50‑DMA (inverted)
Safe‑Haven Demand: 20‑day SPY–IEF return spread
Junk‑Bond Demand: HY vs IG credit spread (inverted)
Normalization: z‑score → percentile (0–100) with ±3 clipping.
CNN‑aligned thresholds:
Extreme Fear: 0–24 | Fear: 25–44 | Neutral: 45–54 | Greed: 55–74 | Extreme Greed: 75+.
Risk tools: ATR & MAD volatility measures with configurable multipliers.
Flexible layout: vertical or side‑by‑side columns.
Data Sources
S&P 500: CBOE:SPX or AMEX:SPY
NYSE: INDEX:HIGN, INDEX:LOWN, USI:UVOL, USI:DVOL
Options: USI:PCC (Total PCR), fallback INDEX:CPCS (Equity PCR)
Volatility: CBOE:VIX
Treasuries: NASDAQ:IEF
Credit Spreads: FRED:BAMLH0A0HYM2, FRED:BAMLC0A0CM
Risk Management
ATR risk bands: 🟢 ≤3%, 🟡 3–6%, ⚪ 6–10%, 🟠 10–15%, 🔴 >15%
MAD‑based stop‑loss and take‑profit calculations.
Author: Daniel Dahan
(AI Generated, Merged & enhanced version with CNN‑style Fear & Greed)
Smart RebalanceThis script is based on the portfolio rebalancing strategy. It's designed to work with cryptocurrencies, but it can work with any market.
How portfolio rebalance works?
Let's assume your initial capital is $1000, and you want to distribute it into 4 coins. This script takes the USDT as the stable coin for the initial money, so in case you want other currency, the pairs must be with that fiat as the quote.
Following our example, you would take BTC, ETH, BNB, and FTT. After selecting the coins, it's time to choose how much allocation is on each. Let's put 25% on each. This way, $250 of our capital on each coin.
After selecting the coins and their allocation, you choose the price change ratio for rebalancing. Let's use 1%. Next, you start to watch the markets. The first thing that happens, following our example, is the BTCUSDT price moving 1% up.
That amount hit the ratio of 1% for the rebalance. Hence, you sell 1% of BTC for USDT and redistribute to the other coins, buying 0.25% of each currency to rebalance the portfolio.
Next, ETHUSDT goes 1% down, time to rebalance again. This time, you need to take 0.33% of each other coin and buy ETH, so this way, it's all divided as the chosen allocation.
Why use rebalancing?
Looks easy, right? It is, but very time demanding. Demands even more if you raise the number of coins you want to distribute. Having a system to do that automatically is a must to work efficiently. Rebalancing spreads the risk among multiple currencies. This way, you earn small when it goes up, but you lose small when it goes down.
What this script helps with portfolio rebalance?
This indicator will not buy/sell for you but will help you choose the best markets for your rebalancing. Which coin will work best in that period? Do I need to have more than 8 coins? How much must be my ratio? Those questions you can answer using this indicator.
What this script has?
Start and End dates
The script will work for a certain period. All calculations will be done in that period.
Coin Ratio %
The amount of price movement of each asset that will be used to calculate the rebalancing
Initial Capital and Broker Fee
The amount of capital to be used on the rebalancing and the broker fee you want to use the strategy. The cost will be applied on every trade, buying or selling the coins.
Assets, allocations, and colors
It's possible to select from 2 to 10 assets to be used on the portfolio. Each purchase must have the allocation %. Suppose the sum of the allocations is different from 100%. In that case, a warning message will appear on the chart instead of the statistics.
Panel and tooltips
There is a panel with a summary of the results
Set allocations automatically
There is an option to make the indicator use the daily asset volume from the day before to determine the allocation percentage of each asset. This option is better if you are unsure how much allocation you want to use on each coin.
Use this indicator as a backtest for your rebalancing strategy. The selected market on the chart will not affect the calculation on this indicator, but the time frame will. The higher the time frame, the higher the coin ratio % must be.
About the code
The code is written to use arrays to store the values of each asset, making the calculations on each candle inside the time range. The for-loops are used to reduce the code length and make it easy to change the analysis of all assets. Finally, the script has some comments on the code.
Monte Carlo Range Forecast [DW]This is an experimental study designed to forecast the range of price movement from a specified starting point using a Monte Carlo simulation.
Monte Carlo experiments are a broad class of computational algorithms that utilize random sampling to derive real world numerical results.
These types of algorithms have a number of applications in numerous fields of study including physics, engineering, behavioral sciences, climate forecasting, computer graphics, gaming AI, mathematics, and finance.
Although the applications vary, there is a typical process behind the majority of Monte Carlo methods:
-> First, a distribution of possible inputs is defined.
-> Next, values are generated randomly from the distribution.
-> The values are then fed through some form of deterministic algorithm.
-> And lastly, the results are aggregated over some number of iterations.
In this study, the Monte Carlo process used generates a distribution of aggregate pseudorandom linear price returns summed over a user defined period, then plots standard deviations of the outcomes from the mean outcome generate forecast regions.
The pseudorandom process used in this script relies on a modified Wichmann-Hill pseudorandom number generator (PRNG) algorithm.
Wichmann-Hill is a hybrid generator that uses three linear congruential generators (LCGs) with different prime moduli.
Each LCG within the generator produces an independent, uniformly distributed number between 0 and 1.
The three generated values are then summed and modulo 1 is taken to deliver the final uniformly distributed output.
Because of its long cycle length, Wichmann-Hill is a fantastic generator to use on TV since it's extremely unlikely that you'll ever see a cycle repeat.
The resulting pseudorandom output from this generator has a minimum repetition cycle length of 6,953,607,871,644.
Fun fact: Wichmann-Hill is a widely used PRNG in various software applications. For example, Excel 2003 and later uses this algorithm in its RAND function, and it was the default generator in Python up to v2.2.
The generation algorithm in this script takes the Wichmann-Hill algorithm, and uses a multi-stage transformation process to generate the results.
First, a parent seed is selected. This can either be a fixed value, or a dynamic value.
The dynamic parent value is produced by taking advantage of Pine's timenow variable behavior. It produces a variable parent seed by using a frozen ratio of timenow/time.
Because timenow always reflects the current real time when frozen and the time variable reflects the chart's beginning time when frozen, the ratio of these values produces a new number every time the cache updates.
After a parent seed is selected, its value is then fed through a uniformly distributed seed array generator, which generates multiple arrays of pseudorandom "children" seeds.
The seeds produced in this step are then fed through the main generators to produce arrays of pseudorandom simulated outcomes, and a pseudorandom series to compare with the real series.
The main generators within this script are designed to (at least somewhat) model the stochastic nature of financial time series data.
The first step in this process is to transform the uniform outputs of the Wichmann-Hill into outputs that are normally distributed.
In this script, the transformation is done using an estimate of the normal distribution quantile function.
Quantile functions, otherwise known as percent-point or inverse cumulative distribution functions, specify the value of a random variable such that the probability of the variable being within the value's boundary equals the input probability.
The quantile equation for a normal probability distribution is μ + σ(√2)erf^-1(2(p - 0.5)) where μ is the mean of the distribution, σ is the standard deviation, erf^-1 is the inverse Gauss error function, and p is the probability.
Because erf^-1() does not have a simple, closed form interpretation, it must be approximated.
To keep things lightweight in this approximation, I used a truncated Maclaurin Series expansion for this function with precomputed coefficients and rolled out operations to avoid nested looping.
This method provides a decent approximation of the error function without completely breaking floating point limits or sucking up runtime memory.
Note that there are plenty of more robust techniques to approximate this function, but their memory needs very. I chose this method specifically because of runtime favorability.
To generate a pseudorandom approximately normally distributed variable, the uniformly distributed variable from the Wichmann-Hill algorithm is used as the input probability for the quantile estimator.
Now from here, we get a pretty decent output that could be used itself in the simulation process. Many Monte Carlo simulations and random price generators utilize a normal variable.
However, if you compare the outputs of this normal variable with the actual returns of the real time series, you'll find that the variability in shocks (random changes) doesn't quite behave like it does in real data.
This is because most real financial time series data is more complex. Its distribution may be approximately normal at times, but the variability of its distribution changes over time due to various underlying factors.
In light of this, I believe that returns behave more like a convoluted product distribution rather than just a raw normal.
So the next step to get our procedurally generated returns to more closely emulate the behavior of real returns is to introduce more complexity into our model.
Through experimentation, I've found that a return series more closely emulating real returns can be generated in a three step process:
-> First, generate multiple independent, normally distributed variables simultaneously.
-> Next, apply pseudorandom weighting to each variable ranging from -1 to 1, or some limits within those bounds. This modulates each series to provide more variability in the shocks by producing product distributions.
-> Lastly, add the results together to generate the final pseudorandom output with a convoluted distribution. This adds variable amounts of constructive and destructive interference to produce a more "natural" looking output.
In this script, I use three independent normally distributed variables multiplied by uniform product distributed variables.
The first variable is generated by multiplying a normal variable by one uniformly distributed variable. This produces a bit more tailedness (kurtosis) than a normal distribution, but nothing too extreme.
The second variable is generated by multiplying a normal variable by two uniformly distributed variables. This produces moderately greater tails in the distribution.
The third variable is generated by multiplying a normal variable by three uniformly distributed variables. This produces a distribution with heavier tails.
For additional control of the output distributions, the uniform product distributions are given optional limits.
These limits control the boundaries for the absolute value of the uniform product variables, which affects the tails. In other words, they limit the weighting applied to the normally distributed variables in this transformation.
All three sets are then multiplied by user defined amplitude factors to adjust presence, then added together to produce our final pseudorandom return series with a convoluted product distribution.
Once we have the final, more "natural" looking pseudorandom series, the values are recursively summed over the forecast period to generate a simulated result.
This process of generation, weighting, addition, and summation is repeated over the user defined number of simulations with different seeds generated from the parent to produce our array of initial simulated outcomes.
After the initial simulation array is generated, the max, min, mean and standard deviation of this array are calculated, and the values are stored in holding arrays on each iteration to be called upon later.
Reference difference series and price values are also stored in holding arrays to be used in our comparison plots.
In this script, I use a linear model with simple returns rather than compounding log returns to generate the output.
The reason for this is that in generating outputs this way, we're able to run our simulations recursively from the beginning of the chart, then apply scaling and anchoring post-process.
This allows a greater conservation of runtime memory than the alternative, making it more suitable for doing longer forecasts with heavier amounts of simulations in TV's runtime environment.
From our starting time, the previous bar's price, volatility, and optional drift (expected return) are factored into our holding arrays to generate the final forecast parameters.
After these parameters are computed, the range forecast is produced.
The basis value for the ranges is the mean outcome of the simulations that were run.
Then, quarter standard deviations of the simulated outcomes are added to and subtracted from the basis up to 3σ to generate the forecast ranges.
All of these values are plotted and colorized based on their theoretical probability density. The most likely areas are the warmest colors, and least likely areas are the coolest colors.
An information panel is also displayed at the starting time which shows the starting time and price, forecast type, parent seed value, simulations run, forecast bars, total drift, mean, standard deviation, max outcome, min outcome, and bars remaining.
The interesting thing about simulated outcomes is that although the probability distribution of each simulation is not normal, the distribution of different outcomes converges to a normal one with enough steps.
In light of this, the probability density of outcomes is highest near the initial value + total drift, and decreases the further away from this point you go.
This makes logical sense since the central path is the easiest one to travel.
Given the ever changing state of markets, I find this tool to be best suited for shorter term forecasts.
However, if the movements of price are expected to remain relatively stable, longer term forecasts may be equally as valid.
There are many possible ways for users to apply this tool to their analysis setups. For example, the forecast ranges may be used as a guide to help users set risk targets.
Or, the generated levels could be used in conjunction with other indicators for meaningful confluence signals.
More advanced users could even extrapolate the functions used within this script for various purposes, such as generating pseudorandom data to test systems on, perform integration and approximations, etc.
These are just a few examples of potential uses of this script. How you choose to use it to benefit your trading, analysis, and coding is entirely up to you.
If nothing else, I think this is a pretty neat script simply for the novelty of it.
----------
How To Use:
When you first add the script to your chart, you will be prompted to confirm the starting date and time, number of bars to forecast, number of simulations to run, and whether to include drift assumption.
You will also be prompted to confirm the forecast type. There are two types to choose from:
-> End Result - This uses the values from the end of the simulation throughout the forecast interval.
-> Developing - This uses the values that develop from bar to bar, providing a real-time outlook.
You can always update these settings after confirmation as well.
Once these inputs are confirmed, the script will boot up and automatically generate the forecast in a separate pane.
Note that if there is no bar of data at the time you wish to start the forecast, the script will automatically detect use the next available bar after the specified start time.
From here, you can now control the rest of the settings.
The "Seeding Settings" section controls the initial seed value used to generate the children that produce the simulations.
In this section, you can control whether the seed is a fixed value, or a dynamic one.
Since selecting the dynamic parent option will change the seed value every time you change the settings or refresh your chart, there is a "Regenerate" input built into the script.
This input is a dummy input that isn't connected to any of the calculations. The purpose of this input is to force an update of the dynamic parent without affecting the generator or forecast settings.
Note that because we're running a limited number of simulations, different parent seeds will typically yield slightly different forecast ranges.
When using a small number of simulations, you will likely see a higher amount of variance between differently seeded results because smaller numbers of sampled simulations yield a heavier bias.
The more simulations you run, the smaller this variance will become since the outcomes become more convergent toward the same distribution, so the differences between differently seeded forecasts will become more marginal.
When using a dynamic parent, pay attention to the dispersion of ranges.
When you find a set of ranges that is dispersed how you like with your configuration, set your fixed parent value to the parent seed that shows in the info panel.
This will allow you to replicate that dispersion behavior again in the future.
An important thing to note when settings alerts on the plotted levels, or using them as components for signals in other scripts, is to decide on a fixed value for your parent seed to avoid minor repainting due to seed changes.
When the parent seed is fixed, no repainting occurs.
The "Amplitude Settings" section controls the amplitude coefficients for the three differently tailed generators.
These amplitude factors will change the difference series output for each simulation by controlling how aggressively each series moves.
When "Adjust Amplitude Coefficients" is disabled, all three coefficients are set to 1.
Note that if you expect volatility to significantly diverge from its historical values over the forecast interval, try experimenting with these factors to match your anticipation.
The "Weighting Settings" section controls the weighting boundaries for the three generators.
These weighting limits affect how tailed the distributions in each generator are, which in turn affects the final series outputs.
The maximum absolute value range for the weights is . When "Limit Generator Weights" is disabled, this is the range that is automatically used.
The last set of inputs is the "Display Settings", where you can control the visual outputs.
From here, you can select to display either "Forecast" or "Difference Comparison" via the "Output Display Type" dropdown tab.
"Forecast" is the type displayed by default. This plots the end result or developing forecast ranges.
There is an option with this display type to show the developing extremes of the simulations. This option is enabled by default.
There's also an option with this display type to show one of the simulated price series from the set alongside actual prices.
This allows you to visually compare simulated prices alongside the real prices.
"Difference Comparison" allows you to visually compare a synthetic difference series from the set alongside the actual difference series.
This display method is primarily useful for visually tuning the amplitude and weighting settings of the generators.
There are also info panel settings on the bottom, which allow you to control size, colors, and date format for the panel.
It's all pretty simple to use once you get the hang of it. So play around with the settings and see what kinds of forecasts you can generate!
----------
ADDITIONAL NOTES & DISCLAIMERS
Although I've done a number of things within this script to keep runtime demands as low as possible, the fact remains that this script is fairly computationally heavy.
Because of this, you may get random timeouts when using this script.
This could be due to either random drops in available runtime on the server, using too many simulations, or running the simulations over too many bars.
If it's just a random drop in runtime on the server, hide and unhide the script, re-add it to the chart, or simply refresh the page.
If the timeout persists after trying this, then you'll need to adjust your settings to a less demanding configuration.
Please note that no specific claims are being made in regards to this script's predictive accuracy.
It must be understood that this model is based on randomized price generation with assumed constant drift and dispersion from historical data before the starting point.
Models like these not consider the real world factors that may influence price movement (economic changes, seasonality, macro-trends, instrument hype, etc.), nor the changes in sample distribution that may occur.
In light of this, it's perfectly possible for price data to exceed even the most extreme simulated outcomes.
The future is uncertain, and becomes increasingly uncertain with each passing point in time.
Predictive models of any type can vary significantly in performance at any point in time, and nobody can guarantee any specific type of future performance.
When using forecasts in making decisions, DO NOT treat them as any form of guarantee that values will fall within the predicted range.
When basing your trading decisions on any trading methodology or utility, predictive or not, you do so at your own risk.
No guarantee is being issued regarding the accuracy of this forecast model.
Forecasting is very far from an exact science, and the results from any forecast are designed to be interpreted as potential outcomes rather than anything concrete.
With that being said, when applied prudently and treated as "general case scenarios", forecast models like these may very well be potentially beneficial tools to have in the arsenal.
RISK-OFF.RISK.ON-ppxdf.v3======================================= RISK-OFF & RISK ON INDEX ================================================
1. Stock Price Momentum: Measuring the Standard & Poor's 500 Index ( S&P 500 ) versus its 125-day moving average (MA)
2. Stock Price Strength: Calculating the number of stocks hitting 52-week highs versus those hitting 52-week lows on the New York Stock Exchange (NYSE)
3. Stock Price Breadth: Analyzing trading volumes in rising stocks against declining stocks
4. Put and Call Options: How much do put options lag behind call options, signifying greed, or surpass them, indicating fear
5. Junk Bond Demand: Gauging appetite for higher risk strategies by measuring the spread between yields on investment-grade bonds and junk bonds
6. Market Volatility: CNN measures the Chicago Board Options Exchange Volatility Index ( VIX ), concentrating on a 50-day MA
7. Safe Haven Demand: The difference in returns for stocks versus treasuries
Each of these seven indicators is measured on a scale from 0 to 100, with the index being computed by taking an equal-weighted average of each of them.
A reading of 50 is deemed NEUTRAL.
Above 50 signals the market with RISK-ON. (GREED)
Below 50, Signals the market with RISK-OFF (FEAR)
8
DZ/SZ - HFM by MamaRight-Empty Wick Zones (MTF) draws Supply/Demand zones from the remaining wick of adjacent opposite-color candles (Classic & Non-classic rules). Zones extend right only through empty space and stop at the first touching candle. Multi-TF scan (H1/H4/1D/1W/1M) with TF-colored boxes and labels showing Demand/Supply + H/L.
Demand (red → green, adjacent):
Classic: if the red candle’s lower wick is longer than the green’s → zone = (the “excess” red wick).
Non-classic: if the red’s lower wick is shorter or equal → zone = (use the longer green wick).
Supply (green → red, adjacent):
Classic: if the green candle’s upper wick is longer than the red’s → zone = (the “excess” green wick).
Non-classic: if the green’s upper wick is shorter or equal → zone = (use the longer red wick).
After a zone is created, the box extends right and terminates at the very first bar whose price range (body or wick) overlaps the zone → ensures the plotted area is genuinely right-empty.
What you see
Zone boxes with distinct colors per timeframe (e.g., H1/H4/1D/1W/1M).
Optional labels on each box: H4 Demand / H1 Supply, plus H/L prices of the zone.
Labels can sit at the left edge or follow the right edge of the box.
Inputs
Toggles: Demand Classic / Demand Non-classic / Supply Classic / Supply Non-classic.
Timeframes to scan: H1, H4, 1D, 1W, 1M.
Min zone thickness (price): minimum height of a zone (in price units).
Initial right extension (bars): initial box length; the script auto-cuts at the first touch.
Show labels / place labels at the right edge.
How to use (suggestion)
Use higher TF (e.g., 1D) for bias and lower TFs (H1/H4) for execution zones.
Keep only the rule set (Classic/Non-classic) that matches your playbook.
Treat zones as areas of interest—wait for your own confirmations (e.g., swing rejection, wick re-entry, structure shift, volume cues) and manage risk accordingly.
Notes
Because zones are sourced from higher TFs via request.security, the drawing can update intrabar; a zone is final once the source TF bar closes.
Min zone thickness uses price units (e.g., on XAUUSD, 1.00 ≈ $1).
This tool is an analytical aid, not financial advice or an entry/exit signal.
อินดิเคเตอร์ DZ/SZ - HFM by Mama ใช้หา Demand/Supply zone จาก “ไส้ที่เหลือ” ของ คู่แท่งสีตรงข้ามที่ติดกัน แล้ววาดเป็นกล่อง ยืดไปทางขวาเฉพาะช่วงที่ว่าง และ หยุดตรงแท่งแรกที่เข้ามาแตะโซน รองรับหลาย Timeframe (H1/H4/1D/1W/1M) พร้อมสีแยก TF และป้ายกำกับ Demand/Supply + H/L ของโซน
รายละเอียดการทำงาน (ไทย)
แนวคิดหลัก
Demand: เลือกคู่ แดง→เขียว ที่ “ติดกัน”
Classic: ถ้า ไส้ล่าง ของแท่งแดงยาวกว่าแท่งเขียว → โซน =
Non-classic: ถ้า ไส้ล่าง ของแท่งแดงสั้นกว่าหรือเท่าเขียว → โซน =
Supply: เลือกคู่ เขียว→แดง ที่ “ติดกัน”
Classic: ถ้า ไส้บน ของแท่งเขียวยาวกว่าแท่งแดง → โซน =
Non-classic: ถ้า ไส้บน ของแท่งเขียวสั้นกว่าหรือเท่าแดง → โซน =
เมื่อสร้างโซนแล้ว กล่องจะ ยืดทางขวา ไปเรื่อย ๆ และ หยุดทันทีเมื่อมีแท่งแรกที่ช่วงราคา (ไส้หรือตัวแท่ง) ทับซ้อนกับโซน ⇒ ได้ “พื้นที่ขวาว่าง” ตามโจทย์
สิ่งที่แสดงบนกราฟ
กล่องโซนสีตาม Timeframe (เช่น H1=ฟ้า, H4=เขียว, 1D=ส้ม, 1W=ม่วง, 1M=เทา)
Label ที่มุมกล่อง: H4 Demand / H1 Supply + ราคาของ High/Low ของโซน
(เลือกวาง ซ้าย หรือ ขอบขวา ของกล่องได้ในตั้งค่า)
ตัวเลือกสำคัญใน Settings
เปิด/ปิด: Demand Classic / Demand Non-classic / Supply Classic / Supply Non-classic
เลือก TF ที่จะสแกน: H1, H4, 1D, 1W, 1M
Min zone thickness (price): กำหนด “ความหนา” ขั้นต่ำของโซน (หน่วยเป็นราคา เช่น XAUUSD = ดอลลาร์)
Initial right extension (bars): ความยาวยืดเริ่มต้น (อินดี้จะตัดให้สั้นลงเองเมื่อมีแท่งมาแตะ)
แสดง Label บนโซน และ วาง Label ที่ขอบขวากล่อง
วิธีใช้แนะนำ
เลือก TF ที่ต้องการ (เช่น ให้ H1/H4 เป็นโซนเทรดละเอียด และ 1D ใช้กรองทิศ)
เปิดเฉพาะโหมด (Classic/Non-classic) ที่ตรงกับแนวคิดการเทรดของคุณ
ใช้โซนเป็นบริเวณ “สนใจ” แล้วรอพฤติกรรมราคา/สัญญาณยืนยันเสริม (เช่น สวิงกลับ, rejection wick, โวลลุ่ม, หรือโครงสร้างจบคลื่น)
หมายเหตุสำคัญ
อินดี้ใช้ข้อมูลข้าม TF; สัญญาณจาก TF สูง อาจเปลี่ยนระหว่างแท่งยังไม่ปิด (ลักษณะ intrabar update) โซนจะ “นิ่ง” เมื่อแท่งของ TF ต้นทาง ปิดแล้ว
หน่วยของ Min zone thickness เป็น หน่วยราคา ไม่ใช่ pips (XAUUSD: 1.00 = $1)
อินดี้ไม่ได้ให้สัญญาณเข้า–ออกอัตโนมัติ ควรใช้ร่วมกับแผนเทรดและการจัดการความเสี่ยง
PRO SMC DASHBOARDPRO SMC DASHBOARD - PRO LEVEL
Advanced Supply & Demand / SMC dashboard for scalping and intraday:
Multi-Timeframe Trend: Visualizes trend direction for M1, M5, M15, H1, H4.
HTF Supply/Demand: Shows closest high time frame (HTF) supply/demand zone and distance (in pips).
Smart “Flip” & Liquidity Signals: Flip and Liquidity Sweep arrows/signals are shown only when truly significant:
Near HTF Supply/Demand zone
And confirmed by volume spike or high confluence score
Momentum & Bias: Real-time momentum (RSI M1), H1 bias and fakeout detection.
Confluence Score: Objective score (out of 7) for trade confidence.
Volume Spike, Divergence, BOS: Includes volume spikes, RSI divergence (M1), and Break of Structure (BOS) for both M15 & H1.
Ultra-clean chart: Only valid signals/alerts shown; no spam or visual clutter.
Full dashboard with all signals and context, always visible bottom-right.
Best used for:
Forex, Gold/Silver, US indices, and crypto
Scalping/intraday with fast, clear decisions based on multi-factor SMC logic
Usage:
Add to your chart, monitor the dashboard for valid setups, and trade only when multiple factors align for high-probability entries.
How to Use the PRO SMC DASHBOARD
1. Add the Script to Your Chart:
Apply the indicator to your favorite Forex, Gold, crypto, or indices chart (best on M1, M5, or M15 for entries).
2. Read the Dashboard (Bottom Right):
The dashboard shows real-time information from multiple timeframes and key SMC filters, including:
Trend (M1, M5, M15, H1, H4):
Arrows show up (↑) or down (↓) trend for each timeframe, based on EMA.
Momentum (RSI M1):
Shows “Strong Up,” “Strong Down,” or “Neutral” plus the current RSI value.
RSI (H1):
Higher timeframe momentum confirmation.
ATR State:
Indicates current volatility (High, Normal, Low).
Session:
Detects if the market is in London, NY, or Asia session (based on UTC).
HTF S/D Zone:
Shows the nearest high timeframe Supply or Demand zone, its timeframe (M15, H1, H4), and exact pip distance.
Fakeout (last 3):
Detects recent false breakouts—if there are multiple fakeouts, potential for reversal is higher.
FVG (Fair Value Gap):
Indicates direction and distance to the nearest FVG (Above/Below).
Bias:
“Strong Buy,” “Strong Sell,” or “Neutral”—multi-timeframe, momentum, and volatility filtered.
Inducement:
Alerts for possible “stop hunt” or liquidity grab before reversal.
BOS (Break of Structure):
Recent or live breaks of market structure (for both M15 & H1).
Liquidity Sweep:
Shows if price just swept a key high/low and then reversed (often key reversal point).
Confluence Score (0-7):
Higher score means more factors align—look for 5+ for strong setups.
Volume Spike:
“YES” appears if the current volume is significantly above average—big players are active!
RSI Divergence:
Bullish or bearish divergence on M1—signals early reversal risk.
Momentum Flip:
“UP” or “DN” appears if RSI M1 crosses the 50 line, confirmed by location and other filters.
Chart Signals (Arrows & Markers):
Flip arrows (up/down) and Liquidity markers only appear when price is at/near a key Supply/Demand zone and confirmed by either a volume spike or strong confluence.
No signal spam:
If you see an arrow or LIQ tag, it’s a truly significant moment!
Suggested Trading Workflow:
Scan the Dashboard:
Is the multi-timeframe trend aligned?
Are you near a major Supply or Demand zone?
Is the Confluence Score high (5 or more)?
Check for Signals:
Is there a Flip or LIQ marker near a Supply/Demand zone?
Is volume spiking or a fakeout just occurred?
Look for Reversal or Continuation:
If there’s a Flip at Demand (with high confluence), consider a long setup.
If there’s a LIQ sweep + flip + volume at Supply, consider a short.
Manage Risk:
Don’t chase every signal.
Confirm with your entry criteria and preferred session timing.
Pro Tips:
Highest confidence trades:
When dashboard signals and chart arrows/markers agree, especially with high confluence and volume spike.
Adapt pip distance filter:
Dashboard is tuned for FX and gold; for other assets, adjust pip-size filter if needed.
Use alerts (if enabled):
Set up custom TradingView alerts for “Flip” or “Liquidity” signals for auto-notifications.
Designed to help you make professional, objective decisions—without chart clutter or second-guessing!
CYCLE BY RiotWolftradingDescription of the "CYCLE" Indicator
The "CYCLE" indicator is a custom Pine Script v5 script for TradingView that visualizes cyclic patterns in price action, dividing the trading day into specific sessions and 90-minute quarters (Q1-Q4). It is designed to identify and display market phases (Accumulation, Manipulation, Distribution, and Continuation/Reversal) along with key support and resistance levels within those sessions. Additionally, it allows customization of boxes, lines, labels, and colors to suit user preferences.
Main Features
Cycle Phases:
Accumulation (1900-0100): Represents the phase where large operators accumulate positions.
Manipulation (0100-0700): Identifies potential manipulative moves to mislead retail traders.
Distribution (0700-1300): The phase where large operators distribute their positions.
Continuation/Reversal (1300-1900): Indicates whether the price continues the trend or reverses.
90-Minute Quarters (Q1-Q4):
Divides each 6-hour cycle (360 minutes) into four 90-minute quarters (Q1: 00:00-01:30, Q2: 01:30-03:00, Q3: 03:00-04:30, Q4: 04:30-06:00 UTC).
Each quarter is displayed with a colored box (Q1: light purple, Q2: light blue, Q3: light gray, Q4: light pink) and labels (defaulted to black).
Support and Resistance Visualization:
Draws boxes or lines (based on settings) showing the high and low levels of each session.
Optionally displays accumulated volume at the highs and lows within the boxes.
Daily Lines and Last 3 Boxes:
How to Use the Indicator
Step 1: Add the Indicator to TradingView
Open TradingView and select the chart where you want to apply the indicator (e.g., UMG9OOR on a 5-minute timeframe, as shown in the screenshot).
Go to the Pine Editor (at the bottom of the TradingView interface).
Copy and paste the provided code.
Click Compile and then Add to Chart.
Step 2: Configure the Indicator
Click on the indicator name on the chart ("CYCLE") and select Settings (or double-click the name).
Adjust the options based on your needs:
Cycle Phases: Enable/disable phases (Accumulation, Manipulation, Distribution, Continuation/Reversal) and adjust their time slots if needed.
90-Minute Quarters: Enable/disable quarters (Q1-Q4).
Step 3: Interpret the Indicator
Identify Cycle Phases:
Observe the red boxes indicating the phases (Accumulation, Manipulation, etc.).
The high and low levels within each phase are potential support/resistance zones.
If volume is enabled, pay attention to the accumulated volume at highs and lows, as it may indicate the strength of those levels.
Use the 90-Minute Quarters (Q1-Q4):
The colored boxes (Q1-Q4) divide the day into 90-minute segments.
Each quarter shows the price range (high and low) during that period.
Use these boxes to identify price patterns within each quarter, such as breakouts or consolidations.
The labels (Q1, Q2, etc.) help you track time and anticipate potential moves in the next quarter.
Analyze Support and Resistance:
The high and low levels of each phase/quarter act as support and resistance.
Daily lines (if enabled) show key levels from the previous day, useful for planning entries/exits.
The "last 3 boxes below price" (if enabled) highlight potential support levels the price might target.
Avoid Manipulation:
During the Manipulation phase (0100-0700), be cautious of sharp moves or false breakouts.
Use the high/low levels of this phase to identify potential traps (as explained in your first question about manipulation candles).
Step 4: Trading Strategy
Entries and Exits:
Support/Resistance: Use the high/low levels of phases and quarters to set entry or exit points.
For example, if the price bounces off a Q1 support level, consider a buy.
Breakouts: If the price breaks a high/low of a quarter (e.g., Q2), wait for confirmation to enter in the direction of the breakout.
Volume: If accumulated volume is high near a key level, that level may be more significant.
Risk Management:
Place stop-loss orders below lows (for buys) or above highs (for sells) identified by the indicator.
Avoid trading during the Manipulation phase unless you have a specific strategy to handle false breakouts.
Time Context:
Use the quarters (Q1-Q4) to plan your trades based on time. For example, if Q3 is typically volatile in your market, prepare for larger moves between 03:00-04:30 UTC.
Step 5: Adjustments and Testing
Test on Different Timeframes: The indicator is set for a 5-minute timeframe (as in the screenshot), but you can test it on other timeframes (e.g., 1-minute, 15-minute) by adjusting the time slots if needed.
Adjust Colors and Styles: If the default colors are not visible on your chart, change them for better clarity.
---
📌 1. **Accumulation: Strong Institutional Activity**
- During the **accumulation phase, we see **high volume: 82.773K, which suggests strong buying interest**, likely from institutional players.
- This sets the base for the following upward move in price.
---
📌 2. **Manipulation: False Breakout with Lower Volume**
- Later, there's a manipulation phase where price breaks above previous highs, but the volume (71.814K) is **lower than during accumulation**.
- This implies that buyers are not as aggressive as before—no real demandbehind the breakout.
- It’s likely a bull trap, where smart money is selling into the breakout to exit their positions.
---
### 📌 3. Distribution: Weakness and Lack of Demand
- The market enters a distribution phase, and volume drops even further (only 7.914K).
- Price struggles to go higher, and you start seeing rejections at the top.
- This shows that demand is drying up, and smart money is offloading positions**—not accumulating anymore.
---
### 💡 Why Take the Short Here?
- Volume is not increasing with new highs—showing weak demand**.
- The manipulation volume is weaker than the accumulation volume, confirming the breakout was likely false.
- Structure starts to break down (Q levels falling), which confirms weakness.
- This creates a high-probability short setup:
- **Entry:** after confirmation of distribution and structural breakdown.
- **Stop loss:** above the manipulation high.
- **Target:** down toward previous lows or value zones.
---
### ✅ Conclusion
Since the manipulation volume failed to exceed the accumulation volume, the breakout lacked real strength. Combined with decreasing volume in the distribution phase, this indicates fading demand and supply taking control—which justifies entering a short position.






















