Smarter Money Flow Divergence Detector [PhenLabs]📊 Smarter Money Flow Divergence Detector
Version: PineScript™ v6
📌 Description
SMFD was developed to help give you guys a better ability to “read” what is going on behind the scenes without directly having access to that level of data. SMFD is an enhanced divergence detection indicator that identifies money flow patterns from advanced volume analysis and price action correspondence. The detection portion of this indicator combines intelligent money flow calculations with multi timeframe volume analysis to help you see hidden accumulation and distribution phases before major price movements occur.
The indicator measures institutional trading activity by looking at volume surges, price volume dynamics, and the factors of momentum to construct an overall picture of market sentiment. It’s built to assist traders in identifying high probability entries by identifying if smart money is positioning against price action.
🚀 Points of Innovation
● Advanced Smart Money Flow algorithm with volume spike detection and large trade weighting
● Multi timeframe volume analysis for enhanced institutional activity detection
● Dynamic overbought/oversold zones that adapt to current market conditions
● Enhanced divergence detection with pivot confirmation and strength validation
● Color themes with customizable visual styling options
● Real time institutional bias tracking through accumulation/distribution analysis
🔧 Core Components
● Smart Money Flow Calculation: Combines price momentum, volume expansion, and VWAP analysis
● Institutional Bias Oscillator: Tracks accumulation/distribution patterns with volume pressure analysis
● Enhanced Divergence Engine: Detects bullish/bearish divergences with multiple confirmation factors
● Dynamic Zone Detection: Automatically adjusts overbought/oversold levels based on market volatility
● Volume Pressure Analysis: Measures buying vs selling pressure over configurable periods
● Multi factor Signal System: Generates entries with trend alignment and strength validation
🔥 Key Features
● Smart Money Flow Period: Configurable calculation period for institutional activity detection
● Volume Spike Threshold: Adjustable multiplier for detecting unusual institutional volume
● Large Trade Weight: Emphasis factor for high volume periods in flow calculations
● Pivot Detection: Customizable lookback period for accurate divergence identification
● Signal Sensitivity: Three tier system (Conservative/Medium/Aggressive) for signal generation
● Themes: Four color schemes optimized for different chart backgrounds
🎨 Visualization
● Main Oscillator: Line, Area, or Histogram display styles with dynamic color coding
● Institutional Bias Line: Real time tracking of accumulation/distribution phases
● Dynamic Zones: Adaptive overbought/oversold boundaries with gradient fills
● Divergence Lines: Automatic drawing of bullish/bearish divergence connections
● Entry Signals: Clear BUY/SELL labels with signal strength indicators
● Information Panel: Real time statistics and status updates in customizable positions
📖 Usage Guidelines
Algorithm Settings
● Smart Money Flow Period
○ Default: 20
○ Range: 5-100
○ Description: Controls the calculation period for institutional flow analysis.
Higher values provide smoother signals but reduce responsiveness to recent activity
● Volume Spike Threshold
○ Default: 1.8
○ Range: 1.0-5.0
○ Description: Multiplier for detecting unusual volume activity indicating institutional participation. Higher values require more extreme volume for detection
● Large Trade Weight
○ Default: 2.5
○ Range: 1.5-5.0
○ Description: Weight applied to high volume periods in smart money calculations. Increases emphasis on institutional sized transactions
Divergence Detection
● Pivot Detection Period
○ Default: 12
○ Range: 5-50
○ Description: Bars to analyze for pivot high/low identification.
Affects divergence accuracy and signal frequency
● Minimum Divergence Strength
○ Default: 0.25
○ Range: 0.1-1.0
○ Description: Required price change percentage for valid divergence patterns.
Higher values filter out weaker signals
✅ Best Use Cases
● Trading with intraday to daily timeframes for institutional position identification
● Confirming trend reversals when divergences align with support/resistance levels
● Entry timing in trending markets when institutional bias supports the direction
● Risk management by avoiding trades against strong institutional positioning
● Multi timeframe analysis combining short term signals with longer term bias
⚠️ Limitations
● Requires sufficient volume for accurate institutional detection in low volume markets
● Divergence signals may have false positives during highly volatile news events
● Best performance on liquid markets with consistent institutional participation
● Lagging nature of volume based calculations may delay signal generation
● Effectiveness reduced during low participation holiday periods
💡 What Makes This Unique
● Multi Factor Analysis: Combines volume, price, and momentum for comprehensive institutional detection
● Adaptive Zones: Dynamic overbought/oversold levels that adjust to market conditions
● Volume Intelligence: Advanced algorithms identify institutional sized transactions
● Professional Visualization: Multiple display styles with customizable themes
● Confirmation System: Multiple validation layers reduce false signal generation
🔬 How It Works
1. Volume Analysis Phase:
● Analyzes current volume against historical averages to identify institutional activity
● Applies multi timeframe analysis for enhanced detection accuracy
● Calculates volume pressure through buying vs selling momentum
2. Smart Money Flow Calculation:
● Combines typical price with volume weighted analysis
● Applies institutional trade weighting for high volume periods
● Generates directional flow based on price momentum and volume expansion
3. Divergence Detection Process:
● Identifies pivot highs/lows in both price and indicator values
● Validates divergence strength against minimum threshold requirements
● Confirms signals through multiple technical factors before generation
💡 Note: This indicator works best when combined with proper risk management and position sizing. The institutional bias component helps identify market sentiment shifts, while divergence signals provide specific entry opportunities. For optimal results, use on liquid markets with consistent institutional participation and combine with additional technical analysis methods.
Centered Oscillators
CHN TAB# CHN TAB - Technical Analysis Bot
## Overview
The TAB (Technical Analysis Bot) indicator is a comprehensive trading signal system that combines Simple Moving Average (SMA) crossovers with MACD momentum analysis to identify high-probability entry and exit points. This indicator provides both immediate and delayed signal detection with built-in risk management through automatic Take Profit (TP) and Stop Loss (SL) calculations.
## Key Features
- **Dual Signal Detection**: Combines SMA(50) price action with MACD momentum
- **Smart Signal Timing**: Offers both immediate and delayed signal recognition
- **Automatic Risk Management**: Calculates TP and SL levels using ATR (Average True Range)
- **Visual Feedback**: Color-coded candles and filled zones for easy identification
- **Comprehensive Alerts**: Three distinct alert conditions for different trading needs
## How It Works
### Buy Signals
**Immediate Buy Signal:**
- Price crosses above SMA(50) (open < SMA50 and close > SMA50)
- MACD crosses above zero line simultaneously
**Delayed Buy Signal:**
- Previous candle crossed above SMA(50)
- Previous MACD was ≤ 0, current MACD > 0
- Current candle remains above SMA(50)
### Sell Signals
**Immediate Sell Signal:**
- Price crosses below SMA(50) (open > SMA50 and close < SMA50)
- MACD crosses below zero line simultaneously
**Delayed Sell Signal:**
- Previous candle crossed below SMA(50)
- Previous MACD was ≥ 0, current MACD < 0
- Current candle remains below SMA(50)
### Risk Management
- **Take Profit**: Entry price ± 1.0 × ATR(14)
- **Stop Loss**: Entry price ± 1.5 × ATR(14)
- **Risk-Reward Ratio**: Automatic 1:1.5 setup
## Visual Elements
- **Green Candles**: Buy signal triggered
- **Red Candles**: Sell signal triggered
- **Orange Line**: Entry price level (displayed for 10 bars)
- **Green Fill**: Take profit zone
- **Red Fill**: Stop loss zone
## Alert System
1. **TAB Buy Signal**: Triggers only on buy signals
2. **TAB Sell Signal**: Triggers only on sell signals
3. **TAB Buy & Sell Signal**: Triggers on any signal (buy or sell)
## Best Practices
- Use on trending markets for better signal quality
- Combine with higher timeframe analysis for confirmation
- Consider market volatility when interpreting ATR-based levels
- Backtest on your preferred timeframes before live trading
## Technical Parameters
- **SMA Period**: 50
- **MACD Settings**: 12, 26, 9 (Fast, Slow, Signal)
- **ATR Period**: 14
- **Signal Display**: 10 bars duration
## Timeframe Recommendations
- Works on all timeframes
- Best performance on 15M, 1H, and 4H charts
- Higher timeframes provide more reliable signals
## Risk Disclaimer
This indicator is for educational and informational purposes only. Trading involves substantial risk of loss and is not suitable for all investors. Past performance does not guarantee future results. Always conduct your own analysis and consider your risk tolerance before making trading decisions.
---
**Version**: 6.0
**Overlay**: Yes
**Category**: Trend Following, Momentum
**Suitable For**: Forex, Stocks, Crypto, Commodities
MACD_without_pricePublic sharing has been approved by Mr. Niu Jun. This code does not involve candlestick chart prices. Please make further judgements based on volatility and prices.
公开分享已征得牛军老师同意。本代码未涉及K线价格,请结合波动和价格做进一步判断。
YouTube:
@牛军开门-股市牛转门
@小二帆
Donchian + EMA + T3 + Supertrend (RR 1:2)Trend Catcher Build with Donchain channels and EMA cross, also confirmation with Supertrend
AI Momentum Cloud v6 📌 AI Momentum Cloud v6 – Strategy Overview & Logic
📊 Overview
The AI Momentum Cloud v6 strategy is a dynamic breakout system designed to identify directional moves when price escapes a volatility-defined “cloud” and is supported by momentum. The model combines a custom implementation of Kaufman's Adaptive Moving Average (KAMA) with MACD histogram momentum filtering and an ATR-based cloud envelope. It aims to detect actionable impulses while minimizing noise in ranging markets.
This strategy is suitable for:
* Intraday timeframes (15m, 1h)
* Stocks and crypto assets with trend potential (e.g., AAPL, TSLA, BTCUSD, SPY)
* Traders who want visual clarity and logic-driven risk
⚙️ Technical Logic
1. Trend Base – KAMA
A manually coded version of Kaufman's Adaptive Moving Average (KAMA) is used to adapt to market conditions. This indicator reacts quickly in trending markets but smooths out sideways chop.
2. Momentum Confirmation – MACD Histogram
Only trades in the direction of positive MACD histogram (for longs) or negative histogram (for shorts) are allowed. This avoids entering into fake breakouts without true momentum.
3. Cloud Envelope – ATR-Based Bands
The strategy draws two dynamic bands around KAMA using the Average True Range (ATR):
* Upper Band = KAMA + (ATR × Multiplier)
* Lower Band = KAMA − (ATR × Multiplier)
Price must break through these bands with momentum to qualify as a valid signal.
📥 Entry Conditions
📈 Long Entry:
* Price crosses above the upper cloud band
* Close is above KAMA
* MACD Histogram is positive
📉 Short Entry:
* Price crosses below the lower cloud band
* Close is below KAMA
* MACD Histogram is negative
These conditions ensure that trades align with both trend and momentum.
📤 Exit Conditions
Each trade is exited based on **adaptive volatility targets:
* Take Profit = Entry Price ± (ATR × TP Multiplier)
* Stop Loss = Entry Price ∓ (ATR × SL Multiplier)
No trailing stops or time exits are used, making this a clean 1-shot trade system per signal.
📐 Risk Management
* Default risk size is set to 1% of equity per trade via `strategy.percent_of_equity`
* Both TP and SL are dynamically adjusted to market volatility using ATR
* This protects against overreacting in low-volatility environments and underreacting in high-volatility zones
📊 Visual Features
*Orange KAMA line: Shows the adaptive trend center
*Green and Red Bands: Represent breakout thresholds
*Blue Cloud Fill: Visualizes volatility envelope
*Background Color: Green/red tint for momentum condition (MACD histogram > 0 or < 0)
These cues help manual traders validate live signals alongside the automated entries/exits.
⚠️ Disclaimer
> This strategy is intended for educational and research purposes only. It does not constitute financial advice, a recommendation to buy/sell any asset, or a guarantee of performance. Always backtest and forward-test strategies in a simulated environment before considering live use.
> The logic and risk settings should be tailored to the user’s own risk tolerance and market.
Running Minimum HighThe running minimum high looks at the minimum high from a defined lookback period (default 10 days) and plots that on the price chart. Green arrows signify when the low of the candle is above the running minimum high (suggesting an uptrend), and red arrows signify when the high of the candle is below the running minimum high (suggesting a downtrend).
It is recommended to use this on high timeframes (e.g. 1 hour and above) given the high number of signals it generates on lower timeframes.
Rifle SHORT OSVuka's Rifle Shooter Indicator
TODO fill out description of input settings
See to complement this rifle indicator.
Rifle LONG OSVuka's Rifle Shooter Indicator
TODO fill out description of input settings
See to complement this rifle indicator.
MACD-VWAP-BB IndicatorThe Scalping Rainbow MACD-VWAP-BB Indicator is a simple tool for beginners to scalp (make quick trades) on a 1-minute chart in TradingView. It helps you decide when to buy or sell assets like forex (EUR/USD), crypto (BTC/USD), or stocks by showing clear signals directly on the candlestick chart. Here’s how to use it for scalping, explained in the easiest way:
Setup: Open TradingView, choose a 1-minute chart for a liquid asset (e.g., EUR/USD). Copy the indicator code into the Pine Editor (bottom tab), click “Add to Chart.” You’ll see green triangle-up signals below candles for buying and red triangle-down signals above candles for selling.
Buy Signal (Green Triangle Up): When a green triangle appears below a candle, it means the MACD, VWAP, and Bollinger Bands all suggest the price may rise. Action: Buy immediately, aiming for a small profit (5-10 pips in forex, 0.1-0.5% in crypto/stocks). Set a stop-loss 2-5 pips below the recent low to limit losses.
Sell Signal (Red Triangle Down): A red triangle above a candle signals a potential price drop. Action: Sell or short the asset, targeting a quick profit. Set a stop-loss 2-5 pips above the recent high.
Scalping Tips: Trade during busy market hours (e.g., 5:30 PM–9:30 PM IST for forex). Exit trades within 1-5 minutes. Only risk 1-2% of your account per trade. Check for support/resistance levels or candlestick patterns to confirm signals.
Practice: Use a demo account to test the indicator. Stick to 3-5 trades per session to avoid overtrading. If signals are too frequent, adjust “Signal Delay” to 2 in settings.
This indicator simplifies scalping by combining three reliable tools into clear buy/sell signals, perfect for beginners.
Oscilador de Sentimiento PROUser Manual: Indicator "Dinámicas de Mercado Pro" (DMP)
Author: @Profit_Quant
Created by: Gemini AI (2025)
User Manual (English):RSI Sentiment Oscillator PRO
1. General Concept
The "RSI Sentiment Oscillator PRO" is an advanced RSI-type indicator designed to measure the momentum and strength of market sentiment. Unlike a simple line oscillator, this indicator uses a dynamic-width band that visually expands and contracts with the intensity of the sentiment. Its most powerful feature is the automatic detection of four types of divergences, which are key signals for identifying potential trend reversals or continuations.
2. Main Components and Their Interpretation
a) The Oscillator Band (Dynamic Width)
What it is: The main representation of the indicator. It's not just a line, but a filled band.
Dynamic Width: This is its unique feature. The band widens as sentiment becomes more extreme (near overbought at 100 or oversold at 0) and narrows near the neutral zone (50). This gives you an immediate visual sense of the "pressure" or "strength" of the current sentiment.
Band Colors:
Green: The oscillator is in the oversold zone (below 30). Sentiment is extremely bearish, which could precede a bounce.
Red: The oscillator is in the overbought zone (above 70). Sentiment is extremely bullish, which could precede a correction.
Blue: The oscillator is in a neutral zone.
b) Divergence Detection (Key Signals)
Divergences occur when the price and the oscillator move in opposite directions. They are among the most powerful signals in technical analysis.
Regular Divergences (Trend Reversal Signals)
Regular Bullish Divergence (Green):
What to look for: The price makes a lower low, but the oscillator makes a higher low.
Meaning: The price is still falling, but the momentum of the fall is exhausting. It's a potential signal that the downtrend is ending and could reverse to the upside.
Label: Bull Div
Regular Bearish Divergence (Red):
What to look for: The price makes a higher high, but the oscillator makes a lower high.
Meaning: The price is still rising, but the momentum of the rise is weakening. It's a potential signal that the uptrend is losing steam and could reverse to the downside.
Label: Bear Div
Hidden Divergences (Trend Continuation Signals)
Hidden Bullish Divergence (Yellow):
What to look for: The price makes a higher low (a pullback in an uptrend), but the oscillator makes a lower low.
Meaning: The current pullback is a "buy the dip" opportunity to join the main uptrend. It indicates that the uptrend is likely to continue.
Label: Bull Hid
Hidden Bearish Divergence (Orange):
What to look for: The price makes a lower high (a rally in a downtrend), but the oscillator makes a higher high.
Meaning: The current rally is a "sell the rally" opportunity to join the main downtrend. It indicates that the downtrend is likely to continue.
Label: Bear Hid
3. Trading Strategies
Reversal Trading: Use Regular Divergences as your primary signal. A green Bull Div in the oversold zone is a powerful buy signal. A red Bear Div in the overbought zone is a powerful sell signal.
Continuation Trading: Use Hidden Divergences to enter in the direction of the trend. A yellow Bull Hid during a pullback in an uptrend confirms that it's a good time to buy.
Volume Filter: By default, the indicator requires the volume on the second pivot of a regular divergence to be lower. This increases the reliability of the signal, as it confirms the "loss of conviction" in the price move.
4. Final Disclaimer
Divergences are high-probability signals, not certainties. Always use this indicator in confluence with your own analysis of market structure, support, resistance, and strict risk management.
es.tradingview.com
Triple-Filter ConfirmationTriple-Filter Confirmation System
This indicator generates high-probability trading signals based on a 3-layer filtering approach:
🔹 Trend Filter – Uses a 200-period EMA slope to confirm bullish or bearish bias.
🔹 Momentum Filter – Uses MACD histogram direction for secondary confirmation.
🔹 Volatility Filter – Filters out weak setups using ATR percentile rank (relative to last 100 bars).
✅ Signal appears only when all filters align, avoiding noise and low-confidence zones.
🚫 If any filter disagrees, no signal is shown — preserving capital through discipline.
💡 Works across any timeframe and asset. Use it alongside price action, support/resistance, and sound risk management.
Created for educational and research purposes — not financial advice.
Momentum ScopeOverview
Momentum Scope is a Pine Script™ v6 study that renders a –1 to +1 momentum heatmap across up to 32 lookback periods in its own pane. Using an Augmented Relative Momentum Index (ARMI) and color shading, it highlights where momentum strengthens, weakens, or stays flat over time—across any asset and timeframe.
Key Features
Full-Spectrum Momentum Map : Computes ARMI for 1–32 lookbacks, indexed from –1 (strong bearish) to +1 (strong bullish).
Flexible Scale Gradation : Choose Linear or Exponential spacing, with adjustable expansion ratio and maximum depth.
Trending Bias Control : Apply a contrast-style curve transform to emphasize trending vs. mean-reverting behavior.
Duotone & Tritone Palettes : Select between two vivid color styles, with user-definable hues for bearish, bullish, and neutral momentum.
Compact, Overlay-Free Display : Renders solely in its own pane—keeping your price chart clean.
Inputs & Customization
Scale Gradation : Linear or Exponential spacing of intervals
Scale Expansion : Ratio governing step-size between successive lookbacks
Scale Maximum : Maximum lookback period (and highest interval)
Trending Bias : Curve-transform bias to tilt the –1 … +1 grid
Color Style : Duotone or Tritone rendering modes
Reducing / Increasing / Neutral Colors : Pick your own hues for bearish, bullish, and flat zones
How to Use
Add to Chart : Apply “Momentum Scope” as a separate indicator.
Adjust Scale : For exponential spacing, switch your indicator Y-axis to Logarithmic .
Set Bias & Colors : Tweak Trending Bias and choose a palette that stands out on your layout.
Interpret the Heatmap :
Red tones = weakening/bearish momentum
Green tones = strengthening/bullish momentum
Neutral hues = indecision or flat momentum
Copyright © 2025 MVPMC. Licensed under MIT. For full license see opensource.org
Bắt Đáy Kỹ Thuật_Only_Buy [VNFlow]Bắt Đáy Kỹ Thuật_Only_Buy
Email: hasobin@outlook.com
Phone: 0373885338
Market Sell-Off GaugeOVERVIEW
The Market Sell‑Off Gauge identifies high‑conviction, risk‑off entry opportunities by detecting broad market sell‑off behavior and rising stablecoin dominance, then confirming risk‑off sentiment via NDX weakness, VIX spikes, and elevated volume. It uses fuzzy logic and sigmoid scaling to convert raw signals into a smooth, bounded metric.
FEATURES
Sell‑Off Detection - calculates percentage drops in the primary asset over a user‑defined lookback.
Stablecoin Dominance Surge - tracks combined USDT/USDC dominance rises as a proxy for on‑chain “flight to safety.”
Macro Confirmation
NDX Weakness (NASDAQ‑100)
VIX Spikes (CBOE Volatility Index)
Elevated Volume on declining bars
Fuzzy Logic & Scaling - component values feed into a fuzzy‑logic membership scor and are passed through a sigmoid compressor (–1 to +1). Weighted aggregation derives the final result of the gauge (or metric).
VISUALISATION
Continuous line plot - Smoothed metric (–1 to +1), colored cold‑to‑warm.
Entry circles - Highlighted when all conditions (fuzzy or crisp) are met after the time offset.
Time‑Offset marker - Vertical line/label showing the user‑specified “start” bar.
Component table - Displays real‑time % changes & volume multiples in the lower right of the indicator.
USAGE
Asset drop % - The threshold percent decline to register a sell‑off.
Stables rise % - The threshold percent increase in stablecoin dominance to qualify as a “flight to safety.”
NDX drop % - The threshold percent decline in the NASDAQ‑100 for macro confirmation.
VIX rise % - The threshold percent increase in VIX. Contributes to risk‑off validation.
Volume Multiplier - Defines how many times above SMA volume must rise to confirm conviction.
Lookback Period - Controls the number of bars over which % changes are measured.
Time Offset - Point in time beyond which bars to “fade” historical signals, enables focus on recent data only.
Fuzzy Logic Settings - Enables fuzzy scoring and set membership threshold & sensitivity.
Weights - allows for adjusting the relative importance of each component (Asset, Stables, NDX, VIX, Volume).
Sigmoid Steepness (k) - Controls curve steepness for compression (0.1 = very flat → 5.0 = very sharp S‑curve).
Chart & settings
Best applied on 4H or Daily BTCUSD (or similar) charts to capture meaningful sell‑off events.
Combine with broader trend filters (e.g., moving averages) for trend‑aligned entries.
Adjust Sigmoid Steepness and Membership Sensitivity to fine‑tune signal crispness vs. smoothness. Refer to tooltips.
Disclaimer
This indicator is intended for educational purposes only. Always perform your own due diligence before making financial decisions.
MACD Breakout SuperCandlesMACD Breakout SuperCandles
The MACD Breakout SuperCandles indicator is a candle-coloring tool that monitors trend alignment across multiple timeframes using a combination of MACD behavior and simple price structure. It visually reflects market sentiment directly on price candles, helping traders quickly recognize shifting momentum conditions.
How It Works
The script evaluates trend behavior based on:
- Multi-timeframe MACD Analysis: Uses MACD values and signal line relationships to gauge trend direction and strength.
- Price Relative to SMA Zones: Analyzes whether price is positioned above or below the 20-period high and low SMAs on each timeframe.
For each timeframe, the script assigns one of five possible trend statuses:
- SUPERBULL: Strong bullish MACD signal with price above both SMAs.
- Bullish: Bullish MACD crossover with price showing upward bias.
- Basing: MACD flattening or neutralizing near zero with no directional dominance.
- Bearish: Bearish MACD signal without confirmation of stronger trend.
- SUPERBEAR: Strong bearish MACD signal with price below both SMAs.
-Ghost Candles: Candles with basing attributes that can signal directional change or trend strength.
Signal Scoring System
The script compares conditions across four timeframes:
- TF1 (Short)
- TF2 (Medium)
- TF3 (Long)
- MACD at a fixed 10-minute resolution
Each status type is tracked independently. A colored candle is only applied when a status type (e.g., SUPERBULL) reaches the minimum match threshold, defined by the "Min Status Matches for Candle Color" setting. If no status meets the required threshold, the candle is displayed in a neutral "Ghost" color.
Customizable Visuals
The indicator offers full control over candle appearance via grouped settings:
Body Colors
- SUPERBULL Body
- Bullish Body
- Basing Body
- Bearish Body
- SUPERBEAR Body
- Ghost Candle Body (used when no match)
Border & Wick Colors
- SUPERBULL Border/Wick
- Bullish Border/Wick
- Basing Border/Wick
- Bearish Border/Wick
- SUPERBEAR Border/Wick
- Ghost Border/Wick
Colors are grouped by function and can be adjusted independently to match your chart theme or personal preferences.
Settings Overview
- TF1, TF2, TF3: Select short, medium, and long timeframes to monitor trend structure.
- Min Status Matches: Set how many timeframes must agree before a candle status is applied.
- MACD Settings: Customize MACD fast, slow, and signal lengths, and choose MA type (EMA, SMA, WMA).
This tool helps visualize how aligned various timeframe conditions are by embedding sentiment into the candles themselves. It can assist with trend identification, momentum confirmation, or visual filtering for discretionary strategies.
Magnificent 7 OscillatorThe Magnificent 7 Oscillator is a sophisticated momentum-based technical indicator designed to analyze the collective performance of the seven largest technology companies in the U.S. stock market (Apple, Microsoft, Alphabet, Amazon, NVIDIA, Tesla, and Meta). This indicator incorporates established momentum factor research and provides three distinct analytical modes: absolute momentum tracking, equal-weighted market comparison, and relative performance analysis. The tool integrates five different oscillator methodologies and includes advanced breadth analysis capabilities.
Theoretical Foundation
Momentum Factor Research
The indicator's foundation rests on seminal momentum research in financial markets. Jegadeesh and Titman (1993) demonstrated that stocks with strong price performance over 3-12 month periods tend to continue outperforming in subsequent periods¹. This momentum effect was later incorporated into formal factor models by Carhart (1997), who extended the Fama-French three-factor model to include a momentum factor (UMD - Up Minus Down)².
The momentum calculation methodology follows the academic standard:
Momentum(t) = / P(t-n) × 100
Where P(t) is the current price and n is the lookback period.
The focus on the "Magnificent 7" stocks reflects the increasing market concentration observed in recent years. Fama and French (2015) noted that a small number of large-cap stocks can drive significant market movements due to their substantial index weights³. The combined market capitalization of these seven companies often exceeds 25% of the total S&P 500, making their collective momentum a critical market indicator.
Indicator Architecture
Core Components
1. Data Collection and Processing
The indicator employs robust data collection with error handling for missing or invalid security data. Each stock's momentum is calculated independently using the specified lookback period (default: 14 periods).
2. Composite Oscillator Calculation
Following Fama-French factor construction methodology, the indicator offers two weighting schemes:
- Equal Weight: Each active stock receives identical weighting (1/n)
- Market Cap Weight: Reserved for future enhancement
3. Oscillator Transformation Functions
The indicator provides five distinct oscillator types, each with established technical analysis foundations:
a) Momentum Oscillator (Default)
- Pure rate-of-change calculation
- Centered around zero
- Direct implementation of Jegadeesh & Titman methodology
b) RSI (Relative Strength Index)
- Wilder's (1978) relative strength methodology
- Transformed to center around zero for consistency
- Scale: -50 to +50
c) Stochastic Oscillator
- George Lane's %K methodology
- Measures current position within recent range
- Transformed to center around zero
d) Williams %R
- Larry Williams' range-based oscillator
- Inverse stochastic calculation
- Adjusted for zero-centered display
e) CCI (Commodity Channel Index)
- Donald Lambert's mean reversion indicator
- Measures deviation from moving average
- Scaled for optimal visualization
Operational Modes
Mode 1: Magnificent 7 Analysis
Tracks the collective momentum of the seven constituent stocks. This mode is optimal for:
- Technology sector analysis
- Growth stock momentum assessment
- Large-cap performance tracking
Mode 2: S&P 500 Equal Weight Comparison
Analyzes momentum using an equal-weighted S&P 500 reference (typically RSP ETF). This mode provides:
- Broader market momentum context
- Size-neutral market analysis
- Comparison baseline for relative performance
Mode 3: Relative Performance Analysis
Calculates the momentum differential between Magnificent 7 and S&P 500 Equal Weight. This mode enables:
- Sector rotation analysis
- Style factor assessment (Growth vs. Value)
- Relative strength identification
Formula: Relative Performance = MAG7_Momentum - SP500EW_Momentum
Signal Generation and Thresholds
Signal Classification
The indicator generates three signal states:
- Bullish: Oscillator > Upper Threshold (default: +2.0%)
- Bearish: Oscillator < Lower Threshold (default: -2.0%)
- Neutral: Oscillator between thresholds
Relative Performance Signals
In relative performance mode, specialized thresholds apply:
- Outperformance: Relative momentum > +1.0%
- Underperformance: Relative momentum < -1.0%
Alert System
Comprehensive alert conditions include:
- Threshold crossovers (bullish/bearish signals)
- Zero-line crosses (momentum direction changes)
- Relative performance shifts
- Breadth Analysis Component
The indicator incorporates market breadth analysis, calculating the percentage of constituent stocks with positive momentum. This feature provides insights into:
- Strong Breadth (>60%): Broad-based momentum
- Weak Breadth (<40%): Narrow momentum leadership
- Mixed Breadth (40-60%): Neutral momentum distribution
Visual Design and User Interface
Theme-Adaptive Display
The indicator automatically adjusts color schemes for dark and light chart themes, ensuring optimal visibility across different user preferences.
Professional Data Table
A comprehensive data table displays:
- Current oscillator value and percentage
- Active mode and oscillator type
- Signal status and strength
- Component breakdowns (in relative performance mode)
- Breadth percentage
- Active threshold levels
Custom Color Options
Users can override default colors with custom selections for:
- Neutral conditions (default: Material Blue)
- Bullish signals (default: Material Green)
- Bearish signals (default: Material Red)
Practical Applications
Portfolio Management
- Sector Allocation: Use relative performance mode to time technology sector exposure
- Risk Management: Monitor breadth deterioration as early warning signal
- Entry/Exit Timing: Utilize threshold crossovers for position sizing decisions
Market Analysis
- Trend Identification: Zero-line crosses indicate momentum regime changes
- Divergence Analysis: Compare MAG7 performance against broader market
- Volatility Assessment: Oscillator range and frequency provide volatility insights
Strategy Development
- Factor Timing: Implement growth factor timing strategies
- Momentum Strategies: Develop systematic momentum-based approaches
- Risk Parity: Use breadth metrics for risk-adjusted portfolio construction
Configuration Guidelines
Parameter Selection
- Momentum Period (5-100): Shorter periods (5-20) for tactical analysis, longer periods (50-100) for strategic assessment
- Smoothing Period (1-50): Higher values reduce noise but increase lag
- Thresholds: Adjust based on historical volatility and strategy requirements
Timeframe Considerations
- Daily Charts: Optimal for swing trading and medium-term analysis
- Weekly Charts: Suitable for long-term trend analysis
- Intraday Charts: Useful for short-term tactical decisions
Limitations and Considerations
Market Concentration Risk
The indicator's focus on seven stocks creates concentration risk. During periods of significant rotation away from large-cap technology stocks, the indicator may not represent broader market conditions.
Momentum Persistence
While momentum effects are well-documented, they are not permanent. Jegadeesh and Titman (1993) noted momentum reversal effects over longer time horizons (2-5 years).
Correlation Dynamics
During market stress, correlations among the constituent stocks may increase, reducing the diversification benefits and potentially amplifying signal intensity.
Performance Metrics and Backtesting
The indicator includes hidden plots for comprehensive backtesting:
- Individual stock momentum values
- Composite breadth percentage
- S&P 500 Equal Weight momentum
- Relative performance calculations
These metrics enable quantitative strategy development and historical performance analysis.
References
¹Jegadeesh, N., & Titman, S. (1993). Returns to buying winners and selling losers: Implications for stock market efficiency. Journal of Finance, 48(1), 65-91.
Carhart, M. M. (1997). On persistence in mutual fund performance. Journal of Finance, 52(1), 57-82.
Fama, E. F., & French, K. R. (2015). A five-factor asset pricing model. Journal of Financial Economics, 116(1), 1-22.
Wilder, J. W. (1978). New concepts in technical trading systems. Trend Research.
CDP - Counter-Directional-Pivot🎯 CDP - Counter-Directional-Pivot
📊 Overview
The Counter-Directional-Pivot (CDP) indicator calculates five critical price levels based on the previous day's OHLC data, specifically designed for multi-timeframe analysis. Unlike standard pivot points, CDP levels are calculated using a unique formula that identifies potential reversal zones where price action often changes direction.
⚡ What Makes This Script Original
This implementation solves several technical challenges that existing pivot indicators face:
🔄 Multi-Timeframe Consistency: Values remain identical across all timeframes (1m, 5m, 1h, daily) - a common problem with many pivot implementations
🔒 Intraday Stability: Uses advanced value-locking technology to prevent the "stepping" effect that occurs when pivot lines shift during the trading session
💪 Robust Data Handling: Optimized for both liquid and illiquid stocks with enhanced data synchronization
🧮 CDP Calculation Formula
The indicator calculates five key levels using the previous day's High (H), Low (L), and Close (C):
CDP = (H + L + C) ÷ 3 (Central Decision Point)
AH = 2×CDP + H – 2×L (Anchor High - Strong Resistance)
NH = 2×CDP – L (Near High - Moderate Resistance)
AL = 2×CDP – 2×H + L (Anchor Low - Strong Support)
NL = 2×CDP – H (Near Low - Moderate Support)
✨ Key Features
🎨 Visual Elements
📈 Five Distinct Price Levels: Each with customizable colors and line styles
🏷️ Smart Label System: Shows exact price values for each level
📋 Optional Value Table: Displays all levels in an organized table format
🎯 Clean Chart Display: Minimal visual clutter while maximizing information
⚙️ Technical Advantages
🔐 Session-Locked Values: Prices are locked at market open, preventing intraday shifts
🔄 Multi-Timeframe Sync: Perfect consistency between daily and intraday charts
✅ Data Validation: Built-in checks ensure reliable calculations
🚀 Performance Optimized: Efficient code structure for fast loading
💼 Trading Applications
🔄 Reversal Zones: AH and AL often act as strong turning points
💥 Breakout Confirmation: Price movement beyond these levels signals trend continuation
🛡️ Risk Management: Use levels for stop-loss and take-profit placement
🏗️ Market Structure: Understand daily ranges and potential price targets
📚 How to Use
🚀 Basic Setup
Add the indicator to your chart (works on any timeframe)
Customize colors for easy identification of support/resistance zones
Enable the value table for quick reference of exact price levels
📈 Trading Strategy Examples
🟢 Long Bias: Look for bounces at NL or AL levels
🔴 Short Bias: Watch for rejections at NH or AH levels
💥 Breakout Trading: Enter positions when price decisively breaks through anchor levels
↔️ Range Trading: Use CDP as the central reference point for range-bound markets
🎯 Advanced Strategy Combinations
RSI Integration for Enhanced Signals: 📊
📉 Oversold Bounces: Combine RSI below 30 with price touching AL/NL levels for high-probability long entries
📈 Overbought Rejections: Look for RSI above 70 with price rejecting AH/NH levels for short opportunities
🔍 Divergence Confirmation: When RSI shows bullish divergence at support levels (AL/NL) or bearish divergence at resistance levels (AH/NH), it often signals stronger reversal potential
⚡ Momentum Confluence: RSI crossing 50 while price breaks through CDP can confirm trend direction changes
⚙️ Configuration Options
🎨 Line Customization: Adjust width, style (solid/dashed/dotted), and colors
👁️ Display Preferences: Toggle individual levels, labels, and value table
📍 Table Position: Place the value table anywhere on your chart
🔔 Alert System: Get notifications when price crosses key levels
🔧 Technical Implementation Details
🎯 Data Reliability
The script uses request.security() with lookahead settings to ensure historical accuracy while maintaining real-time functionality. The value-locking mechanism prevents the common issue where pivot levels shift during the trading day.
🔄 Multi-Timeframe Logic
⏰ Intraday Charts: Display previous day's calculated levels as stable horizontal lines
📅 Daily Charts: Show current day's levels based on yesterday's OHLC
🔍 Consistency Check: All timeframes reference the same source data
🤔 Why CDP vs Standard Pivots?
Counter-Directional Pivots often provide more accurate reversal points than traditional pivot calculations because they incorporate the relationship between high/low ranges and closing prices more effectively. The formula creates levels that better reflect market psychology and institutional trading behaviors.
💡 Best Practices
💧 Use on liquid markets for most reliable results
📊 RSI Combination: Add RSI indicator for overbought/oversold confirmation and divergence analysis
📊 Combine with volume analysis for confirmation
🔍 Consider multiple timeframe analysis (daily levels on hourly charts)
📝 Test thoroughly in paper trading before live implementation
💪 Example Market Applications
NASDAQ:AAPL AAPL - Tech stock breakouts through AH levels
$NYSE:SPY SPY - Index trading with CDP range analysis
NASDAQ:TSLA TSLA - Volatile stock reversals at AL/NL levels
⚠️ This indicator is designed for educational and analytical purposes. Always combine with proper risk management and additional technical analysis tools.
MACD Histogram on RSI - Hex ColorsThe Moving Average Convergence Divergence ( MACD ) indicator was developed by Gerald Appel in the late 1970s as a tool for identifying changes in momentum, trend strength, and direction in financial markets . Appel designed MACD to provide traders with a clearer view of market trends by comparing two exponential moving averages (EMAs) and their convergence or divergence over time. The indicator became widely popular due to its versatility—it helps traders recognize strong trends while also signaling potential reversals. Over the years, MACD has evolved, with refinements in interpretation and parameter settings, making it a staple in technical analysis. The most impotrtant indications given by MACD are divergences .
MACD divergences are classified into different types based on their strength and reliability in predicting trend reversals . Here are the main classes:
Class A Divergence: This is the strongest type of divergence. It occurs when the price makes a new high (or low), but the MACD fails to confirm it by making a lower high (or higher low). This signals a high probability of trend reversal.
Class B Divergence: In this case, the price forms a double top or double bottom, but the MACD does not reach a new extreme. This suggests a potential reversal but with less certainty compared to Class A.
Class C Divergence: The weakest form of divergence, where the price makes a new high or low, but the MACD forms a pattern similar to a double top or double bottom. This indicates a possible slowdown in momentum rather than a strong reversal.
These divergences help traders assess whether a trend is losing strength and may reverse.
Besides these, there are two other signals that traders should be aware of, viz, ZLR and Shamur signal.
The Zero Line Reject (ZLR) is a concept in MACD analysis where the MACD line approaches the zero line, briefly crosses it, and then reverses direction. This behavior suggests that the trend attempted to shift but failed, reinforcing the prevailing trend. Traders often interpret this as a continuation signal rather than a reversal.
The Shamur Signal , as some traders call it, is a variation of this pattern. It occurs when the MACD line drops below the zero line, rebounds above it, and then resumes its downward movement—or vice versa for bullish setups. This pattern can indicate a false breakout or a temporary shift in momentum before the trend resumes. The key takeaway is that the market attempted to reverse but lacked the strength to sustain the move, making it a potential opportunity for trend traders.
Now let's look at RSI(14) briefly: The Relative Strength Index (RSI) is a widely used momentum oscillator that measures the speed and magnitude of price movements to identify overbought and oversold conditions. Developed by J. Welles Wilder Jr. in 1978, RSI operates on a scale from 0 to 100, with readings above 70 typically indicating an overbought market and readings below 30 signaling an oversold market. Traders use RSI to assess trend strength, spot potential reversals, and confirm price movements. While effective in ranging markets, RSI can also be adapted with divergence analysis and dynamic thresholds to enhance its predictive power.
Now, the question arises why do we use an indicator on indicator?
Using indicator-on-indicator analysis enhances traditional technical indicators by applying secondary calculations to their values, unlocking deeper insights into market behavior. This method offers several advantages:
Refined Signal Filtering – Applying an indicator to another indicator smooths out noise, helping traders avoid false signals and focus on meaningful market trends. For example, using MACD on RSI can reveal momentum shifts that standard RSI alone might overlook.
Multi-Layered Confirmation – Instead of relying on a single indicator, traders get a more nuanced view of price movements. Secondary indicators reinforce decisions, improving accuracy in identifying trend strength and reversals.
Adaptive Market Analysis – Different market environments require different tools. Indicator-on-indicator techniques allow traders to fine-tune strategies based on changing volatility and momentum conditions rather than relying on static thresholds.
Creative Customization – Traders can mold indicators to fit their specific market approach. Whether refining entries/exits or detecting trend exhaustion, these hybrid setups provide tailored insights beyond conventional methods.
This approach is particularly useful for momentum and trend-based trading, offering a more dynamic perspective that adapts to price action in a way traditional indicators cannot.
What are the potential shortcomings of such an approach?
While indicator-on-indicator analysis can refine signals and enhance decision-making, it also comes with several drawbacks that traders should consider:
Lagging Effect – Since indicators are already derivatives of price action, stacking them introduces additional delays in responsiveness. This can lead to late entries or exits, reducing a strategy’s effectiveness in fast-moving markets.
Over-Filtering Signals – Applying an indicator to another can smooth out noise, but it may also suppress valuable early signals. Traders may miss key turning points if too much filtering dilutes the raw market momentum.
Complex Interpretation – Standard indicators have well-defined thresholds and behaviors, but once modified by another indicator, they can become harder to interpret. Traders may struggle to adapt existing strategies or find reliable patterns.
Reduced Versatility – Some hybrid indicators work well in specific market conditions but lose their edge in others. This dependency on particular trends or volatility levels can make a strategy less adaptable.
Potential Redundancy – If indicators are not chosen wisely, layering them may lead to excessive confirmation bias, where multiple indicators show similar information without providing any new insights.
While indicator-on-indicator techniques can refine analysis, careful calibration is required to balance precision with practicality.
The MACD on RSI Indicator merges two powerful momentum-based indicators, offering deeper insights into trend dynamics and market strength . By applying the MACD calculation to the RSI values instead of price, traders can detect subtle shifts in momentum that might be overlooked by traditional MACD or RSI alone.
This hybrid approach enhances trend confirmation , allowing traders to gauge whether RSI’s momentum aligns with MACD's trend direction. It helps in early signal detection , potentially revealing trend shifts before they appear on conventional setups. Additionally, it reduces false signals by filtering RSI fluctuations, making MACD more reactive to meaningful changes in strength rather than short-term noise.
By combining these indicators, traders can refine entries and exits based on momentum divergences, zero-line behaviors, and shifts in trend acceleration. The MACD on RSI setup is particularly useful in identifying trend exhaustion and continuation signals, making it a valuable tool in both ranging and trending markets.
I have primarily used this indicator to spot hidden divergences. So what are they?
Hidden divergences , sometimes referred to as reverse divergences , are a powerful yet often overlooked concept in technical analysis. Unlike regular divergences, which signal potential trend reversals, hidden divergences indicate trend continuation —suggesting that the prevailing trend is likely to persist despite temporary price fluctuations.
Hidden divergences occur when the price makes a higher low in an uptrend or a lower high in a downtrend, while the oscillator (such as RSI, MACD, or Stochastic) forms a lower low or higher high, respectively. This discrepancy suggests that momentum is still strong in the direction of the trend, even though price action may appear to weaken momentarily.
Types of Hidden Divergences
---------------------------------------------------------
Hidden Bullish Divergence: Price forms a higher low, but the oscillator prints a lower low. This signals that the uptrend remains intact and is likely to continue.
Hidden Bearish Divergence: Price forms a lower high, but the oscillator prints a higher high. This suggests that the downtrend is still dominant and likely to persist.
Why Hidden Divergences Matter
Hidden divergences are particularly useful for trend-following traders, as they provide early confirmation that a trend is still strong despite minor pullbacks. They help traders avoid premature exits and reinforce confidence in holding positions longer. Additionally, hidden divergences can serve as entry signals, allowing traders to position themselves in the direction of the trend before a new wave of momentum unfolds.
Key Considerations
While hidden divergences are valuable, they should not be used in isolation. Combining them with support/resistance levels, volume analysis, and price action confirmation enhances their reliability. Additionally, they tend to work best in strong trending markets, where momentum indicators align with price direction.
By mastering hidden divergences, traders can refine their ability to ride trends effectively, reducing the risk of exiting too soon or misinterpreting temporary pullbacks as reversals.
In my trading, I have used this indicator since 2009. My general aim is to make it available to all my friends. If you are using it, you are also my friend. So happy trading.
Momentum Flip Pro - Advanced ZigZag Trading SystemMomentum Flip Pro - Advanced ZigZag Trading System
Complete User Guide
📊 What This Indicator Does
The Momentum Flip Pro is an advanced position-flipping trading system that automatically identifies trend reversals using ZigZag patterns combined with momentum analysis. It's designed for traders who want to always be in the market, flipping between long and short positions at optimal reversal points.
Key Features:
Automatically flips positions at each ZigZag reversal point
Dynamic stop loss placement at exact ZigZag levels
Real-time trading dashboard with performance metrics
Capital tracking and ROI calculation
Three momentum engines to choose from
🎯 How It Works
Entry Signal: When a ZigZag point appears (circle on chart), the indicator:
Exits current position (if any)
Immediately enters opposite position
Places stop loss at the exact ZigZag price
Exit Signal: Positions are closed when the next ZigZag appears, then immediately reversed
Position Management:
Long Entry: ZigZag bottom (momentum turns UP)
Short Entry: ZigZag peak (momentum turns DOWN)
Stop Loss: Always at the ZigZag entry price
Take Profit: Next ZigZag point (automatic position flip)
⚙️ Recommended Settings
For Day Trading (5m-15m timeframes):
Momentum Engine: Quantum
- RSI Length: 9-12
- Quantum Factor: 3.5-4.0
- RSI Smoothing: 3-5
- Threshold: 8-10
For Swing Trading (1H-4H timeframes):
Momentum Engine: MACD
- Fast Length: 12
- Slow Length: 26
- Signal Smoothing: 9
- MA Type: EMA
For Position Trading (Daily):
Momentum Engine: Moving Average
- Average Type: EMA or HMA
- Length: 20-50
📈 How to Use for Trading
Add to Chart:
Add indicator to your chart
Set your starting capital
Choose your preferred momentum engine
Understanding Signals:
Green circles: Strong bullish momentum reversal
Red circles: Strong bearish momentum reversal
Purple circles: Normal momentum reversal
Entry labels: Show exact entry points with tooltips
Trading Rules:
Enter LONG when you see an up arrow + green/purple circle
Enter SHORT when you see a down arrow + red/purple circle
Stop loss is automatically at the ZigZag level
Hold until next ZigZag appears (exit + reverse)
Risk Management:
Risk per trade = Entry Price - Stop Loss
Position size = (Capital * Risk %) / Risk per trade
Recommended risk: 1-2% per trade
💡 Best Practices
Market Conditions:
Works best in trending markets
Excellent for volatile pairs (crypto, forex majors)
Avoid during low volume/consolidation
Timeframe Selection:
Lower timeframes (5m-15m): More signals, higher noise
Higher timeframes (1H+): Fewer signals, higher reliability
Sweet spot: 15m-1H for most traders
Momentum Engine Selection:
Quantum: Best for volatile markets (crypto, indices)
MACD: Best for trending markets (forex, stocks)
Moving Average: Best for smooth trends (commodities)
📊 Dashboard Interpretation
The trading dashboard shows:
Current Capital: Your running balance
Position: Current trade direction
Entry/Stop: Your risk levels
Statistics: Win rate and performance
ROI: Overall return on investment
⚠️ Important Notes
Always Active: This system is always in a position (long or short)
No Neutral: You're either long or short, never flat
Automatic Reversal: Positions flip at each signal
Stop Loss: Fixed at entry ZigZag level (doesn't trail)
🎮 Quick Start Guide
Beginners: Start with default settings on 1H timeframe
Test First: Use paper trading to understand the signals
Small Size: Begin with 1% risk per trade
Track Results: Monitor the dashboard statistics
Adjust: Fine-tune momentum settings based on results
🔧 Customization Tips
Color Signals: Enable to see momentum strength
Dashboard Position: Move to preferred screen location
Visual Settings: Adjust colors for your theme
Alerts: Set up for automated notifications
This indicator is ideal for traders who prefer an always-in-market approach with clear entry/exit rules and automated position management. The key to success is choosing the right momentum engine for your market and maintaining disciplined risk management.
SROC AngleThe SRCO Angle Oscillator is a technical indicator that normalizes the data from the Stochastic Relative Change Oscillator (SRCO). By transforming the SRCO's output into an angular representation, this oscillator provides a clearer, bounded view of price momentum and relative change, making it easier for traders and analysts to identify overbought/oversold conditions and potential trend reversals within a normalized range. This normalization helps to reduce the choppiness often seen in raw oscillator data, offering a smoother and more interpretable signal.
Open Interest-RSI + Funding + Fractal DivergencesIndicator — “Open Interest-RSI + Funding + Fractal Divergences”
A multi-factor oscillator that fuses Open-Interest RSI, real-time Funding-Rate data and price/OI fractal divergences.
It paints BUY/SELL arrows in its own pane and directly on the price chart, helping you spot spots where crowd positioning, leverage costs and price action contradict each other.
1 Purpose
OI-RSI – measures conviction behind position changes instead of price momentum.
Funding Rate – shows who pays to hold positions (longs → bull bias, shorts → bear bias).
Fractal Divergences – detects HH/LL in price that are not confirmed by OI-RSI.
Optional Funding filter – hides signals when funding is already extreme.
Together these elements highlight exhaustion points and potential mean-reversion trades.
2 Inputs
RSI / Divergence
RSI length – default 14.
High-OI level / Low-OI level – default 70 / 30.
Fractal period n – default 2 (swing width).
Fractals to compare – how many past swings to scan, default 3.
Max visible arrows – keeps last 50 BUY/SELL arrows for speed.
Funding Rate
mode – choose FR, Avg Premium, Premium Index, Avg Prem + PI or FR-candle.
Visual scale (×) – multiplies raw funding to fit 0-100 oscillator scale (default 10).
specify symbol – enable only if funding symbol differs from chart.
use lower tf – averages 1-min premiums for smoother intraday view.
show table – tiny two-row widget at chart edge.
Signal Filter
Use Funding filter – ON hides long signals when funding > Buy-threshold and short signals when funding < Sell-threshold.
BUY threshold (%) – default 0.00 (raw %).
SELL threshold (%) – default 0.00 (raw %).
(Enter funding thresholds as raw percentages, e.g. 0.01 = +0.01 %).
3 Visual Outputs
Sub-pane
Aqua OI-RSI curve with 70 / 50 / 30 reference lines.
Funding visualised according to selected mode (green above 0, red below 0, or other).
BUY / SELL arrows at oscillator extremes.
Price chart
Identical BUY / SELL arrows plotted with force_overlay = true above/below candles that formed qualifying fractals.
Optional table
Shows current asset ticker and latest funding value of the chosen mode.
4 Signal Logic (Summary)
Load _OI series and compute RSI.
Retrieve Funding-Rate + Premium Index (optionally from lower TF).
Find fractal swings (n bars left & right).
Check divergence:
Bearish – price HH + OI-RSI LH.
Bullish – price LL + OI-RSI HL.
If Funding-filter enabled, require funding < Buy-thr (long) or > Sell-thr (short).
Plot arrows and trigger two built-in alerts (Bearish OI-RSI divergence, Bullish OI-RSI divergence).
Signals are fixed once the fractal bar closes; they do not repaint afterwards.
5 How to Use
Attach to a liquid perpetual-futures chart (BTC, ETH, major Binance contracts).
If _OI or funding series is missing you’ll see an error.
Choose timeframe:
15 m – 4 h for intraday;
1 D+ for swing trades.
Lower TFs → more signals; raise Fractals to compare or use Funding filter to trim noise.
Trade checklist
Funding positive and rising → longs overcrowded.
Price makes higher high; OI-RSI makes lower high; Funding above Sell-threshold → consider short.
Reverse logic for longs.
Combine with trend filter (EMA ribbon, SuperTrend, etc.) so you fade only when price is stretched.
Automation – set TradingView alerts on the two alertconditions and send to webhooks/bots.
Performance tips
Keep Max visible arrows ≤ 50.
Disable lower-TF premium aggregation if script feels heavy.
6 Limitations
Some symbols lack _OI or funding history → script stops with a console message.
Binance Premium Index begins mid-2020; older dates show na.
Divergences confirm only after n bars (no forward repaint).
7 Changelog
v1.0 – 10 Jun 2025
Initial public release.
Added price-chart arrows via force_overlay.
Zero Lag MACD + Kijun-sen + EOM StrategyThis strategy offers a robust approach to identifying high-probability trading opportunities in the fast-paced cryptocurrency markets, particularly on lower timeframes (e.g., 5-minute). It leverages the synergistic power of three distinct indicators to confirm entries, ensuring a disciplined approach to risk management.
Key Components:
Zero Lag MACD Enhanced Version 1.2: This core momentum indicator is used to identify precise shifts in trend and momentum, offering reduced lag compared to traditional MACD. Entry signals are filtered based on the histogram's position (below for buys, above for sells) to enhance signal reliability.
Kijun-sen (Ichimoku Cloud): Acting as a dynamic support/resistance and trend filter, the Kijun-sen line confirms the prevailing market direction. Long entries are confirmed when price is above Kijun-sen, and short entries when price is below.
Ease of Movement (EoM): This volume-based oscillator provides crucial confirmation of price movements by measuring the ease with which price changes. Positive EoM confirms buying pressure, while negative confirms selling pressure, adding an essential layer of validation to trade setups.
How it Works:
The strategy generates entry signals only when all three indicators align simultaneously:
For Long Entries: A Zero Lag MACD buy signal (crossover below histogram) must coincide with price trading above the Kijun-sen, and the Ease of Movement indicator being above its zero line.
For Short Entries: A Zero Lag MACD sell signal (crossover above histogram) must coincide with price trading below the Kijun-sen, and the Ease of Movement indicator being below its zero line.
Entries are executed at the open of the candle immediately following the signal confirmation.
Risk Management:
Disciplined risk management is paramount to this strategy:
Dynamic Stop-Loss: An Average True Range (ATR) based stop-loss is implemented, set at 2.5 times the current ATR. This adapts the stop-loss distance to market volatility, ensuring sensible risk sizing.
Fixed Take-Profit: A consistent Risk-to-Reward (R:R) ratio of 1:1.2 is applied for all trades, promoting stable profit realization.
Customization & Optimization:
The strategy is built with fully customizable input parameters for each indicator (MACD lengths, Kijun-sen period, ATR period, ATR multiplier, and Risk-to-Reward ratio). This allows users to fine-tune the strategy for different assets, timeframes, and market conditions, facilitating robust backtesting and optimization.
Disclaimer: Trading involves substantial risk and is not suitable for all investors. Past performance is not indicative of future results. This strategy is provided for educational and informational purposes only. Always use proper risk management and conduct your own due diligence.