스크립트에서 "机械革命无界15+时不时闪屏"에 대해 찾기
15 Minute Gold Trend-Following StrategyThis is the main strategy that I will be forward testing on demo for a month or two, then making it an EA in MetaTrader4
You can see the code for yourself this time, all the strategy is, is a crossover of various moving averages.
Commission included, $10,000 account.
Results over the past 3 months, beginning in January 2017.
100+ BTC Tracker + 182-Day Dormant (6-Month HODL)Instantly see what the biggest Bitcoin whales are doing — and exactly how much of the supply has been completely untouched for 6 full months or longer (182+ days), the strictest and most respected definition of true HODLing.
What this indicator shows you in real time:
Number of wallets holding ≥100 BTC (~15,800 whales)
Total Bitcoin controlled by these whales (~3.25 million BTC)
6-Month Dormant Supply — Bitcoin that hasn’t moved in 182+ days (~14.1 million BTC)
6-Month Dormant % — What percentage of circulating supply is truly locked away
Why 182 days matters:
The 6-month threshold (≈182 days) is the industry-standard cutoff used by Glassnode, CryptoQuant, and analysts worldwide to define ultra-long-term holders. These are the coins least likely to ever hit exchanges — the ultimate measure of conviction and scarcity.
Key features:Live or fallback? — Instantly know if you’re seeing real-time on-chain data (green) or verified backup values (yellow)
Works on free accounts — No paid data subscription required (though it becomes even more accurate with Glassnode/CryptoQuant add-ons)
Clean, non-intrusive design — Three bold plots + sleek dark table in the top-right corner
Always up to date — Fallback values manually verified as of November 21, 2025
Perfect for:
Spotting whale accumulation/distribution phases
Tracking real Bitcoin scarcity during bull or bear markets
Confirming long-term holder conviction before big moves
Add it to any BTC chart and instantly understand who really controls Bitcoin — and how much of it is locked away forever by the strongest hands in crypto.
Scout Regiment - MACD# Scout Regiment - MACD Indicator
## English Documentation
### Overview
Scout Regiment - MACD is an advanced implementation of the Moving Average Convergence Divergence indicator with enhanced features including dual divergence detection (histogram and MACD line), customizable moving average types, multi-timeframe analysis, and sophisticated visual elements. This indicator provides traders with comprehensive momentum analysis and high-probability reversal signals.
### What is MACD?
MACD (Moving Average Convergence Divergence) is a trend-following momentum indicator that shows the relationship between two moving averages:
- **MACD Line**: Difference between fast and slow EMAs
- **Signal Line**: Moving average of the MACD line
- **Histogram**: Difference between MACD line and signal line
- **Purpose**: Identifies trend direction, momentum strength, and potential reversals
### Key Features
#### 1. **Enhanced MACD Display**
**Three Core Components:**
**MACD Line** (Default: Blue/Orange, 2px)
- Fast EMA (13) minus Slow EMA (34)
- Shows momentum direction
- Color changes based on position relative to signal line:
- Blue: Above signal line (bullish)
- Orange: Below signal line (bearish)
- Can be toggled on/off
**Signal Line** (Default: White/Blue with transparency, 2px)
- EMA (9) of the MACD line
- Serves as trigger line for crossover signals
- Color varies based on settings
- Essential for identifying entry/exit points
**Histogram** (Default: 4-color gradient, 4px columns)
- Difference between MACD and signal line
- Visual representation of momentum strength
- Advanced 4-color scheme:
- **Dark Green (#26A69A)**: Positive and increasing (strong bullish)
- **Light Green (#B2DFDB)**: Positive but decreasing (weakening bullish)
- **Dark Red (#FF5252)**: Negative and decreasing (strong bearish)
- **Light Red (#FFCDD2)**: Negative but increasing (weakening bearish)
- Histogram tells the "story" of momentum changes
#### 2. **Customizable Moving Average Types**
**Oscillator MA Type** (MACD Line calculation):
- **EMA** (Exponential) - Default, more responsive
- **SMA** (Simple) - Smoother, less responsive
**Signal Line MA Type**:
- **EMA** (Exponential) - Default, faster signals
- **SMA** (Simple) - Slower, fewer false signals
**Flexibility**: Mix and match for different trading styles
- EMA/EMA: Most responsive (day trading)
- SMA/SMA: Smoothest (swing trading)
- EMA/SMA or SMA/EMA: Balanced approaches
#### 3. **Multi-Timeframe Capability**
**Current Chart Period** (Default: Enabled)
- Uses current timeframe automatically
- Simplest option for most traders
**Custom Timeframe Selection**
- Calculate MACD on any timeframe
- Display higher timeframe MACD on lower timeframe charts
- Example: View 1H MACD on 15min chart
- **Use Case**: Align lower timeframe trades with higher timeframe momentum
#### 4. **Visual Enhancement Features**
**Golden Cross / Death Cross Markers**
- Circles mark crossover points
- Color matches MACD line color
- Clearly identifies entry/exit signals
- Can be toggled on/off
**Zero Line** (White, 2px solid)
- Reference for positive/negative momentum
- Critical level for trend identification
- MACD above zero = Bullish bias
- MACD below zero = Bearish bias
**Color Transitions**
- MACD line changes color at signal line crosses
- Histogram shows momentum acceleration/deceleration
- Provides early warning of trend changes
#### 5. **Dual Divergence Detection System**
This indicator features TWO separate divergence detection systems:
**A. Histogram Divergence Detection**
- **Purpose**: Earlier divergence signals (most sensitive)
- **Detects**: Regular bullish and bearish divergences
- **Label**: "H涨" (Histogram Up), "H跌" (Histogram Down)
- **Special Feature**: Same-sign requirement option
- Top divergence: Both histogram points must be positive
- Bottom divergence: Both histogram points must be negative
- Filters out less reliable divergences
**B. MACD Line Divergence Detection**
- **Purpose**: Stronger, more reliable divergences
- **Detects**: Regular bullish and bearish divergences
- **Label**: "M涨" (MACD Up), "M跌" (MACD Down)
- **Use**: Confirmation of histogram divergences or standalone
**Divergence Types Explained:**
**Regular Bullish Divergence (Yellow)**
- **Price**: Lower lows
- **Indicator**: Higher lows (histogram OR MACD line)
- **Signal**: Potential upward reversal
- **Best**: Near support levels, oversold conditions
- **Entry**: After price breaks above recent resistance
**Regular Bearish Divergence (Blue)**
- **Price**: Higher highs
- **Indicator**: Lower highs (histogram OR MACD line)
- **Signal**: Potential downward reversal
- **Best**: Near resistance levels, overbought conditions
- **Entry**: After price breaks below recent support
#### 6. **Advanced Divergence Parameters**
**Histogram Divergence Settings:**
- **Price Reference**: Wicks (default) or Bodies
- **Right Lookback**: Bars to right of pivot (default: 2)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between divergences (default: 60)
- **Min Range**: Minimum bars between divergences (default: 5)
- **Same Sign Requirement**: Ensures both histogram points have same sign
- **Show Regular Divergence**: Toggle display
- **Show Labels**: Toggle divergence labels
**MACD Line Divergence Settings:**
- **Price Reference**: Wicks (default) or Bodies
- **Right Lookback**: Bars to right of pivot (default: 1)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between divergences (default: 60)
- **Min Range**: Minimum bars between divergences (default: 5)
- **Show Regular Divergence**: Toggle display
- **Show Labels**: Toggle divergence labels
**Independent Control**: Adjust histogram and MACD line divergences separately
### Configuration Settings
#### MACD Basic Settings
- **Fast EMA Period**: Fast moving average length (default: 13)
- **Slow EMA Period**: Slow moving average length (default: 34)
- **Signal Line Period**: Signal line length (default: 9)
- **Use Current Chart Period**: Auto-adjust to current timeframe
- **Select Period**: Choose custom timeframe
- **Show MACD & Signal Lines**: Toggle lines display
- **Show Cross Markers**: Toggle golden/death cross dots
- **Show Histogram**: Toggle histogram display
- **Show Crossover Color Change**: Enable MACD line color change
- **Show Histogram Colors**: Enable 4-color histogram scheme
- **Oscillator MA Type**: Choose SMA or EMA for MACD
- **Signal Line MA Type**: Choose SMA or EMA for signal
#### Histogram Divergence Settings
- **Show Histogram Divergence**: Enable histogram divergence detection
- **Price Reference**: Wicks or Bodies for price comparison
- **Right/Left Lookback**: Pivot detection parameters
- **Max/Min Range**: Distance constraints between pivots
- **Show Regular Divergence**: Display histogram divergence lines
- **Show Labels**: Display histogram divergence labels
- **Require Same Sign**: Enforce histogram sign consistency
#### MACD Line Divergence Settings
- **Show MACD Line Divergence**: Enable MACD line divergence detection
- **Price Reference**: Wicks or Bodies for price comparison
- **Right/Left Lookback**: Pivot detection parameters
- **Max/Min Range**: Distance constraints between pivots
- **Show Regular Divergence**: Display MACD line divergence lines
- **Show Labels**: Display MACD line divergence labels
### How to Use
#### For Basic Trend Following
1. **Enable Core Components**
- MACD line, signal line, and histogram
- Enable cross markers
2. **Identify Trend**
- MACD above zero = Uptrend
- MACD below zero = Downtrend
3. **Watch for Crossovers**
- Golden cross (MACD crosses above signal) = Buy signal
- Death cross (MACD crosses below signal) = Sell signal
4. **Confirm with Histogram**
- Increasing histogram = Strengthening trend
- Decreasing histogram = Weakening trend
#### For Divergence Trading
1. **Enable Both Divergence Systems**
- Histogram divergence (early signals)
- MACD line divergence (confirmation)
2. **Wait for Divergence Signals**
- "H涨" or "H跌" = Early warning
- "M涨" or "M跌" = Confirmation
3. **Best Divergences**
- Both histogram AND MACD line showing divergence
- Divergence at key support/resistance levels
- Multiple divergences on same trend
4. **Entry Timing**
- Wait for price structure break
- Enter on pullback after confirmation
- Use MACD crossover as trigger
#### For Multi-Timeframe Analysis
1. **Set Higher Timeframe**
- Example: 4H MACD on 1H chart
- Uncheck "Use Current Chart Period"
- Select desired timeframe
2. **Identify Higher TF Trend**
- MACD position relative to zero
- MACD vs signal line relationship
3. **Trade with HTF Direction**
- Only take long signals if HTF MACD bullish
- Only take short signals if HTF MACD bearish
4. **Use Current TF for Entries**
- Higher TF for bias
- Current TF for precise timing
#### For Histogram Analysis
1. **Enable 4-Color Histogram**
- Watch color transitions
- Dark colors = Strong momentum
- Light colors = Weakening momentum
2. **Momentum Stages**
- Dark green → Light green = Bullish losing steam
- Light red → Dark red = Bearish gaining strength
3. **Trade Transitions**
- Light green to light red = Momentum shift (potential reversal)
- Entry on confirmation crossover
### Trading Strategies
#### Strategy 1: Classic MACD Crossover
**Setup:**
- Standard settings (13/34/9)
- Enable MACD, signal line, and cross markers
- Clear trend on higher timeframe
**Entry:**
- **Long**: Golden cross (circle marker) above zero line
- **Short**: Death cross (circle marker) below zero line
**Confirmation:**
- Histogram color supporting direction
- Volume increase helps
**Stop Loss:**
- Below recent swing low (long)
- Above recent swing high (short)
**Exit:**
- Opposite crossover
- MACD crosses zero line against position
**Best For:** Trend following, clear trending markets
#### Strategy 2: Zero Line Bounce
**Setup:**
- Enable all components
- Established trend (MACD staying one side of zero)
- Wait for pullback to zero line
**Entry:**
- **Long**: MACD touches zero from above, bounces up with golden cross
- **Short**: MACD touches zero from below, bounces down with death cross
**Confirmation:**
- Histogram color change
- Price at support/resistance
**Stop Loss:**
- Just beyond zero line (opposite side)
**Exit:**
- Target previous extreme
- Or opposite crossover
**Best For:** Trend continuation, strong markets
#### Strategy 3: Dual Divergence Confirmation
**Setup:**
- Enable both histogram and MACD line divergences
- Price at extreme (high/low)
- Wait for divergence signals
**Entry:**
- **Long**: Both "H涨" AND "M涨" labels appear
- **Short**: Both "H跌" AND "M跌" labels appear
**Confirmation:**
- Price breaks structure
- Volume increase
- Golden/death cross confirms
**Stop Loss:**
- Beyond divergence pivot point
**Exit:**
- MACD crosses zero line
- Or opposite divergence appears
**Best For:** Reversal trading, swing trading
#### Strategy 4: Histogram Color Transition
**Setup:**
- Enable 4-color histogram
- Focus on color changes
- Price in trend
**Entry:**
- **Long**: Light red → Light green transition + golden cross
- **Short**: Light green → Light red transition + death cross
**Rationale:**
- Light colors show momentum exhaustion
- Color flip = momentum shift
- Early entry before full trend reversal
**Stop Loss:**
- Recent swing point
**Exit:**
- Histogram color turns light against position
- Or at predetermined target
**Best For:** Scalping, day trading, early entries
#### Strategy 5: Multi-Timeframe Momentum
**Setup:**
- Display higher timeframe MACD (e.g., 4H on 1H chart)
- Current chart shows current momentum
- Higher TF shows overall bias
**Entry:**
- **Long**: HTF MACD above zero + current TF golden cross
- **Short**: HTF MACD below zero + current TF death cross
**Confirmation:**
- HTF histogram supporting direction
- Both timeframes aligned
**Stop Loss:**
- Based on current timeframe structure
**Exit:**
- Current TF opposite crossover
- Or HTF MACD momentum weakens
**Best For:** Swing trading, high-probability setups
#### Strategy 6: Histogram-Only Divergence Scout
**Setup:**
- Enable only histogram divergence
- Use "same sign requirement"
- Focus on early signals
**Entry:**
- **Long**: "H涨" label + price at support
- **Short**: "H跌" label + price at resistance
**Confirmation:**
- Wait for MACD/signal crossover
- Or price structure break
**Advantage:**
- Earliest divergence signals
- Get in before crowd
**Risk:**
- More false signals than MACD line divergence
- Requires strict confirmation
**Stop Loss:**
- Tight stop beyond entry bar
**Exit:**
- Quick targets (30-50% of expected move)
- Or trail stop
**Best For:** Active traders, scalpers seeking early entries
### Best Practices
#### MACD Period Selection
**Standard (13/34/9)** - Default
- Balanced for most markets
- Good for day trading and swing trading
- Widely used, works with general market psychology
**Faster (8/21/5 or 12/26/9)**
- More responsive
- More signals, more noise
- Best for: Scalping, volatile markets
- Risk: More false signals
**Slower (21/55/13)**
- Smoother signals
- Fewer but stronger signals
- Best for: Swing trading, position trading
- Benefit: Higher reliability
#### Histogram vs MACD Line Divergences
**Histogram Divergence:**
- ✅ Earlier signals
- ✅ Catch moves before others
- ❌ More false signals
- ❌ Requires confirmation
- **Best for**: Active traders, scalpers
**MACD Line Divergence:**
- ✅ More reliable
- ✅ Stronger divergences
- ❌ Later signals
- ❌ May miss early moves
- **Best for**: Swing traders, conservative traders
**Both Together:**
- ✅ Maximum confidence
- ✅ Histogram for alert, MACD for confirmation
- ✅ Highest probability setups
- **Best for**: All traders seeking quality over quantity
#### Same Sign Requirement Feature
**Enabled (Recommended):**
- Filters low-quality divergences
- Top divergence: Both histogram points positive
- Bottom divergence: Both histogram points negative
- Results in fewer but more reliable signals
**Disabled:**
- More divergence signals
- Includes zero-line crossing divergences
- Higher false signal rate
- Only for experienced traders
#### Price Reference: Wicks vs Bodies
**Wicks (Default):**
- Uses high/low prices
- Catches all extremes
- More divergences detected
- Best for: Most trading styles
**Bodies:**
- Uses open/close prices
- Filters out spike movements
- Fewer but cleaner divergences
- Best for: Noisy markets, crypto
#### Visual Settings Recommendations
**For Beginners:**
- Enable: MACD line, signal line, histogram
- Enable: Cross markers
- Enable: Histogram colors
- Disable: Both divergence systems initially
- Focus: Learn basic crossovers first
**For Intermediate:**
- All basic components
- Add: Histogram divergence only
- Use: Same sign requirement
- Focus: Early reversal signals
**For Advanced:**
- All components
- Both divergence systems
- Custom parameters per market
- Multi-timeframe analysis
- Focus: High-probability confluence setups
### Indicator Combinations
**With Moving Averages (EMAs):**
- EMAs (21/55/144) show trend
- MACD shows momentum
- Enter when both align
- Exit when MACD turns first
**With RSI:**
- RSI for overbought/oversold
- MACD for momentum confirmation
- Divergence on both = Extremely strong signal
- RSI + MACD divergence = High probability trade
**With Volume:**
- Volume confirms MACD signals
- Crossover + volume spike = Valid breakout
- Divergence + volume divergence = Strong reversal
**With Support/Resistance:**
- S/R levels for entry/exit targets
- MACD divergence at levels = Highest probability
- MACD crossover at level = Strong confirmation
**With Bias Indicator:**
- Bias shows price deviation from EMA
- MACD shows momentum
- Both diverging = Powerful reversal signal
- Bias extreme + MACD divergence = High conviction trade
**With OBV:**
- OBV shows volume trend
- MACD shows price momentum
- OBV + MACD divergence = Volume not supporting price
- Strong reversal indication
**With KSI (RSI/CCI):**
- KSI for oscillator extremes
- MACD for momentum direction
- KSI extreme + MACD divergence = Reversal likely
- All aligned = Maximum confidence
### Common MACD Patterns
1. **Bullish Cross Above Zero**: Strong uptrend continuation signal
2. **Bearish Cross Below Zero**: Strong downtrend continuation signal
3. **Zero Line Rejection**: Price respects zero as support/resistance
4. **Histogram Peak**: Momentum climax, watch for reversal
5. **Double Divergence**: Two divergences without reversal = Very strong signal when it finally reverses
6. **Histogram Convergence**: Histogram narrowing = Trend losing steam
7. **Signal Line Hug**: MACD stays close to signal = Consolidation, expect breakout
### Performance Tips
- Start with default settings (13/34/9 EMA/EMA)
- Test one divergence system at a time
- Use same sign requirement initially
- Enable cross markers for clear signals
- Adjust lookback parameters per market volatility
- Higher timeframe MACD more reliable than lower
- Combine histogram early signal with MACD line confirmation
- Don't trade every divergence - wait for best setups
### Alert Conditions
While not explicitly coded, you can set custom alerts on:
- MACD crossing above/below signal line
- MACD crossing above/below zero line
- Histogram crossing zero
- When divergence labels appear (using visual alerts)
---
## 中文说明文档
### 概述
Scout Regiment - MACD 是移动平均线收敛发散指标的高级实现版本,具有增强功能,包括双重背离检测(直方图和MACD线)、可自定义的移动平均类型、多时间框架分析和复杂的视觉元素。该指标为交易者提供全面的动量分析和高概率反转信号。
### 什么是MACD?
MACD(移动平均线收敛发散)是一个趋势跟随动量指标,显示两条移动平均线之间的关系:
- **MACD线**:快速和慢速EMA之间的差值
- **信号线**:MACD线的移动平均
- **直方图**:MACD线和信号线之间的差值
- **用途**:识别趋势方向、动量强度和潜在反转
### 核心功能
#### 1. **增强的MACD显示**
**三个核心组件:**
**MACD线**(默认:蓝色/橙色,2像素)
- 快速EMA(13)减去慢速EMA(34)
- 显示动量方向
- 根据相对于信号线的位置改变颜色:
- 蓝色:信号线上方(看涨)
- 橙色:信号线下方(看跌)
- 可开关显示
**信号线**(默认:白色/蓝色带透明度,2像素)
- MACD线的EMA(9)
- 作为交叉信号的触发线
- 颜色根据设置变化
- 识别进出场点的关键
**直方图**(默认:4色渐变,4像素柱)
- MACD和信号线之间的差值
- 动量强度的视觉表示
- 高级4色方案:
- **深绿色(#26A69A)**:正值且增加(强劲看涨)
- **浅绿色(#B2DFDB)**:正值但减少(看涨减弱)
- **深红色(#FF5252)**:负值且减少(强劲看跌)
- **浅红色(#FFCDD2)**:负值但增加(看跌减弱)
- 直方图讲述动量变化的"故事"
#### 2. **可自定义的移动平均类型**
**振荡器MA类型**(MACD线计算):
- **EMA**(指数)- 默认,反应更快
- **SMA**(简单)- 更平滑,反应较慢
**信号线MA类型**:
- **EMA**(指数)- 默认,更快信号
- **SMA**(简单)- 更慢,假信号更少
**灵活性**:混合搭配以适应不同交易风格
- EMA/EMA:最灵敏(日内交易)
- SMA/SMA:最平滑(波段交易)
- EMA/SMA或SMA/EMA:平衡方法
#### 3. **多时间框架功能**
**当前图表周期**(默认:启用)
- 自动使用当前时间框架
- 大多数交易者的最简单选项
**自定义时间框架选择**
- 在任何时间框架上计算MACD
- 在低时间框架图表上显示高时间框架MACD
- 示例:在15分钟图上查看1小时MACD
- **使用场景**:使低时间框架交易与高时间框架动量保持一致
#### 4. **视觉增强功能**
**金叉/死叉标记**
- 圆点标记交叉点
- 颜色与MACD线颜色匹配
- 清晰识别进出场信号
- 可开关
**零线**(白色,2像素实线)
- 正负动量的参考
- 趋势识别的关键水平
- MACD在零线上方 = 看涨偏向
- MACD在零线下方 = 看跌偏向
**颜色转换**
- MACD线在信号线交叉处改变颜色
- 直方图显示动量加速/减速
- 提供趋势变化的早期警告
#### 5. **双重背离检测系统**
该指标具有两个独立的背离检测系统:
**A. 直方图背离检测**
- **用途**:更早的背离信号(最敏感)
- **检测**:常规看涨和看跌背离
- **标签**:"H涨"(直方图上涨)、"H跌"(直方图下跌)
- **特殊功能**:同符号要求选项
- 顶背离:两个直方图点都必须为正
- 底背离:两个直方图点都必须为负
- 过滤不太可靠的背离
**B. MACD线背离检测**
- **用途**:更强、更可靠的背离
- **检测**:常规看涨和看跌背离
- **标签**:"M涨"(MACD上涨)、"M跌"(MACD下跌)
- **用途**:确认直方图背离或独立使用
**背离类型说明:**
**常规看涨背离(黄色)**
- **价格**:更低的低点
- **指标**:更高的低点(直方图或MACD线)
- **信号**:潜在向上反转
- **最佳**:在支撑水平附近、超卖状况
- **入场**:价格突破近期阻力后
**常规看跌背离(蓝色)**
- **价格**:更高的高点
- **指标**:更低的高点(直方图或MACD线)
- **信号**:潜在向下反转
- **最佳**:在阻力水平附近、超买状况
- **入场**:价格跌破近期支撑后
#### 6. **高级背离参数**
**直方图背离设置:**
- **价格参考**:影线(默认)或实体
- **右侧回溯**:枢轴点右侧K线数(默认:2)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:背离之间最大K线数(默认:60)
- **最小范围**:背离之间最小K线数(默认:5)
- **同符号要求**:确保两个直方图点符号相同
- **显示常规背离**:切换显示
- **显示标签**:切换背离标签
**MACD线背离设置:**
- **价格参考**:影线(默认)或实体
- **右侧回溯**:枢轴点右侧K线数(默认:1)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:背离之间最大K线数(默认:60)
- **最小范围**:背离之间最小K线数(默认:5)
- **显示常规背离**:切换显示
- **显示标签**:切换背离标签
**独立控制**:分别调整直方图和MACD线背离
### 配置设置
#### MACD基础设置
- **快速EMA周期**:快速移动平均长度(默认:13)
- **慢速EMA周期**:慢速移动平均长度(默认:34)
- **信号线周期**:信号线长度(默认:9)
- **使用当前图表周期**:自动调整到当前时间框架
- **选择周期**:选择自定义时间框架
- **显示MACD线和信号线**:切换线条显示
- **显示金叉死叉圆点标记**:切换金叉/死叉圆点
- **显示直方图**:切换直方图显示
- **显示穿越变化MACD线**:启用MACD线颜色变化
- **显示直方图颜色**:启用4色直方图方案
- **振荡器MA类型**:为MACD选择SMA或EMA
- **信号线MA类型**:为信号线选择SMA或EMA
#### 直方图背离设置
- **显示直方图背离信号**:启用直方图背离检测
- **价格参考**:影线或实体用于价格比较
- **右侧/左侧回溯**:枢轴检测参数
- **最大/最小范围**:枢轴之间的距离约束
- **显示直方图常规背离**:显示直方图背离线
- **显示直方图常规背离标签**:显示直方图背离标签
- **要求背离点柱状图同符号**:强制直方图符号一致性
#### MACD线背离设置
- **显示MACD线背离信号**:启用MACD线背离检测
- **价格参考**:影线或实体用于价格比较
- **右侧/左侧回溯**:枢轴检测参数
- **最大/最小范围**:枢轴之间的距离约束
- **显示线常规背离**:显示MACD线背离线
- **显示线常规背离标签**:显示MACD线背离标签
### 使用方法
#### 基础趋势跟随
1. **启用核心组件**
- MACD线、信号线和直方图
- 启用交叉标记
2. **识别趋势**
- MACD在零线上方 = 上升趋势
- MACD在零线下方 = 下降趋势
3. **观察交叉**
- 金叉(MACD向上穿越信号线)= 买入信号
- 死叉(MACD向下穿越信号线)= 卖出信号
4. **用直方图确认**
- 直方图增加 = 趋势加强
- 直方图减少 = 趋势减弱
#### 背离交易
1. **启用两个背离系统**
- 直方图背离(早期信号)
- MACD线背离(确认)
2. **等待背离信号**
- "H涨"或"H跌" = 早期警告
- "M涨"或"M跌" = 确认
3. **最佳背离**
- 直方图和MACD线都显示背离
- 在关键支撑/阻力水平的背离
- 同一趋势上多个背离
4. **入场时机**
- 等待价格结构突破
- 确认后回调时进入
- 使用MACD交叉作为触发
#### 多时间框架分析
1. **设置更高时间框架**
- 示例:在1小时图上显示4小时MACD
- 取消勾选"使用当前图表周期"
- 选择所需时间框架
2. **识别更高TF趋势**
- MACD相对于零线的位置
- MACD与信号线的关系
3. **顺HTF方向交易**
- 仅在HTF MACD看涨时接受多头信号
- 仅在HTF MACD看跌时接受空头信号
4. **使用当前TF入场**
- 更高TF确定偏向
- 当前TF精确定时
#### 直方图分析
1. **启用4色直方图**
- 观察颜色转换
- 深色 = 强动量
- 浅色 = 动量减弱
2. **动量阶段**
- 深绿色→浅绿色 = 看涨失去动力
- 浅红色→深红色 = 看跌获得力量
3. **交易转换**
- 浅绿色到浅红色 = 动量转变(潜在反转)
- 确认交叉时入场
### 交易策略
#### 策略1:经典MACD交叉
**设置:**
- 标准设置(13/34/9)
- 启用MACD、信号线和交叉标记
- 更高时间框架明确趋势
**入场:**
- **多头**:零线上方金叉(圆点标记)
- **空头**:零线下方死叉(圆点标记)
**确认:**
- 直方图颜色支持方向
- 成交量增加有帮助
**止损:**
- 近期波动低点之下(多头)
- 近期波动高点之上(空头)
**离场:**
- 相反交叉
- MACD反向穿越零线
**适合:**趋势跟随、明确趋势市场
#### 策略2:零线反弹
**设置:**
- 启用所有组件
- 已建立趋势(MACD保持在零线一侧)
- 等待回调至零线
**入场:**
- **多头**:MACD从上方触及零线,向上反弹并金叉
- **空头**:MACD从下方触及零线,向下反弹并死叉
**确认:**
- 直方图颜色变化
- 价格在支撑/阻力位
**止损:**
- 零线对面一侧
**离场:**
- 目标前一极值
- 或相反交叉
**适合:**趋势延续、强势市场
#### 策略3:双重背离确认
**设置:**
- 启用直方图和MACD线背离
- 价格在极值(高点/低点)
- 等待背离信号
**入场:**
- **多头**:"H涨"和"M涨"标签都出现
- **空头**:"H跌"和"M跌"标签都出现
**确认:**
- 价格突破结构
- 成交量增加
- 金叉/死叉确认
**止损:**
- 背离枢轴点之外
**离场:**
- MACD穿越零线
- 或出现相反背离
**适合:**反转交易、波段交易
#### 策略4:直方图颜色转换
**设置:**
- 启用4色直方图
- 关注颜色变化
- 价格处于趋势
**入场:**
- **多头**:浅红色→浅绿色转换 + 金叉
- **空头**:浅绿色→浅红色转换 + 死叉
**原理:**
- 浅色显示动量衰竭
- 颜色翻转 = 动量转变
- 完全趋势反转前的早期入场
**止损:**
- 近期波动点
**离场:**
- 直方图颜色变为反向浅色
- 或预定目标
**适合:**剥头皮、日内交易、早期入场
#### 策略5:多时间框架动量
**设置:**
- 显示更高时间框架MACD(例如,在1小时图上显示4小时)
- 当前图表显示当前动量
- 更高TF显示整体偏向
**入场:**
- **多头**:HTF MACD在零线上方 + 当前TF金叉
- **空头**:HTF MACD在零线下方 + 当前TF死叉
**确认:**
- HTF直方图支持方向
- 两个时间框架对齐
**止损:**
- 基于当前时间框架结构
**离场:**
- 当前TF相反交叉
- 或HTF MACD动量减弱
**适合:**波段交易、高概率设置
#### 策略6:仅直方图背离侦察
**设置:**
- 仅启用直方图背离
- 使用"同符号要求"
- 关注早期信号
**入场:**
- **多头**:"H涨"标签 + 价格在支撑位
- **空头**:"H跌"标签 + 价格在阻力位
**确认:**
- 等待MACD/信号线交叉
- 或价格结构突破
**优势:**
- 最早的背离信号
- 在大众之前进入
**风险:**
- 比MACD线背离假信号更多
- 需要严格确认
**止损:**
- 入场K线之外紧密止损
**离场:**
- 快速目标(预期波动的30-50%)
- 或移动止损
**适合:**活跃交易者、寻求早期入场的剥头皮交易者
### 最佳实践
#### MACD周期选择
**标准(13/34/9)** - 默认
- 大多数市场的平衡
- 适合日内交易和波段交易
- 广泛使用,符合一般市场心理
**更快(8/21/5或12/26/9)**
- 更灵敏
- 更多信号,更多噪音
- 最适合:剥头皮、波动市场
- 风险:更多假信号
**更慢(21/55/13)**
- 更平滑的信号
- 信号较少但更强
- 最适合:波段交易、仓位交易
- 优势:更高可靠性
#### 直方图vs MACD线背离
**直方图背离:**
- ✅ 更早信号
- ✅ 在其他人之前捕捉波动
- ❌ 更多假信号
- ❌ 需要确认
- **最适合**:活跃交易者、剥头皮交易者
**MACD线背离:**
- ✅ 更可靠
- ✅ 更强的背离
- ❌ 信号较晚
- ❌ 可能错过早期波动
- **最适合**:波段交易者、保守交易者
**两者结合:**
- ✅ 最大信心
- ✅ 直方图警报,MACD确认
- ✅ 最高概率设置
- **最适合**:所有寻求质量而非数量的交易者
#### 同符号要求功能
**启用(推荐):**
- 过滤低质量背离
- 顶背离:两个直方图点都为正
- 底背离:两个直方图点都为负
- 产生更少但更可靠的信号
**禁用:**
- 更多背离信号
- 包括零线穿越背离
- 假信号率更高
- 仅适合有经验的交易者
#### 价格参考:影线vs实体
**影线(默认):**
- 使用最高/最低价
- 捕捉所有极值
- 检测到更多背离
- 最适合:大多数交易风格
**实体:**
- 使用开盘/收盘价
- 过滤突刺波动
- 背离更少但更干净
- 最适合:噪音市场、加密货币
#### 视觉设置建议
**新手:**
- 启用:MACD线、信号线、直方图
- 启用:交叉标记
- 启用:直方图颜色
- 禁用:初始禁用两个背离系统
- 重点:先学习基本交叉
**中级:**
- 所有基本组件
- 添加:仅直方图背离
- 使用:同符号要求
- 重点:早期反转信号
**高级:**
- 所有组件
- 两个背离系统
- 每个市场自定义参数
- 多时间框架分析
- 重点:高概率汇合设置
### 指标组合
**与移动平均线(EMA)配合:**
- EMA(21/55/144)显示趋势
- MACD显示动量
- 两者一致时进入
- MACD先转向时退出
**与RSI配合:**
- RSI用于超买超卖
- MACD用于动量确认
- 两者都背离 = 极强信号
- RSI + MACD背离 = 高概率交易
**与成交量配合:**
- 成交量确认MACD信号
- 交叉 + 成交量激增 = 有效突破
- 背离 + 成交量背离 = 强反转
**与支撑/阻力配合:**
- 支撑阻力水平用于进出目标
- 水平处的MACD背离 = 最高概率
- 水平处的MACD交叉 = 强确认
**与Bias指标配合:**
- Bias显示价格相对EMA的偏离
- MACD显示动量
- 两者都背离 = 强大反转信号
- Bias极值 + MACD背离 = 高信念交易
**与OBV配合:**
- OBV显示成交量趋势
- MACD显示价格动量
- OBV + MACD背离 = 成交量不支持价格
- 强反转迹象
**与KSI(RSI/CCI)配合:**
- KSI用于振荡器极值
- MACD用于动量方向
- KSI极值 + MACD背离 = 可能反转
- 全部对齐 = 最大信心
### 常见MACD形态
1. **零线上方看涨交叉**:强上升趋势延续信号
2. **零线下方看跌交叉**:强下降趋势延续信号
3. **零线拒绝**:价格将零线作为支撑/阻力
4. **直方图峰值**:动量高潮,注意反转
5. **双重背离**:两次背离未反转 = 最终反转时非常强
6. **直方图收敛**:直方图变窄 = 趋势失去动力
7. **信号线紧贴**:MACD紧贴信号线 = 盘整,预期突破
### 性能提示
- 从默认设置开始(13/34/9 EMA/EMA)
- 一次测试一个背离系统
- 初始使用同符号要求
- 启用交叉标记以获得清晰信号
- 根据市场波动性调整回溯参数
- 更高时间框架MACD比更低的更可靠
- 结合直方图早期信号与MACD线确认
- 不要交易每个背离 - 等待最佳设置
### 警报条件
虽然没有明确编码,但您可以设置自定义警报:
- MACD向上/向下穿越信号线
- MACD向上/向下穿越零线
- 直方图穿越零线
- 背离标签出现时(使用视觉警报)
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
Scout Regiment - KSI# Scout Regiment - KSI Indicator
## English Documentation
### Overview
Scout Regiment - KSI (Key Stochastic Indicators) is a comprehensive momentum oscillator that combines three powerful technical indicators - RSI, CCI, and Williams %R - into a single, unified display. This multi-indicator approach provides traders with diverse perspectives on market momentum, overbought/oversold conditions, and potential reversal points through advanced divergence detection.
### What is KSI?
KSI stands for "Key Stochastic Indicators" - a composite momentum indicator that:
- Displays multiple oscillators normalized to a 0-100 scale
- Uses standardized bands (20/50/80) for consistent interpretation
- Combines RSI for trend, CCI for cycle, and Williams %R for reversal detection
- Provides enhanced divergence detection specifically for RSI
### Key Features
#### 1. **Triple Oscillator System**
**① RSI (Relative Strength Index)** - Primary Indicator
- **Purpose**: Measures momentum and identifies overbought/oversold conditions
- **Default Length**: 22 periods
- **Display**: Blue line (2px)
- **Key Levels**:
- Above 50: Bullish momentum
- Below 50: Bearish momentum
- Above 80: Overbought
- Below 20: Oversold
- **Special Features**:
- Background color indication (green/red)
- Crossover labels at 50 level
- Full divergence detection (4 types)
**② CCI (Commodity Channel Index)** - Dual Period
- **Purpose**: Identifies cyclical trends and extreme conditions
- **Dual Display**:
- CCI(33): Short-term cycle - Green line (1px)
- CCI(77): Medium-term cycle - Orange line (1px)
- **Default Source**: HLC3 (typical price)
- **Normalized Scale**: Mapped from ±100 to 0-100 for consistency
- **Interpretation**:
- Above 80: Strong upward momentum
- Below 20: Strong downward momentum
- 50 level: Neutral
- Divergence between periods: Trend change warning
**③ Williams %R** - Optional
- **Purpose**: Identifies overbought/oversold extremes
- **Default Length**: 28 periods
- **Display**: Magenta line (2px)
- **Scale**: Inverted and normalized to 0-100
- **Best For**: Short-term reversal signals
- **Default**: Disabled (enable when needed for extra confirmation)
#### 2. **Standardized Band System**
**Three-Level Structure:**
- **Upper Band (80)**: Overbought zone
- Strong momentum area
- Watch for reversal signals
- Divergences here are most reliable
- **Middle Line (50)**: Equilibrium
- Separates bullish/bearish zones
- Crossovers indicate momentum shifts
- Key decision level
- **Lower Band (20)**: Oversold zone
- Weak momentum area
- Look for bounce signals
- Divergences here signal potential reversals
**Band Fill**: Dark background between 20-80 for visual clarity
#### 3. **RSI Visual Enhancements**
**Background Color Indication**
- Green background: RSI above 50 (bullish bias)
- Red background: RSI below 50 (bearish bias)
- Optional display for cleaner charts
- Helps identify overall momentum direction
**Crossover Labels**
- "突破" (Breakout): RSI crosses above 50
- "跌破" (Breakdown): RSI crosses below 50
- Marks momentum shift points
- Can be toggled on/off
#### 4. **Advanced RSI Divergence Detection**
The indicator includes comprehensive divergence detection for RSI only (most reliable oscillator):
**Regular Bullish Divergence (Yellow)**
- **Price**: Lower lows
- **RSI**: Higher lows
- **Signal**: Potential upward reversal
- **Label**: "涨" (Up)
- **Most Common**: Near oversold levels (below 30)
**Regular Bearish Divergence (Blue)**
- **Price**: Higher highs
- **RSI**: Lower highs
- **Signal**: Potential downward reversal
- **Label**: "跌" (Down)
- **Most Common**: Near overbought levels (above 70)
**Hidden Bullish Divergence (Light Yellow)**
- **Price**: Higher lows
- **RSI**: Lower lows
- **Signal**: Uptrend continuation
- **Label**: "隐涨" (Hidden Up)
- **Use**: Add to existing longs
**Hidden Bearish Divergence (Light Blue)**
- **Price**: Lower highs
- **RSI**: Higher highs
- **Signal**: Downtrend continuation
- **Label**: "隐跌" (Hidden Down)
- **Use**: Add to existing shorts
**Divergence Parameters** (Fully Customizable):
- **Right Lookback**: Bars to right of pivot (default: 5)
- **Left Lookback**: Bars to left of pivot (default: 5)
- **Max Range**: Maximum bars between pivots (default: 60)
- **Min Range**: Minimum bars between pivots (default: 5)
### Configuration Settings
#### KSI Display Settings
- **Show RSI**: Toggle RSI indicator
- **Show CCI**: Toggle both CCI lines
- **Show Williams %R**: Toggle Williams %R (optional)
#### RSI Settings
- **RSI Length**: Period for calculation (default: 22)
- **Data Source**: Price source (default: close)
- **Show Background**: Toggle green/red background
- **Show Cross Labels**: Toggle 50-level crossover labels
#### RSI Divergence Settings
- **Right Lookback**: Pivot detection right side
- **Left Lookback**: Pivot detection left side
- **Max Range**: Maximum lookback distance
- **Min Range**: Minimum lookback distance
- **Show Regular Divergence**: Enable regular divergence lines
- **Show Regular Labels**: Enable regular divergence labels
- **Show Hidden Divergence**: Enable hidden divergence lines
- **Show Hidden Labels**: Enable hidden divergence labels
#### CCI Settings
- **CCI Length**: Short-term period (default: 33)
- **CCI Mid Length**: Medium-term period (default: 77)
- **Data Source**: Price calculation (default: HLC3)
- **Show CCI(33)**: Toggle short-term CCI
- **Show CCI(77)**: Toggle medium-term CCI
#### Williams %R Settings
- **Length**: Calculation period (default: 28)
- **Data Source**: Price source (default: close)
### How to Use
#### For Basic Momentum Trading
1. **Enable RSI Only** (primary indicator)
- Focus on 50-level crossovers
- Enable crossover labels for signals
2. **Identify Momentum Direction**
- RSI > 50 = Bullish momentum
- RSI < 50 = Bearish momentum
- Background color confirms direction
3. **Look for Extremes**
- RSI > 80 = Overbought (consider selling)
- RSI < 20 = Oversold (consider buying)
4. **Trade Setup**
- Enter long when RSI crosses above 50 from oversold
- Enter short when RSI crosses below 50 from overbought
#### For Divergence Trading
1. **Enable RSI with Divergence Detection**
- Turn on regular divergence
- Optionally add hidden divergence
2. **Wait for Divergence Signal**
- Yellow label = Bullish divergence
- Blue label = Bearish divergence
3. **Confirm with Price Structure**
- Wait for support/resistance break
- Look for candlestick patterns
- Check volume confirmation
4. **Enter Position**
- Enter after confirmation
- Stop beyond divergence pivot
- Target next key level
#### For Multi-Oscillator Confirmation
1. **Enable All Three Indicators**
- RSI (momentum)
- CCI dual (cycle analysis)
- Williams %R (extremes)
2. **Look for Alignment**
- All above 50 = Strong bullish
- All below 50 = Strong bearish
- Mixed signals = Consolidation
3. **Identify Extremes**
- All indicators > 80 = Extreme overbought
- All indicators < 20 = Extreme oversold
4. **Trade Reversals**
- Enter counter-trend when all aligned at extremes
- Confirm with divergence if available
- Use tight stops
#### For CCI Dual-Period Analysis
1. **Enable Both CCI Lines**
- CCI(33) = Short-term
- CCI(77) = Medium-term
2. **Watch for Crossovers**
- Green crosses above orange = Bullish acceleration
- Green crosses below orange = Bearish acceleration
3. **Analyze Divergence Between Periods**
- Short-term rising, medium falling = Potential reversal
- Both rising together = Strong trend
4. **Trade Accordingly**
- Follow crossover direction
- Exit when lines converge
### Trading Strategies
#### Strategy 1: RSI 50-Level Crossover
**Setup:**
- Enable RSI with background and labels
- Wait for clear trend
- Look for retracement to 50 level
**Entry:**
- Long: "突破" label appears after pullback
- Short: "跌破" label appears after bounce
**Stop Loss:**
- Long: Below recent swing low
- Short: Above recent swing high
**Exit:**
- Opposite crossover label
- Or predetermined target (2:1 risk-reward)
**Best For:** Trend following, clear markets
#### Strategy 2: RSI Divergence Reversal
**Setup:**
- Enable RSI with regular divergence
- Wait for extreme levels (>70 or <30)
- Look for divergence signal
**Entry:**
- Long: Yellow "涨" label at oversold level
- Short: Blue "跌" label at overbought level
**Confirmation:**
- Wait for price to break structure
- Check for volume increase
- Look for candlestick reversal pattern
**Stop Loss:**
- Beyond divergence pivot point
**Exit:**
- Take partial profit at 50 level
- Exit remainder at opposite extreme or divergence
**Best For:** Swing trading, range-bound markets
#### Strategy 3: Triple Oscillator Confluence
**Setup:**
- Enable all three indicators
- Wait for all to reach extreme (>80 or <20)
- Look for alignment
**Entry:**
- Long: All three below 20, first one crosses above 20
- Short: All three above 80, first one crosses below 80
**Confirmation:**
- All indicators must align
- Price at support/resistance
- Volume spike helps
**Stop Loss:**
- Fixed percentage or ATR-based
**Exit:**
- When any indicator crosses 50 level
- Or at predetermined target
**Best For:** High-probability reversals, volatile markets
#### Strategy 4: CCI Dual-Period System
**Setup:**
- Enable both CCI lines only
- Disable RSI and Williams %R for clarity
- Watch for crossovers
**Entry:**
- Long: CCI(33) crosses above CCI(77) below 50 line
- Short: CCI(33) crosses below CCI(77) above 50 line
**Confirmation:**
- Both should be moving in entry direction
- Price breaking key level helps
**Stop Loss:**
- When CCIs cross back in opposite direction
**Exit:**
- Both CCIs enter opposite extreme zone
- Or trailing stop
**Best For:** Catching trend continuations, momentum trading
#### Strategy 5: Hidden Divergence Continuation
**Setup:**
- Enable RSI with hidden divergence
- Confirm existing trend
- Wait for pullback
**Entry:**
- Uptrend: "隐涨" label during pullback
- Downtrend: "隐跌" label during bounce
**Confirmation:**
- Price holds key moving average
- Trend structure intact
**Stop Loss:**
- Beyond pullback extreme
**Exit:**
- Regular divergence appears (reversal warning)
- Or trend structure breaks
**Best For:** Adding to positions, trend trading
### Best Practices
#### Choosing Which Indicators to Display
**For Beginners:**
- Use RSI only
- Enable background color and labels
- Focus on 50-level crossovers
- Simple and effective
**For Intermediate Traders:**
- RSI + Regular Divergence
- Add CCI for confirmation
- Use dual perspectives
- Better accuracy
**For Advanced Traders:**
- All three indicators
- Full divergence detection
- Multi-timeframe analysis
- Maximum information
#### Oscillator Priority
**Primary**: RSI (22)
- Most reliable
- Best divergence detection
- Good for all timeframes
- Use this as your main decision maker
**Secondary**: CCI (33/77)
- Adds cycle analysis
- Great for confirmation
- Dual-period crossovers valuable
- Use to confirm RSI signals
**Tertiary**: Williams %R (28)
- Extreme readings useful
- More volatile
- Best for short-term
- Use sparingly for extra confirmation
#### Timeframe Considerations
**Lower Timeframes (1m-15m):**
- More signals, less reliable
- Use tight divergence parameters
- Focus on RSI crossovers
- Quick entries and exits
**Medium Timeframes (30m-4H):**
- Balanced signal frequency
- Default settings work well
- Best for divergence trading
- Swing trading optimal
**Higher Timeframes (Daily+):**
- Fewer but stronger signals
- Widen divergence ranges
- All indicators more reliable
- Position trading best
#### Divergence Trading Tips
1. **Wait for Confirmation**
- Divergence alone isn't enough
- Need price structure break
- Volume helps validate
2. **Best at Extremes**
- Divergences near 80/20 levels most reliable
- Mid-level divergences often fail
- Combine with support/resistance
3. **Multiple Divergences**
- Second divergence stronger than first
- Third divergence extremely powerful
- Watch for "triple divergence"
4. **Timeframe Alignment**
- Check higher timeframe for direction
- Trade divergences in direction of larger trend
- Counter-trend divergences riskier
### Indicator Combinations
**With Moving Averages:**
- Use EMAs (21/55/144) for trend
- KSI for entry timing
- Enter when both align
**With Volume:**
- Volume confirms breakouts
- Divergence + volume divergence = Stronger
- Low volume at extremes = Reversal likely
**With Support/Resistance:**
- Price levels for targets
- KSI for entry timing
- Divergences at levels = Highest probability
**With Bias Indicator:**
- Bias shows price deviation
- KSI shows momentum
- Both diverging = Strong reversal signal
**With OBV Indicator:**
- OBV shows volume trend
- KSI shows price momentum
- Volume/momentum divergence powerful
### Common Patterns
1. **Bullish Reversal**: All oscillators oversold + RSI bullish divergence
2. **Bearish Reversal**: All oscillators overbought + RSI bearish divergence
3. **Trend Acceleration**: RSI > 50, both CCIs rising, Williams %R not extreme
4. **Weakening Trend**: RSI declining while price rising (pre-divergence warning)
5. **Strong Trend**: All oscillators stay above/below 50 for extended period
6. **Consolidation**: Oscillators crossing 50 frequently without extremes
7. **Exhaustion**: Multiple oscillators at extreme + hidden divergence failure
### Performance Tips
- Start simple: RSI only
- Add indicators gradually as you learn
- Disable unused features for cleaner charts
- Use labels strategically (not always on)
- Test different RSI lengths for your market
- Adjust divergence parameters based on volatility
### Alert Conditions
The indicator includes alerts for:
- RSI crossing above 50
- RSI crossing below 50
- RSI regular bullish divergence
- RSI regular bearish divergence
- RSI hidden bullish divergence
- RSI hidden bearish divergence
---
## 中文说明文档
### 概述
Scout Regiment - KSI(关键随机指标)是一个综合性动量振荡器,将三个强大的技术指标 - RSI、CCI和威廉指标 - 组合到一个统一的显示中。这种多指标方法为交易者提供了市场动量、超买超卖状况和通过高级背离检测发现潜在反转点的多元视角。
### 什么是KSI?
KSI代表"关键随机指标" - 一个综合动量指标:
- 显示多个振荡器,标准化到0-100刻度
- 使用标准化波段(20/50/80)便于一致解读
- 结合RSI用于趋势、CCI用于周期、威廉指标用于反转检测
- 专门为RSI提供增强的背离检测
### 核心功能
#### 1. **三重振荡器系统**
**① RSI(相对强弱指数)** - 主要指标
- **用途**:测量动量并识别超买超卖状况
- **默认长度**:22周期
- **显示**:蓝色线(2像素)
- **关键水平**:
- 50以上:看涨动量
- 50以下:看跌动量
- 80以上:超买
- 20以下:超卖
- **特殊功能**:
- 背景颜色指示(绿色/红色)
- 50水平穿越标签
- 完整背离检测(4种类型)
**② CCI(顺势指标)** - 双周期
- **用途**:识别周期性趋势和极端状况
- **双重显示**:
- CCI(33):短期周期 - 绿色线(1像素)
- CCI(77):中期周期 - 橙色线(1像素)
- **默认数据源**:HLC3(典型价格)
- **标准化刻度**:从±100映射到0-100以保持一致性
- **解读**:
- 80以上:强劲上升动量
- 20以下:强劲下降动量
- 50水平:中性
- 周期间背离:趋势变化警告
**③ 威廉指标 %R** - 可选
- **用途**:识别超买超卖极值
- **默认长度**:28周期
- **显示**:洋红色线(2像素)
- **刻度**:反转并标准化到0-100
- **最适合**:短期反转信号
- **默认**:禁用(需要额外确认时启用)
#### 2. **标准化波段系统**
**三层结构:**
- **上轨(80)**:超买区域
- 强动量区域
- 注意反转信号
- 此处的背离最可靠
- **中线(50)**:均衡线
- 分隔看涨/看跌区域
- 穿越表示动量转变
- 关键决策水平
- **下轨(20)**:超卖区域
- 弱动量区域
- 寻找反弹信号
- 此处的背离预示潜在反转
**波段填充**:20-80之间的深色背景,增强视觉清晰度
#### 3. **RSI视觉增强**
**背景颜色指示**
- 绿色背景:RSI在50以上(看涨偏向)
- 红色背景:RSI在50以下(看跌偏向)
- 可选显示,图表更清爽
- 帮助识别整体动量方向
**穿越标签**
- "突破":RSI向上穿越50
- "跌破":RSI向下穿越50
- 标记动量转变点
- 可开关
#### 4. **高级RSI背离检测**
指标仅为RSI(最可靠的振荡器)提供全面背离检测:
**常规看涨背离(黄色)**
- **价格**:更低的低点
- **RSI**:更高的低点
- **信号**:潜在向上反转
- **标签**:"涨"
- **最常见**:在超卖水平附近(30以下)
**常规看跌背离(蓝色)**
- **价格**:更高的高点
- **RSI**:更低的高点
- **信号**:潜在向下反转
- **标签**:"跌"
- **最常见**:在超买水平附近(70以上)
**隐藏看涨背离(浅黄色)**
- **价格**:更高的低点
- **RSI**:更低的低点
- **信号**:上升趋势延续
- **标签**:"隐涨"
- **用途**:加仓现有多头
**隐藏看跌背离(浅蓝色)**
- **价格**:更低的高点
- **RSI**:更高的高点
- **信号**:下降趋势延续
- **标签**:"隐跌"
- **用途**:加仓现有空头
**背离参数**(完全可自定义):
- **右侧回溯**:枢轴点右侧K线数(默认:5)
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **最大范围**:枢轴点之间最大K线数(默认:60)
- **最小范围**:枢轴点之间最小K线数(默认:5)
### 配置设置
#### KSI显示设置
- **显示RSI**:切换RSI指标
- **显示CCI**:切换两条CCI线
- **显示威廉指标 %R**:切换威廉指标(可选)
#### RSI设置
- **RSI长度**:计算周期(默认:22)
- **数据源**:价格源(默认:收盘价)
- **显示背景**:切换绿色/红色背景
- **显示穿越标签**:切换50水平穿越标签
#### RSI背离设置
- **右侧回溯**:枢轴检测右侧
- **左侧回溯**:枢轴检测左侧
- **回溯范围最大值**:最大回溯距离
- **回溯范围最小值**:最小回溯距离
- **显示常规背离**:启用常规背离线
- **显示常规背离标签**:启用常规背离标签
- **显示隐藏背离**:启用隐藏背离线
- **显示隐藏背离标签**:启用隐藏背离标签
#### CCI设置
- **CCI长度**:短期周期(默认:33)
- **CCI中期长度**:中期周期(默认:77)
- **数据源**:价格计算(默认:HLC3)
- **显示CCI(33)**:切换短期CCI
- **显示CCI(77)**:切换中期CCI
#### 威廉指标 %R 设置
- **长度**:计算周期(默认:28)
- **数据源**:价格源(默认:收盘价)
### 使用方法
#### 基础动量交易
1. **仅启用RSI**(主要指标)
- 关注50水平穿越
- 启用穿越标签获取信号
2. **识别动量方向**
- RSI > 50 = 看涨动量
- RSI < 50 = 看跌动量
- 背景颜色确认方向
3. **寻找极值**
- RSI > 80 = 超买(考虑卖出)
- RSI < 20 = 超卖(考虑买入)
4. **交易设置**
- RSI从超卖区向上穿越50时做多
- RSI从超买区向下穿越50时做空
#### 背离交易
1. **启用RSI和背离检测**
- 打开常规背离
- 可选添加隐藏背离
2. **等待背离信号**
- 黄色标签 = 看涨背离
- 蓝色标签 = 看跌背离
3. **用价格结构确认**
- 等待支撑/阻力突破
- 寻找K线形态
- 检查成交量确认
4. **进入仓位**
- 确认后进入
- 止损设在背离枢轴点之外
- 目标下一个关键水平
#### 多振荡器确认
1. **启用全部三个指标**
- RSI(动量)
- CCI双周期(周期分析)
- 威廉指标 %R(极值)
2. **寻找一致性**
- 全部在50以上 = 强劲看涨
- 全部在50以下 = 强劲看跌
- 信号混合 = 盘整
3. **识别极值**
- 所有指标 > 80 = 极度超买
- 所有指标 < 20 = 极度超卖
4. **交易反转**
- 所有指标在极值一致时逆势进入
- 可能的话用背离确认
- 使用紧密止损
#### CCI双周期分析
1. **启用两条CCI线**
- CCI(33) = 短期
- CCI(77) = 中期
2. **观察穿越**
- 绿色线穿越橙色线向上 = 看涨加速
- 绿色线穿越橙色线向下 = 看跌加速
3. **分析周期间背离**
- 短期上升,中期下降 = 潜在反转
- 两者同时上升 = 强趋势
4. **相应交易**
- 跟随穿越方向
- 线条汇合时退出
### 交易策略
#### 策略1:RSI 50水平穿越
**设置:**
- 启用RSI及背景和标签
- 等待明确趋势
- 寻找回调至50水平
**入场:**
- 多头:回调后出现"突破"标签
- 空头:反弹后出现"跌破"标签
**止损:**
- 多头:近期波动低点之下
- 空头:近期波动高点之上
**离场:**
- 出现相反穿越标签
- 或预定目标(2:1风险收益比)
**适合:**趋势跟随、明确市场
#### 策略2:RSI背离反转
**设置:**
- 启用RSI和常规背离
- 等待极端水平(>70或<30)
- 寻找背离信号
**入场:**
- 多头:超卖水平出现黄色"涨"标签
- 空头:超买水平出现蓝色"跌"标签
**确认:**
- 等待价格突破结构
- 检查成交量增加
- 寻找K线反转形态
**止损:**
- 背离枢轴点之外
**离场:**
- 在50水平部分获利
- 其余在相反极值或背离处离场
**适合:**波段交易、震荡市场
#### 策略3:三重振荡器汇合
**设置:**
- 启用全部三个指标
- 等待全部达到极值(>80或<20)
- 寻找一致性
**入场:**
- 多头:三个全部低于20,第一个向上穿越20
- 空头:三个全部高于80,第一个向下穿越80
**确认:**
- 所有指标必须一致
- 价格在支撑/阻力位
- 成交量激增有帮助
**止损:**
- 固定百分比或基于ATR
**离场:**
- 任一指标穿越50水平时
- 或在预定目标
**适合:**高概率反转、波动市场
#### 策略4:CCI双周期系统
**设置:**
- 仅启用两条CCI线
- 禁用RSI和威廉指标以保持清晰
- 观察穿越
**入场:**
- 多头:CCI(33)在50线下方向上穿越CCI(77)
- 空头:CCI(33)在50线上方向下穿越CCI(77)
**确认:**
- 两者都应朝入场方向移动
- 价格突破关键水平有帮助
**止损:**
- CCI反向穿越时
**离场:**
- 两条CCI进入相反极值区域
- 或移动止损
**适合:**捕捉趋势延续、动量交易
#### 策略5:隐藏背离延续
**设置:**
- 启用RSI和隐藏背离
- 确认现有趋势
- 等待回调
**入场:**
- 上升趋势:回调期间出现"隐涨"标签
- 下降趋势:反弹期间出现"隐跌"标签
**确认:**
- 价格守住关键移动平均线
- 趋势结构完整
**止损:**
- 回调极值之外
**离场:**
- 出现常规背离(反转警告)
- 或趋势结构破坏
**适合:**加仓、趋势交易
### 最佳实践
#### 选择显示哪些指标
**新手:**
- 仅使用RSI
- 启用背景颜色和标签
- 关注50水平穿越
- 简单有效
**中级交易者:**
- RSI + 常规背离
- 添加CCI确认
- 使用双重视角
- 更高准确度
**高级交易者:**
- 全部三个指标
- 完整背离检测
- 多时间框架分析
- 信息最大化
#### 振荡器优先级
**主要**:RSI (22)
- 最可靠
- 最佳背离检测
- 适用所有时间框架
- 用作主要决策依据
**次要**:CCI (33/77)
- 添加周期分析
- 确认效果好
- 双周期穿越有价值
- 用于确认RSI信号
**第三**:威廉指标 %R (28)
- 极值读数有用
- 更波动
- 最适合短期
- 谨慎使用以获额外确认
#### 时间框架考虑
**低时间框架(1分钟-15分钟):**
- 更多信号,可靠性较低
- 使用紧密背离参数
- 关注RSI穿越
- 快速进出
**中等时间框架(30分钟-4小时):**
- 信号频率平衡
- 默认设置效果好
- 最适合背离交易
- 波段交易最优
**高时间框架(日线+):**
- 信号较少但更强
- 扩大背离范围
- 所有指标更可靠
- 最适合仓位交易
#### 背离交易技巧
1. **等待确认**
- 仅背离不够
- 需要价格结构突破
- 成交量帮助验证
2. **极值处最佳**
- 80/20水平附近的背离最可靠
- 中间水平背离常失败
- 结合支撑/阻力
3. **多重背离**
- 第二次背离强于第一次
- 第三次背离极其强大
- 注意"三重背离"
4. **时间框架对齐**
- 检查更高时间框架方向
- 顺大趋势方向交易背离
- 逆势背离风险更大
### 指标组合
**与移动平均线配合:**
- 使用EMA(21/55/144)确定趋势
- KSI用于入场时机
- 两者一致时进入
**与成交量配合:**
- 成交量确认突破
- 背离 + 成交量背离 = 更强
- 极值处低成交量 = 可能反转
**与支撑/阻力配合:**
- 价格水平作为目标
- KSI用于入场时机
- 水平处的背离 = 最高概率
**与Bias指标配合:**
- Bias显示价格偏离
- KSI显示动量
- 两者都背离 = 强反转信号
**与OBV指标配合:**
- OBV显示成交量趋势
- KSI显示价格动量
- 成交量/动量背离强大
### 常见形态
1. **看涨反转**:所有振荡器超卖 + RSI看涨背离
2. **看跌反转**:所有振荡器超买 + RSI看跌背离
3. **趋势加速**:RSI > 50,两条CCI上升,威廉指标不极端
4. **趋势减弱**:价格上升时RSI下降(背离前警告)
5. **强趋势**:所有振荡器长时间保持在50上方/下方
6. **盘整**:振荡器频繁穿越50无极值
7. **衰竭**:多个振荡器在极值 + 隐藏背离失败
### 性能提示
- 从简单开始:仅RSI
- 学习时逐渐添加指标
- 禁用未使用功能以保持图表清晰
- 策略性使用标签(不总是开启)
- 为您的市场测试不同RSI长度
- 根据波动性调整背离参数
### 警报条件
指标包含以下警报:
- RSI向上穿越50
- RSI向下穿越50
- RSI常规看涨背离
- RSI常规看跌背离
- RSI隐藏看涨背离
- RSI隐藏看跌背离
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
Scout Regiment - OBV# Scout Regiment - OBV Indicator
## English Documentation
### Overview
Scout Regiment - OBV (On-Balance Volume) is an advanced momentum indicator that combines volume and price movement to identify the strength of buying and selling pressure. This indicator features an oscillator-based approach with divergence detection to help traders spot potential trend reversals and confirm price movements.
### What is OBV?
On-Balance Volume (OBV) is a cumulative volume indicator that adds volume on up days and subtracts volume on down days:
- **Rising OBV**: Accumulation (buying pressure)
- **Falling OBV**: Distribution (selling pressure)
- **OBV Oscillator**: The difference between OBV and its smoothed moving average, making divergences easier to spot
### Key Features
#### 1. **OBV Oscillator Display**
Instead of displaying raw OBV values, this indicator shows the oscillator (difference between OBV and its smoothed line):
**Benefits:**
- Easier to identify divergences
- Clearer trend changes
- More sensitive to momentum shifts
- Zero line as reference point
**Visual Elements:**
- **Step Line**: Main OBV oscillator line
- Green: Positive oscillator (accumulation)
- Red: Negative oscillator (distribution)
- **Histogram**: Visual representation of oscillator strength
- Green bars: Above zero line
- Red bars: Below zero line
- **Zero Line**: White dotted horizontal line as reference
#### 2. **Smoothing Options**
Choose from multiple moving average types to smooth the OBV:
- **None**: Raw OBV (most sensitive)
- **SMA**: Simple Moving Average (equal weight)
- **EMA**: Exponential Moving Average (recent price emphasis) - Default
- **SMMA (RMA)**: Smoothed Moving Average (very smooth)
- **WMA**: Weighted Moving Average (linear weight)
- **VWMA**: Volume Weighted Moving Average (volume emphasis)
**Default Settings:**
- Type: EMA
- Length: 21 periods
- Best for: Most market conditions
#### 3. **Multi-Timeframe Analysis**
- Calculate OBV on any timeframe
- View higher timeframe momentum on lower timeframe charts
- Align trades with larger timeframe volume trends
- Empty field = Current chart timeframe
#### 4. **Visual Enhancements**
**Background Color**
- Light green: Positive oscillator (bullish volume pressure)
- Light red: Negative oscillator (bearish volume pressure)
- Optional display for cleaner charts
**Crossover Labels**
- "突破" (Breakout): When oscillator crosses above zero
- "跌破" (Breakdown): When oscillator crosses below zero
- Indicates potential trend changes
- Can be toggled on/off
#### 5. **Comprehensive Divergence Detection**
The indicator automatically detects four types of divergences:
**Regular Bullish Divergence (Yellow)**
- **Price**: Makes lower lows
- **OBV**: Makes higher lows
- **Signal**: Potential upward reversal
- **Label**: "看涨" (Bullish)
- **Use**: Enter long positions
**Regular Bearish Divergence (Blue)**
- **Price**: Makes higher highs
- **OBV**: Makes lower highs
- **Signal**: Potential downward reversal
- **Label**: "看跌" (Bearish)
- **Use**: Enter short positions or exit longs
**Hidden Bullish Divergence (Light Yellow)**
- **Price**: Makes higher lows
- **OBV**: Makes lower lows
- **Signal**: Trend continuation (uptrend)
- **Label**: "隐藏看涨" (Hidden Bullish)
- **Use**: Add to long positions
**Hidden Bearish Divergence (Light Blue)**
- **Price**: Makes lower highs
- **OBV**: Makes higher highs
- **Signal**: Trend continuation (downtrend)
- **Label**: "隐藏看跌" (Hidden Bearish)
- **Use**: Add to short positions
#### 6. **Customizable Divergence Detection**
**Pivot Lookback Settings:**
- **Left Lookback**: Bars to the left of pivot (default: 5)
- **Right Lookback**: Bars to the right of pivot (default: 5)
- Determines how "extreme" a point must be to qualify as a pivot
**Range Settings:**
- **Maximum Range**: Maximum bars between pivots (default: 60)
- **Minimum Range**: Minimum bars between pivots (default: 5)
- Filters out too-close or too-distant divergences
**Display Options:**
- Toggle regular divergences on/off
- Toggle hidden divergences on/off
- Toggle divergence labels on/off
- Show only the divergences you need
### Configuration Settings
#### Smoothing Settings
- **Smoothing Type**: Choose MA type (None/SMA/EMA/SMMA/WMA/VWMA)
- **Smoothing Length**: Number of periods for smoothing (default: 21)
#### Calculation Settings
- **Timeframe**: Select calculation timeframe (empty = current chart)
#### Display Settings
- **Show OBV Line**: Toggle step line display
- **Show OBV Histogram**: Toggle histogram display
- **Show Background Color**: Toggle background coloring
- **Show Crossover Labels**: Toggle breakout/breakdown labels
#### Divergence Settings
- **Pivot Right Lookback**: Right bars for pivot detection (default: 5)
- **Pivot Left Lookback**: Left bars for pivot detection (default: 5)
- **Range Maximum**: Max bars between divergences (default: 60)
- **Range Minimum**: Min bars between divergences (default: 5)
- **Show Regular Divergences**: Enable/disable regular divergences
- **Show Regular Labels**: Enable/disable regular divergence labels
- **Show Hidden Divergences**: Enable/disable hidden divergences
- **Show Hidden Labels**: Enable/disable hidden divergence labels
### How to Use
#### For Trend Confirmation
1. **Identify Trend with Price**
- Uptrend: Higher highs and higher lows
- Downtrend: Lower highs and lower lows
2. **Confirm with OBV Oscillator**
- Strong uptrend: OBV oscillator staying positive
- Strong downtrend: OBV oscillator staying negative
- Weak trend: OBV oscillator frequently crossing zero
3. **Volume Confirmation**
- Trend with increasing OBV = Strong trend
- Trend with decreasing OBV = Weak trend (watch for reversal)
#### For Divergence Trading
1. **Enable Divergence Detection**
- Start with regular divergences only
- Add hidden divergences for trend continuation
2. **Wait for Divergence Signal**
- Yellow label = Potential bullish reversal
- Blue label = Potential bearish reversal
3. **Confirm with Price Action**
- Wait for support/resistance break
- Look for candlestick confirmation
- Check higher timeframe alignment
4. **Enter Trade**
- Enter after confirmation
- Set stop loss beyond recent swing
- Target based on previous swing or support/resistance
#### For Breakout Trading
1. **Enable Crossover Labels**
- Identify when oscillator crosses zero line
2. **Confirm Volume Strength**
- Strong breakouts have large oscillator moves
- Weak breakouts barely cross zero
3. **Trade Direction**
- "突破" label = Enter long
- "跌破" label = Enter short
4. **Manage Position**
- Exit when oscillator crosses back
- Use price structure for stops
#### For Multi-Timeframe Analysis
1. **Set Higher Timeframe**
- Example: On 15min chart, set timeframe to 1H or 4H
2. **Identify Higher Timeframe Trend**
- Positive oscillator = Uptrend bias
- Negative oscillator = Downtrend bias
3. **Trade with the Trend**
- Only take long signals in uptrend
- Only take short signals in downtrend
4. **Time Entries**
- Use current timeframe for precise entry
- Confirm with higher timeframe direction
### Trading Strategies
#### Strategy 1: Regular Divergence Reversal
**Setup:**
1. Price in strong trend (up or down)
2. Regular divergence appears
3. Price reaches support/resistance level
**Entry:**
- Bullish: After "看涨" label, when price breaks above recent high
- Bearish: After "看跌" label, when price breaks below recent low
**Stop Loss:**
- Bullish: Below divergence low
- Bearish: Above divergence high
**Exit:**
- Take profit at next major support/resistance
- Or when opposite divergence appears
**Best For:** Swing trading, reversal trading
#### Strategy 2: Hidden Divergence Continuation
**Setup:**
1. Clear trend established
2. Price pulls back (retracement)
3. Hidden divergence appears
**Entry:**
- Bullish: After "隐藏看涨" label, when price resumes uptrend
- Bearish: After "隐藏看跌" label, when price resumes downtrend
**Stop Loss:**
- Behind the pullback swing point
**Exit:**
- Trail stop as trend continues
- Exit on regular divergence (reversal signal)
**Best For:** Trend following, adding to positions
#### Strategy 3: Zero Line Crossover
**Setup:**
1. Enable crossover labels
2. Oscillator crosses zero line
3. Confirm with price structure break
**Entry:**
- "突破" label = Buy signal
- "跌破" label = Sell signal
**Stop Loss:**
- Below/above recent swing
**Exit:**
- When oscillator crosses back over zero
- Or at predetermined target
**Best For:** Momentum trading, quick trades
#### Strategy 4: Multi-Timeframe Confluence
**Setup:**
1. Set indicator to higher timeframe (e.g., 4H on 1H chart)
2. Wait for higher TF oscillator to be positive (uptrend) or negative (downtrend)
3. Look for entries on current timeframe aligned with higher TF
**Entry:**
- Long: When both timeframes show positive oscillator or bullish divergence
- Short: When both timeframes show negative oscillator or bearish divergence
**Stop Loss:**
- Based on current timeframe structure
**Exit:**
- When higher timeframe oscillator turns negative (for longs) or positive (for shorts)
**Best For:** Swing trading, high-probability setups
### Best Practices
#### Volume Analysis
1. **Strong Moves Need Volume**
- Price increase + Rising OBV = Healthy uptrend
- Price increase + Falling OBV = Weak uptrend (warning)
2. **Watch for Confirmation**
- New highs with new OBV highs = Confirmed
- New highs without new OBV highs = Potential divergence
3. **Consider Context**
- Low volume periods (Asian session, holidays) = Less reliable
- High volume periods (News, London/NY overlap) = More reliable
#### Divergence Trading Tips
1. **Not All Divergences Work**
- Wait for price confirmation
- Stronger in oversold/overbought areas
- Better at support/resistance levels
2. **Multiple Divergences**
- Multiple divergences on same trend = Stronger signal
- Quick divergence failures = Ignore and wait for next
3. **Timeframe Matters**
- Higher timeframe divergences = More reliable
- Lower timeframe divergences = More frequent, less reliable
#### Smoothing Selection
1. **No Smoothing (None)**
- Most sensitive, more signals
- More noise, more false signals
- Best for: Scalping, very active trading
2. **EMA (Default)**
- Balanced approach
- Good for most strategies
- Best for: Swing trading, day trading
3. **SMMA (RMA)**
- Very smooth, fewer signals
- Less responsive to sudden changes
- Best for: Position trading, longer timeframes
### Indicator Combinations
**With Moving Averages:**
- Use EMAs for trend direction
- OBV for volume confirmation
- Enter when both align
**With RSI:**
- RSI for overbought/oversold
- OBV for volume confirmation
- Divergences on both = Stronger signal
**With Price Action:**
- Support/resistance for levels
- OBV for strength confirmation
- Breakouts with positive OBV = More likely to succeed
**With Bias Indicator:**
- Bias for price deviation
- OBV for volume confirmation
- Both showing divergence = High probability reversal
### Common Patterns
1. **Accumulation**: OBV rising while price consolidates (breakout likely)
2. **Distribution**: OBV falling while price consolidates (breakdown likely)
3. **Confirmation**: OBV and price both making new highs/lows (trend strong)
4. **Divergence**: OBV and price moving opposite directions (reversal warning)
5. **False Breakout**: Price breaks but OBV doesn't confirm (likely to fail)
### Performance Tips
- Disable unused display features for faster loading
- Start with regular divergences only, add hidden later
- Use histogram for quick visual reference
- Enable crossover labels for clear entry signals
- Test different smoothing lengths for your market
### Alert Conditions
The indicator includes alerts for:
- Regular bullish divergence detected
- Regular bearish divergence detected
- Hidden bullish divergence detected
- Hidden bearish divergence detected
**How to Set Alerts:**
1. Click on the indicator name
2. Select "Add Alert"
3. Choose condition
4. Configure notification method
---
## 中文说明文档
### 概述
Scout Regiment - OBV(能量潮)是一个高级动量指标,结合成交量和价格变动来识别买卖压力的强度。该指标采用振荡器方法并具有背离检测功能,帮助交易者发现潜在的趋势反转并确认价格走势。
### 什么是OBV?
能量潮(OBV)是一个累积成交量指标,在上涨日累加成交量,在下跌日减去成交量:
- **上升的OBV**:积累(买入压力)
- **下降的OBV**:派发(卖出压力)
- **OBV振荡器**:OBV与其平滑移动平均线之间的差值,使背离更容易识别
### 核心功能
#### 1. **OBV振荡器显示**
该指标不显示原始OBV值,而是显示振荡器(OBV与其平滑线之间的差值):
**优势:**
- 更容易识别背离
- 趋势变化更清晰
- 对动量变化更敏感
- 零线作为参考点
**视觉元素:**
- **阶梯线**:主OBV振荡器线
- 绿色:正振荡器(积累)
- 红色:负振荡器(派发)
- **柱状图**:振荡器强度的可视化表示
- 绿色柱:零线以上
- 红色柱:零线以下
- **零线**:白色虚线作为参考
#### 2. **平滑选项**
选择多种移动平均类型来平滑OBV:
- **None**:原始OBV(最敏感)
- **SMA**:简单移动平均(等权重)
- **EMA**:指数移动平均(强调近期价格)- 默认
- **SMMA (RMA)**:平滑移动平均(非常平滑)
- **WMA**:加权移动平均(线性权重)
- **VWMA**:成交量加权移动平均(强调成交量)
**默认设置:**
- 类型:EMA
- 长度:21周期
- 适合:大多数市场状况
#### 3. **多时间框架分析**
- 在任何时间框架上计算OBV
- 在低时间框架图表上查看高时间框架动量
- 使交易与更大时间框架的成交量趋势保持一致
- 空字段 = 当前图表时间框架
#### 4. **视觉增强**
**背景颜色**
- 浅绿色:正振荡器(看涨成交量压力)
- 浅红色:负振荡器(看跌成交量压力)
- 可选显示,图表更清爽
**穿越标签**
- "突破":振荡器向上穿越零线
- "跌破":振荡器向下穿越零线
- 指示潜在趋势变化
- 可开关
#### 5. **全面的背离检测**
指标自动检测四种类型的背离:
**常规看涨背离(黄色)**
- **价格**:创新低
- **OBV**:创更高的低点
- **信号**:潜在向上反转
- **标签**:"看涨"
- **用途**:进入多头仓位
**常规看跌背离(蓝色)**
- **价格**:创新高
- **OBV**:创更低的高点
- **信号**:潜在向下反转
- **标签**:"看跌"
- **用途**:进入空头仓位或退出多头
**隐藏看涨背离(浅黄色)**
- **价格**:创更高的低点
- **OBV**:创更低的低点
- **信号**:趋势延续(上升趋势)
- **标签**:"隐藏看涨"
- **用途**:加仓多头
**隐藏看跌背离(浅蓝色)**
- **价格**:创更低的高点
- **OBV**:创更高的高点
- **信号**:趋势延续(下降趋势)
- **标签**:"隐藏看跌"
- **用途**:加仓空头
#### 6. **可自定义的背离检测**
**枢轴回溯设置:**
- **左侧回溯**:枢轴点左侧K线数(默认:5)
- **右侧回溯**:枢轴点右侧K线数(默认:5)
- 决定一个点要多"极端"才能成为枢轴点
**范围设置:**
- **最大范围**:枢轴点之间最大K线数(默认:60)
- **最小范围**:枢轴点之间最小K线数(默认:5)
- 过滤太近或太远的背离
**显示选项:**
- 开关常规背离
- 开关隐藏背离
- 开关背离标签
- 只显示需要的背离
### 配置设置
#### 平滑设置
- **平滑类型**:选择MA类型(None/SMA/EMA/SMMA/WMA/VWMA)
- **平滑长度**:平滑周期数(默认:21)
#### 计算设置
- **时间周期**:选择计算时间框架(空 = 当前图表)
#### 显示设置
- **显示OBV点线**:切换阶梯线显示
- **显示OBV柱状图**:切换柱状图显示
- **显示背景颜色**:切换背景着色
- **显示突破标签**:切换突破/跌破标签
#### 背离设置
- **枢轴右侧回溯**:枢轴检测右侧K线数(默认:5)
- **枢轴左侧回溯**:枢轴检测左侧K线数(默认:5)
- **回看范围最大值**:背离之间最大K线数(默认:60)
- **回看范围最小值**:背离之间最小K线数(默认:5)
- **显示常规背离**:启用/禁用常规背离
- **显示常规背离标签**:启用/禁用常规背离标签
- **显示隐藏背离**:启用/禁用隐藏背离
- **显示隐藏背离标签**:启用/禁用隐藏背离标签
### 使用方法
#### 趋势确认
1. **用价格识别趋势**
- 上升趋势:更高的高点和更高的低点
- 下降趋势:更低的高点和更低的低点
2. **用OBV振荡器确认**
- 强劲上升趋势:OBV振荡器保持正值
- 强劲下降趋势:OBV振荡器保持负值
- 弱势趋势:OBV振荡器频繁穿越零线
3. **成交量确认**
- 趋势伴随上升的OBV = 强趋势
- 趋势伴随下降的OBV = 弱趋势(注意反转)
#### 背离交易
1. **启用背离检测**
- 先从常规背离开始
- 添加隐藏背离用于趋势延续
2. **等待背离信号**
- 黄色标签 = 潜在看涨反转
- 蓝色标签 = 潜在看跌反转
3. **用价格行为确认**
- 等待支撑/阻力突破
- 寻找K线确认
- 检查更高时间框架对齐
4. **进入交易**
- 确认后进入
- 在近期波动之外设置止损
- 基于前一波动或支撑/阻力设定目标
#### 突破交易
1. **启用穿越标签**
- 识别振荡器何时穿越零线
2. **确认成交量强度**
- 强突破有大振荡器移动
- 弱突破勉强穿越零线
3. **交易方向**
- "突破"标签 = 进入多头
- "跌破"标签 = 进入空头
4. **管理仓位**
- 振荡器反向穿越时退出
- 使用价格结构设置止损
#### 多时间框架分析
1. **设置更高时间框架**
- 例如:在15分钟图上,设置时间框架为1H或4H
2. **识别更高时间框架趋势**
- 正振荡器 = 上升趋势偏向
- 负振荡器 = 下降趋势偏向
3. **顺趋势交易**
- 仅在上升趋势中接受多头信号
- 仅在下降趋势中接受空头信号
4. **把握入场时机**
- 使用当前时间框架进行精确进入
- 用更高时间框架方向确认
### 交易策略
#### 策略1:常规背离反转
**设置:**
1. 价格处于强趋势(上涨或下跌)
2. 出现常规背离
3. 价格到达支撑/阻力水平
**入场:**
- 看涨:在"看涨"标签后,价格突破近期高点时
- 看跌:在"看跌"标签后,价格跌破近期低点时
**止损:**
- 看涨:背离低点之下
- 看跌:背离高点之上
**退出:**
- 在下一个主要支撑/阻力获利
- 或出现相反背离时
**适合:**波段交易、反转交易
#### 策略2:隐藏背离延续
**设置:**
1. 建立明确趋势
2. 价格回调(回撤)
3. 出现隐藏背离
**入场:**
- 看涨:在"隐藏看涨"标签后,价格恢复上升趋势时
- 看跌:在"隐藏看跌"标签后,价格恢复下降趋势时
**止损:**
- 在回调波动点之后
**退出:**
- 随着趋势延续移动止损
- 出现常规背离(反转信号)时退出
**适合:**趋势跟随、加仓
#### 策略3:零线穿越
**设置:**
1. 启用穿越标签
2. 振荡器穿越零线
3. 用价格结构突破确认
**入场:**
- "突破"标签 = 买入信号
- "跌破"标签 = 卖出信号
**止损:**
- 近期波动之下/之上
**退出:**
- 振荡器反向穿越零线时
- 或在预定目标
**适合:**动量交易、快速交易
#### 策略4:多时间框架汇合
**设置:**
1. 设置指标到更高时间框架(例如,在1H图上设置4H)
2. 等待更高TF振荡器为正(上升趋势)或负(下降趋势)
3. 在当前时间框架上寻找与更高TF一致的入场机会
**入场:**
- 多头:两个时间框架都显示正振荡器或看涨背离时
- 空头:两个时间框架都显示负振荡器或看跌背离时
**止损:**
- 基于当前时间框架结构
**退出:**
- 更高时间框架振荡器变为负(多头)或正(空头)时
**适合:**波段交易、高概率设置
### 最佳实践
#### 成交量分析
1. **强势波动需要成交量**
- 价格上涨 + 上升的OBV = 健康上升趋势
- 价格上涨 + 下降的OBV = 弱上升趋势(警告)
2. **注意确认**
- 新高伴随新OBV高点 = 已确认
- 新高没有新OBV高点 = 潜在背离
3. **考虑背景**
- 低成交量期(亚洲时段、假期)= 可靠性较低
- 高成交量期(新闻、伦敦/纽约重叠)= 更可靠
#### 背离交易技巧
1. **不是所有背离都有效**
- 等待价格确认
- 在超卖/超买区域更强
- 在支撑/阻力水平更好
2. **多重背离**
- 同一趋势上多个背离 = 更强信号
- 背离快速失败 = 忽略并等待下一个
3. **时间框架重要**
- 更高时间框架背离 = 更可靠
- 更低时间框架背离 = 更频繁,可靠性较低
#### 平滑选择
1. **无平滑(None)**
- 最敏感,更多信号
- 更多噪音,更多假信号
- 适合:剥头皮、非常活跃的交易
2. **EMA(默认)**
- 平衡方法
- 适合大多数策略
- 适合:波段交易、日内交易
3. **SMMA (RMA)**
- 非常平滑,更少信号
- 对突然变化响应较慢
- 适合:仓位交易、更长时间框架
### 指标组合
**与移动平均线配合:**
- 使用EMA确定趋势方向
- OBV确认成交量
- 两者一致时进入
**与RSI配合:**
- RSI用于超买超卖
- OBV用于成交量确认
- 两者都背离 = 更强信号
**与价格行为配合:**
- 支撑/阻力确定水平
- OBV确认强度
- 正OBV的突破 = 更可能成功
**与Bias指标配合:**
- Bias用于价格偏离
- OBV用于成交量确认
- 两者都显示背离 = 高概率反转
### 常见形态
1. **积累**:OBV上升而价格盘整(突破可能)
2. **派发**:OBV下降而价格盘整(跌破可能)
3. **确认**:OBV和价格都创新高/新低(趋势强劲)
4. **背离**:OBV和价格反向移动(反转警告)
5. **假突破**:价格突破但OBV不确认(可能失败)
### 性能提示
- 禁用未使用的显示功能以加快加载
- 先从常规背离开始,稍后添加隐藏背离
- 使用柱状图快速视觉参考
- 启用穿越标签以获得清晰的入场信号
- 为您的市场测试不同的平滑长度
### 警报条件
指标包含以下警报:
- 检测到常规看涨背离
- 检测到常规看跌背离
- 检测到隐藏看涨背离
- 检测到隐藏看跌背离
**如何设置警报:**
1. 点击指标名称
2. 选择"添加警报"
3. 选择条件
4. 配置通知方法
---
## Technical Support
For questions or issues, please refer to the TradingView community or contact the indicator creator.
## 技术支持
如有问题,请参考TradingView社区或联系指标创建者。
Quarterly Cycle Theory with DST time AdjustedThe Quarterly Theory removes ambiguity, as it gives specific time-based reference points to look for when entering trades. Before being able to apply this theory to trading, one must first understand that time is fractal:
Yearly Quarters = 4 quarters of three months each.
Monthly Quarters = 4 quarters of one week each.
Weekly Quarters = 4 quarters of one day each (Monday - Thursday). Friday has its own specific function.
Daily Quarters = 4 quarters of 6 hours each = 4 trading sessions of a trading day.
Sessions Quarters = 4 quarters of 90 minutes each.
90 Minute Quarters = 4 quarters of 22.5 minutes each.
Yearly Cycle: Analogously to financial quarters, the year is divided in four sections of three months each:
Q1 - January, February, March.
Q2 - April, May, June (True Open, April Open).
Q3 - July, August, September.
Q4 - October, November, December.
S&P 500 E-mini Futures (daily candles) — Monthly Cycle.
Monthly Cycle: Considering that we have four weeks in a month, we start the cycle on the first month’s Monday (regardless of the calendar Day):
Q1 - Week 1: first Monday of the month.
Q2 - Week 2: second Monday of the month (True Open, Daily Candle Open Price).
Q3 - Week 3: third Monday of the month.
Q4 - Week 4: fourth Monday of the month.
S&P 500 E-mini Futures (4 hour candles) — Weekly Cycle.
Weekly Cycle: Daye determined that although the trading week is composed by 5 trading days, we should ignore Friday, and the small portion of Sunday’s price action:
Q1 - Monday.
Q2 - Tuesday (True Open, Daily Candle Open Price).
Q3 - Wednesday.
Q4 - Thursday.
S&P 500 E-mini Futures (1 hour candles) — Daily Cycle.
Daily Cycle: The Day can be broken down into 6 hour quarters. These times roughly define the sessions of the trading day, reinforcing the theory’s validity:
Q1 - 18:00 - 00:00 Asia.
Q2 - 00:00 - 06:00 London (True Open).
Q3 - 06:00 - 12:00 NY AM.
Q4 - 12:00 - 18:00 NY PM.
S&P 500 E-mini Futures (15 minute candles) — 6 Hour Cycle.
6 Hour Quarters or 90 Minute Cycle / Sessions divided into four sections of 90 minutes each (EST/EDT):
Asian Session
Q1 - 18:00 - 19:30
Q2 - 19:30 - 21:00 (True Open)
Q3 - 21:00 - 22:30
Q4 - 22:30 - 00:00
London Session
Q1 - 00:00 - 01:30
Q2 - 01:30 - 03:00 (True Open)
Q3 - 03:00 - 04:30
Q4 - 04:30 - 06:00
NY AM Session
Q1 - 06:00 - 07:30
Q2 - 07:30 - 09:00 (True Open)
Q3 - 09:00 - 10:30
Q4 - 10:30 - 12:00
NY PM Session
Q1 - 12:00 - 13:30
Q2 - 13:30 - 15:00 (True Open)
Q3 - 15:00 - 16:30
Q4 - 16:30 - 18:00
S&P 500 E-mini Futures (5 minute candles) — 90 Minute Cycle.
Micro Cycles: Dividing the 90 Minute Cycle yields 22.5 Minute Quarters, also known as Micro Sessions or Micro Quarters:
Asian Session
Q1/1 18:00:00 - 18:22:30
Q2 18:22:30 - 18:45:00
Q3 18:45:00 - 19:07:30
Q4 19:07:30 - 19:30:00
Q2/1 19:30:00 - 19:52:30 (True Session Open)
Q2/2 19:52:30 - 20:15:00
Q2/3 20:15:00 - 20:37:30
Q2/4 20:37:30 - 21:00:00
Q3/1 21:00:00 - 21:23:30
etc. 21:23:30 - 21:45:00
London Session
00:00:00 - 00:22:30 (True Daily Open)
00:22:30 - 00:45:00
00:45:00 - 01:07:30
01:07:30 - 01:30:00
01:30:00 - 01:52:30 (True Session Open)
01:52:30 - 02:15:00
02:15:00 - 02:37:30
02:37:30 - 03:00:00
03:00:00 - 03:22:30
03:22:30 - 03:45:00
03:45:00 - 04:07:30
04:07:30 - 04:30:00
04:30:00 - 04:52:30
04:52:30 - 05:15:00
05:15:00 - 05:37:30
05:37:30 - 06:00:00
New York AM Session
06:00:00 - 06:22:30
06:22:30 - 06:45:00
06:45:00 - 07:07:30
07:07:30 - 07:30:00
07:30:00 - 07:52:30 (True Session Open)
07:52:30 - 08:15:00
08:15:00 - 08:37:30
08:37:30 - 09:00:00
09:00:00 - 09:22:30
09:22:30 - 09:45:00
09:45:00 - 10:07:30
10:07:30 - 10:30:00
10:30:00 - 10:52:30
10:52:30 - 11:15:00
11:15:00 - 11:37:30
11:37:30 - 12:00:00
New York PM Session
12:00:00 - 12:22:30
12:22:30 - 12:45:00
12:45:00 - 13:07:30
13:07:30 - 13:30:00
13:30:00 - 13:52:30 (True Session Open)
13:52:30 - 14:15:00
14:15:00 - 14:37:30
14:37:30 - 15:00:00
15:00:00 - 15:22:30
15:22:30 - 15:45:00
15:45:00 - 15:37:30
15:37:30 - 16:00:00
16:00:00 - 16:22:30
16:22:30 - 16:45:00
16:45:00 - 17:07:30
17:07:30 - 18:00:00
S&P 500 E-mini Futures (30 second candles) — 22.5 Minute Cycle.
RSI Signal with filters by S.Kodirov📌 English
RSI Signal with Multi-Timeframe Filters
This TradingView indicator generates RSI-based buy and sell signals on the 15-minute timeframe with additional filtering from other timeframes (5M, 30M, 1M).
🔹 Signal Types:
✅ 15/5B & 15/5S – RSI 15M filtered by 5M
✅ 15/30/1B & 15/30/1S – RSI 15M filtered by 30M & 1M
✅ 15B & 15S – RSI 15M without filters
🔹 How It Works:
Signals are displayed as colored triangles on the chart.
Labels indicate the type of signal (e.g., 15/5B, 15S).
Alerts notify users when a signal appears.
🚀 Best for short-term trading with RSI confirmation from multiple timeframes!
📌 Русский
Индикатор RSI с мульти-таймфрейм фильтрами
Этот индикатор для TradingView генерирует сигналы покупки и продажи на 15-минутном таймфрейме, используя фильтрацию с других таймфреймов (5M, 30M, 1M).
🔹 Типы сигналов:
✅ 15/5B & 15/5S – RSI 15M с фильтром 5M
✅ 15/30/1B & 15/30/1S – RSI 15M с фильтрами 30M и 1M
✅ 15B & 15S – RSI 15M без фильтров
🔹 Как это работает:
Сигналы отображаются как цветные треугольники на графике.
Подписи показывают тип сигнала (например, 15/5B, 15S).
Алерты уведомляют трейдера о появлении сигнала.
🚀 Идеально для краткосрочной торговли с подтверждением RSI на нескольких таймфреймах!
📌 O'zbekcha
Ko'p vaqt oralig‘idagi RSI signallari
Ushbu TradingView indikatori 15 daqiqalik vaqt oralig‘ida RSI asosida sotib olish va sotish signallarini yaratadi. Bundan tashqari, boshqa vaqt oralig‘idagi (5M, 30M, 1M) RSI filtrlarini ham hisobga oladi.
🔹 Signal turlari:
✅ 15/5B & 15/5S – 5M bilan filtrlangan RSI 15M
✅ 15/30/1B & 15/30/1S – 30M va 1M bilan filtrlangan RSI 15M
✅ 15B & 15S – Filtrsiz RSI 15M
🔹 Qanday ishlaydi?
Signallar rangli uchburchaklar shaklida ko‘rsatiladi.
Yozuvlar signal turini ko‘rsatadi (masalan, 15/5B, 15S).
Xabarnomalar yangi signal paydo bo‘lganda treyderni ogohlantiradi.
🚀 Ko‘p vaqt oralig‘ida RSI tasdig‘i bilan qisqa muddatli savdo uchun ideal!
CRT Hourly/15m dividers and opensRange Separator is a unique tool designed to help traders visualize critical price levels and ranges on their charts. This script employs the innovative concepts of "Candles Are Ranges" and the "Power of 3 (PO3)" to enhance trading strategies by marking key time intervals and price levels.
What the Script Does:
Hourly Lines:
Automatically draws vertical lines at the start of each hour.
Provides an option to display only the current hour's line for a cleaner visual.
Allows customization of line color, width, and style.
15-Minute Lines:
Adds vertical lines at 15-minute intervals to highlight smaller time ranges.
Includes an option to draw horizontal lines at the 15-minute interval prices.
Offers customization for line color, width, and style.
Horizontal Lines:
Draws horizontal lines based on the opening, high, or low price of the selected timeframe.
Customizable options for line color, width, and style.
How the Script Works:
Candles Are Ranges: Each candle represents a price range (OHLC) on any timeframe. The script visually emphasizes these ranges, helping traders understand price action better.
Power of 3 (PO3): This concept divides price delivery into three stages: formation, turtle soup (stop hunting), and distribution/expansion. The script marks these intervals, aiding in identifying potential key levels for entries and exits.
How to Use the Script:
Adding the Script:
Apply the script to your chart and adjust the settings in the input menu.
Customize the appearance of hourly and 15-minute lines to suit your preference.
Analyzing the Chart:
Observe the hourly lines to determine higher timeframe biases.
Use 15-minute lines to identify more granular price movements.
Pay attention to horizontal lines that mark significant price levels based on your chosen criteria (open, high, low).
Trading Strategy:
Combine the script's visual aids with your understanding of the "Candles Are Ranges" and "Power of 3" concepts.
Use these visual cues to make informed decisions about potential entry and exit points.
What Makes it Original:
Integration of Candles Are Ranges and PO3 Concepts: Unlike traditional scripts that merely plot lines, this script uniquely integrates two powerful trading theories to provide a comprehensive view of price action.
Customizable Visual Aids: Offers extensive customization options for line colors, widths, and styles, allowing traders to tailor the script to their specific needs.
Enhanced Timeframe Analysis: By marking both hourly and 15-minute intervals, the script provides a detailed view of price ranges across multiple timeframes, enhancing the trader's ability to make informed decisions.
- Key script Parameters
Show Hourly Lines: Toggles the display of vertical lines marking each hour.
Hourly Lines Color: Sets the color of the hourly vertical lines.
Hourly Lines Width: Chooses the width of the hourly vertical lines (1, 2, or 3).
Hourly Lines Style: Selects the style of the hourly lines (Solid, Dashed, or Dotted).
Horizontal Line Color: Defines the color of the horizontal lines drawn at hourly intervals.
Horizontal Line Width: Determines the width of the horizontal lines (1, 2, or 3).
Horizontal Line Style: Sets the style of the horizontal lines (Solid, Dashed, or Dotted).
Horizontal Line Start Price: Specifies which price (Open, High, Low) the horizontal lines will start from.
Show Current Hour Only: Limits the display to only the current hour's horizontal line.
Show 15-Minute Lines: Toggles the display of vertical lines marking each 15-minute interval.
15-Minute Lines Color: Sets the color of the 15-minute vertical lines.
15-Minute Lines Width: Chooses the width of the 15-minute vertical lines (1, 2, or 3).
15-Minute Lines Style: Selects the style of the 15-minute lines (Solid, Dashed, or Dotted).
Show 15-Minute Horizontal Lines: Toggles the display of horizontal lines at 15-minute intervals.
15-Minute Horizontal Lines Color: Defines the color of the horizontal lines drawn at 15-minute intervals.
15-Minute Horizontal Lines Width: Determines the width of the horizontal lines (1, 2, or 3).
15-Minute Horizontal Lines Style: Sets the style of the horizontal lines (Solid, Dashed, or Dotted).
Important Notes:
- Credit to @Yazdanian and his basic "Hourly separators" indicator that plots a simple vertical line every hour which provided the idea for this version and expanded on
- This script is designed to complement your trading strategy by providing visual aids and should be used alongside other technical analysis tools.
It is not intended to issue buy or sell signals but to help you understand price ranges and potential key levels.
Disclaimer: The script is provided as-is, and the authors are not responsible for any trading losses incurred using this script. Always perform your own analysis and use proper risk management.
PineConnectorLibrary "PineConnector"
This library is a comprehensive alert webhook text generator for PineConnector. It contains every possible alert syntax variation from the documentation, along with some debugging functions.
To use it, just import the library (eg. "import ZenAndTheArtOfTrading/PineConnector/1 as pc") and use pc.buy(licenseID) to send an alert off to PineConnector - assuming all your webhooks etc are set up correctly.
View the PineConnector documentation for more information on how to send the commands you're looking to send (all of this library's function names match the documentation).
all()
Usage: pc.buy(pc_id, freq=pc.all())
Returns: "all"
once_per_bar()
Usage: pc.buy(pc_id, freq=pc.once_per_bar())
Returns: "once_per_bar"
once_per_bar_close()
Usage: pc.buy(pc_id, freq=pc.once_per_bar_close())
Returns: "once_per_bar_close"
na0(value)
Checks if given value is either 'na' or 0. Useful for streamlining scripts with float user setting inputs which default values to 0 since na is unavailable as a user input default.
Parameters:
value (float) : The value to check
Returns: True if the given value is 0 or na
getDecimals()
Calculates how many decimals are on the quote price of the current market.
Returns: The current decimal places on the market quote price
truncate(number, decimals)
Truncates the given number. Required params: mumber.
Parameters:
number (float) : Number to truncate
decimals (int) : Decimal places to cut down to
Returns: The input number, but as a string truncated to X decimals
getPipSize(multiplier)
Calculates the pip size of the current market.
Parameters:
multiplier (int) : The mintick point multiplier (1 by default, 10 for FX/Crypto/CFD but can be used to override when certain markets require)
Returns: The pip size for the current market
toWhole(number)
Converts pips into whole numbers. Required params: number.
Parameters:
number (float) : The pip number to convert into a whole number
Returns: The converted number
toPips(number)
Converts whole numbers back into pips. Required params: number.
Parameters:
number (float) : The whole number to convert into pips
Returns: The converted number
debug(txt, tooltip, displayLabel)
Prints to console and generates a debug label with the given text. Required params: txt.
Parameters:
txt (string) : Text to display
tooltip (string) : Tooltip to display (optional)
displayLabel (bool) : Turns on/off chart label (default: off)
Returns: Nothing
order(licenseID, command, symbol, parameters, accfilter, comment, secret, freq, debug)
Generates an alert string. Required params: licenseID, command.
Parameters:
licenseID (string) : Your PC license ID
command (string) : Command to send
symbol (string) : The symbol to trigger this order on
parameters (string) : Other optional parameters to include
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: An alert string with valid PC syntax based on supplied parameters
market_order(licenseID, buy, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a market entry alert with relevant syntax commands. Required params: licenseID, buy, risk.
Parameters:
licenseID (string) : Your PC license ID
buy (bool) : true=buy/long, false=sell/short
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A market order alert string with valid PC syntax based on supplied parameters
buy(licenseID, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a market buy alert with relevant syntax commands. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A market order alert string with valid PC syntax based on supplied parameters
sell(licenseID, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a market sell alert with relevant syntax commands. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A market order alert string with valid PC syntax based on supplied parameters
closeall(licenseID, comment, secret, freq, debug)
Closes all open trades at market regardless of symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closealleaoff(licenseID, comment, secret, freq, debug)
Closes all open trades at market regardless of symbol, and turns the EA off. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelong(licenseID, symbol, comment, secret, freq, debug)
Closes all long trades at market for the given symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshort(licenseID, symbol, comment, secret, freq, debug)
Closes all open short trades at market for the given symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongshort(licenseID, symbol, comment, secret, freq, debug)
Closes all open trades at market for the given symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongbuy(licenseID, risk, symbol, comment, secret, freq, debug)
Close all long positions and open a new long at market for the given symbol with given risk/contracts. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk or contracts (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshortsell(licenseID, risk, symbol, comment, secret, freq, debug)
Close all short positions and open a new short at market for the given symbol with given risk/contracts. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : Risk or contracts (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltplong(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any open long trades on the given symbol with the given values. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpshort(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any open short trades on the given symbol with the given values. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongpct(licenseID, symbol, comment, secret, freq, debug)
Close a percentage of open long positions (according to EA settings). Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshortpct(licenseID, symbol, comment, secret, freq, debug)
Close a percentage of open short positions (according to EA settings). Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closelongvol(licenseID, risk, symbol, comment, secret, freq, debug)
Close all open long contracts on the current symbol until the given risk value is remaining. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : The quantity to leave remaining
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
closeshortvol(licenseID, risk, symbol, comment, secret, freq, debug)
Close all open short contracts on the current symbol until the given risk value is remaining. Required params: licenseID, risk.
Parameters:
licenseID (string) : Your PC license ID
risk (float) : The quantity to leave remaining
symbol (string) : Symbol to act on (defaults to current symbol)
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
limit_order(licenseID, buy, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a limit order alert with relevant syntax commands. Required params: licenseID, buy, price, risk.
Parameters:
licenseID (string) : Your PC license ID
buy (bool) : true=buy/long, false=sell/short
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A limit order alert string with valid PC syntax based on supplied parameters
buylimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a buylimit order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A limit order alert string with valid PC syntax based on supplied parameters
selllimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a selllimit order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A limit order alert string with valid PC syntax based on supplied parameters
stop_order(licenseID, buy, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a stop order alert with relevant syntax commands. Required params: licenseID, buy, price, risk.
Parameters:
licenseID (string) : Your PC license ID
buy (bool) : true=buy/long, false=sell/short
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
buystop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a buystop order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
sellstop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Generates a sellstop order alert with relevant syntax commands. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancel_neworder(licenseID, order, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancel + place new order template function.
Parameters:
licenseID (string) : Your PC license ID
order (string) : Cancel order type
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancellongbuystop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all long orders with the specified symbol and places a new buystop order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancellongbuylimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all long orders with the specified symbol and places a new buylimit order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancelshortsellstop(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all short orders with the specified symbol and places a sellstop order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancelshortselllimit(licenseID, price, risk, sl, tp, betrigger, beoffset, spread, trailtrig, traildist, trailstep, atrtimeframe, atrperiod, atrmultiplier, atrshift, atrtrigger, symbol, accfilter, comment, secret, freq, debug)
Cancels all short orders with the specified symbol and places a selllimit order. Required params: licenseID, price, risk.
Parameters:
licenseID (string) : Your PC license ID
price (float) : Price or pips to set limit order (according to EA settings)
risk (float) : Risk quantity (according to EA settings)
sl (float) : Stop loss distance in pips or price
tp (float) : Take profit distance in pips or price
betrigger (float) : Breakeven will be activated after the position gains this number of pips
beoffset (float) : Offset from entry price. This is the amount of pips you'd like to protect
spread (float) : Enter the position only if the spread is equal or less than the specified value in pips
trailtrig (float) : Trailing stop-loss will be activated after a trade gains this number of pips
traildist (float) : Distance of the trailing stop-loss from current price
trailstep (float) : Moves trailing stop-loss once price moves to favourable by a specified number of pips
atrtimeframe (int) : ATR Trailing Stop timeframe, only updates once per bar close. Options: 1, 5, 15, 30, 60, 240, 1440
atrperiod (int) : ATR averaging period
atrmultiplier (float) : Multiple of ATR to utilise in the new SL computation, default = 1
atrshift (int) : Relative shift of price information, 0 uses latest candle, 1 uses second last, etc. Default = 0
atrtrigger (int) : Activate the trigger of ATR Trailing after market moves favourably by a number of pips. Default = 0 (instant)
symbol (string) : The symbol to trigger this order on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment (maximum 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A stop order alert string with valid PC syntax based on supplied parameters
cancellong(licenseID, symbol, accfilter, comment, secret, freq, debug)
Cancels all pending long orders with the specified symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A cancel long alert command
cancelshort(licenseID, symbol, accfilter, comment, secret, freq, debug)
Cancels all pending short orders with the specified symbol. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: A cancel short alert command
newsltpbuystop(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending buy stop orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpbuylimit(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending buy limit orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpsellstop(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending sell stop orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
newsltpselllimit(licenseID, sl, tp, symbol, accfilter, comment, secret, freq, debug)
Updates the stop loss and/or take profit of any pending sell limit orders on the given symbol. Required params: licenseID, sl and/or tp.
Parameters:
licenseID (string) : Your PC license ID
sl (float) : Stop loss pips or price (according to EA settings)
tp (float) : Take profit pips or price (according to EA settings)
symbol (string) : Symbol to act on (defaults to current symbol)
accfilter (float) : Optional minimum account balance filter
comment (string) : Optional comment to include (max 20 characters)
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
eaoff(licenseID, secret, freq, debug)
Turns the EA off. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
eaon(licenseID, secret, freq, debug)
Turns the EA on. Required params: licenseID.
Parameters:
licenseID (string) : Your PC license ID
secret (string) : Optional secret key (must be enabled in dashboard)
freq (string) : Alert frequency. Default = "all", options = "once_per_bar", "once_per_bar_close" and "none"
debug (bool) : Turns on/off debug label
Returns: The required alert syntax as a string
ICT Killzones and Sessions W/ Silver Bullet + MacrosForex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
Usage:
To maximize your experience, minimize the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience.
Forex and Equity Session Tracker with Killzones, Silver Bullet, and Macro Times
This Pine Script indicator is a comprehensive timekeeping tool designed specifically for ICT traders using any time-based strategy. It helps you visualize and keep track of forex and equity session times, kill zones, macro times, and silver bullet hours.
Features:
Session and Killzone Lines:
Green: London Open (LO)
White: New York (NY)
Orange: Australian (AU)
Purple: Asian (AS)
Includes AM and PM session markers.
Dotted/Striped Lines indicate overlapping kill zones within the session timeline.
Customization Options:
Display sessions and killzones in collapsed or full view.
Hide specific sessions or killzones based on your preferences.
Customize colors, texts, and sizes.
Option to hide drawings older than the current day.
Automatic Updates:
The indicator draws all lines and boxes at the start of a new day.
Automatically adjusts time-based boxes according to the New York timezone.
Killzone Time Windows (for indices):
London KZ: 02:00 - 05:00
New York AM KZ: 07:00 - 10:00
New York PM KZ: 13:30 - 16:00
Silver Bullet Times:
03:00 - 04:00
10:00 - 11:00
14:00 - 15:00
Macro Times:
02:33 - 03:00
04:03 - 04:30
08:50 - 09:10
09:50 - 10:10
10:50 - 11:10
11:50 - 12:50
Latest Update:
January 15:
Added option to automatically change text coloring based on the chart.
Included additional optional macro times per user request:
12:50 - 13:10
13:50 - 14:15
14:50 - 15:10
15:50 - 16:15
ICT Sessions and Kill Zones
What They Are:
ICT Sessions: These are specific times during the trading day when market activity is expected to be higher, such as the London Open, New York Open, and the Asian session.
Kill Zones: These are specific time windows within these sessions where the probability of significant price movements is higher. For example, the New York AM Kill Zone is typically from 8:30 AM to 11:00 AM EST.
How to Use Them:
Identify the Session: Determine which trading session you are in (London, New York, or Asian).
Focus on Kill Zones: Within that session, focus on the kill zones for potential trade setups. For instance, during the New York session, look for setups between 8:30 AM and 11:00 AM EST.
Silver Bullets
What They Are:
Silver Bullets: These are specific, high-probability trade setups that occur within the kill zones. They are designed to be "one shot, one kill" trades, meaning they aim for precise and effective entries and exits.
How to Use Them:
Time-Based Setup: Look for these setups within the designated kill zones. For example, between 10:00 AM and 11:00 AM for the New York AM session .
Chart Analysis: Start with higher time frames like the 15-minute chart and then refine down to 5-minute and 1-minute charts to identify imbalances or specific patterns .
Macros
What They Are:
Macros: These are broader market conditions and trends that influence your trading decisions. They include understanding the overall market direction, seasonal tendencies, and the Commitment of Traders (COT) reports.
How to Use Them:
Understand Market Conditions: Be aware of the macroeconomic factors and market conditions that could affect price movements.
Seasonal Tendencies: Know the seasonal patterns that might influence the market direction.
COT Reports: Use the Commitment of Traders reports to understand the positioning of large traders and commercial hedgers .
Putting It All Together
Preparation: Understand the macro conditions and review the COT reports.
Session and Kill Zone: Identify the trading session and focus on the kill zones.
Silver Bullet Setup: Look for high-probability setups within the kill zones using refined chart analysis.
Execution: Execute the trade with precision, aiming for a "one shot, one kill" outcome.
By following these steps, you can effectively use ICT sessions, kill zones, silver bullets, and macros to enhance your trading strategy.
Usage:
To maximize your experience, shrink the pane where the script is drawn. This minimizes distractions while keeping the essential time markers visible. The script is designed to help traders by clearly annotating key trading periods without overwhelming their charts.
Originality and Justification:
This indicator uniquely integrates various time-based strategies essential for ICT traders. Unlike other indicators, it consolidates session times, kill zones, macro times, and silver bullet hours into one comprehensive tool. This allows traders to have a clear and organized view of critical trading periods, facilitating better decision-making.
Credits:
This script incorporates open-source elements with significant improvements to enhance functionality and user experience. All credit goes to itradesize for the SB + Macro boxes
Hellenic EMA Matrix - PremiumHellenic EMA Matrix - Alpha Omega Premium
Complete User Guide
Table of Contents
Introduction
Indicator Philosophy
Mathematical Constants
EMA Types
Settings
Trading Signals
Visualization
Usage Strategies
FAQ
Introduction
Hellenic EMA Matrix is a premium indicator based on mathematical constants of nature: Phi (Phi - Golden Ratio), Pi (Pi), e (Euler's number). The indicator uses these universal constants to create dynamic EMAs that adapt to the natural rhythms of the market.
Key Features:
6 EMA types based on mathematical constants
Premium visualization with Neon Glow and Gradient Clouds
Automatic Fast/Mid/Slow EMA sorting
STRONG signals for powerful trends
Pulsing Ribbon Bar for instant trend assessment
Works on all timeframes (M1 - MN)
Indicator Philosophy
Why Mathematical Constants?
Traditional EMAs use arbitrary periods (9, 21, 50, 200). Hellenic Matrix goes further, using universal mathematical constants found in nature:
Phi (1.618) - Golden Ratio: galaxy spirals, seashells, human body proportions
Pi (3.14159) - Pi: circles, waves, cycles
e (2.71828) - Natural logarithm base: exponential growth, radioactive decay
Markets are also a natural system composed of millions of participants. Using mathematical constants allows tuning into the natural rhythms of market cycles.
Mathematical Constants
Phi (Phi) - Golden Ratio
Phi = 1.618033988749895
Properties:
Phi² = Phi + 1 = 2.618
Phi³ = 4.236
Phi⁴ = 6.854
Application: Ideal for trending movements and Fibonacci corrections
Pi (Pi) - Pi Number
Pi = 3.141592653589793
Properties:
2Pi = 6.283 (full circle)
3Pi = 9.425
4Pi = 12.566
Application: Excellent for cyclical markets and wave structures
e (Euler) - Euler's Number
e = 2.718281828459045
Properties:
e² = 7.389
e³ = 20.085
e⁴ = 54.598
Application: Suitable for exponential movements and volatile markets
EMA Types
1. Phi (Phi) - Golden Ratio EMA
Description: EMA based on the golden ratio
Period Formula:
Period = Phi^n × Base Multiplier
Parameters:
Phi Power Level (1-8): Power of Phi
Phi¹ = 1.618 → ~16 period (with Base=10)
Phi² = 2.618 → ~26 period
Phi³ = 4.236 → ~42 period (recommended)
Phi⁴ = 6.854 → ~69 period
Recommendations:
Phi² or Phi³ for day trading
Phi⁴ or Phi⁵ for swing trading
Works excellently as Fast EMA
2. Pi (Pi) - Circular EMA
Description: EMA based on Pi for cyclical movements
Period Formula:
Period = Pi × Multiple × Base Multiplier
Parameters:
Pi Multiple (1-10): Pi multiplier
1Pi = 3.14 → ~31 period (with Base=10)
2Pi = 6.28 → ~63 period (recommended)
3Pi = 9.42 → ~94 period
Recommendations:
2Pi ideal as Mid or Slow EMA
Excellently identifies cycles and waves
Use on volatile markets (crypto, forex)
3. e (Euler) - Natural EMA
Description: EMA based on natural logarithm
Period Formula:
Period = e^n × Base Multiplier
Parameters:
e Power Level (1-6): Power of e
e¹ = 2.718 → ~27 period (with Base=10)
e² = 7.389 → ~74 period (recommended)
e³ = 20.085 → ~201 period
Recommendations:
e² works excellently as Slow EMA
Ideal for stocks and indices
Filters noise well on lower timeframes
4. Delta (Delta) - Adaptive EMA
Description: Adaptive EMA that changes period based on volatility
Period Formula:
Period = Base Period × (1 + (Volatility - 1) × Factor)
Parameters:
Delta Base Period (5-200): Base period (default 20)
Delta Volatility Sensitivity (0.5-5.0): Volatility sensitivity (default 2.0)
How it works:
During low volatility → period decreases → EMA reacts faster
During high volatility → period increases → EMA smooths noise
Recommendations:
Works excellently on news and sharp movements
Use as Fast EMA for quick adaptation
Sensitivity 2.0-3.0 for crypto, 1.0-2.0 for stocks
5. Sigma (Sigma) - Composite EMA
Description: Composite EMA combining multiple active EMAs
Composition Methods:
Weighted Average (default):
Sigma = (Phi + Pi + e + Delta) / 4
Simple average of all active EMAs
Geometric Mean:
Sigma = fourth_root(Phi × Pi × e × Delta)
Geometric mean (more conservative)
Harmonic Mean:
Sigma = 4 / (1/Phi + 1/Pi + 1/e + 1/Delta)
Harmonic mean (more weight to smaller values)
Recommendations:
Enable for additional confirmation
Use as Mid EMA
Weighted Average - most universal method
6. Lambda (Lambda) - Wave EMA
Description: Wave EMA with sinusoidal period modulation
Period Formula:
Period = Base Period × (1 + Amplitude × sin(2Pi × bar / Frequency))
Parameters:
Lambda Base Period (10-200): Base period
Lambda Wave Amplitude (0.1-2.0): Wave amplitude
Lambda Wave Frequency (10-200): Wave frequency in bars
How it works:
Period pulsates sinusoidally
Creates wave effect following market cycles
Recommendations:
Experimental EMA for advanced users
Works well on cyclical markets
Frequency = 50 for day trading, 100+ for swing
Settings
Matrix Core Settings
Base Multiplier (1-100)
Multiplies all EMA periods
Base = 1: Very fast EMAs (Phi³ = 4, 2Pi = 6, e² = 7)
Base = 10: Standard (Phi³ = 42, 2Pi = 63, e² = 74)
Base = 20: Slow EMAs (Phi³ = 85, 2Pi = 126, e² = 148)
Recommendations by timeframe:
M1-M5: Base = 5-10
M15-H1: Base = 10-15 (recommended)
H4-D1: Base = 15-25
W1-MN: Base = 25-50
Matrix Source
Data source selection for EMA calculation:
close - closing price (standard)
open - opening price
high - high
low - low
hl2 - (high + low) / 2
hlc3 - (high + low + close) / 3
ohlc4 - (open + high + low + close) / 4
When to change:
hlc3 or ohlc4 for smoother signals
high for aggressive longs
low for aggressive shorts
Manual EMA Selection
Critically important setting! Determines which EMAs are used for signal generation.
Use Manual Fast/Slow/Mid Selection
Enabled (default): You select EMAs manually
Disabled: Automatic selection by periods
Fast EMA
Fast EMA - reacts first to price changes
Recommendations:
Phi Golden (recommended) - universal choice
Delta Adaptive - for volatile markets
Must be fastest (smallest period)
Slow EMA
Slow EMA - determines main trend
Recommendations:
Pi Circular (recommended) - excellent trend filter
e Natural - for smoother trend
Must be slowest (largest period)
Mid EMA
Mid EMA - additional signal filter
Recommendations:
e Natural (recommended) - excellent middle level
Pi Circular - alternative
None - for more frequent signals (only 2 EMAs)
IMPORTANT: The indicator automatically sorts selected EMAs by their actual periods:
Fast = EMA with smallest period
Mid = EMA with middle period
Slow = EMA with largest period
Therefore, you can select any combination - the indicator will arrange them correctly!
Premium Visualization
Neon Glow
Enable Neon Glow for EMAs - adds glowing effect around EMA lines
Glow Strength:
Light - subtle glow
Medium (recommended) - optimal balance
Strong - bright glow (may be too bright)
Effect: 2 glow layers around each EMA for 3D effect
Gradient Clouds
Enable Gradient Clouds - fills space between EMAs with gradient
Parameters:
Cloud Transparency (85-98): Cloud transparency
95-97 (recommended)
Higher = more transparent
Dynamic Cloud Intensity - automatically changes transparency based on EMA distance
Cloud Colors:
Phi-Pi Cloud:
Blue - when Pi above Phi (bullish)
Gold - when Phi above Pi (bearish)
Pi-e Cloud:
Green - when e above Pi (bullish)
Blue - when Pi above e (bearish)
2 layers for volumetric effect
Pulsing Ribbon Bar
Enable Pulsing Indicator Bar - pulsing strip at bottom/top of chart
Parameters:
Ribbon Position: Top / Bottom (recommended)
Pulse Speed: Slow / Medium (recommended) / Fast
Symbols and colors:
Green filled square - STRONG BULLISH
Pink filled square - STRONG BEARISH
Blue hollow square - Bullish (regular)
Red hollow square - Bearish (regular)
Purple rectangle - Neutral
Effect: Pulsation with sinusoid for living market feel
Signal Bar Highlights
Enable Signal Bar Highlights - highlights bars with signals
Parameters:
Highlight Transparency (88-96): Highlight transparency
Highlight Style:
Light Fill (recommended) - bar background fill
Thin Line - bar outline only
Highlights:
Golden Cross - green
Death Cross - pink
STRONG BUY - green
STRONG SELL - pink
Show Greek Labels
Shows Greek alphabet letters on last bar:
Phi - Phi EMA (gold)
Pi - Pi EMA (blue)
e - Euler EMA (green)
Delta - Delta EMA (purple)
Sigma - Sigma EMA (pink)
When to use: For education or presentations
Show Old Background
Old background style (not recommended):
Green background - STRONG BULLISH
Pink background - STRONG BEARISH
Blue background - Bullish
Red background - Bearish
Not recommended - use new Gradient Clouds and Pulsing Bar
Info Table
Show Info Table - table with indicator information
Parameters:
Position: Top Left / Top Right (recommended) / Bottom Left / Bottom Right
Size: Tiny / Small (recommended) / Normal / Large
Table contents:
EMA list - periods and current values of all active EMAs
Effects - active visual effects
TREND - current trend state:
STRONG UP - strong bullish
STRONG DOWN - strong bearish
Bullish - regular bullish
Bearish - regular bearish
Neutral - neutral
Momentum % - percentage deviation of price from Fast EMA
Setup - current Fast/Slow/Mid configuration
Trading Signals
Show Golden/Death Cross
Golden Cross - Fast EMA crosses Slow EMA from below (bullish signal) Death Cross - Fast EMA crosses Slow EMA from above (bearish signal)
Symbols:
Yellow dot "GC" below - Golden Cross
Dark red dot "DC" above - Death Cross
Show STRONG Signals
STRONG BUY and STRONG SELL - the most powerful indicator signals
Conditions for STRONG BULLISH:
EMA Alignment: Fast > Mid > Slow (all EMAs aligned)
Trend: Fast > Slow (clear uptrend)
Distance: EMAs separated by minimum 0.15%
Price Position: Price above Fast EMA
Fast Slope: Fast EMA rising
Slow Slope: Slow EMA rising
Mid Trending: Mid EMA also rising (if enabled)
Conditions for STRONG BEARISH:
Same but in reverse
Visual display:
Green label "STRONG BUY" below bar
Pink label "STRONG SELL" above bar
Difference from Golden/Death Cross:
Golden/Death Cross = crossing moment (1 bar)
STRONG signal = sustained trend (lasts several bars)
IMPORTANT: After fixes, STRONG signals now:
Work on all timeframes (M1 to MN)
Don't break on small retracements
Work with any Fast/Mid/Slow combination
Automatically adapt thanks to EMA sorting
Show Stop Loss/Take Profit
Automatic SL/TP level calculation on STRONG signal
Parameters:
Stop Loss (ATR) (0.5-5.0): ATR multiplier for stop loss
1.5 (recommended) - standard
1.0 - tight stop
2.0-3.0 - wide stop
Take Profit R:R (1.0-5.0): Risk/reward ratio
2.0 (recommended) - standard (risk 1.5 ATR, profit 3.0 ATR)
1.5 - conservative
3.0-5.0 - aggressive
Formulas:
LONG:
Stop Loss = Entry - (ATR × Stop Loss ATR)
Take Profit = Entry + (ATR × Stop Loss ATR × Take Profit R:R)
SHORT:
Stop Loss = Entry + (ATR × Stop Loss ATR)
Take Profit = Entry - (ATR × Stop Loss ATR × Take Profit R:R)
Visualization:
Red X - Stop Loss
Green X - Take Profit
Levels remain active while STRONG signal persists
Trading Signals
Signal Types
1. Golden Cross
Description: Fast EMA crosses Slow EMA from below
Signal: Beginning of bullish trend
How to trade:
ENTRY: On bar close with Golden Cross
STOP: Below local low or below Slow EMA
TARGET: Next resistance level or 2:1 R:R
Strengths:
Simple and clear
Works well on trending markets
Clear entry point
Weaknesses:
Lags (signal after movement starts)
Many false signals in ranging markets
May be late on fast moves
Optimal timeframes: H1, H4, D1
2. Death Cross
Description: Fast EMA crosses Slow EMA from above
Signal: Beginning of bearish trend
How to trade:
ENTRY: On bar close with Death Cross
STOP: Above local high or above Slow EMA
TARGET: Next support level or 2:1 R:R
Application: Mirror of Golden Cross
3. STRONG BUY
Description: All EMAs aligned + trend + all EMAs rising
Signal: Powerful bullish trend
How to trade:
ENTRY: On bar close with STRONG BUY or on pullback to Fast EMA
STOP: Below Fast EMA or automatic SL (if enabled)
TARGET: Automatic TP (if enabled) or by levels
TRAILING: Follow Fast EMA
Entry strategies:
Aggressive: Enter immediately on signal
Conservative: Wait for pullback to Fast EMA, then enter on bounce
Pyramiding: Add positions on pullbacks to Mid EMA
Position management:
Hold while STRONG signal active
Exit on STRONG SELL or Death Cross appearance
Move stop behind Fast EMA
Strengths:
Most reliable indicator signal
Doesn't break on pullbacks
Catches large moves
Works on all timeframes
Weaknesses:
Appears less frequently than other signals
Requires confirmation (multiple conditions)
Optimal timeframes: All (M5 - D1)
4. STRONG SELL
Description: All EMAs aligned down + downtrend + all EMAs falling
Signal: Powerful bearish trend
How to trade: Mirror of STRONG BUY
Visual Signals
Pulsing Ribbon Bar
Quick market assessment at a glance:
Symbol Color State
Filled square Green STRONG BULLISH
Filled square Pink STRONG BEARISH
Hollow square Blue Bullish
Hollow square Red Bearish
Rectangle Purple Neutral
Pulsation: Sinusoidal, creates living effect
Signal Bar Highlights
Bars with signals are highlighted:
Green highlight: STRONG BUY or Golden Cross
Pink highlight: STRONG SELL or Death Cross
Gradient Clouds
Colored space between EMAs shows trend strength:
Wide clouds - strong trend
Narrow clouds - weak trend or consolidation
Color change - trend change
Info Table
Quick reference in corner:
TREND: Current state (STRONG UP, Bullish, Neutral, Bearish, STRONG DOWN)
Momentum %: Movement strength
Effects: Active visual effects
Setup: Fast/Slow/Mid configuration
Usage Strategies
Strategy 1: "Golden Trailing"
Idea: Follow STRONG signals using Fast EMA as trailing stop
Settings:
Fast: Phi Golden (Phi³)
Mid: Pi Circular (2Pi)
Slow: e Natural (e²)
Base Multiplier: 10
Timeframe: H1, H4
Entry rules:
Wait for STRONG BUY
Enter on bar close or on pullback to Fast EMA
Stop below Fast EMA
Management:
Hold position while STRONG signal active
Move stop behind Fast EMA daily
Exit on STRONG SELL or Death Cross
Take Profit:
Partially close at +2R
Trail remainder until exit signal
For whom: Swing traders, trend followers
Pros:
Catches large moves
Simple rules
Emotionally comfortable
Cons:
Requires patience
Possible extended drawdowns on pullbacks
Strategy 2: "Scalping Bounces"
Idea: Scalp bounces from Fast EMA during STRONG trend
Settings:
Fast: Delta Adaptive (Base 15, Sensitivity 2.0)
Mid: Phi Golden (Phi²)
Slow: Pi Circular (2Pi)
Base Multiplier: 5
Timeframe: M5, M15
Entry rules:
STRONG signal must be active
Wait for price pullback to Fast EMA
Enter on bounce (candle closes above/below Fast EMA)
Stop behind local extreme (15-20 pips)
Take Profit:
+1.5R or to Mid EMA
Or to next level
For whom: Active day traders
Pros:
Many signals
Clear entry point
Quick profits
Cons:
Requires constant monitoring
Not all bounces work
Requires discipline for frequent trading
Strategy 3: "Triple Filter"
Idea: Enter only when all 3 EMAs and price perfectly aligned
Settings:
Fast: Phi Golden (Phi³)
Mid: e Natural (e²)
Slow: Pi Circular (3Pi)
Base Multiplier: 15
Timeframe: H4, D1
Entry rules (LONG):
STRONG BUY active
Price above all three EMAs
Fast > Mid > Slow (all aligned)
All EMAs rising (slope up)
Gradient Clouds wide and bright
Entry:
On bar close meeting all conditions
Or on next pullback to Fast EMA
Stop:
Below Mid EMA or -1.5 ATR
Take Profit:
First target: +3R
Second target: next major level
Trailing: Mid EMA
For whom: Conservative swing traders, investors
Pros:
Very reliable signals
Minimum false entries
Large profit potential
Cons:
Rare signals (2-5 per month)
Requires patience
Strategy 4: "Adaptive Scalper"
Idea: Use only Delta Adaptive EMA for quick volatility reaction
Settings:
Fast: Delta Adaptive (Base 10, Sensitivity 3.0)
Mid: None
Slow: Delta Adaptive (Base 30, Sensitivity 2.0)
Base Multiplier: 3
Timeframe: M1, M5
Feature: Two different Delta EMAs with different settings
Entry rules:
Golden Cross between two Delta EMAs
Both Delta EMAs must be rising/falling
Enter on next bar
Stop:
10-15 pips or below Slow Delta EMA
Take Profit:
+1R to +2R
Or Death Cross
For whom: Scalpers on cryptocurrencies and forex
Pros:
Instant volatility adaptation
Many signals on volatile markets
Quick results
Cons:
Much noise on calm markets
Requires fast execution
High commissions may eat profits
Strategy 5: "Cyclical Trader"
Idea: Use Pi and Lambda for trading cyclical markets
Settings:
Fast: Pi Circular (1Pi)
Mid: Lambda Wave (Base 30, Amplitude 0.5, Frequency 50)
Slow: Pi Circular (3Pi)
Base Multiplier: 10
Timeframe: H1, H4
Entry rules:
STRONG signal active
Lambda Wave EMA synchronized with trend
Enter on bounce from Lambda Wave
For whom: Traders of cyclical assets (some altcoins, commodities)
Pros:
Catches cyclical movements
Lambda Wave provides additional entry points
Cons:
More complex to configure
Not for all markets
Lambda Wave may give false signals
Strategy 6: "Multi-Timeframe Confirmation"
Idea: Use multiple timeframes for confirmation
Scheme:
Higher TF (D1): Determine trend direction (STRONG signal)
Middle TF (H4): Wait for STRONG signal in same direction
Lower TF (M15): Look for entry point (Golden Cross or bounce from Fast EMA)
Settings for all TFs:
Fast: Phi Golden (Phi³)
Mid: e Natural (e²)
Slow: Pi Circular (2Pi)
Base Multiplier: 10
Rules:
All 3 TFs must show one trend
Entry on lower TF
Stop by lower TF
Target by higher TF
For whom: Serious traders and investors
Pros:
Maximum reliability
Large profit targets
Minimum false signals
Cons:
Rare setups
Requires analysis of multiple charts
Experience needed
Practical Tips
DOs
Use STRONG signals as primary - they're most reliable
Let signals develop - don't exit on first pullback
Use trailing stop - follow Fast EMA
Combine with levels - S/R, Fibonacci, volumes
Test on demo before real
Adjust Base Multiplier for your timeframe
Enable visual effects - they help see the picture
Use Info Table - quick situation assessment
Watch Pulsing Bar - instant state indicator
Trust auto-sorting of Fast/Mid/Slow
DON'Ts
Don't trade against STRONG signal - trend is your friend
Don't ignore Mid EMA - it adds reliability
Don't use too small Base Multiplier on higher TFs
Don't enter on Golden Cross in range - check for trend
Don't change settings during open position
Don't forget risk management - 1-2% per trade
Don't trade all signals in row - choose best ones
Don't use indicator in isolation - combine with Price Action
Don't set too tight stops - let trade breathe
Don't over-optimize - simplicity = reliability
Optimal Settings by Asset
US Stocks (SPY, AAPL, TSLA)
Recommendation:
Fast: Phi Golden (Phi³)
Mid: e Natural (e²)
Slow: Pi Circular (2Pi)
Base: 10-15
Timeframe: H4, D1
Features:
Use on daily for swing
STRONG signals very reliable
Works well on trending stocks
Forex (EUR/USD, GBP/USD)
Recommendation:
Fast: Delta Adaptive (Base 15, Sens 2.0)
Mid: Phi Golden (Phi²)
Slow: Pi Circular (2Pi)
Base: 8-12
Timeframe: M15, H1, H4
Features:
Delta Adaptive works excellently on news
Many signals on M15-H1
Consider spreads
Cryptocurrencies (BTC, ETH, altcoins)
Recommendation:
Fast: Delta Adaptive (Base 10, Sens 3.0)
Mid: Pi Circular (2Pi)
Slow: e Natural (e²)
Base: 5-10
Timeframe: M5, M15, H1
Features:
High volatility - adaptation needed
STRONG signals can last days
Be careful with scalping on M1-M5
Commodities (Gold, Oil)
Recommendation:
Fast: Pi Circular (1Pi)
Mid: Phi Golden (Phi³)
Slow: Pi Circular (3Pi)
Base: 12-18
Timeframe: H4, D1
Features:
Pi works excellently on cyclical commodities
Gold responds especially well to Phi
Oil volatile - use wide stops
Indices (S&P500, Nasdaq, DAX)
Recommendation:
Fast: Phi Golden (Phi³)
Mid: e Natural (e²)
Slow: Pi Circular (2Pi)
Base: 15-20
Timeframe: H4, D1, W1
Features:
Very trending instruments
STRONG signals last weeks
Good for position trading
Alerts
The indicator supports 6 alert types:
1. Golden Cross
Message: "Hellenic Matrix: GOLDEN CROSS - Fast EMA crossed above Slow EMA - Bullish trend starting!"
When: Fast EMA crosses Slow EMA from below
2. Death Cross
Message: "Hellenic Matrix: DEATH CROSS - Fast EMA crossed below Slow EMA - Bearish trend starting!"
When: Fast EMA crosses Slow EMA from above
3. STRONG BULLISH
Message: "Hellenic Matrix: STRONG BULLISH SIGNAL - All EMAs aligned for powerful uptrend!"
When: All conditions for STRONG BUY met (first bar)
4. STRONG BEARISH
Message: "Hellenic Matrix: STRONG BEARISH SIGNAL - All EMAs aligned for powerful downtrend!"
When: All conditions for STRONG SELL met (first bar)
5. Bullish Ribbon
Message: "Hellenic Matrix: BULLISH RIBBON - EMAs aligned for uptrend"
When: EMAs aligned bullish + price above Fast EMA (less strict condition)
6. Bearish Ribbon
Message: "Hellenic Matrix: BEARISH RIBBON - EMAs aligned for downtrend"
When: EMAs aligned bearish + price below Fast EMA (less strict condition)
How to Set Up Alerts:
Open indicator on chart
Click on three dots next to indicator name
Select "Create Alert"
In "Condition" field select needed alert:
Golden Cross
Death Cross
STRONG BULLISH
STRONG BEARISH
Bullish Ribbon
Bearish Ribbon
Configure notification method:
Pop-up in browser
Email
SMS (in Premium accounts)
Push notifications in mobile app
Webhook (for automation)
Select frequency:
Once Per Bar Close (recommended) - once on bar close
Once Per Bar - during bar formation
Only Once - only first time
Click "Create"
Tip: Create separate alerts for different timeframes and instruments
FAQ
1. Why don't STRONG signals appear?
Possible reasons:
Incorrect Fast/Mid/Slow order
Solution: Indicator automatically sorts EMAs by periods, but ensure selected EMAs have different periods
Base Multiplier too large
Solution: Reduce Base to 5-10 on lower timeframes
Market in range
Solution: STRONG signals appear only in trends - this is normal
Too strict EMA settings
Solution: Try classic combination: Phi³ / Pi×2 / e² with Base=10
Mid EMA too close to Fast or Slow
Solution: Select Mid EMA with period between Fast and Slow
2. How often should STRONG signals appear?
Normal frequency:
M1-M5: 5-15 signals per day (very active markets)
M15-H1: 2-8 signals per day
H4: 3-10 signals per week
D1: 2-5 signals per month
W1: 2-6 signals per year
If too many signals - market very volatile or Base too small
If too few signals - market in range or Base too large
4. What are the best settings for beginners?
Universal "out of the box" settings:
Matrix Core:
Base Multiplier: 10
Source: close
Phi Golden: Enabled, Power = 3
Pi Circular: Enabled, Multiple = 2
e Natural: Enabled, Power = 2
Delta Adaptive: Enabled, Base = 20, Sensitivity = 2.0
Manual Selection:
Fast: Phi Golden
Mid: e Natural
Slow: Pi Circular
Visualization:
Gradient Clouds: ON
Neon Glow: ON (Medium)
Pulsing Bar: ON (Medium)
Signal Highlights: ON (Light Fill)
Table: ON (Top Right, Small)
Signals:
Golden/Death Cross: ON
STRONG Signals: ON
Stop Loss: OFF (while learning)
Timeframe for learning: H1 or H4
5. Can I use only one EMA?
No, minimum 2 EMAs (Fast and Slow) for signal generation.
Mid EMA is optional:
With Mid EMA = more reliable but rarer signals
Without Mid EMA = more signals but less strict filtering
Recommendation: Start with 3 EMAs (Fast/Mid/Slow), then experiment
6. Does the indicator work on cryptocurrencies?
Yes, works excellently! Especially good on:
Bitcoin (BTC)
Ethereum (ETH)
Major altcoins (SOL, BNB, XRP)
Recommended settings for crypto:
Fast: Delta Adaptive (Base 10-15, Sensitivity 2.5-3.0)
Mid: Pi Circular (2Pi)
Slow: e Natural (e²)
Base: 5-10
Timeframe: M15, H1, H4
Crypto market features:
High volatility → use Delta Adaptive
24/7 trading → set alerts
Sharp movements → wide stops
7. Can I trade only with this indicator?
Technically yes, but NOT recommended.
Best approach - combine with:
Price Action - support/resistance levels, candle patterns
Volume - movement strength confirmation
Fibonacci - retracement and extension levels
RSI/MACD - divergences and overbought/oversold
Fundamental analysis - news, company reports
Hellenic Matrix:
Excellently determines trend and its strength
Provides clear entry/exit points
Doesn't consider fundamentals
Doesn't see major levels
8. Why do Gradient Clouds change color?
Color depends on EMA order:
Phi-Pi Cloud:
Blue - Pi EMA above Phi EMA (bullish alignment)
Gold - Phi EMA above Pi EMA (bearish alignment)
Pi-e Cloud:
Green - e EMA above Pi EMA (bullish alignment)
Blue - Pi EMA above e EMA (bearish alignment)
Color change = EMA order change = possible trend change
9. What is Momentum % in the table?
Momentum % = percentage deviation of price from Fast EMA
Formula:
Momentum = ((Close - Fast EMA) / Fast EMA) × 100
Interpretation:
+0.5% to +2% - normal bullish momentum
+2% to +5% - strong bullish momentum
+5% and above - overheating (correction possible)
-0.5% to -2% - normal bearish momentum
-2% to -5% - strong bearish momentum
-5% and below - oversold (bounce possible)
Usage:
Monitor momentum during STRONG signals
Large momentum = don't enter (wait for pullback)
Small momentum = good entry point
10. How to configure for scalping?
Settings for scalping (M1-M5):
Base Multiplier: 3-5
Source: close or hlc3 (smoother)
Fast: Delta Adaptive (Base 8-12, Sensitivity 3.0)
Mid: None (for more signals)
Slow: Phi Golden (Phi²) or Pi Circular (1Pi)
Visualization:
- Gradient Clouds: ON (helps see strength)
- Neon Glow: OFF (doesn't clutter chart)
- Pulsing Bar: ON (quick assessment)
- Signal Highlights: ON
Signals:
- Golden/Death Cross: ON
- STRONG Signals: ON
- Stop Loss: ON (1.0-1.5 ATR, R:R 1.5-2.0)
Scalping rules:
Trade only STRONG signals
Enter on bounce from Fast EMA
Tight stops (10-20 pips)
Quick take profit (+1R to +2R)
Don't hold through news
11. How to configure for long-term investing?
Settings for investing (D1-W1):
Base Multiplier: 20-30
Source: close
Fast: Phi Golden (Phi³ or Phi⁴)
Mid: e Natural (e²)
Slow: Pi Circular (3Pi or 4Pi)
Visualization:
- Gradient Clouds: ON
- Neon Glow: ON (Medium)
- Everything else - to taste
Signals:
- Golden/Death Cross: ON
- STRONG Signals: ON
- Stop Loss: OFF (use percentage stop)
Investing rules:
Enter only on STRONG signals
Hold while STRONG active (weeks/months)
Stop below Slow EMA or -10%
Take profit: by company targets or +50-100%
Ignore short-term pullbacks
12. What if indicator slows down chart?
Indicator is optimized, but if it slows:
Disable unnecessary visual effects:
Neon Glow: OFF (saves 8 plots)
Gradient Clouds: ON but low quality
Lambda Wave EMA: OFF (if not using)
Reduce number of active EMAs:
Sigma Composite: OFF
Lambda Wave: OFF
Leave only Phi, Pi, e, Delta
Simplify settings:
Pulsing Bar: OFF
Greek Labels: OFF
Info Table: smaller size
13. Can I use on different timeframes simultaneously?
Yes! Multi-timeframe analysis is very powerful:
Classic scheme:
Higher TF (D1, W1) - determine global trend
Wait for STRONG signal
This is our trading direction
Middle TF (H4, H1) - look for confirmation
STRONG signal in same direction
Precise entry zone
Lower TF (M15, M5) - entry point
Golden Cross or bounce from Fast EMA
Precise stop loss
Example:
W1: STRONG BUY active (global uptrend)
H4: STRONG BUY appeared (confirmation)
M15: Wait for Golden Cross or bounce from Fast EMA → ENTRY
Advantages:
Maximum reliability
Clear timeframe hierarchy
Large targets
14. How does indicator work on news?
Delta Adaptive EMA adapts excellently to news:
Before news:
Low volatility → Delta EMA becomes fast → pulls to price
During news:
Sharp volatility spike → Delta EMA slows → filters noise
After news:
Volatility normalizes → Delta EMA returns to normal
Recommendations:
Don't trade at news release moment (spreads widen)
Wait for STRONG signal after news (2-5 bars)
Use Delta Adaptive as Fast EMA for quick reaction
Widen stops by 50-100% during important news
Advanced Techniques
Technique 1: "Divergences with EMA"
Idea: Look for discrepancies between price and Fast EMA
Bullish divergence:
Price makes lower low
Fast EMA makes higher low
= Possible reversal up
Bearish divergence:
Price makes higher high
Fast EMA makes lower high
= Possible reversal down
How to trade:
Find divergence
Wait for STRONG signal in divergence direction
Enter on confirmation
Technique 2: "EMA Tunnel"
Idea: Use space between Fast and Slow EMA as "tunnel"
Rules:
Wide tunnel - strong trend, hold position
Narrow tunnel - weak trend or consolidation, caution
Tunnel narrowing - trend weakening, prepare to exit
Tunnel widening - trend strengthening, can add
Visually: Gradient Clouds show this automatically!
Trading:
Enter on STRONG signal (tunnel starts widening)
Hold while tunnel wide
Exit when tunnel starts narrowing
Technique 3: "Wave Analysis with Lambda"
Idea: Lambda Wave EMA creates sinusoid matching market cycles
Setup:
Lambda Base Period: 30
Lambda Wave Amplitude: 0.5
Lambda Wave Frequency: 50 (adjusted to asset cycle)
How to find correct Frequency:
Look at historical cycles (distance between local highs)
Average distance = your Frequency
Example: if highs every 40-60 bars, set Frequency = 50
Trading:
Enter when Lambda Wave at bottom of sinusoid (growth potential)
Exit when Lambda Wave at top (fall potential)
Combine with STRONG signals
Technique 4: "Cluster Analysis"
Idea: When all EMAs gather in narrow cluster = powerful breakout soon
Cluster signs:
All EMAs (Phi, Pi, e, Delta) within 0.5-1% of each other
Gradient Clouds almost invisible
Price jumping around all EMAs
Trading:
Identify cluster (all EMAs close)
Determine breakout direction (where more volume, higher TFs direction)
Wait for breakout and STRONG signal
Enter on confirmation
Target = cluster size × 3-5
This is very powerful technique for big moves!
Technique 5: "Sigma as Dynamic Level"
Idea: Sigma Composite EMA = average of all EMAs = magnetic level
Usage:
Enable Sigma Composite (Weighted Average)
Sigma works as dynamic support/resistance
Price often returns to Sigma before trend continuation
Trading:
In trend: Enter on bounces from Sigma
In range: Fade moves from Sigma (trade return to Sigma)
On breakout: Sigma becomes support/resistance
Risk Management
Basic Rules
1. Position Size
Conservative: 1% of capital per trade
Moderate: 2% of capital per trade (recommended)
Aggressive: 3-5% (only for experienced)
Calculation formula:
Lot Size = (Capital × Risk%) / (Stop in pips × Pip value)
2. Risk/Reward Ratio
Minimum: 1:1.5
Standard: 1:2 (recommended)
Optimal: 1:3
Aggressive: 1:5+
3. Maximum Drawdown
Daily: -3% to -5%
Weekly: -7% to -10%
Monthly: -15% to -20%
Upon reaching limit → STOP trading until end of period
Position Management Strategies
1. Fixed Stop
Method:
Stop below/above Fast EMA or local extreme
DON'T move stop against position
Can move to breakeven
For whom: Beginners, conservative traders
2. Trailing by Fast EMA
Method:
Each day (or bar) move stop to Fast EMA level
Position closes when price breaks Fast EMA
Advantages:
Stay in trend as long as possible
Automatically exit on reversal
For whom: Trend followers, swing traders
3. Partial Exit
Method:
50% of position close at +2R
50% hold with trailing by Mid EMA or Slow EMA
Advantages:
Lock profit
Leave position for big move
Psychologically comfortable
For whom: Universal method (recommended)
4. Pyramiding
Method:
First entry on STRONG signal (50% of planned position)
Add 25% on pullback to Fast EMA
Add another 25% on pullback to Mid EMA
Overall stop below Slow EMA
Advantages:
Average entry price
Reduce risk
Increase profit in strong trends
Caution:
Works only in trends
In range leads to losses
For whom: Experienced traders
Trading Psychology
Correct Mindset
1. Indicator is a tool, not holy grail
Indicator shows probability, not guarantee
There will be losing trades - this is normal
Important is series statistics, not one trade
2. Trust the system
If STRONG signal appeared - enter
Don't search for "perfect" moment
Follow trading plan
3. Patience
STRONG signals don't appear every day
Better miss signal than enter against trend
Quality over quantity
4. Discipline
Always set stop loss
Don't move stop against position
Don't increase risk after losses
Beginner Mistakes
1. "I know better than indicator"
Indicator says STRONG BUY, but you think "too high, will wait for pullback"
Result: miss profitable move
Solution: Trust signals or don't use indicator
2. "Will reverse now for sure"
Trading against STRONG trend
Result: stops, stops, stops
Solution: Trend is your friend, trade with trend
3. "Will hold a bit more"
Don't exit when STRONG signal disappears
Greed eats profit
Solution: If signal gone - exit!
4. "I'll recover"
After losses double risk
Result: huge losses
Solution: Fixed % risk ALWAYS
5. "I don't like this signal"
Skip signals because of "feeling"
Result: inconsistency, no statistics
Solution: Trade ALL signals or clearly define filters
Trading Journal
What to Record
For each trade:
1. Entry/exit date and time
2. Instrument and timeframe
3. Signal type
Golden Cross
STRONG BUY
STRONG SELL
Death Cross
4. Indicator settings
Fast/Mid/Slow EMA
Base Multiplier
Other parameters
5. Chart screenshot
Entry moment
Exit moment
6. Trade parameters
Position size
Stop loss
Take Profit
R:R
7. Result
Profit/Loss in $
Profit/Loss in %
Profit/Loss in R
8. Notes
What was right
What was wrong
Emotions during trade
Lessons
Journal Analysis
Analyze weekly:
1. Win Rate
Win Rate = (Profitable trades / All trades) × 100%
Good: 50-60%
Excellent: 60-70%
Exceptional: 70%+
2. Average R
Average R = Sum of all R / Number of trades
Good: +0.5R
Excellent: +1.0R
Exceptional: +1.5R+
3. Profit Factor
Profit Factor = Total profit / Total losses
Good: 1.5+
Excellent: 2.0+
Exceptional: 3.0+
4. Maximum Drawdown
Track consecutive losses
If more than 5 in row - stop, check system
5. Best/Worst Trades
What was common in best trades? (do more)
What was common in worst trades? (avoid)
Pre-Trade Checklist
Technical Analysis
STRONG signal active (BUY or SELL)
All EMAs properly aligned (Fast > Mid > Slow or reverse)
Price on correct side of Fast EMA
Gradient Clouds confirm trend
Pulsing Bar shows STRONG state
Momentum % in normal range (not overheated)
No close strong levels against direction
Higher timeframe doesn't contradict
Risk Management
Position size calculated (1-2% risk)
Stop loss set
Take profit calculated (minimum 1:2)
R:R satisfactory
Daily/weekly risk limit not exceeded
No other open correlated positions
Fundamental Analysis
No important news in coming hours
Market session appropriate (liquidity)
No contradicting fundamentals
Understand why asset is moving
Psychology
Calm and thinking clearly
No emotions from previous trades
Ready to accept loss at stop
Following trading plan
Not revenging market for past losses
If at least one point is NO - think twice before entering!
Learning Roadmap
Week 1: Familiarization
Goals:
Install and configure indicator
Study all EMA types
Understand visualization
Tasks:
Add indicator to chart
Test all Fast/Mid/Slow settings
Play with Base Multiplier on different timeframes
Observe Gradient Clouds and Pulsing Bar
Study Info Table
Result: Comfort with indicator interface
Week 2: Signals
Goals:
Learn to recognize all signal types
Understand difference between Golden Cross and STRONG
Tasks:
Find 10 Golden Cross examples in history
Find 10 STRONG BUY examples in history
Compare their results (which worked better)
Set up alerts
Get 5 real alerts
Result: Understanding signals
Week 3: Demo Trading
Goals:
Start trading signals on demo account
Gather statistics
Tasks:
Open demo account
Trade ONLY STRONG signals
Keep journal (minimum 20 trades)
Don't change indicator settings
Strictly follow stop losses
Result: 20+ documented trades
Week 4: Analysis
Goals:
Analyze demo trading results
Optimize approach
Tasks:
Calculate win rate and average R
Find patterns in profitable trades
Find patterns in losing trades
Adjust approach (not indicator!)
Write trading plan
Result: Trading plan on 1 page
Month 2: Improvement
Goals:
Deepen understanding
Add additional techniques
Tasks:
Study multi-timeframe analysis
Test combinations with Price Action
Try advanced techniques (divergences, tunnels)
Continue demo trading (minimum 50 trades)
Achieve stable profitability on demo
Result: Win rate 55%+ and Profit Factor 1.5+
Month 3: Real Trading
Goals:
Transition to real account
Maintain discipline
Tasks:
Open small real account
Trade minimum lots
Strictly follow trading plan
DON'T increase risk
Focus on process, not profit
Result: Psychological comfort on real
Month 4+: Scaling
Goals:
Increase account
Become consistently profitable
Tasks:
With 60%+ win rate can increase risk to 2%
Upon doubling account can add capital
Continue keeping journal
Periodically review and improve strategy
Share experience with community
Result: Stable profitability month after month
Additional Resources
Recommended Reading
Technical Analysis:
"Technical Analysis of Financial Markets" - John Murphy
"Trading in the Zone" - Mark Douglas (psychology)
"Market Wizards" - Jack Schwager (trader interviews)
EMA and Moving Averages:
"Moving Averages 101" - Steve Burns
Articles on Investopedia about EMA
Risk Management:
"The Mathematics of Money Management" - Ralph Vince
"Trade Your Way to Financial Freedom" - Van K. Tharp
Trading Journals:
Edgewonk (paid, very powerful)
Tradervue (free version + premium)
Excel/Google Sheets (free)
Screeners:
TradingView Stock Screener
Finviz (stocks)
CoinMarketCap (crypto)
Conclusion
Hellenic EMA Matrix is a powerful tool based on universal mathematical constants of nature. The indicator combines:
Mathematical elegance - Phi, Pi, e instead of arbitrary numbers
Premium visualization - Neon Glow, Gradient Clouds, Pulsing Bar
Reliable signals - STRONG BUY/SELL work on all timeframes
Flexibility - 6 EMA types, adaptation to any trading style
Automation - auto-sorting EMAs, SL/TP calculation, alerts
Key Success Principles:
Simplicity - start with basic settings (Phi/Pi/e, Base=10)
Discipline - follow STRONG signals strictly
Patience - wait for quality setups
Risk Management - 1-2% per trade, ALWAYS
Journal - document every trade
Learning - constantly improve skills
Remember:
Indicator shows probability, not guarantee
Important is series statistics, not one trade
Psychology more important than technique
Quality more important than quantity
Process more important than result
Acknowledgments
Thank you for using Hellenic EMA Matrix - Alpha Omega Premium!
The indicator was created with love for mathematics, markets, and beautiful visualization.
Wishing you profitable trading!
Guide Version: 1.0
Date: 2025
Compatibility: Pine Script v6, TradingView
"In the simplicity of mathematical constants lies the complexity of market movements"
Adaptive Investment Timing ModelA COMPREHENSIVE FRAMEWORK FOR SYSTEMATIC EQUITY INVESTMENT TIMING
Investment timing represents one of the most challenging aspects of portfolio management, with extensive academic literature documenting the difficulty of consistently achieving superior risk-adjusted returns through market timing strategies (Malkiel, 2003).
Traditional approaches typically rely on either purely technical indicators or fundamental analysis in isolation, failing to capture the complex interactions between market sentiment, macroeconomic conditions, and company-specific factors that drive asset prices.
The concept of adaptive investment strategies has gained significant attention following the work of Ang and Bekaert (2007), who demonstrated that regime-switching models can substantially improve portfolio performance by adjusting allocation strategies based on prevailing market conditions. Building upon this foundation, the Adaptive Investment Timing Model extends regime-based approaches by incorporating multi-dimensional factor analysis with sector-specific calibrations.
Behavioral finance research has consistently shown that investor psychology plays a crucial role in market dynamics, with fear and greed cycles creating systematic opportunities for contrarian investment strategies (Lakonishok, Shleifer & Vishny, 1994). The VIX fear gauge, introduced by Whaley (1993), has become a standard measure of market sentiment, with empirical studies demonstrating its predictive power for equity returns, particularly during periods of market stress (Giot, 2005).
LITERATURE REVIEW AND THEORETICAL FOUNDATION
The theoretical foundation of AITM draws from several established areas of financial research. Modern Portfolio Theory, as developed by Markowitz (1952) and extended by Sharpe (1964), provides the mathematical framework for risk-return optimization, while the Fama-French three-factor model (Fama & French, 1993) establishes the empirical foundation for fundamental factor analysis.
Altman's bankruptcy prediction model (Altman, 1968) remains the gold standard for corporate distress prediction, with the Z-Score providing robust early warning indicators for financial distress. Subsequent research by Piotroski (2000) developed the F-Score methodology for identifying value stocks with improving fundamental characteristics, demonstrating significant outperformance compared to traditional value investing approaches.
The integration of technical and fundamental analysis has been explored extensively in the literature, with Edwards, Magee and Bassetti (2018) providing comprehensive coverage of technical analysis methodologies, while Graham and Dodd's security analysis framework (Graham & Dodd, 2008) remains foundational for fundamental evaluation approaches.
Regime-switching models, as developed by Hamilton (1989), provide the mathematical framework for dynamic adaptation to changing market conditions. Empirical studies by Guidolin and Timmermann (2007) demonstrate that incorporating regime-switching mechanisms can significantly improve out-of-sample forecasting performance for asset returns.
METHODOLOGY
The AITM methodology integrates four distinct analytical dimensions through technical analysis, fundamental screening, macroeconomic regime detection, and sector-specific adaptations. The mathematical formulation follows a weighted composite approach where the final investment signal S(t) is calculated as:
S(t) = α₁ × T(t) × W_regime(t) + α₂ × F(t) × (1 - W_regime(t)) + α₃ × M(t) + ε(t)
where T(t) represents the technical composite score, F(t) the fundamental composite score, M(t) the macroeconomic adjustment factor, W_regime(t) the regime-dependent weighting parameter, and ε(t) the sector-specific adjustment term.
Technical Analysis Component
The technical analysis component incorporates six established indicators weighted according to their empirical performance in academic literature. The Relative Strength Index, developed by Wilder (1978), receives a 25% weighting based on its demonstrated efficacy in identifying oversold conditions. Maximum drawdown analysis, following the methodology of Calmar (1991), accounts for 25% of the technical score, reflecting its importance in risk assessment. Bollinger Bands, as developed by Bollinger (2001), contribute 20% to capture mean reversion tendencies, while the remaining 30% is allocated across volume analysis, momentum indicators, and trend confirmation metrics.
Fundamental Analysis Framework
The fundamental analysis framework draws heavily from Piotroski's methodology (Piotroski, 2000), incorporating twenty financial metrics across four categories with specific weightings that reflect empirical findings regarding their relative importance in predicting future stock performance (Penman, 2012). Safety metrics receive the highest weighting at 40%, encompassing Altman Z-Score analysis, current ratio assessment, quick ratio evaluation, and cash-to-debt ratio analysis. Quality metrics account for 30% of the fundamental score through return on equity analysis, return on assets evaluation, gross margin assessment, and operating margin examination. Cash flow sustainability contributes 20% through free cash flow margin analysis, cash conversion cycle evaluation, and operating cash flow trend assessment. Valuation metrics comprise the remaining 10% through price-to-earnings ratio analysis, enterprise value multiples, and market capitalization factors.
Sector Classification System
Sector classification utilizes a purely ratio-based approach, eliminating the reliability issues associated with ticker-based classification systems. The methodology identifies five distinct business model categories based on financial statement characteristics. Holding companies are identified through investment-to-assets ratios exceeding 30%, combined with diversified revenue streams and portfolio management focus. Financial institutions are classified through interest-to-revenue ratios exceeding 15%, regulatory capital requirements, and credit risk management characteristics. Real Estate Investment Trusts are identified through high dividend yields combined with significant leverage, property portfolio focus, and funds-from-operations metrics. Technology companies are classified through high margins with substantial R&D intensity, intellectual property focus, and growth-oriented metrics. Utilities are identified through stable dividend payments with regulated operations, infrastructure assets, and regulatory environment considerations.
Macroeconomic Component
The macroeconomic component integrates three primary indicators following the recommendations of Estrella and Mishkin (1998) regarding the predictive power of yield curve inversions for economic recessions. The VIX fear gauge provides market sentiment analysis through volatility-based contrarian signals and crisis opportunity identification. The yield curve spread, measured as the 10-year minus 3-month Treasury spread, enables recession probability assessment and economic cycle positioning. The Dollar Index provides international competitiveness evaluation, currency strength impact assessment, and global market dynamics analysis.
Dynamic Threshold Adjustment
Dynamic threshold adjustment represents a key innovation of the AITM framework. Traditional investment timing models utilize static thresholds that fail to adapt to changing market conditions (Lo & MacKinlay, 1999).
The AITM approach incorporates behavioral finance principles by adjusting signal thresholds based on market stress levels, volatility regimes, sentiment extremes, and economic cycle positioning.
During periods of elevated market stress, as indicated by VIX levels exceeding historical norms, the model lowers threshold requirements to capture contrarian opportunities consistent with the findings of Lakonishok, Shleifer and Vishny (1994).
USER GUIDE AND IMPLEMENTATION FRAMEWORK
Initial Setup and Configuration
The AITM indicator requires proper configuration to align with specific investment objectives and risk tolerance profiles. Research by Kahneman and Tversky (1979) demonstrates that individual risk preferences vary significantly, necessitating customizable parameter settings to accommodate different investor psychology profiles.
Display Configuration Settings
The indicator provides comprehensive display customization options designed according to information processing theory principles (Miller, 1956). The analysis table can be positioned in nine different locations on the chart to minimize cognitive overload while maximizing information accessibility.
Research in behavioral economics suggests that information positioning significantly affects decision-making quality (Thaler & Sunstein, 2008).
Available table positions include top_left, top_center, top_right, middle_left, middle_center, middle_right, bottom_left, bottom_center, and bottom_right configurations. Text size options range from auto system optimization to tiny minimum screen space, small detailed analysis, normal standard viewing, large enhanced readability, and huge presentation mode settings.
Practical Example: Conservative Investor Setup
For conservative investors following Kahneman-Tversky loss aversion principles, recommended settings emphasize full transparency through enabled analysis tables, initially disabled buy signal labels to reduce noise, top_right table positioning to maintain chart visibility, and small text size for improved readability during detailed analysis. Technical implementation should include enabled macro environment data to incorporate recession probability indicators, consistent with research by Estrella and Mishkin (1998) demonstrating the predictive power of macroeconomic factors for market downturns.
Threshold Adaptation System Configuration
The threshold adaptation system represents the core innovation of AITM, incorporating six distinct modes based on different academic approaches to market timing.
Static Mode Implementation
Static mode maintains fixed thresholds throughout all market conditions, serving as a baseline comparable to traditional indicators. Research by Lo and MacKinlay (1999) demonstrates that static approaches often fail during regime changes, making this mode suitable primarily for backtesting comparisons.
Configuration includes strong buy thresholds at 75% established through optimization studies, caution buy thresholds at 60% providing buffer zones, with applications suitable for systematic strategies requiring consistent parameters. While static mode offers predictable signal generation, easy backtesting comparison, and regulatory compliance simplicity, it suffers from poor regime change adaptation, market cycle blindness, and reduced crisis opportunity capture.
Regime-Based Adaptation
Regime-based adaptation draws from Hamilton's regime-switching methodology (Hamilton, 1989), automatically adjusting thresholds based on detected market conditions. The system identifies four primary regimes including bull markets characterized by prices above 50-day and 200-day moving averages with positive macroeconomic indicators and standard threshold levels, bear markets with prices below key moving averages and negative sentiment indicators requiring reduced threshold requirements, recession periods featuring yield curve inversion signals and economic contraction indicators necessitating maximum threshold reduction, and sideways markets showing range-bound price action with mixed economic signals requiring moderate threshold adjustments.
Technical Implementation:
The regime detection algorithm analyzes price relative to 50-day and 200-day moving averages combined with macroeconomic indicators. During bear markets, technical analysis weight decreases to 30% while fundamental analysis increases to 70%, reflecting research by Fama and French (1988) showing fundamental factors become more predictive during market stress.
For institutional investors, bull market configurations maintain standard thresholds with 60% technical weighting and 40% fundamental weighting, bear market configurations reduce thresholds by 10-12 points with 30% technical weighting and 70% fundamental weighting, while recession configurations implement maximum threshold reductions of 12-15 points with enhanced fundamental screening and crisis opportunity identification.
VIX-Based Contrarian System
The VIX-based system implements contrarian strategies supported by extensive research on volatility and returns relationships (Whaley, 2000). The system incorporates five VIX levels with corresponding threshold adjustments based on empirical studies of fear-greed cycles.
Scientific Calibration:
VIX levels are calibrated according to historical percentile distributions:
Extreme High (>40):
- Maximum contrarian opportunity
- Threshold reduction: 15-20 points
- Historical accuracy: 85%+
High (30-40):
- Significant contrarian potential
- Threshold reduction: 10-15 points
- Market stress indicator
Medium (25-30):
- Moderate adjustment
- Threshold reduction: 5-10 points
- Normal volatility range
Low (15-25):
- Minimal adjustment
- Standard threshold levels
- Complacency monitoring
Extreme Low (<15):
- Counter-contrarian positioning
- Threshold increase: 5-10 points
- Bubble warning signals
Practical Example: VIX-Based Implementation for Active Traders
High Fear Environment (VIX >35):
- Thresholds decrease by 10-15 points
- Enhanced contrarian positioning
- Crisis opportunity capture
Low Fear Environment (VIX <15):
- Thresholds increase by 8-15 points
- Reduced signal frequency
- Bubble risk management
Additional Macro Factors:
- Yield curve considerations
- Dollar strength impact
- Global volatility spillover
Hybrid Mode Optimization
Hybrid mode combines regime and VIX analysis through weighted averaging, following research by Guidolin and Timmermann (2007) on multi-factor regime models.
Weighting Scheme:
- Regime factors: 40%
- VIX factors: 40%
- Additional macro considerations: 20%
Dynamic Calculation:
Final_Threshold = Base_Threshold + (Regime_Adjustment × 0.4) + (VIX_Adjustment × 0.4) + (Macro_Adjustment × 0.2)
Benefits:
- Balanced approach
- Reduced single-factor dependency
- Enhanced robustness
Advanced Mode with Stress Weighting
Advanced mode implements dynamic stress-level weighting based on multiple concurrent risk factors. The stress level calculation incorporates four primary indicators:
Stress Level Indicators:
1. Yield curve inversion (recession predictor)
2. Volatility spikes (market disruption)
3. Severe drawdowns (momentum breaks)
4. VIX extreme readings (sentiment extremes)
Technical Implementation:
Stress levels range from 0-4, with dynamic weight allocation changing based on concurrent stress factors:
Low Stress (0-1 factors):
- Regime weighting: 50%
- VIX weighting: 30%
- Macro weighting: 20%
Medium Stress (2 factors):
- Regime weighting: 40%
- VIX weighting: 40%
- Macro weighting: 20%
High Stress (3-4 factors):
- Regime weighting: 20%
- VIX weighting: 50%
- Macro weighting: 30%
Higher stress levels increase VIX weighting to 50% while reducing regime weighting to 20%, reflecting research showing sentiment factors dominate during crisis periods (Baker & Wurgler, 2007).
Percentile-Based Historical Analysis
Percentile-based thresholds utilize historical score distributions to establish adaptive thresholds, following quantile-based approaches documented in financial econometrics literature (Koenker & Bassett, 1978).
Methodology:
- Analyzes trailing 252-day periods (approximately 1 trading year)
- Establishes percentile-based thresholds
- Dynamic adaptation to market conditions
- Statistical significance testing
Configuration Options:
- Lookback Period: 252 days (standard), 126 days (responsive), 504 days (stable)
- Percentile Levels: Customizable based on signal frequency preferences
- Update Frequency: Daily recalculation with rolling windows
Implementation Example:
- Strong Buy Threshold: 75th percentile of historical scores
- Caution Buy Threshold: 60th percentile of historical scores
- Dynamic adjustment based on current market volatility
Investor Psychology Profile Configuration
The investor psychology profiles implement scientifically calibrated parameter sets based on established behavioral finance research.
Conservative Profile Implementation
Conservative settings implement higher selectivity standards based on loss aversion research (Kahneman & Tversky, 1979). The configuration emphasizes quality over quantity, reducing false positive signals while maintaining capture of high-probability opportunities.
Technical Calibration:
VIX Parameters:
- Extreme High Threshold: 32.0 (lower sensitivity to fear spikes)
- High Threshold: 28.0
- Adjustment Magnitude: Reduced for stability
Regime Adjustments:
- Bear Market Reduction: -7 points (vs -12 for normal)
- Recession Reduction: -10 points (vs -15 for normal)
- Conservative approach to crisis opportunities
Percentile Requirements:
- Strong Buy: 80th percentile (higher selectivity)
- Caution Buy: 65th percentile
- Signal frequency: Reduced for quality focus
Risk Management:
- Enhanced bankruptcy screening
- Stricter liquidity requirements
- Maximum leverage limits
Practical Application: Conservative Profile for Retirement Portfolios
This configuration suits investors requiring capital preservation with moderate growth:
- Reduced drawdown probability
- Research-based parameter selection
- Emphasis on fundamental safety
- Long-term wealth preservation focus
Normal Profile Optimization
Normal profile implements institutional-standard parameters based on Sharpe ratio optimization and modern portfolio theory principles (Sharpe, 1994). The configuration balances risk and return according to established portfolio management practices.
Calibration Parameters:
VIX Thresholds:
- Extreme High: 35.0 (institutional standard)
- High: 30.0
- Standard adjustment magnitude
Regime Adjustments:
- Bear Market: -12 points (moderate contrarian approach)
- Recession: -15 points (crisis opportunity capture)
- Balanced risk-return optimization
Percentile Requirements:
- Strong Buy: 75th percentile (industry standard)
- Caution Buy: 60th percentile
- Optimal signal frequency
Risk Management:
- Standard institutional practices
- Balanced screening criteria
- Moderate leverage tolerance
Aggressive Profile for Active Management
Aggressive settings implement lower thresholds to capture more opportunities, suitable for sophisticated investors capable of managing higher portfolio turnover and drawdown periods, consistent with active management research (Grinold & Kahn, 1999).
Technical Configuration:
VIX Parameters:
- Extreme High: 40.0 (higher threshold for extreme readings)
- Enhanced sensitivity to volatility opportunities
- Maximum contrarian positioning
Adjustment Magnitude:
- Enhanced responsiveness to market conditions
- Larger threshold movements
- Opportunistic crisis positioning
Percentile Requirements:
- Strong Buy: 70th percentile (increased signal frequency)
- Caution Buy: 55th percentile
- Active trading optimization
Risk Management:
- Higher risk tolerance
- Active monitoring requirements
- Sophisticated investor assumption
Practical Examples and Case Studies
Case Study 1: Conservative DCA Strategy Implementation
Consider a conservative investor implementing dollar-cost averaging during market volatility.
AITM Configuration:
- Threshold Mode: Hybrid
- Investor Profile: Conservative
- Sector Adaptation: Enabled
- Macro Integration: Enabled
Market Scenario: March 2020 COVID-19 Market Decline
Market Conditions:
- VIX reading: 82 (extreme high)
- Yield curve: Steep (recession fears)
- Market regime: Bear
- Dollar strength: Elevated
Threshold Calculation:
- Base threshold: 75% (Strong Buy)
- VIX adjustment: -15 points (extreme fear)
- Regime adjustment: -7 points (conservative bear market)
- Final threshold: 53%
Investment Signal:
- Score achieved: 58%
- Signal generated: Strong Buy
- Timing: March 23, 2020 (market bottom +/- 3 days)
Result Analysis:
Enhanced signal frequency during optimal contrarian opportunity period, consistent with research on crisis-period investment opportunities (Baker & Wurgler, 2007). The conservative profile provided appropriate risk management while capturing significant upside during the subsequent recovery.
Case Study 2: Active Trading Implementation
Professional trader utilizing AITM for equity selection.
Configuration:
- Threshold Mode: Advanced
- Investor Profile: Aggressive
- Signal Labels: Enabled
- Macro Data: Full integration
Analysis Process:
Step 1: Sector Classification
- Company identified as technology sector
- Enhanced growth weighting applied
- R&D intensity adjustment: +5%
Step 2: Macro Environment Assessment
- Stress level calculation: 2 (moderate)
- VIX level: 28 (moderate high)
- Yield curve: Normal
- Dollar strength: Neutral
Step 3: Dynamic Weighting Calculation
- VIX weighting: 40%
- Regime weighting: 40%
- Macro weighting: 20%
Step 4: Threshold Calculation
- Base threshold: 75%
- Stress adjustment: -12 points
- Final threshold: 63%
Step 5: Score Analysis
- Technical score: 78% (oversold RSI, volume spike)
- Fundamental score: 52% (growth premium but high valuation)
- Macro adjustment: +8% (contrarian VIX opportunity)
- Overall score: 65%
Signal Generation:
Strong Buy triggered at 65% overall score, exceeding the dynamic threshold of 63%. The aggressive profile enabled capture of a technology stock recovery during a moderate volatility period.
Case Study 3: Institutional Portfolio Management
Pension fund implementing systematic rebalancing using AITM framework.
Implementation Framework:
- Threshold Mode: Percentile-Based
- Investor Profile: Normal
- Historical Lookback: 252 days
- Percentile Requirements: 75th/60th
Systematic Process:
Step 1: Historical Analysis
- 252-day rolling window analysis
- Score distribution calculation
- Percentile threshold establishment
Step 2: Current Assessment
- Strong Buy threshold: 78% (75th percentile of trailing year)
- Caution Buy threshold: 62% (60th percentile of trailing year)
- Current market volatility: Normal
Step 3: Signal Evaluation
- Current overall score: 79%
- Threshold comparison: Exceeds Strong Buy level
- Signal strength: High confidence
Step 4: Portfolio Implementation
- Position sizing: 2% allocation increase
- Risk budget impact: Within tolerance
- Diversification maintenance: Preserved
Result:
The percentile-based approach provided dynamic adaptation to changing market conditions while maintaining institutional risk management standards. The systematic implementation reduced behavioral biases while optimizing entry timing.
Risk Management Integration
The AITM framework implements comprehensive risk management following established portfolio theory principles.
Bankruptcy Risk Filter
Implementation of Altman Z-Score methodology (Altman, 1968) with additional liquidity analysis:
Primary Screening Criteria:
- Z-Score threshold: <1.8 (high distress probability)
- Current Ratio threshold: <1.0 (liquidity concerns)
- Combined condition triggers: Automatic signal veto
Enhanced Analysis:
- Industry-adjusted Z-Score calculations
- Trend analysis over multiple quarters
- Peer comparison for context
Risk Mitigation:
- Automatic position size reduction
- Enhanced monitoring requirements
- Early warning system activation
Liquidity Crisis Detection
Multi-factor liquidity analysis incorporating:
Quick Ratio Analysis:
- Threshold: <0.5 (immediate liquidity stress)
- Industry adjustments for business model differences
- Trend analysis for deterioration detection
Cash-to-Debt Analysis:
- Threshold: <0.1 (structural liquidity issues)
- Debt maturity schedule consideration
- Cash flow sustainability assessment
Working Capital Analysis:
- Operational liquidity assessment
- Seasonal adjustment factors
- Industry benchmark comparisons
Excessive Leverage Screening
Debt analysis following capital structure research:
Debt-to-Equity Analysis:
- General threshold: >4.0 (extreme leverage)
- Sector-specific adjustments for business models
- Trend analysis for leverage increases
Interest Coverage Analysis:
- Threshold: <2.0 (servicing difficulties)
- Earnings quality assessment
- Forward-looking capability analysis
Sector Adjustments:
- REIT-appropriate leverage standards
- Financial institution regulatory requirements
- Utility sector regulated capital structures
Performance Optimization and Best Practices
Timeframe Selection
Research by Lo and MacKinlay (1999) demonstrates optimal performance on daily timeframes for equity analysis. Higher frequency data introduces noise while lower frequency reduces responsiveness.
Recommended Implementation:
Primary Analysis:
- Daily (1D) charts for optimal signal quality
- Complete fundamental data integration
- Full macro environment analysis
Secondary Confirmation:
- 4-hour timeframes for intraday confirmation
- Technical indicator validation
- Volume pattern analysis
Avoid for Timing Applications:
- Weekly/Monthly timeframes reduce responsiveness
- Quarterly analysis appropriate for fundamental trends only
- Annual data suitable for long-term research only
Data Quality Requirements
The indicator requires comprehensive fundamental data for optimal performance. Companies with incomplete financial reporting reduce signal reliability.
Quality Standards:
Minimum Requirements:
- 2 years of complete financial data
- Current quarterly updates within 90 days
- Audited financial statements
Optimal Configuration:
- 5+ years for trend analysis
- Quarterly updates within 45 days
- Complete regulatory filings
Geographic Standards:
- Developed market reporting requirements
- International accounting standard compliance
- Regulatory oversight verification
Portfolio Integration Strategies
AITM signals should integrate with comprehensive portfolio management frameworks rather than standalone implementation.
Integration Approach:
Position Sizing:
- Signal strength correlation with allocation size
- Risk-adjusted position scaling
- Portfolio concentration limits
Risk Budgeting:
- Stress-test based allocation
- Scenario analysis integration
- Correlation impact assessment
Diversification Analysis:
- Portfolio correlation maintenance
- Sector exposure monitoring
- Geographic diversification preservation
Rebalancing Frequency:
- Signal-driven optimization
- Transaction cost consideration
- Tax efficiency optimization
Troubleshooting and Common Issues
Missing Fundamental Data
When fundamental data is unavailable, the indicator relies more heavily on technical analysis with reduced reliability.
Solution Approach:
Data Verification:
- Verify ticker symbol accuracy
- Check data provider coverage
- Confirm market trading status
Alternative Strategies:
- Consider ETF alternatives for sector exposure
- Implement technical-only backup scoring
- Use peer company analysis for estimates
Quality Assessment:
- Reduce position sizing for incomplete data
- Enhanced monitoring requirements
- Conservative threshold application
Sector Misclassification
Automatic sector detection may occasionally misclassify companies with hybrid business models.
Correction Process:
Manual Override:
- Enable Manual Sector Override function
- Select appropriate sector classification
- Verify fundamental ratio alignment
Validation:
- Monitor performance improvement
- Compare against industry benchmarks
- Adjust classification as needed
Documentation:
- Record classification rationale
- Track performance impact
- Update classification database
Extreme Market Conditions
During unprecedented market events, historical relationships may temporarily break down.
Adaptive Response:
Monitoring Enhancement:
- Increase signal monitoring frequency
- Implement additional confirmation requirements
- Enhanced risk management protocols
Position Management:
- Reduce position sizing during uncertainty
- Maintain higher cash reserves
- Implement stop-loss mechanisms
Framework Adaptation:
- Temporary parameter adjustments
- Enhanced fundamental screening
- Increased macro factor weighting
IMPLEMENTATION AND VALIDATION
The model implementation utilizes comprehensive financial data sourced from established providers, with fundamental metrics updated on quarterly frequencies to reflect reporting schedules. Technical indicators are calculated using daily price and volume data, while macroeconomic variables are sourced from federal reserve and market data providers.
Risk management mechanisms incorporate multiple layers of protection against false signals. The bankruptcy risk filter utilizes Altman Z-Scores below 1.8 combined with current ratios below 1.0 to identify companies facing potential financial distress. Liquidity crisis detection employs quick ratios below 0.5 combined with cash-to-debt ratios below 0.1. Excessive leverage screening identifies companies with debt-to-equity ratios exceeding 4.0 and interest coverage ratios below 2.0.
Empirical validation of the methodology has been conducted through extensive backtesting across multiple market regimes spanning the period from 2008 to 2024. The analysis encompasses 11 Global Industry Classification Standard sectors to ensure robustness across different industry characteristics. Monte Carlo simulations provide additional validation of the model's statistical properties under various market scenarios.
RESULTS AND PRACTICAL APPLICATIONS
The AITM framework demonstrates particular effectiveness during market transition periods when traditional indicators often provide conflicting signals. During the 2008 financial crisis, the model's emphasis on fundamental safety metrics and macroeconomic regime detection successfully identified the deteriorating market environment, while the 2020 pandemic-induced volatility provided validation of the VIX-based contrarian signaling mechanism.
Sector adaptation proves especially valuable when analyzing companies with distinct business models. Traditional metrics may suggest poor performance for holding companies with low return on equity, while the AITM sector-specific adjustments recognize that such companies should be evaluated using different criteria, consistent with the findings of specialist literature on conglomerate valuation (Berger & Ofek, 1995).
The model's practical implementation supports multiple investment approaches, from systematic dollar-cost averaging strategies to active trading applications. Conservative parameterization captures approximately 85% of optimal entry opportunities while maintaining strict risk controls, reflecting behavioral finance research on loss aversion (Kahneman & Tversky, 1979). Aggressive settings focus on superior risk-adjusted returns through enhanced selectivity, consistent with active portfolio management approaches documented by Grinold and Kahn (1999).
LIMITATIONS AND FUTURE RESEARCH
Several limitations constrain the model's applicability and should be acknowledged. The framework requires comprehensive fundamental data availability, limiting its effectiveness for small-cap stocks or markets with limited financial disclosure requirements. Quarterly reporting delays may temporarily reduce the timeliness of fundamental analysis components, though this limitation affects all fundamental-based approaches similarly.
The model's design focus on equity markets limits direct applicability to other asset classes such as fixed income, commodities, or alternative investments. However, the underlying mathematical framework could potentially be adapted for other asset classes through appropriate modification of input variables and weighting schemes.
Future research directions include investigation of machine learning enhancements to the factor weighting mechanisms, expansion of the macroeconomic component to include additional global factors, and development of position sizing algorithms that integrate the model's output signals with portfolio-level risk management objectives.
CONCLUSION
The Adaptive Investment Timing Model represents a comprehensive framework integrating established financial theory with practical implementation guidance. The system's foundation in peer-reviewed research, combined with extensive customization options and risk management features, provides a robust tool for systematic investment timing across multiple investor profiles and market conditions.
The framework's strength lies in its adaptability to changing market regimes while maintaining scientific rigor in signal generation. Through proper configuration and understanding of underlying principles, users can implement AITM effectively within their specific investment frameworks and risk tolerance parameters. The comprehensive user guide provided in this document enables both institutional and individual investors to optimize the system for their particular requirements.
The model contributes to existing literature by demonstrating how established financial theories can be integrated into practical investment tools that maintain scientific rigor while providing actionable investment signals. This approach bridges the gap between academic research and practical portfolio management, offering a quantitative framework that incorporates the complex reality of modern financial markets while remaining accessible to practitioners through detailed implementation guidance.
REFERENCES
Altman, E. I. (1968). Financial ratios, discriminant analysis and the prediction of corporate bankruptcy. Journal of Finance, 23(4), 589-609.
Ang, A., & Bekaert, G. (2007). Stock return predictability: Is it there? Review of Financial Studies, 20(3), 651-707.
Baker, M., & Wurgler, J. (2007). Investor sentiment in the stock market. Journal of Economic Perspectives, 21(2), 129-152.
Berger, P. G., & Ofek, E. (1995). Diversification's effect on firm value. Journal of Financial Economics, 37(1), 39-65.
Bollinger, J. (2001). Bollinger on Bollinger Bands. New York: McGraw-Hill.
Calmar, T. (1991). The Calmar ratio: A smoother tool. Futures, 20(1), 40.
Edwards, R. D., Magee, J., & Bassetti, W. H. C. (2018). Technical Analysis of Stock Trends. 11th ed. Boca Raton: CRC Press.
Estrella, A., & Mishkin, F. S. (1998). Predicting US recessions: Financial variables as leading indicators. Review of Economics and Statistics, 80(1), 45-61.
Fama, E. F., & French, K. R. (1988). Dividend yields and expected stock returns. Journal of Financial Economics, 22(1), 3-25.
Fama, E. F., & French, K. R. (1993). Common risk factors in the returns on stocks and bonds. Journal of Financial Economics, 33(1), 3-56.
Giot, P. (2005). Relationships between implied volatility indexes and stock index returns. Journal of Portfolio Management, 31(3), 92-100.
Graham, B., & Dodd, D. L. (2008). Security Analysis. 6th ed. New York: McGraw-Hill Education.
Grinold, R. C., & Kahn, R. N. (1999). Active Portfolio Management. 2nd ed. New York: McGraw-Hill.
Guidolin, M., & Timmermann, A. (2007). Asset allocation under multivariate regime switching. Journal of Economic Dynamics and Control, 31(11), 3503-3544.
Hamilton, J. D. (1989). A new approach to the economic analysis of nonstationary time series and the business cycle. Econometrica, 57(2), 357-384.
Kahneman, D., & Tversky, A. (1979). Prospect theory: An analysis of decision under risk. Econometrica, 47(2), 263-291.
Koenker, R., & Bassett Jr, G. (1978). Regression quantiles. Econometrica, 46(1), 33-50.
Lakonishok, J., Shleifer, A., & Vishny, R. W. (1994). Contrarian investment, extrapolation, and risk. Journal of Finance, 49(5), 1541-1578.
Lo, A. W., & MacKinlay, A. C. (1999). A Non-Random Walk Down Wall Street. Princeton: Princeton University Press.
Malkiel, B. G. (2003). The efficient market hypothesis and its critics. Journal of Economic Perspectives, 17(1), 59-82.
Markowitz, H. (1952). Portfolio selection. Journal of Finance, 7(1), 77-91.
Miller, G. A. (1956). The magical number seven, plus or minus two: Some limits on our capacity for processing information. Psychological Review, 63(2), 81-97.
Penman, S. H. (2012). Financial Statement Analysis and Security Valuation. 5th ed. New York: McGraw-Hill Education.
Piotroski, J. D. (2000). Value investing: The use of historical financial statement information to separate winners from losers. Journal of Accounting Research, 38, 1-41.
Sharpe, W. F. (1964). Capital asset prices: A theory of market equilibrium under conditions of risk. Journal of Finance, 19(3), 425-442.
Sharpe, W. F. (1994). The Sharpe ratio. Journal of Portfolio Management, 21(1), 49-58.
Thaler, R. H., & Sunstein, C. R. (2008). Nudge: Improving Decisions About Health, Wealth, and Happiness. New Haven: Yale University Press.
Whaley, R. E. (1993). Derivatives on market volatility: Hedging tools long overdue. Journal of Derivatives, 1(1), 71-84.
Whaley, R. E. (2000). The investor fear gauge. Journal of Portfolio Management, 26(3), 12-17.
Wilder, J. W. (1978). New Concepts in Technical Trading Systems. Greensboro: Trend Research.
Multi-Timeframe Stochastic Alert [tradeviZion]# Multi-Timeframe Stochastic Alert : Complete User Guide
## 1. Introduction
### What is the Multi-Timeframe Stochastic Alert?
The Multi-Timeframe Stochastic Alert is an advanced technical analysis tool that helps traders identify potential trading opportunities by analyzing momentum across multiple timeframes. It combines the power of the stochastic oscillator with multi-timeframe analysis to provide more reliable trading signals.
### Key Features and Benefits
- Simultaneous analysis of 6 different timeframes
- Advanced alert system with customizable conditions
- Real-time visual feedback with color-coded signals
- Comprehensive data table with instant market insights
- Motivational trading messages for psychological support
- Flexible theme support for comfortable viewing
### How it Can Help Your Trading
- Identify stronger trends by confirming momentum across multiple timeframes
- Reduce false signals through multi-timeframe confirmation
- Stay informed of market changes with customizable alerts
- Make more informed decisions with comprehensive market data
- Maintain trading discipline with clear visual signals
## 2. Understanding the Display
### The Stochastic Chart
The main chart displays three key components:
1. ** K-Line (Fast) **: The primary stochastic line (default color: green)
2. ** D-Line (Slow) **: The signal line (default color: red)
3. ** Reference Lines **:
- Overbought Level (80): Upper dashed line
- Middle Line (50): Center dashed line
- Oversold Level (20): Lower dashed line
### The Information Table
The table provides a comprehensive view of stochastic readings across all timeframes. Here's what each column means:
#### Column Explanations:
1. ** Timeframe **
- Shows the time period for each row
- Example: "5" = 5 minutes, "15" = 15 minutes, etc.
2. ** K Value **
- The fast stochastic line value (0-100)
- Higher values indicate stronger upward momentum
- Lower values indicate stronger downward momentum
3. ** D Value **
- The slow stochastic line value (0-100)
- Helps confirm momentum direction
- Crossovers with K-line can signal potential trades
4. ** Status **
- Shows current momentum with symbols:
- ▲ = Increasing (bullish)
- ▼ = Decreasing (bearish)
- Color matches the trend direction
5. ** Trend **
- Shows the current market condition:
- "Overbought" (above 80)
- "Bullish" (above 50)
- "Bearish" (below 50)
- "Oversold" (below 20)
#### Row Explanations:
1. ** Title Row **
- Shows "🎯 Multi-Timeframe Stochastic"
- Indicates the indicator is active
2. ** Header Row **
- Contains column titles
- Dark blue background for easy reading
3. ** Timeframe Rows **
- Six rows showing different timeframe analyses
- Each row updates independently
- Color-coded for easy trend identification
4. **Message Row**
- Shows rotating motivational messages
- Updates every 5 bars
- Helps maintain trading discipline
### Visual Indicators and Colors
- ** Green Background **: Indicates bullish conditions
- ** Red Background **: Indicates bearish conditions
- ** Color Intensity **: Shows strength of the signal
- ** Background Highlights **: Appear when alert conditions are met
## 3. Core Settings Groups
### Stochastic Settings
These settings control the core calculation of the stochastic oscillator.
1. ** Length (Default: 14) **
- What it does: Determines the lookback period for calculations
- Higher values (e.g., 21): More stable, fewer signals
- Lower values (e.g., 8): More sensitive, more signals
- Recommended:
* Day Trading: 8-14
* Swing Trading: 14-21
* Position Trading: 21-30
2. ** Smooth K (Default: 3) **
- What it does: Smooths the main stochastic line
- Higher values: Smoother line, fewer false signals
- Lower values: More responsive, but more noise
- Recommended:
* Day Trading: 2-3
* Swing Trading: 3-5
* Position Trading: 5-7
3. ** Smooth D (Default: 3) **
- What it does: Smooths the signal line
- Works in conjunction with Smooth K
- Usually kept equal to or slightly higher than Smooth K
- Recommended: Keep same as Smooth K for consistency
4. ** Source (Default: Close) **
- What it does: Determines price data for calculations
- Options: Close, Open, High, Low, HL2, HLC3, OHLC4
- Recommended: Stick with Close for most reliable signals
### Timeframe Settings
Controls the multiple timeframes analyzed by the indicator.
1. ** Main Timeframes (TF1-TF6) **
- TF1 (Default: 10): Shortest timeframe for quick signals
- TF2 (Default: 15): Short-term trend confirmation
- TF3 (Default: 30): Medium-term trend analysis
- TF4 (Default: 30): Additional medium-term confirmation
- TF5 (Default: 60): Longer-term trend analysis
- TF6 (Default: 240): Major trend confirmation
Recommended Combinations:
* Scalping: 1, 3, 5, 15, 30, 60
* Day Trading: 5, 15, 30, 60, 240, D
* Swing Trading: 15, 60, 240, D, W, M
2. ** Wait for Bar Close (Default: true) **
- What it does: Controls when calculations update
- True: More reliable but slightly delayed signals
- False: Faster signals but may change before bar closes
- Recommended: Keep True for more reliable signals
### Alert Settings
#### Main Alert Settings
1. ** Enable Alerts (Default: true) **
- Master switch for all alert notifications
- Toggle this off when you don't want any alerts
- Useful during testing or when you want to focus on visual signals only
2. ** Alert Condition (Options) **
- "Above Middle": Bullish momentum alerts only
- "Below Middle": Bearish momentum alerts only
- "Both": Alerts for both directions
- Recommended:
* Trending Markets: Choose direction matching the trend
* Ranging Markets: Use "Both" to catch reversals
* New Traders: Start with "Both" until you develop a specific strategy
3. ** Alert Frequency **
- "Once Per Bar": Immediate alerts during the bar
- "Once Per Bar Close": Alerts only after bar closes
- Recommended:
* Day Trading: "Once Per Bar" for quick reactions
* Swing Trading: "Once Per Bar Close" for confirmed signals
* Beginners: "Once Per Bar Close" to reduce false signals
#### Timeframe Check Settings
1. ** First Check (TF1) **
- Purpose: Confirms basic trend direction
- Alert Triggers When:
* For Bullish: Stochastic is above middle line (50)
* For Bearish: Stochastic is below middle line (50)
* For Both: Triggers in either direction based on position relative to middle line
- Settings:
* Enable/Disable: Turn first check on/off
* Timeframe: Default 5 minutes
- Best Used For:
* Quick trend confirmation
* Entry timing
* Scalping setups
2. ** Second Check (TF2) **
- Purpose: Confirms both position and momentum
- Alert Triggers When:
* For Bullish: Stochastic is above middle line AND both K&D lines are increasing
* For Bearish: Stochastic is below middle line AND both K&D lines are decreasing
* For Both: Triggers based on position and direction matching current condition
- Settings:
* Enable/Disable: Turn second check on/off
* Timeframe: Default 15 minutes
- Best Used For:
* Trend strength confirmation
* Avoiding false breakouts
* Day trading setups
3. ** Third Check (TF3) **
- Purpose: Confirms overall momentum direction
- Alert Triggers When:
* For Bullish: Both K&D lines are increasing (momentum confirmation)
* For Bearish: Both K&D lines are decreasing (momentum confirmation)
* For Both: Triggers based on matching momentum direction
- Settings:
* Enable/Disable: Turn third check on/off
* Timeframe: Default 30 minutes
- Best Used For:
* Major trend confirmation
* Swing trading setups
* Avoiding trades against the main trend
Note: All three conditions must be met simultaneously for the alert to trigger. This multi-timeframe confirmation helps reduce false signals and provides stronger trade setups.
#### Alert Combinations Examples
1. ** Conservative Setup **
- Enable all three checks
- Use "Once Per Bar Close"
- Timeframe Selection Example:
* First Check: 15 minutes
* Second Check: 1 hour (60 minutes)
* Third Check: 4 hours (240 minutes)
- Wider gaps between timeframes reduce noise and false signals
- Best for: Swing trading, beginners
2. ** Aggressive Setup **
- Enable first two checks only
- Use "Once Per Bar"
- Timeframe Selection Example:
* First Check: 5 minutes
* Second Check: 15 minutes
- Closer timeframes for quicker signals
- Best for: Day trading, experienced traders
3. ** Balanced Setup **
- Enable all checks
- Use "Once Per Bar"
- Timeframe Selection Example:
* First Check: 5 minutes
* Second Check: 15 minutes
* Third Check: 1 hour (60 minutes)
- Balanced spacing between timeframes
- Best for: All-around trading
### Visual Settings
#### Alert Visual Settings
1. ** Show Background Color (Default: true) **
- What it does: Highlights chart background when alerts trigger
- Benefits:
* Makes signals more visible
* Helps spot opportunities quickly
* Provides visual confirmation of alerts
- When to disable:
* If using multiple indicators
* When preferring a cleaner chart
* During manual backtesting
2. ** Background Transparency (Default: 90) **
- Range: 0 (solid) to 100 (invisible)
- Recommended Settings:
* Clean Charts: 90-95
* Multiple Indicators: 85-90
* Single Indicator: 80-85
- Tip: Adjust based on your chart's overall visibility
3. ** Background Colors **
- Bullish Background:
* Default: Green
* Indicates upward momentum
* Customizable to match your theme
- Bearish Background:
* Default: Red
* Indicates downward momentum
* Customizable to match your theme
#### Level Settings
1. ** Oversold Level (Default: 20) **
- Traditional Setting: 20
- Adjustable Range: 0-100
- Usage:
* Lower values (e.g., 10): More conservative
* Higher values (e.g., 30): More aggressive
- Trading Applications:
* Potential bullish reversal zone
* Support level in uptrends
* Entry point for long positions
2. ** Overbought Level (Default: 80) **
- Traditional Setting: 80
- Adjustable Range: 0-100
- Usage:
* Lower values (e.g., 70): More aggressive
* Higher values (e.g., 90): More conservative
- Trading Applications:
* Potential bearish reversal zone
* Resistance level in downtrends
* Exit point for long positions
3. ** Middle Line (Default: 50) **
- Purpose: Trend direction separator
- Applications:
* Above 50: Bullish territory
* Below 50: Bearish territory
* Crossing 50: Potential trend change
- Trading Uses:
* Trend confirmation
* Entry/exit trigger
* Risk management level
#### Color Settings
1. ** Bullish Color (Default: Green) **
- Used for:
* K-Line (Main stochastic line)
* Status symbols when trending up
* Trend labels for bullish conditions
- Customization:
* Choose colors that stand out
* Match your trading platform theme
* Consider color blindness accessibility
2. ** Bearish Color (Default: Red) **
- Used for:
* D-Line (Signal line)
* Status symbols when trending down
* Trend labels for bearish conditions
- Customization:
* Choose contrasting colors
* Ensure visibility on your chart
* Consider monitor settings
3. ** Neutral Color (Default: Gray) **
- Used for:
* Middle line (50 level)
- Customization:
* Should be less prominent
* Easy on the eyes
* Good background contrast
### Theme Settings
1. **Color Theme Options**
- Dark Theme (Default):
* Dark background with white text
* Optimized for dark chart backgrounds
* Reduces eye strain in low light
- Light Theme:
* Light background with black text
* Better visibility in bright conditions
- Custom Theme:
* Use your own color preferences
2. ** Available Theme Colors **
- Table Background
- Table Text
- Table Headers
Note: The theme affects only the table display colors. The stochastic lines and alert backgrounds use their own color settings.
### Table Settings
#### Position and Size
1. ** Table Position **
- Options:
* Top Right (Default)
* Middle Right
* Bottom Right
* Top Left
* Middle Left
* Bottom Left
- Considerations:
* Chart space utilization
* Personal preference
* Multiple monitor setups
2. ** Text Sizes **
- Title Size Options:
* Tiny: Minimal space usage
* Small: Compact but readable
* Normal (Default): Standard visibility
* Large: Enhanced readability
* Huge: Maximum visibility
- Data Size Options:
* Recommended: One size smaller than title
* Adjust based on screen resolution
* Consider viewing distance
3. ** Empowering Messages **
- Purpose:
* Maintain trading discipline
* Provide psychological support
* Remind of best practices
- Rotation:
* Changes every 5 bars
* Categories include:
- Market Wisdom
- Strategy & Discipline
- Mindset & Growth
- Technical Mastery
- Market Philosophy
## 4. Setting Up for Different Trading Styles
### Day Trading Setup
1. **Timeframes**
- Primary: 5, 15, 30 minutes
- Secondary: 1H, 4H
- Alert Settings: "Once Per Bar"
2. ** Stochastic Settings **
- Length: 8-14
- Smooth K/D: 2-3
- Alert Condition: Match market trend
3. ** Visual Settings **
- Background: Enabled
- Transparency: 85-90
- Theme: Based on trading hours
### Swing Trading Setup
1. ** Timeframes **
- Primary: 1H, 4H, Daily
- Secondary: Weekly
- Alert Settings: "Once Per Bar Close"
2. ** Stochastic Settings **
- Length: 14-21
- Smooth K/D: 3-5
- Alert Condition: "Both"
3. ** Visual Settings **
- Background: Optional
- Transparency: 90-95
- Theme: Personal preference
### Position Trading Setup
1. ** Timeframes **
- Primary: Daily, Weekly
- Secondary: Monthly
- Alert Settings: "Once Per Bar Close"
2. ** Stochastic Settings **
- Length: 21-30
- Smooth K/D: 5-7
- Alert Condition: "Both"
3. ** Visual Settings **
- Background: Disabled
- Focus on table data
- Theme: High contrast
## 5. Troubleshooting Guide
### Common Issues and Solutions
1. ** Too Many Alerts **
- Cause: Settings too sensitive
- Solutions:
* Increase timeframe intervals
* Use "Once Per Bar Close"
* Enable fewer timeframe checks
* Adjust stochastic length higher
2. ** Missed Signals **
- Cause: Settings too conservative
- Solutions:
* Decrease timeframe intervals
* Use "Once Per Bar"
* Enable more timeframe checks
* Adjust stochastic length lower
3. ** False Signals **
- Cause: Insufficient confirmation
- Solutions:
* Enable all three timeframe checks
* Use larger timeframe gaps
* Wait for bar close
* Confirm with price action
4. ** Visual Clarity Issues **
- Cause: Poor contrast or overlap
- Solutions:
* Adjust transparency
* Change theme settings
* Reposition table
* Modify color scheme
### Best Practices
1. ** Getting Started **
- Start with default settings
- Use "Both" alert condition
- Enable all timeframe checks
- Wait for bar close
- Monitor for a few days
2. ** Fine-Tuning **
- Adjust one setting at a time
- Document changes and results
- Test in different market conditions
- Find your optimal timeframe combination
- Balance sensitivity with reliability
3. ** Risk Management **
- Don't trade against major trends
- Confirm signals with price action
- Use appropriate position sizing
- Set clear stop losses
- Follow your trading plan
4. ** Regular Maintenance **
- Review settings weekly
- Adjust for market conditions
- Update color scheme for visibility
- Clean up chart regularly
- Maintain trading journal
## 6. Tips for Success
1. ** Entry Strategies **
- Wait for all timeframes to align
- Confirm with price action
- Use proper position sizing
- Consider market conditions
2. ** Exit Strategies **
- Trail stops using indicator levels
- Take partial profits at targets
- Honor your stop losses
- Don't fight the trend
3. ** Psychology **
- Stay disciplined with settings
- Don't override system signals
- Keep emotions in check
- Learn from each trade
4. ** Continuous Improvement **
- Record your trades
- Review performance regularly
- Adjust settings gradually
- Stay educated on markets
Market Electromagnetic Field [The_lurker]Market Electromagnetic Field
An innovative analytical indicator that presents a completely new model for understanding market dynamics, inspired by the laws of electromagnetic physics — but it's not a rhetorical metaphor, rather a complete mathematical system.
Unlike traditional indicators that focus on price or momentum, this indicator portrays the market as a closed physical system, where:
⚡ Candles = Electric charges (positive at bullish close, negative at bearish)
⚡ Buyers and Sellers = Two opposing poles where pressure accumulates
⚡ Market tension = Voltage difference between the poles
⚡ Price breakout = Electrical discharge after sufficient energy accumulation
█ Core Concept
Markets don't move randomly, but follow a clear physical cycle:
Accumulation → Tension → Discharge → Stabilization → New Accumulation
When charges accumulate (through strong candles with high volume) and exceed a certain "electrical capacitance" threshold, the indicator issues a "⚡ DISCHARGE IMMINENT" alert — meaning a price explosion is imminent, giving the trader an opportunity to enter before the move begins.
█ Competitive Advantage
- Predictive forecasting (not confirmatory after the event)
- Smart multi-layer filtering reduces false signals
- Animated 3D visual representation makes reading price conditions instant and intuitive — without need for number analysis
█ Theoretical Physical Foundation
The indicator doesn't use physical terms for decoration, but applies mathematical laws with precise market adjustments:
⚡ Coulomb's Law
Physics: F = k × (q₁ × q₂) / r²
Market: Field Intensity = 4 × norm_positive × norm_negative
Peaks at equilibrium (0.5 × 0.5 × 4 = 1.0), and decreases at dominance — because conflict increases at parity.
⚡ Ohm's Law
Physics: V = I × R
Market: Voltage = norm_positive − norm_negative
Measures balance of power:
- +1 = Absolute buying dominance
- −1 = Absolute selling dominance
- 0 = Balance
⚡ Capacitance
Physics: C = Q / V
Market: Capacitance = |Voltage| × Field Intensity
Represents stored energy ready for discharge — increases with bias combined with high interaction.
⚡ Electrical Discharge
Physics: Occurs when exceeding insulation threshold
Market: Discharge Probability = min(Capacitance / Discharge Threshold, 1.0)
When ≥ 0.9: "⚡ DISCHARGE IMMINENT"
📌 Key Note:
Maximum capacitance doesn't occur at absolute dominance (where field intensity = 0), nor at perfect balance (where voltage = 0), but at moderate bias (±30–50%) with high interaction (field intensity > 25%) — i.e., in moments of "pressure before breakout".
█ Detailed Calculation Mechanism
⚡ Phase 1: Candle Polarity
polarity = (close − open) / (high − low)
- +1.0: Complete bullish candle (Bullish Marubozu)
- −1.0: Complete bearish candle (Bearish Marubozu)
- 0.0: Doji (no decision)
- Intermediate values: Represent the ratio of candle body to its range — reducing the effect of long-shadow candles
⚡ Phase 2: Volume Weight
vol_weight = volume / SMA(volume, lookback)
A candle with 150% of average volume = 1.5x stronger charge
⚡ Phase 3: Adaptive Factor
adaptive_factor = ATR(lookback) / SMA(ATR, lookback × 2)
- In volatile markets: Increases sensitivity
- In quiet markets: Reduces noise
- Always recommended to keep it enabled
⚡ Phase 4–6: Charge Accumulation and Normalization
Charges are summed over lookback candles, then ratios are normalized:
norm_positive = positive_charge / total_charge
norm_negative = negative_charge / total_charge
So that: norm_positive + norm_negative = 1 — for easier comparison
⚡ Phase 7: Field Calculations
voltage = norm_positive − norm_negative
field_intensity = 4 × norm_positive × norm_negative × field_sensitivity
capacitance = |voltage| × field_intensity
discharge_prob = min(capacitance / discharge_threshold, 1.0)
█ Settings
⚡ Electromagnetic Model
Lookback Period
- Default: 20
- Range: 5–100
- Recommendations:
- Scalping: 10–15
- Day Trading: 20
- Swing: 30–50
- Investing: 50–100
Discharge Threshold
- Default: 0.7
- Range: 0.3–0.95
- Recommendations:
- Speed + Noise: 0.5–0.6
- Balance: 0.7
- High Accuracy: 0.8–0.95
Field Sensitivity
- Default: 1.0
- Range: 0.5–2.0
- Recommendations:
- Amplify Conflict: 1.2–1.5
- Natural: 1.0
- Calm: 0.5–0.8
Adaptive Mode
- Default: Enabled
- Always keep it enabled
🔬 Dynamic Filters
All enabled filters must pass for discharge signal to appear.
Volume Filter
- Condition: volume > SMA(volume) × vol_multiplier
- Function: Excludes "weak" candles not supported by volume
- Recommendation: Enabled (especially for stocks and forex)
Volatility Filter
- Condition: STDEV > SMA(STDEV) × 0.5
- Function: Ignores sideways stagnation periods
- Recommendation: Always enabled
Trend Filter
- Condition: Voltage alignment with fast/slow EMA
- Function: Reduces counter-trend signals
- Recommendation: Enabled for swing/investing only
Volume Threshold
- Default: 1.2
- Recommendations:
- 1.0–1.2: High sensitivity
- 1.5–2.0: Exclusive to high volume
🎨 Visual Settings
Settings improve visual reading experience — don't affect calculations.
Scale Factor
- Default: 600
- Higher = Larger scene (200–1200)
Horizontal Shift
- Default: 180
- Horizontal shift to the left — to focus on last candle
Pole Size
- Default: 60
- Base sphere size (30–120)
Field Lines
- Default: 8
- Number of field lines (4–16) — 8 is ideal balance
Colors
- Green/Red/Blue/Orange
- Fully customizable
█ Visual Representation: A Visual Language for Diagnosing Price Conditions
✨ Design Philosophy
The representation isn't "decoration", but a complete cognitive model — each element carries information, and element interaction tells a complete story.
The brain perceives changes in size, color, and movement 60,000 times faster than reading numbers — so you can "sense" the change before your eye finishes scanning.
═════════════════════════════════════════════════════════════
🟢 Positive Pole (Green Sphere — Left)
═════════════════════════════════════════════════════════════
What does it represent?
Active buying pressure accumulation — not just an uptrend, but real demand force supported by volume and volatility.
● Dynamic Size
Size = pole_size × (0.7 + norm_positive × 0.6)
- 70% of base size = No significant charge
- 130% of base size = Complete dominance
- The larger the sphere: Greater buyer dominance, higher probability of bullish continuation
Size Interpretation:
- Large sphere (>55%): Strong buying pressure — Buyers dominate
- Medium sphere (45–55%): Relative balance with buying bias
- Small sphere (<45%): Weak buying pressure — Sellers dominate
● Lighting and Transparency
- 20% transparency (when Bias = +1): Pole currently active — Bullish direction
- 50% transparency (when Bias ≠ +1): Pole inactive — Not the prevailing direction
Lighting = Current activity, while Size = Historical accumulation
● Pulsing Inner Glow
A smaller sphere pulses automatically when Bias = +1:
inner_pulse = 0.4 + 0.1 × sin(anim_time × 3)
Symbolizes continuity of buy order flow — not static dominance.
● Orbital Rings
Two rings rotating at different speeds and directions:
- Inner: 1.3× sphere size — Direct influence range
- Outer: 1.6× sphere size — Extended influence range
Represent "influence zone" of buyers:
- Continuous rotation = Stability and momentum
- Slowdown = Momentum exhaustion
● Percentage
Displayed below sphere: norm_positive × 100
- >55% = Clear dominance
- 45–55% = Balance
- <45% = Weakness
═════════════════════════════════════════════════════════════
🔴 Negative Pole (Red Sphere — Right)
═════════════════════════════════════════════════════════════
What does it represent?
Active selling pressure accumulation — whether cumulative selling (smart distribution) or panic selling (position liquidation).
● Visual Dynamics
Same size, lighting, and inner glow mechanism — but in red.
Key Difference:
- Rotation is reversed (counter-clockwise)
- Visually distinguishes "buy flow" from "sell flow"
- Allows reading direction at a glance — even for colorblind users
📌 Pole Reading Summary:
🟢 Large + Bright green sphere = Active buying force
🔴 Large + Bright red sphere = Active selling force
🟢🔴 Both large but dim = Energy accumulation (before discharge)
⚪ Both small = Stagnation / Low liquidity
═════════════════════════════════════════════════════════════
🔵 Field Lines (Curved Blue Lines)
═════════════════════════════════════════════════════════════
What do they represent?
Energy flow paths between poles — the arena where price battle is fought.
● Number of Lines
4–16 lines (Default: 8)
More lines: Greater sense of "interaction density"
● Arc Height
arc_h = (i − half_lines) × 15 × field_intensity × 2
- High field intensity = Highly elevated lines (like waves)
- Low intensity = Nearly straight lines
● Oscillating Transparency
transp = 30 + phase × 40
where phase = sin(anim_time × 2 + i × 0.5) × 0.5 + 0.5
Creates illusion of "flowing current" — not static lines
● Asymmetric Curvature
- Upper lines curve upward
- Lower lines curve downward
- Adds 3D depth and shows "pressure" direction
⚡ Pro Tip:
When you see lines suddenly "contract" (straighten), while both spheres are large — this is an early indicator of impending discharge, because the interaction is losing its flexibility.
═════════════════════════════════════════════════════════════
⚪ Moving Particles
═════════════════════════════════════════════════════════════
What do they represent?
Real liquidity flow in the market — who's driving price right now.
● Number and Movement
- 6 particles covering most field lines
- Move sinusoidally along the arc:
t = (sin(phase_val) + 1) / 2
- High speed = High trading activity
- Clustering at a pole = That side's control
● Color Gradient
From green (at positive pole) to red (at negative)
Shows "energy transformation":
- Green particle = Pure buying energy
- Orange particle = Conflict zone
- Red particle = Pure selling energy
📌 How to Read Them?
- Moving left to right (🟢 → 🔴): Buy flow → Bullish push
- Moving right to left (🔴 → 🟢): Sell flow → Bearish push
- Clustered in middle: Balanced conflict — Wait for breakout
═════════════════════════════════════════════════════════════
🟠 Discharge Zone (Orange Glow — Center)
═════════════════════════════════════════════════════════════
What does it represent?
Point of stored energy accumulation not yet discharged — heart of the early warning system.
● Glow Stages
Initial Warning (discharge_prob > 0.3):
- Dim orange circle (70% transparency)
- Meaning: Watch, don't enter yet
High Tension (discharge_prob ≥ 0.7):
- Stronger glow + "⚠️ HIGH TENSION" text
- Meaning: Prepare — Set pending orders
Imminent Discharge (discharge_prob ≥ 0.9):
- Bright glow + "⚡ DISCHARGE IMMINENT" text
- Meaning: Enter with direction (after candle confirmation)
● Layered Glow Effect (Glow Layering)
3 concentric circles with increasing transparency:
- Inner: 20%
- Middle: 35%
- Outer: 50%
Result: Realistic aura resembling actual electrical discharge.
📌 Why in the Center?
Because discharge always starts from the relative balance zone — where opposing pressures meet.
═════════════════════════════════════════════════════════════
📊 Voltage Meter (Bottom of Scene)
═════════════════════════════════════════════════════════════
What does it represent?
Simplified numeric indicator of voltage difference — for those who prefer numerical reading.
● Components
- Gray bar: Full range (−100% to +100%)
- Green fill: Positive voltage (extends right)
- Red fill: Negative voltage (extends left)
- Lightning symbol (⚡): Above center — reminder it's an "electrical gauge"
- Text value: Like "+23.4%" — in direction color
● Voltage Reading Interpretation
+50% to +100%:
Overwhelming buying dominance — Beware of saturation, may precede correction
+20% to +50%:
Strong buying dominance — Suitable for buying with trend
+5% to +20%:
Slight bullish bias — Wait for additional confirmation
−5% to +5%:
Balance/Neutral — Avoid entry or wait for breakout
−5% to −20%:
Slight bearish bias — Wait for confirmation
−20% to −50%:
Strong selling dominance — Suitable for selling with trend
−50% to −100%:
Overwhelming selling dominance — Beware of saturation, may precede bounce
═════════════════════════════════════════════════════════════
📈 Field Strength Indicator (Top of Scene)
═════════════════════════════════════════════════════════════
What it displays: "Field: XX.X%"
Meaning: Strength of conflict between buyers and sellers.
● Reading Interpretation
0–5%:
- Appearance: Nearly straight lines, transparent
- Meaning: Complete control by one side
- Strategy: Trend Following
5–15%:
- Appearance: Slight curvature
- Meaning: Clear direction with light resistance
- Strategy: Enter with trend
15–25%:
- Appearance: Medium curvature, clear lines
- Meaning: Balanced conflict
- Strategy: Range trading or waiting
25–35%:
- Appearance: High curvature, clear density
- Meaning: Strong conflict, high uncertainty
- Strategy: Volatility trading or prepare for discharge
35%+:
- Appearance: Very high lines, strong glow
- Meaning: Peak tension
- Strategy: Best discharge opportunities
📌 Golden Relationship:
Highest discharge probability when:
Field Strength (25–35%) + Voltage (±30–50%) + High Volume
← This is the "red zone" to monitor carefully.
█ Comprehensive Visual Reading
To read market condition at a glance, follow this sequence:
Step 1: Which sphere is larger?
- 🟢 Green larger ← Dominant buying pressure
- 🔴 Red larger ← Dominant selling pressure
- Equal ← Balance/Conflict
Step 2: Which sphere is bright?
- 🟢 Green bright ← Current bullish direction
- 🔴 Red bright ← Current bearish direction
- Both dim ← Neutral/No clear direction
Step 3: Is there orange glow?
- None ← Discharge probability <30%
- 🟠 Dim glow ← Discharge probability 30–70%
- 🟠 Strong glow with text ← Discharge probability >70%
Step 4: What's the voltage meter reading?
- Strong positive ← Confirms buying dominance
- Strong negative ← Confirms selling dominance
- Near zero ← No clear direction
█ Practical Visual Reading Examples
Example 1: Ideal Buy Opportunity ⚡🟢
- Green sphere: Large and bright with inner pulse
- Red sphere: Small and dim
- Orange glow: Strong with "DISCHARGE IMMINENT" text
- Voltage meter: +45%
- Field strength: 28%
Interpretation: Strong accumulated buying pressure, bullish explosion imminent
Example 2: Ideal Sell Opportunity ⚡🔴
- Green sphere: Small and dim
- Red sphere: Large and bright with inner pulse
- Orange glow: Strong with "DISCHARGE IMMINENT" text
- Voltage meter: −52%
- Field strength: 31%
Interpretation: Strong accumulated selling pressure, bearish explosion imminent
Example 3: Balance/Wait ⚖️
- Both spheres: Approximately equal in size
- Lighting: Both dim
- Orange glow: Strong
- Voltage meter: +3%
- Field strength: 24%
Interpretation: Strong conflict without clear winner, wait for breakout
Example 4: Clear Uptrend (No Discharge) 📈
- Green sphere: Large and bright
- Red sphere: Very small and dim
- Orange glow: None
- Voltage meter: +68%
- Field strength: 8%
Interpretation: Clear buying control, limited conflict, suitable for following bullish trend
Example 5: Potential Buying Saturation ⚠️
- Green sphere: Very large and bright
- Red sphere: Very small
- Orange glow: Dim
- Voltage meter: +88%
- Field strength: 4%
Interpretation: Absolute buying dominance, may precede bearish correction
█ Trading Signals
⚡ DISCHARGE IMMINENT
Appearance Conditions:
- discharge_prob ≥ 0.9
- All enabled filters passed
- Confirmed (after candle close)
Interpretation:
- Very large energy accumulation
- Pressure reached critical level
- Price explosion expected within 1–3 candles
How to Trade:
1. Determine voltage direction:
• Positive = Expect rise
• Negative = Expect fall
2. Wait for confirmation candle:
• For rise: Bullish candle closing above its open
• For fall: Bearish candle closing below its open
3. Entry: With next candle's open
4. Stop Loss: Behind last local low/high
5. Target: Risk/Reward ratio of at least 1:2
✅ Pro Tips:
- Best results when combined with support/resistance levels
- Avoid entry if voltage is near zero (±5%)
- Increase position size when field strength > 30%
⚠️ HIGH TENSION
Appearance Conditions:
- 0.7 ≤ discharge_prob < 0.9
Interpretation:
- Market in energy accumulation state
- Likely strong move soon, but not immediate
- Accumulation may continue or discharge may occur
How to Benefit:
- Prepare: Set pending orders at potential breakouts
- Monitor: Watch following candles for momentum candle
- Select: Don't enter every signal — choose those aligned with overall trend
█ Trading Strategies
📈 Strategy 1: Discharge Trading (Basic)
Principle: Enter at "DISCHARGE IMMINENT" in voltage direction
Steps:
1. Wait for "⚡ DISCHARGE IMMINENT"
2. Check voltage direction (+/−)
3. Wait for confirmation candle in voltage direction
4. Enter with next candle's open
5. Stop loss behind last low/high
6. Target: 1:2 or 1:3 ratio
Very high success rate when following confirmation conditions.
📈 Strategy 2: Dominance Following
Principle: Trade with dominant pole (largest and brightest sphere)
Steps:
1. Identify dominant pole (largest and brightest)
2. Trade in its direction
3. Beware when sizes converge (conflict)
Suitable for higher timeframes (H1+).
📈 Strategy 3: Reversal Hunting
Principle: Counter-trend entry under certain conditions
Conditions:
- High field strength (>30%)
- Extreme voltage (>±40%)
- Divergence with price (e.g., new price high with declining voltage)
⚠️ High risk — Use small position size.
📈 Strategy 4: Integration with Technical Analysis
Strong Confirmation Examples:
- Resistance breakout + Bullish discharge = Excellent buy signal
- Support break + Bearish discharge = Excellent sell signal
- Head & Shoulders pattern + Increasing negative voltage = Pattern confirmation
- RSI divergence + High field strength = Potential reversal
█ Ready Alerts
Bullish Discharge
- Condition: discharge_prob ≥ 0.9 + Positive voltage + All filters
- Message: "⚡ Bullish discharge"
- Use: High probability buy opportunity
Bearish Discharge
- Condition: discharge_prob ≥ 0.9 + Negative voltage + All filters
- Message: "⚡ Bearish discharge"
- Use: High probability sell opportunity
✅ Tip: Use these alerts with "Once Per Bar" setting to avoid repetition.
█ Data Window Outputs
Bias
- Values: −1 / 0 / +1
- Interpretation: −1 = Bearish, 0 = Neutral, +1 = Bullish
- Use: For integration in automated strategies
Discharge %
- Range: 0–100%
- Interpretation: Discharge probability
- Use: Monitor tension progression (e.g., from 40% to 85% in 5 candles)
Field Strength
- Range: 0–100%
- Interpretation: Conflict intensity
- Use: Identify "opportunity window" (25–35% ideal for discharge)
Voltage
- Range: −100% to +100%
- Interpretation: Balance of power
- Use: Monitor extremes (potential buying/selling saturation)
█ Optimal Settings by Trading Style
Scalping
- Timeframe: 1M–5M
- Lookback: 10–15
- Threshold: 0.5–0.6
- Sensitivity: 1.2–1.5
- Filters: Volume + Volatility
Day Trading
- Timeframe: 15M–1H
- Lookback: 20
- Threshold: 0.7
- Sensitivity: 1.0
- Filters: Volume + Volatility
Swing Trading
- Timeframe: 4H–D1
- Lookback: 30–50
- Threshold: 0.8
- Sensitivity: 0.8
- Filters: Volatility + Trend
Position Trading
- Timeframe: D1–W1
- Lookback: 50–100
- Threshold: 0.85–0.95
- Sensitivity: 0.5–0.8
- Filters: All filters
█ Tips for Optimal Use
1. Start with Default Settings
Try it first as is, then adjust to your style.
2. Watch for Element Alignment
Best signals when:
- Clear voltage (>│20%│)
- Moderate–high field strength (15–35%)
- High discharge probability (>70%)
3. Use Multiple Timeframes
- Higher timeframe: Determine overall trend
- Lower timeframe: Time entry
- Ensure signal alignment between frames
4. Integrate with Other Tools
- Support/Resistance levels
- Trend lines
- Candle patterns
- Volume indicators
5. Respect Risk Management
- Don't risk more than 1–2% of account
- Always use stop loss
- Don't enter every signal — choose the best
█ Important Warnings
⚠️ Not for Standalone Use
The indicator is an analytical support tool — don't use it isolated from technical or fundamental analysis.
⚠️ Doesn't Predict the Future
Calculations are based on historical data — Results are not guaranteed.
⚠️ Markets Differ
You may need to adjust settings for each market:
- Forex: Focus on Volume Filter
- Stocks: Add Trend Filter
- Crypto: Lower Threshold slightly (more volatile)
⚠️ News and Events
The indicator doesn't account for sudden news — Avoid trading before/during major news.
█ Unique Features
✅ First Application of Electromagnetism to Markets
Innovative mathematical model — Not just an ordinary indicator
✅ Predictive Detection of Price Explosions
Alerts before the move happens — Not after
✅ Multi-Layer Filtering
4 smart filters reduce false signals to minimum
✅ Smart Volatility Adaptation
Automatically adjusts sensitivity based on market conditions
✅ Animated 3D Visual Representation
Makes reading instant — Even for beginners
✅ High Flexibility
Works on all assets: Stocks, Forex, Crypto, Commodities
✅ Built-in Ready Alerts
No complex setup needed — Ready for immediate use
█ Conclusion: When Art Meets Science
Market Electromagnetic Field is not just an indicator — but a new analytical philosophy.
It's the bridge between:
- Physics precision in describing dynamic systems
- Market intelligence in generating trading opportunities
- Visual psychology in facilitating instant reading
The result: A tool that isn't read — but watched, felt, and sensed.
When you see the green sphere expanding, the glow intensifying, and particles rushing rightward — you're not seeing numbers, you're seeing market energy breathing.
⚠️ Disclaimer:
This indicator is for educational and analytical purposes only. It does not constitute financial, investment, or trading advice. Use it in conjunction with your own strategy and risk management. Neither TradingView nor the developer is liable for any financial decisions or losses.
المجال الكهرومغناطيسي للسوق - Market Electromagnetic Field
مؤشر تحليلي مبتكر يقدّم نموذجًا جديدًا كليًّا لفهم ديناميكيات السوق، مستوحى من قوانين الفيزياء الكهرومغناطيسية — لكنه ليس استعارة بلاغية، بل نظام رياضي متكامل.
على عكس المؤشرات التقليدية التي تُركّز على السعر أو الزخم، يُصوّر هذا المؤشر السوق كـنظام فيزيائي مغلق، حيث:
⚡ الشموع = شحنات كهربائية (موجبة عند الإغلاق الصاعد، سالبة عند الهابط)
⚡ المشتريون والبائعون = قطبان متعاكسان يتراكم فيهما الضغط
⚡ التوتر السوقي = فرق جهد بين القطبين
⚡ الاختراق السعري = تفريغ كهربائي بعد تراكم طاقة كافية
█ الفكرة الجوهرية
الأسواق لا تتحرك عشوائيًّا، بل تخضع لدورة فيزيائية واضحة:
تراكم → توتر → تفريغ → استقرار → تراكم جديد
عندما تتراكم الشحنات (من خلال شموع قوية بحجم مرتفع) وتتجاوز "السعة الكهربائية" عتبة معيّنة، يُصدر المؤشر تنبيه "⚡ DISCHARGE IMMINENT" — أي أن انفجارًا سعريًّا وشيكًا، مما يمنح المتداول فرصة الدخول قبل بدء الحركة.
█ الميزة التنافسية
- تنبؤ استباقي (ليس تأكيديًّا بعد الحدث)
- فلترة ذكية متعددة الطبقات تقلل الإشارات الكاذبة
- تمثيل بصري ثلاثي الأبعاد متحرك يجعل قراءة الحالة السعرية فورية وبديهية — دون حاجة لتحليل أرقام
█ الأساس النظري الفيزيائي
المؤشر لا يستخدم مصطلحات فيزيائية للزينة، بل يُطبّق القوانين الرياضية مع تعديلات سوقيّة دقيقة:
⚡ قانون كولوم (Coulomb's Law)
الفيزياء: F = k × (q₁ × q₂) / r²
السوق: شدة الحقل = 4 × norm_positive × norm_negative
تصل لذروتها عند التوازن (0.5 × 0.5 × 4 = 1.0)، وتنخفض عند الهيمنة — لأن الصراع يزداد عند التكافؤ.
⚡ قانون أوم (Ohm's Law)
الفيزياء: V = I × R
السوق: الجهد = norm_positive − norm_negative
يقيس ميزان القوى:
- +1 = هيمنة شرائية مطلقة
- −1 = هيمنة بيعية مطلقة
- 0 = توازن
⚡ السعة الكهربائية (Capacitance)
الفيزياء: C = Q / V
السوق: السعة = |الجهد| × شدة الحقل
تمثّل الطاقة المخزّنة القابلة للتفريغ — تزداد عند وجود تحيّز مع تفاعل عالي.
⚡ التفريغ الكهربائي (Discharge)
الفيزياء: يحدث عند تجاوز عتبة العزل
السوق: احتمال التفريغ = min(السعة / عتبة التفريغ, 1.0)
عندما ≥ 0.9: "⚡ DISCHARGE IMMINENT"
📌 ملاحظة جوهرية:
أقصى سعة لا تحدث عند الهيمنة المطلقة (حيث شدة الحقل = 0)، ولا عند التوازن التام (حيث الجهد = 0)، بل عند انحياز متوسط (±30–50%) مع تفاعل عالي (شدة حقل > 25%) — أي في لحظات "الضغط قبل الاختراق".
█ آلية الحساب التفصيلية
⚡ المرحلة 1: قطبية الشمعة
polarity = (close − open) / (high − low)
- +1.0: شمعة صاعدة كاملة (ماروبوزو صاعد)
- −1.0: شمعة هابطة كاملة (ماروبوزو هابط)
- 0.0: دوجي (لا قرار)
- القيم الوسيطة: تمثّل نسبة جسم الشمعة إلى مداها — مما يقلّل تأثير الشموع ذات الظلال الطويلة
⚡ المرحلة 2: وزن الحجم
vol_weight = volume / SMA(volume, lookback)
شمعة بحجم 150% من المتوسط = شحنة أقوى بـ 1.5 مرة
⚡ المرحلة 3: معامل التكيف (Adaptive Factor)
adaptive_factor = ATR(lookback) / SMA(ATR, lookback × 2)
- في الأسواق المتقلبة: يزيد الحساسية
- في الأسواق الهادئة: يقلل الضوضاء
- يوصى دائمًا بتركه مفعّلًا
⚡ المرحلة 4–6: تراكم وتوحيد الشحنات
تُجمّع الشحنات على lookback شمعة، ثم تُوحّد النسب:
norm_positive = positive_charge / total_charge
norm_negative = negative_charge / total_charge
بحيث: norm_positive + norm_negative = 1 — لتسهيل المقارنة
⚡ المرحلة 7: حسابات الحقل
voltage = norm_positive − norm_negative
field_intensity = 4 × norm_positive × norm_negative × field_sensitivity
capacitance = |voltage| × field_intensity
discharge_prob = min(capacitance / discharge_threshold, 1.0)
█ الإعدادات
⚡ Electromagnetic Model
Lookback Period
- الافتراضي: 20
- النطاق: 5–100
- التوصيات:
- المضاربة: 10–15
- اليومي: 20
- السوينغ: 30–50
- الاستثمار: 50–100
Discharge Threshold
- الافتراضي: 0.7
- النطاق: 0.3–0.95
- التوصيات:
- سرعة + ضوضاء: 0.5–0.6
- توازن: 0.7
- دقة عالية: 0.8–0.95
Field Sensitivity
- الافتراضي: 1.0
- النطاق: 0.5–2.0
- التوصيات:
- تضخيم الصراع: 1.2–1.5
- طبيعي: 1.0
- تهدئة: 0.5–0.8
Adaptive Mode
- الافتراضي: مفعّل
- أبقِه دائمًا مفعّلًا
🔬 Dynamic Filters
يجب اجتياز جميع الفلاتر المفعّلة لظهور إشارة التفريغ.
Volume Filter
- الشرط: volume > SMA(volume) × vol_multiplier
- الوظيفة: يستبعد الشموع "الضعيفة" غير المدعومة بحجم
- التوصية: مفعّل (خاصة للأسهم والعملات)
Volatility Filter
- الشرط: STDEV > SMA(STDEV) × 0.5
- الوظيفة: يتجاهل فترات الركود الجانبي
- التوصية: مفعّل دائمًا
Trend Filter
- الشرط: توافق الجهد مع EMA سريع/بطيء
- الوظيفة: يقلل الإشارات المعاكسة للاتجاه العام
- التوصية: مفعّل للسوينغ/الاستثمار فقط
Volume Threshold
- الافتراضي: 1.2
- التوصيات:
- 1.0–1.2: حساسية عالية
- 1.5–2.0: حصرية للحجم العالي
🎨 Visual Settings
الإعدادات تُحسّن تجربة القراءة البصرية — لا تؤثر على الحسابات.
Scale Factor
- الافتراضي: 600
- كلما زاد: المشهد أكبر (200–1200)
Horizontal Shift
- الافتراضي: 180
- إزاحة أفقيّة لليسار — ليركّز على آخر شمعة
Pole Size
- الافتراضي: 60
- حجم الكرات الأساسية (30–120)
Field Lines
- الافتراضي: 8
- عدد خطوط الحقل (4–16) — 8 توازن مثالي
الألوان
- أخضر/أحمر/أزرق/برتقالي
- قابلة للتخصيص بالكامل
█ التمثيل البصري: لغة بصرية لتشخيص الحالة السعرية
✨ الفلسفة التصميمية
التمثيل ليس "زينة"، بل نموذج معرفي متكامل — كل عنصر يحمل معلومة، وتفاعل العناصر يروي قصة كاملة.
العقل يدرك التغيير في الحجم، اللون، والحركة أسرع بـ 60,000 مرة من قراءة الأرقام — لذا يمكنك "الإحساس" بالتغير قبل أن تُنهي العين المسح.
═════════════════════════════════════════════════════════════
🟢 القطب الموجب (الكرة الخضراء — يسار)
═════════════════════════════════════════════════════════════
ماذا يمثّل؟
تراكم ضغط الشراء النشط — ليس مجرد اتجاه صاعد، بل قوة طلب حقيقية مدعومة بحجم وتقلّب.
● الحجم المتغير
حجم = pole_size × (0.7 + norm_positive × 0.6)
- 70% من الحجم الأساسي = لا شحنة تُذكر
- 130% من الحجم الأساسي = هيمنة تامة
- كلما كبرت الكرة: زاد تفوّق المشترين، وارتفع احتمال الاستمرار الصعودي
تفسير الحجم:
- كرة كبيرة (>55%): ضغط شراء قوي — المشترون يسيطرون
- كرة متوسطة (45–55%): توازن نسبي مع ميل للشراء
- كرة صغيرة (<45%): ضعف ضغط الشراء — البائعون يسيطرون
● الإضاءة والشفافية
- شفافية 20% (عند Bias = +1): القطب نشط حالياً — الاتجاه صعودي
- شفافية 50% (عند Bias ≠ +1): القطب غير نشط — ليس الاتجاه السائد
الإضاءة = النشاط الحالي، بينما الحجم = التراكم التاريخي
● التوهج الداخلي النابض
كرة أصغر تنبض تلقائيًّا عند Bias = +1:
inner_pulse = 0.4 + 0.1 × sin(anim_time × 3)
يرمز إلى استمرارية تدفق أوامر الشراء — وليس هيمنة جامدة.
● الحلقات المدارية
حلقتان تدوران بسرعات واتجاهات مختلفة:
- الداخلية: 1.3× حجم الكرة — نطاق التأثير المباشر
- الخارجية: 1.6× حجم الكرة — نطاق التأثير الممتد
تمثّل "نطاق تأثير" المشترين:
- الدوران المستمر = استقرار وزخم
- التباطؤ = نفاد الزخم
● النسبة المئوية
تظهر تحت الكرة: norm_positive × 100
- >55% = هيمنة واضحة
- 45–55% = توازن
- <45% = ضعف
═════════════════════════════════════════════════════════════
🔴 القطب السالب (الكرة الحمراء — يمين)
═════════════════════════════════════════════════════════════
ماذا يمثّل؟
تراكم ضغط البيع النشط — سواء كان بيعًا تراكميًّا (التوزيع الذكي) أو بيعًا هستيريًّا (تصفية مراكز).
● الديناميكيات البصرية
نفس آلية الحجم والإضاءة والتوهج الداخلي — لكن باللون الأحمر.
الفرق الجوهري:
- الدوران معكوس (عكس اتجاه عقارب الساعة)
- يُميّز بصريًّا بين "تدفق الشراء" و"تدفق البيع"
- يسمح بقراءة الاتجاه بنظرة واحدة — حتى للمصابين بعَمَى الألوان
📌 ملخص قراءة القطبين:
🟢 كرة خضراء كبيرة + مضيئة = قوة شرائية نشطة
🔴 كرة حمراء كبيرة + مضيئة = قوة بيعية نشطة
🟢🔴 كرتان كبيرتان لكن خافتتان = تراكم طاقة (قبل التفريغ)
⚪ كرتان صغيرتان = ركود / سيولة منخفضة
═════════════════════════════════════════════════════════════
🔵 خطوط الحقل (الخطوط الزرقاء المنحنية)
═════════════════════════════════════════════════════════════
ماذا تمثّل؟
مسارات تدفق الطاقة بين القطبين — أي الساحة التي تُدار فيها المعركة السعرية.
● عدد الخطوط
4–16 خط (الافتراضي: 8)
كلما زاد العدد: زاد إحساس "كثافة التفاعل"
● ارتفاع القوس
arc_h = (i − half_lines) × 15 × field_intensity × 2
- شدة حقل عالية = خطوط شديدة الارتفاع (مثل موجة)
- شدة منخفضة = خطوط شبه مستقيمة
● الشفافية المتذبذبة
transp = 30 + phase × 40
حيث phase = sin(anim_time × 2 + i × 0.5) × 0.5 + 0.5
تخلق وهم "تيّار متدفّق" — وليس خطوطًا ثابتة
● الانحناء غير المتناظر
- الخطوط العلوية تنحني لأعلى
- الخطوط السفلية تنحني لأسفل
- يُضفي عمقًا ثلاثي الأبعاد ويُظهر اتجاه "الضغط"
⚡ تلميح احترافي:
عندما ترى الخطوط "تتقلّص" فجأة (تستقيم)، بينما الكرتان كبيرتان — فهذا مؤشر مبكر على قرب التفريغ، لأن التفاعل بدأ يفقد مرونته.
═════════════════════════════════════════════════════════════
⚪ الجزيئات المتحركة
═════════════════════════════════════════════════════════════
ماذا تمثّل؟
تدفق السيولة الحقيقية في السوق — أي من يدفع السعر الآن.
● العدد والحركة
- 6 جزيئات تغطي معظم خطوط الحقل
- تتحرك جيبيًّا على طول القوس:
t = (sin(phase_val) + 1) / 2
- سرعة عالية = نشاط تداول عالي
- تجمّع عند قطب = سيطرة هذا الطرف
● تدرج اللون
من أخضر (عند القطب الموجب) إلى أحمر (عند السالب)
يُظهر "تحوّل الطاقة":
- جزيء أخضر = طاقة شرائية نقية
- جزيء برتقالي = منطقة صراع
- جزيء أحمر = طاقة بيعية نقية
📌 كيف تقرأها؟
- تحركت من اليسار لليمين (🟢 → 🔴): تدفق شرائي → دفع صعودي
- تحركت من اليمين لليسار (🔴 → 🟢): تدفق بيعي → دفع هبوطي
- تجمّعت في المنتصف: صراع متكافئ — انتظر اختراقًا
═════════════════════════════════════════════════════════════
🟠 منطقة التفريغ (التوهج البرتقالي — المركز)
═════════════════════════════════════════════════════════════
ماذا تمثّل؟
نقطة تراكم الطاقة المخزّنة التي لم تُفرّغ بعد — قلب نظام الإنذار المبكر.
● مراحل التوهج
إنذار أولي (discharge_prob > 0.3):
- دائرة برتقالية خافتة (شفافية 70%)
- المعنى: راقب، لا تدخل بعد
توتر عالي (discharge_prob ≥ 0.7):
- توهج أقوى + نص "⚠️ HIGH TENSION"
- المعنى: استعد — ضع أوامر معلقة
تفريغ وشيك (discharge_prob ≥ 0.9):
- توهج ساطع + نص "⚡ DISCHARGE IMMINENT"
- المعنى: ادخل مع الاتجاه (بعد تأكيد شمعة)
● تأثير التوهج الطبقي (Glow Layering)
3 دوائر متحدة المركز بشفافية متزايدة:
- داخلي: 20%
- وسط: 35%
- خارجي: 50%
النتيجة: هالة (Aura) واقعية تشبه التفريغ الكهربائي الحقيقي.
📌 لماذا في المركز؟
لأن التفريغ يبدأ دائمًا من منطقة التوازن النسبي — حيث يلتقي الضغطان المتعاكسان.
═════════════════════════════════════════════════════════════
📊 مقياس الجهد (أسفل المشهد)
═════════════════════════════════════════════════════════════
ماذا يمثّل؟
مؤشر رقمي مبسّط لفرق الجهد — لمن يفضّل القراءة العددية.
● المكونات
- الشريط الرمادي: النطاق الكامل (−100% إلى +100%)
- التعبئة الخضراء: جهد موجب (تمتد لليمين)
- التعبئة الحمراء: جهد سالب (تمتد لليسار)
- رمز البرق (⚡): فوق المركز — تذكير بأنه "مقياس كهربائي"
- القيمة النصية: مثل "+23.4%" — بلون الاتجاه
● تفسير قراءات الجهد
+50% إلى +100%:
هيمنة شرائية ساحقة — احذر التشبع، قد يسبق تصحيح
+20% إلى +50%:
هيمنة شرائية قوية — مناسب للشراء مع الاتجاه
+5% إلى +20%:
ميل صعودي خفيف — انتظر تأكيدًا إضافيًّا
−5% إلى +5%:
توازن/حياد — تجنّب الدخول أو انتظر اختراقًا
−5% إلى −20%:
ميل هبوطي خفيف — انتظر تأكيدًا
−20% إلى −50%:
هيمنة بيعية قوية — مناسب للبيع مع الاتجاه
−50% إلى −100%:
هيمنة بيعية ساحقة — احذر التشبع، قد يسبق ارتداد
═════════════════════════════════════════════════════════════
📈 مؤشر شدة الحقل (أعلى المشهد)
═════════════════════════════════════════════════════════════
ما يعرضه: "Field: XX.X%"
الدلالة: قوة الصراع بين المشترين والبائعين.
● تفسير القراءات
0–5%:
- المظهر: خطوط مستقيمة تقريبًا، شفافة
- المعنى: سيطرة تامة لأحد الطرفين
- الاستراتيجية: تتبع الترند (Trend Following)
5–15%:
- المظهر: انحناء خفيف
- المعنى: اتجاه واضح مع مقاومة خفيفة
- الاستراتيجية: الدخول مع الاتجاه
15–25%:
- المظهر: انحناء متوسط، خطوط واضحة
- المعنى: صراع متوازن
- الاستراتيجية: تداول النطاق أو الانتظار
25–35%:
- المظهر: انحناء عالي، كثافة واضحة
- المعنى: صراع قوي، عدم يقين عالي
- الاستراتيجية: تداول التقلّب أو الاستعداد للتفريغ
35%+:
- المظهر: خطوط عالية جدًّا، توهج قوي
- المعنى: ذروة التوتر
- الاستراتيجية: أفضل فرص التفريغ
📌 العلاقة الذهبية:
أعلى احتمال تفريغ عندما:
شدة الحقل (25–35%) + جهد (±30–50%) + حجم مرتفع
← هذه هي "المنطقة الحمراء" التي يجب مراقبتها بدقة.
█ قراءة التمثيل البصري الشاملة
لقراءة حالة السوق بنظرة واحدة، اتبع هذا التسلسل:
الخطوة 1: أي كرة أكبر؟
- 🟢 الخضراء أكبر ← ضغط شراء مهيمن
- 🔴 الحمراء أكبر ← ضغط بيع مهيمن
- متساويتان ← توازن/صراع
الخطوة 2: أي كرة مضيئة؟
- 🟢 الخضراء مضيئة ← اتجاه صعودي حالي
- 🔴 الحمراء مضيئة ← اتجاه هبوطي حالي
- كلاهما خافت ← حياد/لا اتجاه واضح
الخطوة 3: هل يوجد توهج برتقالي؟
- لا يوجد ← احتمال تفريغ <30%
- 🟠 توهج خافت ← احتمال تفريغ 30–70%
- 🟠 توهج قوي مع نص ← احتمال تفريغ >70%
الخطوة 4: ما قراءة مقياس الجهد؟
- موجب قوي ← تأكيد الهيمنة الشرائية
- سالب قوي ← تأكيد الهيمنة البيعية
- قريب من الصفر ← لا اتجاه واضح
█ أمثلة عملية للقراءة البصرية
المثال 1: فرصة شراء مثالية ⚡🟢
- الكرة الخضراء: كبيرة ومضيئة مع نبض داخلي
- الكرة الحمراء: صغيرة وخافتة
- التوهج البرتقالي: قوي مع نص "DISCHARGE IMMINENT"
- مقياس الجهد: +45%
- شدة الحقل: 28%
التفسير: ضغط شراء قوي متراكم، انفجار صعودي وشيك
المثال 2: فرصة بيع مثالية ⚡🔴
- الكرة الخضراء: صغيرة وخافتة
- الكرة الحمراء: كبيرة ومضيئة مع نبض داخلي
- التوهج البرتقالي: قوي مع نص "DISCHARGE IMMINENT"
- مقياس الجهد: −52%
- شدة الحقل: 31%
التفسير: ضغط بيع قوي متراكم، انفجار هبوطي وشيك
المثال 3: توازن/انتظار ⚖️
- الكرتان: متساويتان تقريباً في الحجم
- الإضاءة: كلاهما خافت
- التوهج البرتقالي: قوي
- مقياس الجهد: +3%
- شدة الحقل: 24%
التفسير: صراع قوي بدون فائز واضح، انتظر اختراقًا
المثال 4: اتجاه صعودي واضح (لا تفريغ) 📈
- الكرة الخضراء: كبيرة ومضيئة
- الكرة الحمراء: صغيرة جداً وخافتة
- التوهج البرتقالي: لا يوجد
- مقياس الجهد: +68%
- شدة الحقل: 8%
التفسير: سيطرة شرائية واضحة، صراع محدود، مناسب لتتبع الترند الصعودي
المثال 5: تشبع شرائي محتمل ⚠️
- الكرة الخضراء: كبيرة جداً ومضيئة
- الكرة الحمراء: صغيرة جداً
- التوهج البرتقالي: خافت
- مقياس الجهد: +88%
- شدة الحقل: 4%
التفسير: هيمنة شرائية مطلقة، قد يسبق تصحيحاً هبوطياً
█ إشارات التداول
⚡ DISCHARGE IMMINENT (التفريغ الوشيك)
شروط الظهور:
- discharge_prob ≥ 0.9
- اجتياز جميع الفلاتر المفعّلة
- Confirmed (بعد إغلاق الشمعة)
التفسير:
- تراكم طاقة كبير جدًّا
- الضغط وصل لمستوى حرج
- انفجار سعري متوقع خلال 1–3 شموع
كيفية التداول:
1. حدد اتجاه الجهد:
• موجب = توقع صعود
• سالب = توقع هبوط
2. انتظر شمعة تأكيدية:
• للصعود: شمعة صاعدة تغلق فوق افتتاحها
• للهبوط: شمعة هابطة تغلق تحت افتتاحها
3. الدخول: مع افتتاح الشمعة التالية
4. وقف الخسارة: وراء آخر قاع/قمة محلية
5. الهدف: نسبة مخاطرة/عائد 1:2 على الأقل
✅ نصائح احترافية:
- أفضل النتائج عند دمجها مع مستويات الدعم/المقاومة
- تجنّب الدخول إذا كان الجهد قريبًا من الصفر (±5%)
- زِد حجم المركز عند شدة حقل > 30%
⚠️ HIGH TENSION (التوتر العالي)
شروط الظهور:
- 0.7 ≤ discharge_prob < 0.9
التفسير:
- السوق في حالة تراكم طاقة
- احتمال حركة قوية قريبة، لكن ليست فورية
- قد يستمر التراكم أو يحدث تفريغ
كيفية الاستفادة:
- الاستعداد: حضّر أوامر معلقة عند الاختراقات المحتملة
- المراقبة: راقب الشموع التالية بحثًا عن شمعة دافعة
- الانتقاء: لا تدخل كل إشارة — اختر تلك التي تتوافق مع الاتجاه العام
█ استراتيجيات التداول
📈 استراتيجية 1: تداول التفريغ (الأساسية)
المبدأ: الدخول عند "DISCHARGE IMMINENT" في اتجاه الجهد
الخطوات:
1. انتظر ظهور "⚡ DISCHARGE IMMINENT"
2. تحقق من اتجاه الجهد (+/−)
3. انتظر شمعة تأكيدية في اتجاه الجهد
4. ادخل مع افتتاح الشمعة التالية
5. وقف الخسارة وراء آخر قاع/قمة
6. الهدف: نسبة 1:2 أو 1:3
نسبة نجاح عالية جدًّا عند الالتزام بشروط التأكيد.
📈 استراتيجية 2: تتبع الهيمنة
المبدأ: التداول مع القطب المهيمن (الكرة الأكبر والأكثر إضاءة)
الخطوات:
1. حدد القطب المهيمن (الأكبر حجماً والأكثر إضاءة)
2. تداول في اتجاهه
3. احذر عند تقارب الأحجام (صراع)
مناسبة للإطارات الزمنية الأعلى (H1+).
📈 استراتيجية 3: صيد الانعكاس
المبدأ: الدخول عكس الاتجاه عند ظروف معينة
الشروط:
- شدة حقل عالية (>30%)
- جهد متطرف (>±40%)
- تباعد مع السعر (مثل: قمة سعرية جديدة مع تراجع الجهد)
⚠️ عالية المخاطرة — استخدم حجم مركز صغير.
📈 استراتيجية 4: الدمج مع التحليل الفني
أمثلة تأكيد قوي:
- اختراق مقاومة + تفريغ صعودي = إشارة شراء ممتازة
- كسر دعم + تفريغ هبوطي = إشارة بيع ممتازة
- نموذج Head & Shoulders + جهد سالب متزايد = تأكيد النموذج
- تباعد RSI + شدة حقل عالية = انعكاس محتمل
█ التنبيهات الجاهزة
Bullish Discharge
- الشرط: discharge_prob ≥ 0.9 + جهد موجب + جميع الفلاتر
- الرسالة: "⚡ Bullish discharge"
- الاستخدام: فرصة شراء عالية الاحتمالية
Bearish Discharge
- الشرط: discharge_prob ≥ 0.9 + جهد سالب + جميع الفلاتر
- الرسالة: "⚡ Bearish discharge"
- الاستخدام: فرصة بيع عالية الاحتمالية
✅ نصيحة: استخدم هذه التنبيهات مع إعداد "Once Per Bar" لتجنب التكرار.
█ المخرجات في نافذة البيانات
Bias
- القيم: −1 / 0 / +1
- التفسير: −1 = هبوطي، 0 = حياد، +1 = صعودي
- الاستخدام: لدمجها في استراتيجيات آلية
Discharge %
- النطاق: 0–100%
- التفسير: احتمال التفريغ
- الاستخدام: مراقبة تدرّج التوتر (مثال: من 40% إلى 85% في 5 شموع)
Field Strength
- النطاق: 0–100%
- التفسير: شدة الصراع
- الاستخدام: تحديد "نافذة الفرص" (25–35% مثالية للتفريغ)
Voltage
- النطاق: −100% إلى +100%
- التفسير: ميزان القوى
- الاستخدام: مراقبة التطرف (تشبع شرائي/بيعي محتمل)
█ الإعدادات المثلى حسب أسلوب التداول
المضاربة (Scalping)
- الإطار: 1M–5M
- Lookback: 10–15
- Threshold: 0.5–0.6
- Sensitivity: 1.2–1.5
- الفلاتر: Volume + Volatility
التداول اليومي (Day Trading)
- الإطار: 15M–1H
- Lookback: 20
- Threshold: 0.7
- Sensitivity: 1.0
- الفلاتر: Volume + Volatility
السوينغ (Swing Trading)
- الإطار: 4H–D1
- Lookback: 30–50
- Threshold: 0.8
- Sensitivity: 0.8
- الفلاتر: Volatility + Trend
الاستثمار (Position Trading)
- الإطار: D1–W1
- Lookback: 50–100
- Threshold: 0.85–0.95
- Sensitivity: 0.5–0.8
- الفلاتر: جميع الفلاتر
█ نصائح للاستخدام الأمثل
1. ابدأ بالإعدادات الافتراضية
جرّبه أولًا كما هو، ثم عدّل حسب أسلوبك.
2. راقب التوافق بين العناصر
أفضل الإشارات عندما:
- الجهد واضح (>│20%│)
- شدة الحقل معتدلة–عالية (15–35%)
- احتمال التفريغ مرتفع (>70%)
3. استخدم أطر زمنية متعددة
- الإطار الأعلى: تحديد الاتجاه العام
- الإطار الأدنى: توقيت الدخول
- تأكد من توافق الإشارات بين الأطر
4. دمج مع أدوات أخرى
- مستويات الدعم/المقاومة
- خطوط الاتجاه
- أنماط الشموع
- مؤشرات الحجم
5. احترم إدارة المخاطرة
- لا تخاطر بأكثر من 1–2% من الحساب
- استخدم دائمًا وقف الخسارة
- لا تدخل كل الإشارات — اختر الأفضل
█ تحذيرات مهمة
⚠️ ليس للاستخدام المنفرد
المؤشر أداة تحليل مساعِدة — لا تستخدمه بمعزل عن التحليل الفني أو الأساسي.
⚠️ لا يتنبأ بالمستقبل
الحسابات مبنية على البيانات التاريخية — النتائج ليست مضمونة.
⚠️ الأسواق تختلف
قد تحتاج لضبط الإعدادات لكل سوق:
- العملات: تركّز على Volume Filter
- الأسهم: أضف Trend Filter
- الكريبتو: خفّض Threshold قليلًا (أكثر تقلّبًا)
⚠️ الأخبار والأحداث
المؤشر لا يأخذ في الاعتبار الأخبار المفاجئة — تجنّب التداول قبل/أثناء الأخبار الرئيسية.
█ الميزات الفريدة
✅ أول تطبيق للكهرومغناطيسية على الأسواق
نموذج رياضي مبتكر — ليس مجرد مؤشر عادي
✅ كشف استباقي للانفجارات السعرية
يُنبّه قبل حدوث الحركة — وليس بعدها
✅ تصفية متعددة الطبقات
4 فلاتر ذكية تقلل الإشارات الكاذبة إلى الحد الأدنى
✅ تكيف ذكي مع التقلب
يضبط حساسيته تلقائيًّا حسب ظروف السوق
✅ تمثيل بصري ثلاثي الأبعاد متحرك
يجعل القراءة فورية — حتى للمبتدئين
✅ مرونة عالية
يعمل على جميع الأصول: أسهم، عملات، كريبتو، سلع
✅ تنبيهات مدمجة جاهزة
لا حاجة لإعدادات معقدة — جاهز للاستخدام الفوري
█ خاتمة: عندما يلتقي الفن بالعلم
Market Electromagnetic Field ليس مجرد مؤشر — بل فلسفة تحليلية جديدة.
هو الجسر بين:
- دقة الفيزياء في وصف الأنظمة الديناميكية
- ذكاء السوق في توليد فرص التداول
- علم النفس البصري في تسهيل القراءة الفورية
النتيجة: أداة لا تُقرأ — بل تُشاهد، تُشعر، وتُستشعر.
عندما ترى الكرة الخضراء تتوسع، والتوهج يصفرّ، والجزيئات تندفع لليمين — فأنت لا ترى أرقامًا، بل ترى طاقة السوق تتنفّس.
⚠️ إخلاء مسؤولية:
هذا المؤشر لأغراض تعليمية وتحليلية فقط. لا يُمثل نصيحة مالية أو استثمارية أو تداولية. استخدمه بالتزامن مع استراتيجيتك الخاصة وإدارة المخاطر. لا يتحمل TradingView ولا المطور مسؤولية أي قرارات مالية أو خسائر.
Opening Range Break LRSThis script is designed for a trend-following, opening range breakout strategy. The main idea is to only trade breakouts that happen in the same direction as the short-term trend, which the script identifies using a linear regression slope.
1. Identify the Short-Term Trend
This is the first and most important step. The script does this for you using the Linear Regression and the bar coloring.
• If the bars are colored BLUE: The linear regression slope is positive. This means the script considers the short-term trend to be UP. A trader using this script would only look for long (buy) trades.
• If the bars are colored YELLOW: The linear regression slope is negative. This means the script considers the short-term trend to be DOWN. A trader using this script would only look for short (sell) trades.
This filter is designed to prevent you from trading a "false breakout" against the immediate momentum.
2. Watch the Opening Ranges Form
At the start of the trading session (8:30 AM by default), the script will begin drawing boxes for the 5, 15, 30, and 60-minute opening ranges you've enabled.
• The 5-minute box (e.g., gray) will be set after the 8:30 - 8:35 period.
• The 15-minute box (e.g., blue) will be set after the 8:30 - 8:45 period.
• ...and so on.
These boxes, which extend for the rest of the day, represent the key high and low levels established at the open. The "Live Box Extension" input simply keeps the right edge of the box a few bars away from the current price so you can see it clearly.
3. Look for a Filtered Breakout Signal
This is where the trend filter (Step 1) and the range boxes (Step 2) come together.
Bullish Trade Example (Long):
1. A trader sees the bars are colored BLUE (uptrend). They are now only looking for a break above one of the ORB highs.
2. They will ignore any break below the ORB lows, as that would be trading against the trend filter.
3. The price moves up and finally closes above the 15-minute ORB high.
4. The script will plot a green "Break 15" label. This is the trader's signal to enter a long trade.
Bearish Trade Example (Short):
1. A trader sees the bars are colored YELLOW (downtrend). They are now only looking for a break below one of the ORB lows.
2. They will ignore any break above the ORB highs.
3. The price moves down and closes below the 5-minute ORB low.
4. The script will plot a red "Break 5" label. This is the trader's signal to enter a short trade.
4. Use Multiple Timeframes for Context
The real power of this script is seeing all the ranges at once. A trader wouldn't just trade them in isolation.
• Confirmation: A "Break 5" signal is a quick, early signal. But if the price also breaks the "15" and "30" minute highs, it signals much stronger bullish consensus, which might encourage the trader to hold the trade longer.
• Support & Resistance: The other ORB levels act as a map for the day.
o As Targets: If a trader takes a "Break 15" long signal, the 30-minute ORB high and 60-minute ORB high become logical profit targets.
o As Warning Signs: If the price gives a "Break 5" long signal but is struggling right under the 15-minute high, a trader might wait for that 15-minute level to break before entering, seeing it as a key resistance level.
Summary: A Trader's Workflow
1. Morning (8:30 AM): Watch the script. What color are the bars? (Blue = longs only, Yellow = shorts only).
2. Wait: Let the 5, 15, 30, and 60-minute ranges form. The boxes will be drawn on the chart.
3. Execute: Wait for a "Break" signal (a label) that matches your trend direction.
4. Manage: Use the other ORB levels as potential profit targets or as confirmation of the move's strength.
5. Single Signal: The "Single Signal Only" input, if checked, ensures they only get one signal per timeframe (e.g., one "Break 15" long, and that's it for the day), which helps prevent over-trading in choppy conditions.
SmartPlusSmartPlus
Overview
The SmartPlus indicator is a complete framework for intraday traders. It combines key market reference points (VWAP, moving averages, and the first 15-minute high/low range) with predictive levels based on historical daily moves. Together, these elements allow traders to build directional bias, spot breakouts, and manage risk throughout the session.
Key Features
1. VWAP (Volume-Weighted Average Price)
- Plots the intraday VWAP in real time.
- VWAP acts as a central “fair value” reference point for institutional order flow.
- Price trading above VWAP generally suggests bullish bias, while below VWAP leans bearish.
2. Exponential Moving Averages (EMAs)
- Two configurable EMAs are included:
- Fast EMA (default: 21 periods)
- Slow EMA (default: 34 periods)
- Each EMA is plotted with a single, user-selectable color for clarity.
- Crossovers or alignment between price, VWAP, and EMAs help define market structure.
3. Smart Bar Coloring
- Candles automatically change color when conditions align:
- Bull Zone: Price above VWAP, Fast EMA, and Slow EMA.
- Bear Zone: Price below VWAP, Fast EMA, and Slow EMA.
- Fluorescent bar coloring helps highlight momentum zones visually without additional analysis.
4. First 15-Minute High/Low/Mid (Automatic)
- Automatically detects the first 15 minutes of each new trading day (no manual input required).
- Plots horizontal lines for:
- First 15-Minute High (green)
- First 15-Minute Low (red)
- Midpoint of that range (gray)
- Once the initial 15-minute window ends, these levels remain projected throughout the session as breakout or support/resistance zones.
- Alerts trigger when price breaks above the high or below the low after the window.
5. Daily Support/Resistance Forecast
- Uses a rolling lookback of recent daily ranges (default: 126 days).
- Tracks average up moves and down moves from the daily open.
- Optionally incorporates standard deviation for wider confidence bands.
- Plots forecast levels above/below the current day’s open for reference.
Trading Logic (How to Use)
- Bullish Bias:
- Price is above VWAP, above both EMAs, and ideally above the first 15-minute high.
- This setup suggests trend continuation or breakout opportunities on the long side.
- Bearish Bias:
- Price is below VWAP, below both EMAs, and ideally below the first 15-minute low.
- This setup suggests downward pressure or breakout opportunities on the short side.
- Neutral / Caution Zone:
- Price caught between VWAP, EMAs, or inside the 15-minute range often signals indecision.
- Best to wait for confirmation or breakout before committing to trades.
Expectations After Using It
- The script provides context and structure, not trading signals.
- It highlights where price is relative to meaningful market levels so traders can act with greater confidence.
- Combining VWAP, EMAs, and the 15-minute breakout framework helps traders stay aligned with the market’s natural rhythm.
Disclaimer
This script is a tool for market analysis and educational purposes only.
It does not constitute financial advice, trading recommendations, or guaranteed profitability.
Markets are inherently risky, and past patterns do not ensure future results.
Always combine this tool with sound risk management, personal research, and professional guidance before making any trading decisions.
System 0530 - Stoch RSI Strategy with ATR filterStrategy Description: System 0530 - Multi-Timeframe Stochastic RSI with ATR Filter
Overview:
This strategy, "System 0530," is designed to identify trading opportunities by leveraging the Stochastic RSI indicator across two different timeframes: a shorter timeframe for initial signal triggers (assumed to be the chart's current timeframe, e.g., 5-minute) and a longer timeframe (15-minute) for signal confirmation. It incorporates an ATR (Average True Range) filter to help ensure trades are taken during periods of adequate market volatility and includes a cooldown mechanism to prevent rapid, successive signals in the same direction. Trade exits are primarily handled by reversing signals.
How It Works:
1. Signal Initiation (e.g., 5-Minute Timeframe):
Long Signal Wait: A potential long entry is considered when the 5-minute Stochastic RSI %K line crosses above its %D line, AND the %K value at the time of the cross is at or below a user-defined oversold level (default: 30).
Short Signal Wait: A potential short entry is considered when the 5-minute Stochastic RSI %K line crosses below its %D line, AND the %K value at the time of the cross is at or above a user-defined overbought level (default: 70). When these conditions are met, the strategy enters a "waiting state" for confirmation from the 15-minute timeframe.
2. Signal Confirmation (15-Minute Timeframe):
Once in a waiting state, the strategy looks for confirmation on the 15-minute Stochastic RSI within a user-defined number of 5-minute bars (wait_window_5min_bars, default: 5 bars).
Long Confirmation:
The 15-minute Stochastic RSI %K must be greater than or equal to its %D line.
The 15-minute Stochastic RSI %K value must be below a user-defined threshold (stoch_15min_long_entry_level, default: 40).
Short Confirmation:
The 15-minute Stochastic RSI %K must be less than or equal to its %D line.
The 15-minute Stochastic RSI %K value must be above a user-defined threshold (stoch_15min_short_entry_level, default: 60).
3. Filters:
ATR Volatility Filter: If enabled, trades are only confirmed if the current ATR value (converted to ticks) is above a user-defined minimum threshold (min_atr_value_ticks). This helps to avoid taking signals during periods of very low market volatility. If the ATR condition is not met, the strategy continues to wait for the condition to be met within the confirmation window, provided other conditions still hold.
Signal Cooldown Filter: If enabled, after a signal is generated, the strategy will wait for a minimum number of bars (min_bars_between_signals) before allowing another signal in the same direction. This aims to reduce overtrading.
4. Entry and Exit Logic:
Entry: A strategy.entry() order is placed when all trigger, confirmation, and filter conditions are met.
Exit: This strategy primarily uses reversing signals for exits. For example, if a long position is open, a confirmed short signal will close the long position and open a new short position. There are no explicit take profit or stop loss orders programmed into this version of the script.
Key User-Adjustable Parameters:
Stochastic RSI Parameters: RSI Length, Stochastic RSI Length, %K Smoothing, %D Smoothing.
Signal Trigger & Confirmation:
5-minute %K trigger levels for long and short.
15-minute %K confirmation thresholds for long and short.
Wait window (in 5-minute bars) for 15-minute confirmation.
Filters:
Enable/disable and configure the Signal Cooldown filter (minimum bars between signals).
Enable/disable and configure the ATR Volatility filter (ATR period, minimum ATR value in ticks).
Strategy Parameters:
Leverage Multiplier (Note: This primarily affects theoretical position sizing for backtesting calculations in TradingView and does not simulate actual leveraged trading risks).
Recommendations for Users:
Thorough Backtesting: Test this strategy extensively on historical data for the instruments and timeframes you intend to trade.
Parameter Optimization: Experiment with different parameter settings to find what works best for your trading style and chosen markets. The default values are starting points and may not be optimal for all conditions.
Understand the Logic: Ensure you understand how each component (Stochastic RSI on different timeframes, ATR filter, cooldown) interacts to generate signals.
Risk Management: Since this version does not include explicit stop-loss orders, ensure you have a clear risk management plan in place if trading this strategy live. You might consider manually adding stop-loss orders through your broker or using TradingView's separate strategy order settings for stop-loss if applicable.
Disclaimer:
This strategy description is for informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. Trading involves significant risk of loss. Always do your own research and understand the risks before trading.
FVG Premium [no1x]█ OVERVIEW
This indicator provides a comprehensive toolkit for identifying, visualizing, and tracking Fair Value Gaps (FVGs) across three distinct timeframes (current chart, a user-defined Medium Timeframe - MTF, and a user-defined High Timeframe - HTF). It is designed to offer traders enhanced insight into FVG dynamics through detailed state monitoring (formation, partial fill, full mitigation, midline touch), extensive visual customization for FVG representation, and a rich alert system for timely notifications on FVG-related events.
█ CONCEPTS
This indicator is built upon the core concept of Fair Value Gaps (FVGs) and their significance in price action analysis, offering a multi-layered approach to their detection and interpretation across different timeframes.
Fair Value Gaps (FVGs)
A Fair Value Gap (FVG), also known as an imbalance, represents a range in price delivery where one side of the market (buying or selling) was more aggressive, leaving an inefficiency or an "imbalance" in the price action. This concept is prominently featured within Smart Money Concepts (SMC) and Inner Circle Trader (ICT) methodologies, where such gaps are often interpreted as footprints left by "smart money" due to rapid, forceful price movements. These methodologies suggest that price may later revisit these FVG zones to rebalance a prior inefficiency or to seek liquidity before continuing its path. These gaps are typically identified by a three-bar pattern:
Bullish FVG : This is a three-candle formation where the second candle shows a strong upward move. The FVG is the space created between the high of the first candle (bottom of FVG) and the low of the third candle (top of FVG). This indicates a strong upward impulsive move.
Bearish FVG : This is a three-candle formation where the second candle shows a strong downward move. The FVG is the space created between the low of the first candle (top of FVG) and the high of the third candle (bottom of FVG). This indicates a strong downward impulsive move.
FVGs are often watched by traders as potential areas where price might return to "rebalance" or find support/resistance.
Multi-Timeframe (MTF) Analysis
The indicator extends FVG detection beyond the current chart's timeframe (Low Timeframe - LTF) to two higher user-defined timeframes: Medium Timeframe (MTF) and High Timeframe (HTF). This allows traders to:
Identify FVGs that might be significant on a broader market structure.
Observe how FVGs from different timeframes align or interact.
Gain a more comprehensive perspective on potential support and resistance zones.
FVG State and Lifecycle Management
The indicator actively tracks the lifecycle of each detected FVG:
Formation : The initial identification of an FVG.
Partial Fill (Entry) : When price enters but does not completely pass through the FVG. The indicator updates the "current" top/bottom of the FVG to reflect the filled portion.
Midline (Equilibrium) Touch : When price touches the 50% level of the FVG.
Full Mitigation : When price completely trades through the FVG, effectively "filling" or "rebalancing" the gap. The indicator records the mitigation time.
This state tracking is crucial for understanding how price interacts with these zones.
FVG Classification (Large FVG)
FVGs can be optionally classified as "Large FVGs" (LV) if their size (top to bottom range) exceeds a user-defined multiple of the Average True Range (ATR) for that FVG's timeframe. This helps distinguish FVGs that are significantly larger relative to recent volatility.
Visual Customization and Information Delivery
A key concept is providing extensive control over how FVGs are displayed. This control is achieved through a centralized set of visual parameters within the indicator, allowing users to configure numerous aspects (colors, line styles, visibility of boxes, midlines, mitigation lines, labels, etc.) for each timeframe. Additionally, an on-chart information panel summarizes the nearest unmitigated bullish and bearish FVG levels for each active timeframe, providing a quick glance at key price points.
█ FEATURES
This indicator offers a rich set of features designed to provide a highly customizable and comprehensive Fair Value Gap (FVG) analysis experience. Users can tailor the FVG detection, visual representation, and alerting mechanisms across three distinct timeframes: the current chart (Low Timeframe - LTF), a user-defined Medium Timeframe (MTF), and a user-defined High Timeframe (HTF).
Multi-Timeframe FVG Detection and Display
The core strength of this indicator lies in its ability to identify and display FVGs from not only the current chart's timeframe (LTF) but also from two higher, user-selectable timeframes (MTF and HTF).
Timeframe Selection: Users can specify the exact MTF (e.g., "60", "240") and HTF (e.g., "D", "W") through dedicated inputs in the "MTF (Medium Timeframe)" and "HTF (High Timeframe)" settings groups. The visibility of FVGs from these higher timeframes can be toggled independently using the "Show MTF FVGs" and "Show HTF FVGs" checkboxes.
Consistent Detection Logic: The FVG detection logic, based on the classic three-bar imbalance pattern detailed in the 'Concepts' section, is applied consistently across all selected timeframes (LTF, MTF, HTF)
Timeframe-Specific Visuals: Each timeframe's FVGs (LTF, MTF, HTF) can be customized with unique colors for bullish/bearish states and their mitigated counterparts. This allows for easy visual differentiation of FVGs originating from different market perspectives.
Comprehensive FVG Visualization Options
The indicator provides extensive control over how FVGs are visually represented on the chart for each timeframe (LTF, MTF, HTF).
FVG Boxes:
Visibility: Main FVG boxes can be shown or hidden per timeframe using the "Show FVG Boxes" (for LTF), "Show Boxes" (for MTF/HTF) inputs.
Color Customization: Colors for bullish, bearish, active, and mitigated FVG boxes (including Large FVGs, if classified) are fully customizable for each timeframe.
Box Extension & Length: FVG boxes can either be extended to the right indefinitely ("Extend Boxes Right") or set to a fixed length in bars ("Short Box Length" or "Box Length" equivalent inputs).
Box Labels: Optional labels can display the FVG's timeframe and fill percentage on the box. These labels are configurable for all timeframes (LTF, MTF, and HTF). Please note: If FVGs are positioned very close to each other on the chart, their respective labels may overlap. This can potentially lead to visual clutter, and it is a known behavior in the current version of the indicator.
Box Borders: Visibility, width, style (solid, dashed, dotted), and color of FVG box borders are customizable per timeframe.
Midlines (Equilibrium/EQ):
Visibility: The 50% level (midline or EQ) of FVGs can be shown or hidden for each timeframe.
Style Customization: Width, style, and color of the midline are customizable per timeframe. The indicator tracks if this midline has been touched by price.
Mitigation Lines:
Visibility: Mitigation lines (representing the FVG's opening level that needs to be breached for full mitigation) can be shown or hidden for each timeframe. If shown, these lines are always extended to the right.
Style Customization: Width, style, and color of the mitigation line are customizable per timeframe.
Mitigation Line Labels: Optional price labels can be displayed on mitigation lines, with a customizable horizontal bar offset for positioning. For optimal label placement, the following horizontal bar offsets are recommended: 4 for LTF, 8 for MTF, and 12 for HTF.
Persistence After Mitigation: Users can choose to keep mitigation lines visible even after an FVG is fully mitigated, with a distinct color for such lines. Importantly, this option is only effective if the general setting 'Hide Fully Mitigated FVGs' is disabled, as otherwise, the entire FVG and its lines will be removed upon mitigation.
FVG State Management and Behavior
The indicator tracks and visually responds to changes in FVG states.
Hide Fully Mitigated FVGs: This option, typically found in the indicator's general settings, allows users to automatically remove all visual elements of an FVG from the chart once price has fully mitigated it. This helps maintain chart clarity by focusing on active FVGs.
Partial Fill Visualization: When price enters an FVG, the indicator offers a dynamic visual representation: the portion of the FVG that has been filled is shown as a "mitigated box" (typically with a distinct color), while the original FVG box shrinks to clearly highlight the remaining, unfilled portion. This two-part display provides an immediate visual cue about how much of the FVG's imbalance has been addressed and what potential remains within the gap.
Visual Filtering by ATR Proximity: To help users focus on the most relevant price action, FVGs can be dynamically hidden if they are located further from the current price than a user-defined multiple of the Average True Range (ATR). This behavior is controlled by the "Filter Band Width (ATR Multiple)" input; setting this to zero disables the filter entirely, ensuring all detected FVGs remain visible regardless of their proximity to price.
Alternative Usage Example: Mitigation Lines as Key Support/Resistance Levels
For traders preferring a minimalist chart focused on key Fair Value Gap (FVG) levels, the indicator's visualization settings can be customized to display only FVG mitigation lines. This approach leverages these lines as potential support and resistance zones, reflecting areas where price might revisit to address imbalances.
To configure this view:
Disable FVG Boxes: Turn off "Show FVG Boxes" (for LTF) or "Show Boxes" (for MTF/HTF) for the desired timeframes.
Hide Midlines: Disable the visibility of the 50% FVG Midlines (Equilibrium/EQ).
Ensure Mitigation Lines are Visible: Keep "Mitigation Lines" enabled.
Retain All Mitigation Lines:
Disable the "Hide Fully Mitigated FVGs" option in the general settings.
Enable the feature to "keep mitigation lines visible even after an FVG is fully mitigated". This ensures lines from all FVGs (active or fully mitigated) remain on the chart, which is only effective if "Hide Fully Mitigated FVGs" is disabled.
This setup offers:
A Decluttered Chart: Focuses solely on the FVG opening levels.
Precise S/R Zones: Treats mitigation lines as specific points for potential price reactions.
Historical Level Analysis: Includes lines from past, fully mitigated FVGs for a comprehensive view of significant price levels.
For enhanced usability with this focused view, consider these optional additions:
The on-chart Information Panel can be activated to display a quick summary of the nearest unmitigated FVG levels.
Mitigation Line Labels can also be activated for clear price level identification. A customizable horizontal bar offset is available for positioning these labels; for example, offsets of 4 for LTF, 8 for MTF, and 12 for HTF can be effective.
FVG Classification (Large FVG)
This feature allows for distinguishing FVGs based on their size relative to market volatility.
Enable Classification: Users can enable "Classify FVG (Large FVG)" to identify FVGs that are significantly larger than average.
ATR-Based Threshold: An FVG is classified as "Large" if its height (price range) is greater than or equal to the Average True Range (ATR) of its timeframe multiplied by a user-defined "Large FVG Threshold (ATR Multiple)". The ATR period for this calculation is also configurable.
Dedicated Colors: Large FVGs (both bullish/bearish and active/mitigated) can be assigned unique colors, making them easily distinguishable on the chart.
Panel Icon: Large FVGs are marked with a special icon in the Info Panel.
Information Panel
An on-chart panel provides a quick summary of the nearest unmitigated FVG levels.
Visibility and Position: The panel can be shown/hidden and positioned in any of the nine standard locations on the chart (e.g., Top Right, Middle Center).
Content: It displays the price levels of the nearest unmitigated bullish and bearish FVGs for LTF, MTF (if active), and HTF (if active). It also indicates if these nearest FVGs are Large FVGs (if classification is enabled) using a selectable icon.
Styling: Text size, border color, header background/text colors, default text color, and "N/A" cell background color are customizable.
Highlighting: Background and text colors for the cells displaying the overall nearest bullish and bearish FVG levels (across all active timeframes) can be customized to draw attention to the most proximate FVG.
Comprehensive Alert System
The indicator offers a granular alert system for various FVG-related events, configurable for each timeframe (LTF, MTF, HTF) independently. Users can enable alerts for:
New FVG Formation: Separate alerts for new bullish and new bearish FVG formations.
FVG Entry/Partial Fill: Separate alerts for price entering a bullish FVG or a bearish FVG.
FVG Full Mitigation: Separate alerts for full mitigation of bullish and bearish FVGs.
FVG Midline (EQ) Touch: Separate alerts for price touching the midline of a bullish or bearish FVG.
Alert messages are detailed, providing information such as the timeframe, FVG type (bull/bear, Large FVG), relevant price levels, and timestamps.
█ NOTES
This section provides additional information regarding the indicator's usage, performance considerations, and potential interactions with the TradingView platform. Understanding these points can help users optimize their experience and troubleshoot effectively.
Performance and Resource Management
Maximum FVGs to Track : The "Max FVGs to Track" input (defaulting to 25) limits the number of FVG objects processed for each category (e.g., LTF Bullish, MTF Bearish). Increasing this value significantly can impact performance due to more objects being iterated over and potentially drawn, especially when multiple timeframes are active.
Drawing Object Limits : To manage performance, this script sets its own internal limits on the number of drawing objects it displays. While it allows for up to approximately 500 lines (max_lines_count=500) and 500 labels (max_labels_count=500), the number of FVG boxes is deliberately restricted to a maximum of 150 (max_boxes_count=150). This specific limit for boxes is a key performance consideration: displaying too many boxes can significantly slow down the indicator, and a very high number is often not essential for analysis. Enabling all visual elements for many FVGs across all three timeframes can cause the indicator to reach these internal limits, especially the stricter box limit
Optimization Strategies : To help you manage performance, reduce visual clutter, and avoid exceeding drawing limits when using this indicator, I recommend the following strategies:
Maintain or Lower FVG Tracking Count: The "Max FVGs to Track" input defaults to 25. I find this value generally sufficient for effective analysis and balanced performance. You can keep this default or consider reducing it further if you experience performance issues or prefer a less dense FVG display.
Utilize Proximity Filtering: I suggest activating the "Filter Band Width (ATR Multiple)" option (found under "General Settings") to display only those FVGs closer to the current price. From my experience, a value of 5 for the ATR multiple often provides a good starting point for balanced performance, but you should feel free to adjust this based on market volatility and your specific trading needs.
Hide Fully Mitigated FVGs: I strongly recommend enabling the "Hide Fully Mitigated FVGs" option. This setting automatically removes all visual elements of an FVG from the chart once it has been fully mitigated by price. Doing so significantly reduces the number of active drawing objects, lessens computational load, and helps maintain chart clarity by focusing only on active, relevant FVGs.
Disable FVG Display for Unused Timeframes: If you are not actively monitoring certain higher timeframes (MTF or HTF) for FVG analysis, I advise disabling their display by unchecking "Show MTF FVGs" or "Show HTF FVGs" respectively. This can provide a significant performance boost.
Simplify Visual Elements: For active FVGs, consider hiding less critical visual elements if they are not essential for your specific analysis. This could include box labels, borders, or even entire FVG boxes if, for example, only the mitigation lines are of interest for a particular timeframe.
Settings Changes and Platform Limits : This indicator is comprehensive and involves numerous calculations and drawings. When multiple settings are changed rapidly in quick succession, it is possible, on occasion, for TradingView to issue a "Runtime error: modify_study_limit_exceeding" or similar. This can cause the indicator to temporarily stop updating or display errors.
Recommended Approach : When adjusting settings, it is advisable to wait a brief moment (a few seconds) after each significant change. This allows the indicator to reprocess and update on the chart before another change is made
Error Recovery : Should such a runtime error occur, making a minor, different adjustment in the settings (e.g., toggling a checkbox off and then on again) and waiting briefly will typically allow the indicator to recover and resume correct operation. This behavior is related to platform limitations when handling complex scripts with many inputs and drawing objects.
Multi-Timeframe (MTF/HTF) Data and Behavior
HTF FVG Confirmation is Essential: : For an FVG from a higher timeframe (MTF or HTF) to be identified and displayed on your current chart (LTF), the three-bar pattern forming the FVG on that higher timeframe must consist of fully closed bars. The indicator does not draw speculative FVGs based on incomplete/forming bars from higher timeframes.
Data Retrieval and LTF Processing: The indicator may use techniques like lookahead = barmerge.lookahead_on for timely data retrieval from higher timeframes. However, the actual detection of an FVG occurs after all its constituent bars on the HTF have closed.
Appearance Timing on LTF (1 LTF Candle Delay): As a natural consequence of this, an FVG that is confirmed on an HTF (i.e., its third bar closes) will typically become visible on your LTF chart one LTF bar after its confirmation on the HTF.
Example: Assume an FVG forms on a 30-minute chart at 15:30 (i.e., with the close of the 30-minute bar that covers the 15:00-15:30 period). If you are monitoring this FVG on a 15-minute chart, the indicator will detect this newly formed 30-minute FVG while processing the data for the 15-minute bar that starts at 15:30 and closes at 15:45. Therefore, the 30-minute FVG will become visible on your 15-minute chart at the earliest by 15:45 (i.e., with the close of that relevant 15-minute LTF candle). This means the HTF FVG is reflected on the LTF chart with a delay equivalent to one LTF candle.
FVG Detection and Display Logic
Fair Value Gaps (FVGs) on the current chart timeframe (LTF) are detected based on barstate.isconfirmed. This means the three-bar pattern must be complete with closed bars before an FVG is identified. This confirmation method prevents FVGs from being prematurely identified on the forming bar.
Alerts
Alert Setup : To receive alerts from this indicator, you must first ensure you have enabled the specific alert conditions you are interested in within the indicator's own settings (see 'Comprehensive Alert System' under the 'FEATURES' section). Once configured, open TradingView's 'Create Alert' dialog. In the 'Condition' tab, select this indicator's name, and crucially, choose the 'Any alert() function call' option from the dropdown list. This setup allows the indicator to trigger alerts based on the precise event conditions you have activated in its settings
Alert Frequency : Alerts are designed to trigger once per bar close (alert.freq_once_per_bar_close) for the specific event.
User Interface (UI) Tips
Settings Group Icons: In the indicator settings menu, timeframe-specific groups are marked with star icons for easier navigation: 🌟 for LTF (Current Chart Timeframe), 🌟🌟 for MTF (Medium Timeframe), and 🌟🌟🌟 for HTF (High Timeframe).
Dependent Inputs: Some input settings are dependent on others being enabled. These dependencies are visually indicated in the settings menu using symbols like "↳" (dependent setting on the next line), "⟷" (mutually exclusive inline options), or "➜" (directly dependent inline option).
Settings Layout Overview: The indicator settings are organized into logical groups for ease of use. Key global display controls – such as toggles for MTF FVGs, HTF FVGs (along with their respective timeframe selectors), and the Information Panel – are conveniently located at the very top within the '⚙️ General Settings' group. This placement allows for quick access to frequently adjusted settings. Other sections provide detailed customization options for each timeframe (LTF, MTF, HTF), specific FVG components, and alert configurations.
█ FOR Pine Script® CODERS
This section provides a high-level overview of the FVG Premium indicator's internal architecture, data flow, and the interaction between its various library components. It is intended for Pine Script™ programmers who wish to understand the indicator's design, potentially extend its functionality, or learn from its structure.
System Architecture and Modular Design
The indicator is architected moduarly, leveraging several custom libraries to separate concerns and enhance code organization and reusability. Each library has a distinct responsibility:
FvgTypes: Serves as the foundational data definition layer. It defines core User-Defined Types (UDTs) like fvgObject (for storing all attributes of an FVG) and drawSettings (for visual configurations), along with enumerations like tfType.
CommonUtils: Provides utility functions for common tasks like mapping user string inputs (e.g., "Dashed" for line style) to their corresponding Pine Script™ constants (e.g., line.style_dashed) and formatting timeframe strings for display.
FvgCalculations: Contains the core logic for FVG detection (both LTF and MTF/HTF via requestMultiTFBarData), FVG classification (Large FVGs based on ATR), and checking FVG interactions with price (mitigation, partial fill).
FvgObject: Implements an object-oriented approach by attaching methods to the fvgObject UDT. These methods manage the entire visual lifecycle of an FVG on the chart, including drawing, updating based on state changes (e.g., mitigation), and deleting drawing objects. It's responsible for applying the visual configurations defined in drawSettings.
FvgPanel: Manages the creation and dynamic updates of the on-chart information panel, which displays key FVG levels.
The main indicator script acts as the orchestrator, initializing these libraries, managing user inputs, processing data flow between libraries, and handling the main event loop (bar updates) for FVG state management and alerts.
Core Data Flow and FVG Lifecycle Management
The general data flow and FVG lifecycle can be summarized as follows:
Input Processing: User inputs from the "Settings" dialog are read by the main indicator script. Visual style inputs (colors, line styles, etc.) are consolidated into a types.drawSettings object (defined in FvgTypes). Other inputs (timeframes, filter settings, alert toggles) control the behavior of different modules. CommonUtils assists in mapping some string inputs to Pine constants.
FVG Detection:
For the current chart timeframe (LTF), FvgCalculations.detectFvg() identifies potential FVGs based on bar patterns.
For MTF/HTF, the main indicator script calls FvgCalculations.requestMultiTFBarData() to fetch necessary bar data from higher timeframes, then FvgCalculations.detectMultiTFFvg() identifies FVGs.
Newly detected FVGs are instantiated as types.fvgObject and stored in arrays within the main script. These objects also undergo classification (e.g., Large FVG) by FvgCalculations.
State Update & Interaction: On each bar, the main indicator script iterates through active FVG objects to manage their state based on price interaction:
Initially, the main script calls FvgCalculations.fvgInteractionCheck() to efficiently determine if the current bar's price might be interacting with a given FVG.
If a potential interaction is flagged, the main script then invokes methods directly on the fvgObject instance (e.g., updateMitigation(), updatePartialFill(), checkMidlineTouch(), which are part of FvgObject).
These fvgObject methods are responsible for the detailed condition checking and the actual modification of the FVG's state. For instance, the updateMitigation() and updatePartialFill() methods internally utilize specific helper functions from FvgCalculations (like checkMitigation() and checkPartialMitigation()) to confirm the precise nature of the interaction before updating the fvgObject’s state fields (such as isMitigated, currentTop, currentBottom, or isMidlineTouched).
Visual Rendering:
The FvgObject.updateDrawings() method is called for each fvgObject. This method is central to drawing management; it creates, updates, or deletes chart drawings (boxes, lines, labels) based on the FVG's current state, its prev_* (previous bar state) fields for optimization, and the visual settings passed via the drawSettings object.
Information Panel Update: The main indicator script determines the nearest FVG levels, populates a panelData object (defined in FvgPanelLib), and calls FvgPanel.updatePanel() to refresh the on-chart display.
Alert Generation: Based on the updated FVG states and user-enabled alert settings, the main indicator script constructs and triggers alerts using Pine Script's alert() function."
Key Design Considerations
UDT-Centric Design: The fvgObject UDT is pivotal, acting as a stateful container for all information related to a single FVG. Most operations revolve around creating, updating, or querying these objects.
State Management: To optimize drawing updates and manage FVG lifecycles, fvgObject instances store their previous bar's state (e.g., prevIsVisible, prevCurrentTop). The FvgObject.updateDrawings() method uses this to determine if a redraw is necessary, minimizing redundant drawing calls.
Settings Object: A drawSettings object is populated once (or when inputs change) and passed to drawing functions. This avoids repeatedly reading numerous input() values on every bar or within loops, improving performance.
Dynamic Arrays for FVG Storage: Arrays are used to store collections of fvgObject instances, allowing for dynamic management (adding new FVGs, iterating for updates).
SCE Price Action SuiteThis is an indicator designed to use past market data to mark key price action levels as well as provide a different kind of insight. There are 8 different features in the script that users can turn on and off. This description will go in depth on all 8 with chart examples.
#1 Absorption Zones
I defined Absorption Zones as follows.
//----------------------------------------------
//---------------Absorption---------------------
//----------------------------------------------
box absorptionBox = na
absorptionBar = ta.highest(bodySize, absorptionLkb)
bsab = ta.barssince(bool(ta.change(absorptionBar)))
if bsab == 0 and upBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(0, 80, 75), border_width = boxLineSize, bgcolor = color.rgb(0, 80, 75))
absorptionBox
else if bsab == 0 and downBar and showAbsorption
absorptionBox := box.new(left = bar_index - 1, top = close, right = bar_index + az_strcuture, bottom = open, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = color.rgb(105, 15, 15))
absorptionBox
What this means is that absorption bars are defined as the bars with the largest bodies over a selected lookback period. Those large bodies represent areas where price may react. I was inspired by the concept of a Fair Value Gap for this concept. In that body price may enter to be a point of support or resistance, market participants get “absorbed” in the area so price can continue in whichever direction.
#2 Candle Wick Theory/Strategy
I defined Candle Wick Theory/Strategy as follows.
//----------------------------------------------
//---------------Candle Wick--------------------
//----------------------------------------------
highWick = upBar ? high - close : downBar ? high - open : na
lowWick = upBar ? open - low : downBar ? close - low : na
upWick = upBar ? close + highWick : downBar ? open + highWick : na
downWick = upBar ? open - lowWick : downBar ? close - lowWick : na
downDelivery = upBar and downBar and high > upWick and highWick > lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
upDelivery = downBar and upBar and low < downWick and highWick < lowWick and totalSize > totalSize and barstate.isconfirmed and session.ismarket
line lG = na
line lE = na
line lR = na
bodyMidpoint = math.abs(body) / 2
upWickMidpoint = math.abs(upWickSize) / 2
downWickkMidpoint = math.abs(downWickSize) / 2
if upDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, downWickkMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, downWickkMidpoint)
cpG = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 + tp))
cpR = chart.point.new(time, bar_index + bl, downWickkMidpoint * (1 - sl))
cpG1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 + tp))
cpR1 = chart.point.new(time, bar_index - 1, downWickkMidpoint * (1 - sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
else if downDelivery and showCdTheory
cpE = chart.point.new(time, bar_index - 1, upWickMidpoint)
cpE2 = chart.point.new(time, bar_index + bl, upWickMidpoint)
cpG = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 - tp))
cpR = chart.point.new(time, bar_index + bl, upWickMidpoint * (1 + sl))
cpG1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 - tp))
cpR1 = chart.point.new(time, bar_index - 1, upWickMidpoint * (1 + sl))
lG := line.new(cpG1, cpG, xloc.bar_index, extend.none, color.green, line.style_solid, 1)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.white, line.style_solid, 1)
lR := line.new(cpR1, cpR, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
lR
First I get the size of the wicks for the top and bottoms of the candles. This depends on if the bar is red or green. If the bar is green the wick is the high minus the close, if red the high minus the open, and so on. Next, the script defines the upper and lower bounds of the wicks for further comparison. If the candle is green, it's the open price minus the bottom wick. If the candle is red, it's the close price minus the bottom wick, and so on. Next we have the condition for when this strategy is present.
Down delivery:
Occurs when the previous candle is green, the current candle is red, and:
The high of the current candle is above the upper wick of the previous candle.
The size of the current candle's top wick is greater than its bottom wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed (barstate.isconfirmed).
The session is during market hours (session.ismarket).
Up delivery:
Occurs when the previous candle is red, the current candle is green, and:
The low of the current candle is below the lower wick of the previous candle.
The size of the current candle's bottom wick is greater than its top wick.
The total size of the previous candle is greater than the total size of the current candle.
The current bar is confirmed.
The session is during market hours
Then risk is plotted from the percentage that users can input from an ideal entry spot.
#3 Candle Size Theory
I defined Candle Size Theory as follows.
//----------------------------------------------
//---------------Candle displacement------------
//----------------------------------------------
line lECD = na
notableDown = bodySize > bodySize * candle_size_sensitivity and downBar and session.ismarket and barstate.isconfirmed
notableUp = bodySize > bodySize * candle_size_sensitivity and upBar and session.ismarket and barstate.isconfirmed
if notableUp and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(0, 80, 75), line.style_solid, 3)
lECD
else if notableDown and showCdSizeTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lECD := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.rgb(105, 15, 15), line.style_solid, 3)
lECD
This plots candles that are “notable” or out of the ordinary. Candles that are larger than the last by a value users get to specify. These candles' highs or lows, if they are green or red, act as levels for support or resistance.
#4 Candle Structure Theory
I defined Candle Structure Theory as follows.
//----------------------------------------------
//---------------Structure----------------------
//----------------------------------------------
breakDownStructure = low < low and low < low and high > high and upBar and downBar and upBar and downBar and session.ismarket and barstate.isconfirmed
breakUpStructure = low > low and low > low and high < high and downBar and upBar and downBar and upBar and session.ismarket and barstate.isconfirmed
if breakUpStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, close)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, close)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.teal, line.style_solid, 3)
lE
else if breakDownStructure and showStructureTheory
cpE = chart.point.new(time, bar_index - 1, open)
cpE2 = chart.point.new(time, bar_index + bl_strcuture, open)
lE := line.new(cpE, cpE2, xloc.bar_index, extend.none, color.red, line.style_solid, 3)
lE
It is a series of candles to create a notable event. 2 lower lows in a row, a lower high, then green bar, red bar, green bar is a structure for a breakdown. 2 higher lows in a row, a higher high, red bar, green bar, red bar for a break up.
#5 Candle Swing Structure Theory
I defined Candle Swing Structure Theory as follows.
//----------------------------------------------
//---------------Swing Structure----------------
//----------------------------------------------
line htb = na
line ltb = na
if totalSize * swing_struct_sense < totalSize and upBar and downBar and high > high and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, high)
cpE = chart.point.new(time, bar_index + bl_strcuture, high)
htb := line.new(cpS, cpE, xloc.bar_index, color = color.red, style = line.style_dashed)
htb
else if totalSize * swing_struct_sense < totalSize and downBar and upBar and low > low and showSwingSturcture and session.ismarket and barstate.isconfirmed
cpS = chart.point.new(time, bar_index - 1, low)
cpE = chart.point.new(time, bar_index + bl_strcuture, low)
ltb := line.new(cpS, cpE, xloc.bar_index, color = color.teal, style = line.style_dashed)
ltb
A bearish swing structure is defined as the last candle’s total size, times a scalar that the user can input, is less than the current candles. Like a size imbalance. The last bar must be green and this one red. The last high should also be less than this high. For a bullish swing structure the same size imbalance must be present, but we need a red bar then a green bar, and the last low higher than the current low.
#6 Fractal Boxes
I define the Fractal Boxes as follows
//----------------------------------------------
//---------------Fractal Boxes------------------
//----------------------------------------------
box b = na
int indexx = na
if bar_index % (n * 2) == 0 and session.ismarket and showBoxes
b := box.new(left = bar_index, top = topBox, right = bar_index + n, bottom = bottomBox, border_color = color.rgb(105, 15, 15), border_width = boxLineSize, bgcolor = na)
indexx := bar_index + 1
indexx
The idea of this strategy is that the market is fractal. It is considered impossible to be able to tell apart two different time frames from just the chart. So inside the chart there are many many breakouts and breakdowns happening as price bounces around. The boxes are there to give you the view from your timeframe if the market is in a range from a time frame that would be higher than it. Like if we are inside what a larger time frame candle’s range. If we break out or down from this, we might be able to trade it. Users can specify a lookback period and the box is that period’s, as an interval, high and low. I say as an interval because it is plotted every n * 2 bars. So we get a box, price moves, then a new box.
#7 Potential Move Width
I define the Potential Move Width as follows
//----------------------------------------------
//---------------Move width---------------------
//----------------------------------------------
velocity = V(n)
line lC = na
line l = na
line l2 = na
line l3 = na
line l4 = na
line l5 = na
line l6 = na
line l7 = na
line l8 = na
line lGFractal = na
line lRFractal = na
cp2 = chart.point.new(time, bar_index + n, close + velocity)
cp3 = chart.point.new(time, bar_index + n, close - velocity)
cp4 = chart.point.new(time, bar_index + n, close + velocity * 5)
cp5 = chart.point.new(time, bar_index + n, close - velocity * 5)
cp6 = chart.point.new(time, bar_index + n, close + velocity * 10)
cp7 = chart.point.new(time, bar_index + n, close - velocity * 10)
cp8 = chart.point.new(time, bar_index + n, close + velocity * 15)
cp9 = chart.point.new(time, bar_index + n, close - velocity * 15)
cpG = chart.point.new(time, bar_index + n, close + R)
cpR = chart.point.new(time, bar_index + n, close - R)
if ((bar_index + n) * 2 - bar_index) % n == 0 and session.ismarket and barstate.isconfirmed and showPredictionWidtn
cp = chart.point.new(time, bar_index, close)
cpG1 = chart.point.new(time, bar_index, close + R)
cpR1 = chart.point.new(time, bar_index, close - R)
l := line.new(cp, cp2, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l2 := line.new(cp, cp3, xloc.bar_index, extend.none, color.aqua, line.style_solid, 1)
l3 := line.new(cp, cp4, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l4 := line.new(cp, cp5, xloc.bar_index, extend.none, color.red, line.style_solid, 1)
l5 := line.new(cp, cp6, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l6 := line.new(cp, cp7, xloc.bar_index, extend.none, color.teal, line.style_solid, 1)
l7 := line.new(cp, cp8, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8 := line.new(cp, cp9, xloc.bar_index, extend.none, color.blue, line.style_solid, 1)
l8
By using the past n bar’s velocity, or directional speed, every n * 2 bars. I can use it to scale the close value and get an estimate for how wide the next moves might be.
#8 Linear regression
//----------------------------------------------
//---------------Linear Regression--------------
//----------------------------------------------
lr = showLR ? ta.linreg(close, n, 0) : na
plot(lr, 'Linear Regression', color.blue)
I used TradingView’s built in linear regression to not reinvent the wheel. This is present to see past market strength of weakness from a different perspective.
User input
Users can control a lot about this script. For the strategy based plots you can enter what you want the risk to be in percentages. So the default 0.01 is 1%. You can also control how far forward the line goes.
Look back at where it is needed as well as line width for the Fractal Boxes are controllable. Also users can check on and off what they would like to see on the charts.
No indicator is 100% reliable, do not follow this one blindly. I encourage traders to make their own decisions and not trade solely based on technical indicators. I encourage constructive criticism in the comments below. Thank you.
DNSE VN301!, SMA & EMA Cross StrategyDiscover the tailored Pinescript to trade VN30F1M Future Contracts intraday, the strategy focuses on SMA & EMA crosses to identify potential entry/exit points. The script closes all positions by 14:25 to avoid holding any contracts overnight.
HNX:VN301!
www.tradingview.com
Setting & Backtest result:
1-minute chart, initial capital of VND 100 million, entering 4 contracts per time, backtest result from Jan-2024 to Nov-2024 yielded a return over 40%, executed over 1,000 trades (average of 4 trades/day), winning trades rate ~ 30% with a profit factor of 1.10.
The default setting of the script:
A decent optimization is reached when SMA and EMA periods are set to 60 and 15 respectively while the Long/Short stop-loss level is set to 20 ticks (2 points) from the entry price.
Entry & Exit conditions:
Long signals are generated when ema(15) crosses over sma(60) while Short signals happen when ema(15) crosses under sma(60). Long orders are closed when ema(15) crosses under sma(60) while Short orders are closed when ema(15) crosses over sma(60).
Exit conditions happen when (whichever came first):
Another Long/Short signal is generated
The Stop-loss level is reached
The Cut-off time is reached (14:25 every day)
*Disclaimers:
Futures Contracts Trading are subjected to a high degree of risk and price movements can fluctuate significantly. This script functions as a reference source and should be used after users have clearly understood how futures trading works, accessed their risk tolerance level, and are knowledgeable of the functioning logic behind the script.
Users are solely responsible for their investment decisions, and DNSE is not responsible for any potential losses from applying such a strategy to real-life trading activities. Past performance is not indicative/guarantee of future results, kindly reach out to us should you have specific questions about this script.
---------------------------------------------------------------------------------------
Khám phá Pinescript được thiết kế riêng để giao dịch Hợp đồng tương lai VN30F1M trong ngày, chiến lược tập trung vào các đường SMA & EMA cắt nhau để xác định các điểm vào/ra tiềm năng. Chiến lược sẽ đóng tất cả các vị thế trước 14:25 để tránh giữ bất kỳ hợp đồng nào qua đêm.
Thiết lập & Kết quả backtest:
Chart 1 phút, vốn ban đầu là 100 triệu đồng, vào 4 hợp đồng mỗi lần, kết quả backtest từ tháng 1/2024 tới tháng 11/2024 mang lại lợi nhuận trên 40%, thực hiện hơn 1.000 giao dịch (trung bình 4 giao dịch/ngày), tỷ lệ giao dịch thắng ~ 30% với hệ số lợi nhuận là 1,10.
Thiết lập mặc định của chiến lược:
Đạt được một mức tối ưu ổn khi SMA và EMA periods được đặt lần lượt là 60 và 15 trong khi mức cắt lỗ được đặt thành 20 tick (2 điểm) từ giá vào.
Điều kiện Mở và Đóng vị thế:
Tín hiệu Long được tạo ra khi ema(15) cắt trên sma(60) trong khi tín hiệu Short xảy ra khi ema(15) cắt dưới sma(60). Lệnh Long được đóng khi ema(15) cắt dưới sma(60) trong khi lệnh Short được đóng khi ema(15) cắt lên sma(60).
Điều kiện đóng vị thể xảy ra khi (tùy điều kiện nào đến trước):
Một tín hiệu Long/Short khác được tạo ra
Giá chạm mức cắt lỗ
Lệnh chưa đóng nhưng tới giờ cut-off (14:25 hàng ngày)
*Tuyên bố miễn trừ trách nhiệm:
Giao dịch hợp đồng tương lai có mức rủi ro cao và giá có thể dao động đáng kể. Chiến lược này hoạt động như một nguồn tham khảo và nên được sử dụng sau khi người dùng đã hiểu rõ cách thức giao dịch hợp đồng tương lai, đã đánh giá mức độ chấp nhận rủi ro của bản thân và hiểu rõ về logic vận hành của chiến lược này.
Người dùng hoàn toàn chịu trách nhiệm về các quyết định đầu tư của mình và DNSE không chịu trách nhiệm về bất kỳ khoản lỗ tiềm ẩn nào khi áp dụng chiến lược này vào các hoạt động giao dịch thực tế. Hiệu suất trong quá khứ không chỉ ra/cam kết kết quả trong tương lai, vui lòng liên hệ với chúng tôi nếu bạn có thắc mắc cụ thể về chiến lược giao dịch này.
VARGAS"VARGAS" is an indicator that can be used in all timeframes on charts in the stock, crypto, and commodity markets. It allows trades to be opened according to the intersections of moving averages in different time periods.
It is an indicator using weighted moving averages. Using a weighted moving average has the following benefits for traders:
1) Precision and Smoothness: The WMA typically gives more weight to recent prices and therefore reacts faster to more recent data. This helps you catch price movements faster and recognize trend changes faster. On the other hand, the WMA is smoother than the simple moving average (SMA), which makes it less likely to generate false signals.
2) Trend Identification: The WMA is used to identify and analyze price trends. It is especially important for traders who want to track short-term movements. The WMA is used to assess the direction and strength of the trend.
3) Trading Signals: The WMA is used as part of various trading strategies. It is especially used in moving average crossover strategies. For example, a short-term WMA crossing the long-term WMA to the upside can be considered a buy signal, while a reversal can be interpreted as a sell signal.
4) Adaptability to Volatility: WMA can adapt to volatility by changing weighting factors. Investors can adopt a more flexible approach by assigning different weights based on market conditions and asset classes.
5) Data Correction: WMA can be helpful in reducing data noise. A single large price fluctuation can cause the SMA to be more affected, while the WMA reduces the impact of these fluctuations.
In our VARGAS coding, the intersection times of the 9-day and 15-day weighted moving averages allow us to decide the direction of the trend. The green and red cloud areas following the price candles make the strategy easy for the user to follow.
At the intersection between the 9-day weighted moving average and the 15-day weighted moving average, we can use buy and sell signals as follows:
If the 9-day weighted moving average crosses the 15-day weighted moving average upwards, buy,
Sell if the 9-day weighted moving average crosses the 15-day weighted moving average downwards.
Within the scope of this strategy, GOLDEN CROSS and DEATH CROSS intersections, which guide us for trend changes, are also included in the coding. Thus, it is aimed to add strength to our WMA 9 and WMA 15 intersection strategy as an idea.
VARGAS indicator gives better results for longer periods of 4 hours and above. As the time period increases, the probability of correct results will increase.
**
"VARGAS" hisse senedi, kripto, ve emtia piyasalarındaki grafiklerde her türlü zaman diliminde kullanılabilen bir indikatördür. Farklı zaman periyotlarındaki hareketli ortalamaların kesişimlerine göre işlem açılmasını sağlar.
Ağırlıklı hareketli ortalamalar kullanılarak hazırlanmış bir göstergedir. Ağırlıklı hareketli ortalama kullanmanın yatırımcılara aşağıdaki gibi faydaları bulunmaktadır:
1) Duyarlılık ve Pürüzsüzlük: WMA, tipik olarak son dönem fiyatlarına daha fazla ağırlık verir ve bu nedenle daha güncel verilere daha hızlı tepki verir. Bu, fiyat hareketlerini daha hızlı yakalamanıza ve daha hızlı trend değişikliklerini tanımanıza yardımcı olur. Diğer yandan, WMA, basit hareketli ortalamaya (SMA) göre daha pürüzsüzdür, bu da yanlış sinyal üretme olasılığını azaltır.
2) Trend Belirleme: WMA, fiyat trendlerini belirlemek ve analiz etmek için kullanılır. Özellikle kısa vadeli hareketleri izlemek isteyen yatırımcılar için önemlidir. WMA, trendin yönünü ve gücünü değerlendirmek için kullanılır.
3) Ticaret Sinyalleri: WMA, çeşitli ticaret stratejilerinin bir parçası olarak kullanılır. Özellikle hareketli ortalama crossover stratejilerinde kullanılır. Örneğin, kısa vadeli WMA'nın uzun vadeli WMA'yı yukarı yönlü kesmesi bir alım sinyali olarak kabul edilebilir, tersine dönmesi ise bir satış sinyali olarak yorumlanabilir.
4) Volatiliteye Uyarlanabilirlik: WMA, ağırlıklandırma faktörlerini değiştirerek volatiliteye uyum sağlayabilir. Yatırımcılar, piyasa koşullarına ve varlık sınıflarına göre farklı ağırlıklar atayarak daha esnek bir yaklaşım benimseyebilirler.
5) Veri Düzeltme: WMA, veri gürültüsünü azaltmada yardımcı olabilir. Tek bir büyük fiyat dalgalanması, SMA'nın daha fazla etkilenmesine neden olabilirken, WMA bu dalgalanmaların etkisini azaltır.
VARGAS isimli kodlamamızda ise 9 günlük ve 15 günlük ağırlıklı hareketli ortalamaların kesişme zamanları trendin yönüne karar vermemizi sağlar. Fiyat mumlarını takip eden yeşil ve kırmızı bulut alanları stratejinin kullanıcı tarafından kolaylıkla takip edilmesini sağlamaktadır.
9 Günlük Ağırlıklı hareketli ortalama, 15 Günlük Ağırlıklı hareketli ortalama arasındaki kesişimde al ve sat sinyallerini şu şekilde kullanabiliriz:
Eğer 9 günlük ağırlıklı hareketli ortalama 15 günlük ağırlıklı hareketli ortalamayı yukarı doğru kesiyorsa al,
Eğer 9 günlük ağırlıklı hareketli ortalama, 15 günlük ağırlıklı hareketli ortalamayı aşağı doğru keserse sat.
Bu strateji kapsamında trend değişimleri için bizlere yön veren GOLDEN CROSS ve DEATH CROSS kesişimleri de kodlamanın içerisinde dahil edilmiştir. Böylelikle WMA 9 ve WMA 15 kesişim stratejimize fikir olarak güç katması hedeflenmiştir.
VARGAS indikatörü 4 saat ve üzeri daha uzun periyotlarda daha iyi sonuçlar vermektedir. Zaman periyodu büyüdükçe doğru sonuç verme olasılığı artacaktır.
Luxy BIG beautiful Dynamic ORBThis is an advanced Opening Range Breakout (ORB) indicator that tracks price breakouts from the first 5, 15, 30, and 60 minutes of the trading session. It provides complete trade management including entry signals, stop-loss placement, take-profit targets, and position sizing calculations.
The ORB strategy is based on the concept that the opening range of a trading session often acts as support/resistance, and breakouts from this range tend to lead to significant moves.
What Makes This Different?
Most ORB indicators simply draw horizontal lines and leave you to figure out the rest. This indicator goes several steps further:
Multi-Stage Tracking
Instead of just one ORB timeframe, this tracks FOUR simultaneously (5min, 15min, 30min, 60min). Each stage builds on the previous one, giving you multiple trading opportunities throughout the session.
Active Trade Management
When a breakout occurs, the indicator automatically calculates and displays entry price, stop-loss, and multiple take-profit targets. These lines extend forward and update in real-time until the trade completes.
Cycle Detection
Unlike indicators that only show the first breakout, this tracks the complete cycle: Breakout → Retest → Re-breakout. You can see when price returns to test the ORB level after breaking out (potential re-entry).
Failed Breakout Warning
If price breaks out but quickly returns inside the range (within a few bars), the label changes to "FAILED BREAK" - warning you to exit or avoid the trade.
Position Sizing Calculator
Built-in risk management that tells you exactly how many shares to buy based on your account size and risk tolerance. No more guessing or manual calculations.
Advanced Filtering
Optional filters for volume confirmation, trend alignment, and Fair Value Gaps (FVG) to reduce false signals and improve win rate.
Core Features Explained
### 1. Multi-Stage ORB Levels
The indicator builds four separate Opening Range levels:
ORB 5 - First 5 minutes (fastest signals, most volatile)
ORB 15 - First 15 minutes (balanced, most popular)
ORB 30 - First 30 minutes (slower, more reliable)
ORB 60 - First 60 minutes (slowest, most confirmed)
Each level is drawn as a horizontal range on your chart. As time progresses, the ranges expand to include more price action. You can enable or disable any stage and assign custom colors to each.
How it works: During the opening minutes, the indicator tracks the highest high and lowest low. Once the time period completes, those levels become your ORB high and low for that stage.
### 2. Breakout Detection
When price closes outside the ORB range, a label appears:
BREAK UP (green label above price) - Price closed above ORB High
BREAK DOWN (red label below price) - Price closed below ORB Low
The label shows which ORB stage triggered (ORB5, ORB15, etc.) and the cycle number if tracking multiple breakouts.
Important: Signals appear on bar close only - no repainting. What you see is what you get.
### 3. Retest Detection
After price breaks out and moves away, if it returns to test the ORB level, a "RETEST" label appears (orange). This indicates:
The original breakout level is now acting as support/resistance
Potential re-entry opportunity if you missed the first breakout
Confirmation that the level is significant
The indicator requires price to move a minimum distance away before considering it a valid retest (configurable in settings).
### 4. Failed Breakout Detection
If price breaks out but returns inside the ORB range within a few bars (before the breakout is "committed"), the original label changes to "FAILED BREAK" in orange.
This warns you:
The breakout lacked conviction
Consider exiting if already in the trade
Wait for better setup
Committed Breakout: The indicator tracks how many bars price stays outside the range. Only after staying outside for the minimum number of bars does it become a committed breakout that can be retested.
### 5. TP/SL Lines (Trade Management)
When a breakout occurs, colored horizontal lines appear showing:
Entry Line (cyan for long, orange for short) - Your entry price (the ORB level)
Stop Loss Line (red) - Where to exit if trade goes against you
TP1, TP2, TP3 Lines (same color as entry) - Profit targets at 1R, 2R, 3R
These lines extend forward as new bars form, making it easy to track your trade. When a target is hit, the line turns green and the label shows a checkmark.
Lines freeze (stop updating) when:
Stop loss is hit
The final enabled take-profit is hit
End of trading session (optional setting)
### 6. Position Sizing Dashboard
The dashboard (bottom-left corner by default) shows real-time information:
Current ORB stage and range size
Breakout status (Inside Range / Break Up / Break Down)
Volume confirmation (if filter enabled)
Trend alignment (if filter enabled)
Entry and Stop Loss prices
All enabled Take Profit levels with percentages
Risk/Reward ratio
Position sizing: Max shares to buy and total risk amount
Position Sizing Example:
If your account is $25,000 and you risk 1% per trade ($250), and the distance from entry to stop loss is $0.50, the calculator shows you can buy 500 shares (250 / 0.50 = 500).
### 7. FVG Filter (Fair Value Gap)
Fair Value Gaps are price inefficiencies - gaps left by strong momentum where one candle's high doesn't overlap with a previous candle's low (or vice versa).
When enabled, this filter:
Detects bullish and bearish FVGs
Draws semi-transparent boxes around these gaps
Only allows breakout signals if there's an FVG near the breakout level
Why this helps: FVGs indicate institutional activity. Breakouts through FVGs tend to be stronger and more reliable.
Proximity setting: Controls how close the FVG must be to the ORB level. 2.0x means the breakout can be within 2 times the FVG size - a reasonable default.
### 8. Volume & Trend Filters
Volume Filter:
Requires current volume to be above average (customizable multiplier). High volume breakouts are more likely to sustain.
Set minimum multiplier (e.g., 1.5x = 50% above average)
Set "strong volume" multiplier (e.g., 2.5x) that bypasses other filters
Dashboard shows current volume ratio
Trend Filter:
Only shows breakouts aligned with a higher timeframe trend. Choose from:
VWAP - Price above/below volume-weighted average
EMA - Price above/below exponential moving average
SuperTrend - ATR-based trend indicator
Combined modes (VWAP+EMA, VWAP+SuperTrend) for stricter filtering
### 9. Pullback Filter (Advanced)
Purpose:
Waits for price to pull back slightly after initial breakout before confirming the signal.
This reduces false breakouts from immediate reversals.
How it works:
- After breakout is detected, indicator waits for a small pullback (default 2%)
- Once pullback occurs AND price breaks out again, signal is confirmed
- If no pullback within timeout period (5 bars), signal is issued anyway
Settings:
Enable Pullback Filter: Turn this filter on/off
Pullback %: How much price must pull back (2% is balanced)
Timeout (bars): Max bars to wait for pullback (5 is standard)
When to use:
- Choppy markets with many fake breakouts
- When you want higher quality signals
- Combine with Volume filter for maximum confirmation
Trade-off:
- Better signal quality
- May miss some valid fast moves
- Slight entry delay
How to Use This Indicator
### For Beginners - Simple Setup
Add the indicator to your chart (5-minute or 15-minute timeframe recommended)
Leave all default settings - they work well for most stocks
Watch for BREAK UP or BREAK DOWN labels to appear
Check the dashboard for entry, stop loss, and targets
Use the position sizing to determine how many shares to buy
Basic Trading Plan:
Wait for a clear breakout label
Enter at the ORB level (or next candle open if you're late)
Place stop loss where the red line indicates
Take profit at TP1 (50% of position) and TP2 (remaining 50%)
### For Advanced Traders - Customized Setup
Choose which ORB stages to track (you might only want ORB15 and ORB30)
Enable filters: Volume (stocks) or Trend (trending markets)
Enable FVG filter for institutional confirmation
Set "Track Cycles" mode to catch retests and re-breakouts
Customize stop loss method (ATR for volatile stocks, ORB% for stable ones)
Adjust risk per trade and account size for accurate position sizing
Advanced Strategy Example:
Enable ORB15 only (disable others for cleaner chart)
Turn on Volume filter at 1.5x with Strong at 2.5x
Enable Trend filter using VWAP
Set Signal Mode to "Track Cycles" with Max 3 cycles
Wait for aligned breakouts (Volume + Trend + Direction)
Enter on retest if you missed the initial break
### Timeframe Recommendations
5-minute chart: Scalping, very active trading, crypto
15-minute chart: Day trading, balanced approach (most popular)
30-minute chart: Swing entries, less screen time
60-minute chart: Position trading, longer holds
The indicator works on any intraday timeframe, but ORB is fundamentally a day trading strategy. Daily charts don't make sense for ORB.
DEFAULT CONFIGURATION
ON by Default:
• All 4 ORB stages (5/15/30/60)
• Breakout Detection
• Retest Labels
• All TP levels (1/1.5/2/3)
• TP/SL Lines (Detailed mode)
• Dashboard (Bottom Left, Dark theme)
• Position Size Calculator
OFF by Default (Optional Filters):
• FVG Filter
• Pullback Filter
• Volume Filter
• Trend Filter
• HTF Bias Check
• Alerts
Recommended for Beginners:
• Leave all defaults
• Session Mode: Auto-Detect
• Signal Mode: Track Cycles
• Stop Method: ATR
• Add Volume Filter if trading stocks
Recommended for Advanced:
• Enable ORB15 + ORB30 only (disable 5 & 60)
• Enable: Volume + Trend + FVG
• Signal Mode: Track Cycles, Max 3
• Stop Method: ATR or Safer
• Enable HTF Daily bias check
## Settings Guide
The settings are organized into logical groups. Here's what each section controls:
### ORB COLORS Section
Show Edge Labels: Display "ORB 5", "ORB 15" labels at the right edge of the levels
Background: Fill the area between ORB high/low with color
Transparency: How see-through the background is (95% is nearly invisible)
Enable ORB 5/15/30/60: Turn each stage on or off individually
Colors: Assign colors to each ORB stage for easy identification
### SESSION SETTINGS Section
Session Mode: Choose trading session (Auto-Detect works for most instruments)
Custom Session Hours: Define your own hours if needed (format: HHMM-HHMM)
Auto-Detect uses the instrument's natural hours (stocks use exchange hours, crypto uses 24/7).
### BREAKOUT DETECTION Section
Enable Breakout Detection: Master switch for signals
Show Retest Labels: Display retest signals
Label Size: Visual size for all labels (Small recommended)
Enable FVG Filter: Require Fair Value Gap confirmation
Show FVG Boxes: Display the gap boxes on chart
Signal Mode: "First Only" = one signal per direction per day, "Track Cycles" = multiple signals
Max Cycles: How many breakout-retest cycles to track (6 is balanced)
Breakout Buffer: Extra distance required beyond ORB level (0.1-0.2% recommended)
Min Distance for Retest: How far price must move away before retest is valid (2% recommended)
Min Bars Outside ORB: Bars price must stay outside for committed breakout (2 is balanced)
### TARGETS & RISK Section
Enable Targets & Stop-Loss: Calculate and show trade management
TP1/TP2/TP3 checkboxes: Select which profit targets to display
Stop Method: How to calculate stop loss placement
- ATR: Based on volatility (best for most cases)
- ORB %: Fixed % of ORB range
- Swing: Recent swing high/low
- Safer: Widest of all methods
ATR Length & Multiplier: Controls ATR stop distance (14 period, 1.5x is standard)
ORB Stop %: Percentage beyond ORB for stop (20% is balanced)
Swing Bars: Lookback period for swing high/low (3 is recent)
### TP/SL LINES Section
Show TP/SL Lines: Display horizontal lines on chart
Label Format: "Short" = minimal text, "Detailed" = shows prices
Freeze Lines at EOD: Stop extending lines at session close
### DASHBOARD Section
Show Info Panel: Display the metrics dashboard
Theme: Dark or Light colors
Position: Where to place dashboard on chart
Toggle rows: Show/hide specific information rows
Calculate Position Size: Enable the position sizing calculator
Risk Mode: Risk fixed $ amount or % of account
Account Size: Your total trading capital
Risk %: Percentage to risk per trade (0.5-1% recommended)
### VOLUME FILTER Section
Enable Volume Filter: Require volume confirmation
MA Length: Average period (20 is standard)
Min Volume: Required multiplier (1.5x = 50% above average)
Strong Volume: Multiplier that bypasses other filters (2.5x)
### TREND FILTER Section
Enable Trend Filter: Require trend alignment
Trend Mode: Method to determine trend (VWAP is simple and effective)
Custom EMA Length: If using EMA mode (50 for swing, 20 for day trading)
SuperTrend settings: Period and Multiplier if using SuperTrend mode
### HIGHER TIMEFRAME Section
Check Daily Trend: Display higher timeframe bias in dashboard
Timeframe: What TF to check (D = daily, recommended)
Method: Price vs MA (stable) or Candle Direction (reactive)
MA Period: EMA length for Price vs MA method (20 is balanced)
Min Strength %: Minimum strength threshold for HTF bias to be considered
- For "Price vs MA": Minimum distance (%) from moving average
- For "Candle Direction": Minimum candle body size (%)
- 0.5% is balanced - increase for stricter filtering
- Lower values = more signals, higher values = only strong trends
### ALERTS Section
Enable Alerts: Master switch (must be ON to use any alerts)
Breakout Alerts: Notify on ORB breakouts
Retest Alerts: Notify when price retests after breakout
Failed Break Alerts: Notify on failed breakouts
Stage Complete Alerts: Notify when each ORB stage finishes forming
After enabling desired alert types, click "Create Alert" button, select this indicator, choose "Any alert() function call".
## Tips & Best Practices
### General Trading Tips
ORB works best on liquid instruments (stocks with good volume, major crypto pairs)
First hour of the session is most important - that's when ORB is forming
Breakouts WITH the trend have higher success rates - use the trend filter
Failed breakouts are common - use the "Min Bars Outside" setting to filter weak moves
Not every day produces good ORB setups - be patient and selective
### Position Sizing Best Practices
Never risk more than 1-2% of your account on a single trade
Use the built-in calculator - don't guess your position size
Update your account size monthly as it grows
Smaller accounts: use $ Amount mode for simplicity
Larger accounts: use % of Account mode for scaling
### Take Profit Strategy
Most traders use: 50% at TP1, 50% at TP2
Aggressive: Hold through TP1 for TP2 or TP3
Conservative: Full exit at TP1 (1:1 risk/reward)
After TP1 hits, consider moving stop to breakeven
TP3 rarely hits - only on strong trending days
### Filter Combinations
Maximum Quality: Volume + Trend + FVG (fewest signals, highest quality)
Balanced: Volume + Trend (good quality, reasonable frequency)
Active Trading: No filters or Volume only (many signals, lower quality)
Trending Markets: Trend filter essential (indices, crypto)
Range-Bound: Volume + FVG (avoid trend filter)
### Common Mistakes to Avoid
Chasing breakouts - wait for the bar to close, don't FOMO into wicks
Ignoring the stop loss - always use it, move it manually if needed
Over-leveraging - the calculator shows MAX shares, you can buy less
Trading every signal - quality > quantity, use filters
Not tracking results - keep a journal to see what works for YOU
## Pros and Cons
### Advantages
Complete all-in-one solution - from signal to position sizing
Multiple timeframes tracked simultaneously
Visual clarity - easy to see what's happening
Cycle tracking catches opportunities others miss
Built-in risk management eliminates guesswork
Customizable filters for different trading styles
No repainting - what you see is locked in
Works across multiple markets (stocks, forex, crypto)
### Limitations
Intraday strategy only - doesn't work on daily charts
Requires active monitoring during first 1-2 hours of session
Not suitable for after-hours or extended sessions by default
Can produce many signals in choppy markets (use filters)
Dashboard can be overwhelming for complete beginners
Performance depends on market conditions (trends vs ranges)
Requires understanding of risk management concepts
### Best For
Day traders who can watch the first 1-2 hours of market open
Traders who want systematic entry/exit rules
Those learning proper position sizing and risk management
Active traders comfortable with multiple signals per day
Anyone trading liquid instruments with clear sessions
### Not Ideal For
Swing traders holding multi-day positions
Set-and-forget / passive investors
Traders who can't watch market open
Complete beginners unfamiliar with trading concepts
Low volume / illiquid instruments
## Frequently Asked Questions
Q: Why are no signals appearing?
A: Check that you're on an intraday timeframe (5min, 15min, etc.) and that the current time is within your session hours. Also verify that "Enable Breakout Detection" is ON and at least one ORB stage is enabled. If using filters, they might be blocking signals - try disabling them temporarily.
Q: What's the best ORB stage to use?
A: ORB15 (15 minutes) is most popular and balanced. ORB5 gives faster signals but more noise. ORB30 and ORB60 are slower but more reliable. Many traders use ORB15 + ORB30 together.
Q: Should I enable all the filters?
A: Start with no filters to see all signals. If too many false signals, add Volume filter first (stocks) or Trend filter (trending markets). FVG filter is most restrictive - use for maximum quality but fewer signals.
Q: How do I know which stop loss method to use?
A: ATR works for most cases - it adapts to volatility. Use ORB% if you want predictable stop placement. Swing is for respecting chart structure. Safer gives you the most room but largest risk.
Q: Can I use this for swing trading?
A: Not really - ORB is fundamentally an intraday strategy. The ranges reset each day. For swing trading, look at weekly support/resistance or moving averages instead.
Q: Why do TP/SL lines disappear sometimes?
A: Lines freeze (stop extending) when: stop loss is hit, the last enabled take-profit is hit, or end of session arrives (if "Freeze at EOD" is enabled). This is intentional - the trade is complete.
Q: What's the difference between "First Only" and "Track Cycles"?
A: "First Only" shows one breakout UP and one DOWN per day maximum - clean but might miss opportunities. "Track Cycles" shows breakout-retest-rebreak sequences - more signals but busier chart.
Q: Is position sizing accurate for options/forex?
A: The calculator is designed for shares (stocks). For options, ignore the share count and use the risk amount. For forex, you'll need to adapt the lot size calculation manually.
Q: How much capital do I need to use this?
A: The indicator works for any account size, but practical day trading typically requires $25,000 in the US due to Pattern Day Trader rules. Adjust the "Account Size" setting to match your capital.
Q: Can I backtest this strategy?
A: This is an indicator, not a strategy script, so it doesn't have built-in backtesting. You can visually review historical signals or code a strategy script using similar logic.
Q: Why does the dashboard show different entry price than the breakout label?
A: If you're looking at an old breakout, the ORB levels may have changed when the next stage completed. The dashboard always shows the CURRENT active range and trade setup.
Q: What's a good win rate to expect?
A: ORB strategies typically see 40-60% win rate depending on market conditions and filters used. The strategy relies on positive risk/reward ratios (2:1 or better) to be profitable even with moderate win rates.
Q: Does this work on crypto?
A: Yes, but crypto trades 24/7 so you need to define what "session start" means. Use Session Mode = Custom and set your preferred daily reset time (e.g., 0000-2359 UTC).
## Credits & Transparency
### Development
This indicator was developed with the assistance of AI technology to implement complex ORB trading logic.
The strategy concept, feature specifications, and trading logic were designed by the publisher. The implementation leverages modern development tools to ensure:
Clean, efficient, and maintainable code
Comprehensive error handling and input validation
Detailed documentation and user guidance
Performance optimization
### Trading Concepts
This indicator implements several public domain trading concepts:
Opening Range Breakout (ORB): Trading strategy popularized by Toby Crabel, Mark Fisher and many more talanted traders.
Fair Value Gap (FVG): Price imbalance concept from ICT methodology
SuperTrend: ATR-based trend indicator using public formula
Risk/Reward Ratio: Standard risk management principle
All mathematical formulas and technical concepts used are in the public domain.
### Pine Script
Uses standard TradingView built-in functions:
ta.ema(), ta.atr(), ta.vwap(), ta.highest(), ta.lowest(), request.security()
No external libraries or proprietary code from other authors.
## Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice.
Trading involves substantial risk of loss and is not suitable for every investor. Past performance shown in examples is not indicative of future results.
The indicator provides signals and calculations, but trading decisions are solely your responsibility. Always:
Test strategies on paper before using real money
Never risk more than you can afford to lose
Understand that all trading involves risk
Consider seeking advice from a licensed financial advisor
The publisher makes no guarantees regarding accuracy, profitability, or performance. Use at your own risk.
---
Version: 3.0
Pine Script Version: v6
Last Updated: October 2024
For support, questions, or suggestions, please comment below or send a private message.
---
Happy trading, and remember: consistent risk management beats perfect entry timing every time.






















