Index Top 5 Heavyweight Analyzer## 🎯 Overview
This advanced Pine Script indicator applies the **Pareto Principle** to Nifty 50 trading: the top 5 heavyweights control 40%+ of the index's movement. Instead of watching all 50 stocks, this tool monitors the "Kings" that actually drive the index direction.
Professional traders don't trade the index in isolation - they look "under the hood" at heavyweight constituents. This indicator does exactly that, providing real-time analysis of HDFC Bank, Reliance, ICICI Bank, Bharti Airtel, and TCS to predict Nifty movements before they happen.
## 🔥 Key Features
### 1️⃣ Four-Quadrant OI Cycle Analysis
Identifies which cycle each heavyweight is in using Open Interest from continuous futures contracts:
- **Long Buildup** (Price ↑ + OI ↑): Institutions buying aggressively → Bullish driver
- **Short Covering** (Price ↑ + OI ↓): Bears trapped and exiting → Fast bullish spike
- **Short Buildup** (Price ↓ + OI ↑): Big money shorting → Bearish drag
- **Long Unwinding** (Price ↓ + OI ↓): Buyers giving up → Index weakness
### 2️⃣ Alignment Score System
Counts how many of the top 5 stocks are bullish/bearish/neutral. When 3+ heavyweights align in the same direction with sufficient weightage (15%+), the indicator generates high-conviction trade signals for the Nifty index.
### 3️⃣ Cost of Carry (Basis) Analysis
Compares Future vs Spot prices to gauge institutional sentiment:
- **Rising Premium**: Aggressive institutional buying
- **Discount (Backwardation)**: Extreme bearishness
### 4️⃣ Divergence Detection
Warns when the index move contradicts heavyweight signals - identifying "fake moves" that professional traders fade.
### 5️⃣ Actionable Trade Signals
- **Strong Bullish**: Buy Index Calls / Long Nifty Future
- **Strong Bearish**: Buy Index Puts / Short Nifty Future
- **Neutral/Choppy**: Iron Condor / Avoid Directional trades
## 📈 What Makes This Different?
Unlike basic index indicators, this tool:
- Fetches real Open Interest data from continuous futures (RELIANCE1!, HDFCBANK1!, etc.)
- Applies weighted analysis - top 3 stocks matter most
- Provides professional trade recommendations based on constituent alignment
- Uses dark theme optimized colors for extended screen time
- Displays comprehensive dashboard with price, OI, OI change %, cycle status, and basis
## 💡 How to Use
1. **Add to any Nifty 50 or Bank Nifty chart**
2. **Watch the dashboard** in the top-right corner showing all 5 heavyweights
3. **Check the ALIGNMENT row**:
- 🔼 Bull Count | 🔽 Bear Count | ➖ Neutral Count
- Weighted Bull/Bear scores
4. **Read the INDEX SIGNAL row** for trade recommendations
5. **Look for divergence warnings** (⚠️) indicating fake moves
6. **Use the histogram plot** to visualize signal strength over time
## ⚙️ Customizable Settings
- **Constituents**: Modify ticker symbols and weightages
- **Signal Thresholds**: Adjust minimum alignment required (default: 3 out of 5)
- **Display Options**: Toggle table, signals, and basis calculations
- **Timeframe**: Works on all timeframes (intraday and daily)
## 🎨 Dark Theme Optimized
Designed specifically for TradingView's dark mode with:
- High-contrast colors that reduce eye strain
- Bright lime green (#00E676) for bullish signals
- Bright red (#FF5252) for bearish signals
- Electric colors for easy pattern recognition
## 📊 Best Used For
- **Nifty 50 Options Trading**: Know whether to buy calls or puts
- **Index Futures Trading**: Identify high-probability directional moves
- **Risk Management**: Avoid trading when heavyweights show divergence
- **Market Timing**: Enter when top stocks align (3+ in same direction)
## 🚀 Pro Tips
- **"Double Engine" Signal**: When Reliance shows Long Buildup AND HDFC Bank shows Short Covering → Extremely bullish for Nifty
- **Sector Rotation**: If Banks are strong but Tech is weak (or vice versa) → Expect choppy, range-bound index
- **Rollover Analysis**: Near expiry, watch for high OI with rising basis → Bulls/Bears carrying positions forward with confidence
## ⚠️ Important Notes
- Requires TradingView Premium for multiple `request.security()` calls
- OI data available only for stocks with active futures
- Best used on NSE exchange during market hours
- Combine with your own risk management strategy
## 📝 Credits
Based on professional institutional trading methodologies that analyze index constituents rather than the index itself. Implements the Pareto Principle: focus on the 20% (top 5 stocks) that drives 80% of the index movement.
***
## 🔔 Alerts Available
- Strong Bullish Signal (3+ stocks aligned bullish)
- Strong Bearish Signal (3+ stocks aligned bearish)
- Divergence Warning (fake index moves)
**Made for serious traders who want to trade like institutions - by watching what the "smart money" is doing in the heavyweights.**
***
*Optimize your Nifty trading by monitoring the stocks that actually matter. Stop watching all 50 - focus on the 5 Kings!* 👑
***
**Tags**: Nifty, Open Interest, OI Analysis, Heavyweight Analysis, Index Trading, Options Trading, Futures Trading, Institutional Analysis, Smart Money, Pareto Principle
אינדיקטורים ואסטרטגיות
All-in-One (PHT)All-in-One (PHT) — Modular Multi-Tool Market Analyzer (Pine Script v6)
All-in-One (PHT) is a complete, modular market-analysis toolkit designed for traders who want clean, reliable, and professional-grade charting - in a single indicator.
Built using Pine Script® v6 and structured with reusable PHT-Libraries (EMA Band, Bollinger Band, Fractal, Session), this indicator delivers clarity, precision, and consistent performance across all markets and timeframes.
Unlike traditional indicators that mix logic and visuals, AIO (PHT) uses a fully modular architecture. All calculations come from dedicated libraries, and this main script focuses purely on visual output and clean plotting.
This ensures:
Stable plot references
Zero repainting in all included modules
High performance even with complex overlays
Easy extensibility for future upgrades
🔥 Included Modules
1. EMA Band (PHT Library)
A triple-EMA band designed for trend clarity and structure.
Provides:
EMA of High
EMA of Close
EMA of Low
Band fill visualization
Ideal for identifying trend strength, momentum pockets, and mean-reversion zones.
2. Bollinger Band Suite
A complete Bollinger framework with:
SMA / EMA / WMA midline options
Dual standard-deviation envelopes
Multi-zone band fills (upper, middle, lower)
User-controlled visibility for each layer
Perfect for volatility detection, squeeze identification, and precision envelope trading.
3. Fractal Engine (High/Low Pivots)
Fast, reliable fractal detection using user-defined left/right periods.
Features:
Pivot Highs & Pivot Lows
Multiple marker sizes (Tiny → Large)
Zero-lag plotting with proper offset handling
Useful for swing structure, breakout confirmation, and automated level marking.
4. Market Session Tracker
A powerful session-mapping module that visually highlights market sessions with:
Dynamic session boxes
High & Low markers
Persistent historical sessions
Auto-managed labels, lines, and live updates
Timezone-aware session boundaries (supports IANA zones)
Designed for identifying daily ranges, session liquidity, volatility pockets, and market timing.
🧠 Why This Indicator Is Different
Most “all-in-one” tools mix plotting, logic, and calculations in a single heavy script, causing lag, reference instability, and repainting issues.
All-in-One (PHT) solves this by using a Pine v6 library architecture:
Each component is computed in its own library
The main script handles only visuals
No hidden code, no repainting tricks
Maximum clarity and maintainability
This design mirrors professional software architecture:
clear separation of logic, visuals, and user interface.
🎯 Ideal For
Trend traders
Scalpers & intraday traders
Swing and positional traders
Volatility analysts
Structure-based price action traders
Anyone who wants multiple high-quality tools in one clean indicator
Whether you analyze markets manually or build algorithmic systems, AIO (PHT) provides a solid foundation.
⚙️ Features at a Glance
Fully modular Pine v6 design
Complete EMA band engine
Advanced Bollinger band system (multi-deviation, multi-fill)
Configurable fractal high/low markers
Smart session boxing with history
Clean visuals and transparent settings
No repainting
Fully customizable colors & visibility
Optimized for performance
💡 How to Use
Choose the modules you want to display (EMA, BB, Fractals, Sessions).
Adjust lengths, deviations, or fractal periods as per your trading style.
Use session boxes to understand volatility timing.
Combine bands + fractals for advanced structure-based decisions.
The indicator is designed to overlay on price for maximum clarity.
🚀 Future Upgrades
The PHT framework supports smooth future expansion. Planned modules include:
ATR/volatility engines
Trend switches
Supertrend/Donchian plugins
Volume profile extensions
Updates will remain backward compatible across all modules.
⭐ Summary
All-in-One (PHT) is not just another overlay — it’s a complete multi-tool trading framework built using professional engineering practices in Pine Script v6.
If you want cleaner charts, smarter signals, and a high-performance modular system, this indicator gives you everything in one reliable package.
SFP + TP/SL + WT JSON BOT (Touch/Return)Smart Reversal Engine with Automated TP/SL & WunderTrading Integration
This invite-only indicator is designed for traders seeking highly responsive reversal detection and fully automated execution.
It combines multiple market conditions into a single confirmation system that identifies high-probability turning points with minimal delay.
The tool provides:
🔷 Key Features
✔ Real-time reversal detection
Signals are generated the moment specific market conditions align—no need to wait for candle closures.
This allows extremely early entries with minimal lag.
✔ Auto-calculated TP/SL levels
Profit-taking and protection levels are dynamically generated based on market structure.
Visual TP/SL lines appear directly on the chart for clarity.
✔ Backtesting suite
Last N trades statistics
Monthly performance summary (last 4 months)
Estimated PnL based on user-defined capital & leverage
On-chart TP/SL markers
Everything updates automatically as new signals appear.
✔ Fully automated execution through WunderTrading
When enabled, the indicator automatically sends structured JSON alerts compatible with WT bots:
Enter Long
Enter Short
Exit All
Including:
Market orders
Position size based on your capital settings
Exchange-level TP/SL placement
This allows the chart signals to translate directly into live trading actions.
🔷 Customization
Users can freely adjust:
Entry behavior mode
TP/SL model
Capital allocation
Leverage settings
Backtest window
Without exposing or modifying the underlying logic.
🔷 Notes
This script does not repaint after confirmation.
Real-time signals may update during candle formation (normal for intrabar processing).
Strategy logic is proprietary and not disclosed.
Access is invite-only.
If you would like access, contact me directly through TradingView messages.
Setup guide and WT integration instructions are provided for all subscribers.
智能反转引擎(Smart Reversal Engine)+ 自动 TP/SL + WunderTrading 全自动交易接口
这是一个 邀请制(Invite-Only) 指标,专为追求高响应性反转信号、自动化交易执行的用户打造。
它将多重市场条件整合成统一的判定系统,在极短延迟下识别潜在的高概率转折点。
不会披露策略逻辑、指标原理或内部结构。
🔷 主要功能
✔ 实时反转信号(无需等待收线)
当关键市场条件同时满足时,系统会即时给出提醒。
适用于希望提前布局、减少延迟的交易者。
✔ 自动计算 TP / SL
止盈/止损根据市场位置自动生成,图表上清晰显示,仅需跟随即可。
无需手动测量价格距离。
✔ 完整回测统计系统
最近 N 笔交易统计
最近 4 个月月度表现
根据本金与杠杆估算的 PnL
每一笔 TP / SL 自动打标
所有统计数据均实时更新。
✔ 完整支持 WunderTrading 全自动下单
启用后可自动发送结构化 JSON 信号,包括:
开多
开空
全部平仓
并自动附带:
市价单
依照用户设置的手数 / 杠杆
交易所级别 TP / SL 挂单
实现从图表信号 → 自动交易执行的全流程自动化。
🔷 自定义设置
你可以自由调整:
入场模式
TP/SL 比例
本金
杠杆
回测窗口长度
无需触碰或理解核心逻辑。
🔷 注意事项
指标在信号确认后不会重绘
实时信号在未收线时可能动态变化(属正常现象)
核心算法为私有内容,不会公开
采用 Invite-Only 授权方式
MACD° by ClearView LabsMomentum trend indicator with clean, minimalist design. Wine/forest green color scheme. Dashboard displays momentum direction and zero-line position.
BB & MTF EMAs + DPOC/WPOCDescription:
This indicator combines multiple trend and support/resistance tools into a single overlay with specific customization for the Indian Standard Time (IST) session.
Features Included:
Bollinger Bands: 20-period SMA Basis, 1.5 StdDev.
4 Multi-Timeframe EMAs:
EMA 1: 9 Length (1m timeframe)
EMA 2: 20 Length (3m timeframe)
EMA 3: 50 Length (15m timeframe)
EMA 4: 200 Length (15m timeframe)
Session POCs (IST):
Daily POC (DPOC): Calculated 05:30-05:29 IST. Extends for full 24h session.
Weekly POC: Calculated from Monday 05:30 IST Open. Extends for full 7-day week.
Controls:
Toggle visibility for all individual components.
"Show Historical" toggle for pivots to see past levels or keep charts clean.
Stoch° by ClearView LabsStochastic oscillator with clean, minimalist design. Wine/black color scheme. Dashboard shows current K value and zone status (Overbought >80, Oversold <20, Neutral).
Magic Equity Trend & PivotsMagic Equity Trend & Pivots is a robust technical analysis engine designed specifically for equity and index traders. It serves as a comprehensive "Trend & Level" companion, combining institutional Pivot Points with a proprietary EMA trend filtering system to identify high-probability setups.
How the Magic Works
This indicator simplifies complex market data into a clear visual workflow:
1. The Magic Equity Trend (Trend Identification) The script uses a weighted system to determine the dominant market direction:
Bullish Trend: Price holds above the primary Trend SMA + a Volatility Buffer (Green Zone).
Bearish Trend: Price is rejected below the Trend SMA - Buffer (Red Zone).
No-Trade Zone: When the price is trapped inside the buffer (Gray Channel), the trend is considered weak or ranging.
2. Institutional Pivot Points Price often reacts at hidden levels. This tool calculates and overlays these levels automatically:
Multi-Type Support: Choose between Traditional, Fibonacci, Woodie, Classic, DM, and Camarilla pivots.
Timeframe Smart-Switching: Use fixed timeframes (e.g., Weekly Pivots on a Daily chart) or let the "Auto" mode decide the best reference period for your current view.
Historical Mode: Unlike standard pivots, these can be back-tested visually to see how prices respected levels in the past.
3. Precision Entry & Exit Logic Trade signals are not random; they are based on a strict confluence of "Magic" factors:
Entry Signal: Requires Trend Alignment + Fast/Slow EMA Crossover + RSI Strength (>60) + Relative Volume Spike.
Top-Up (Add-on): Detects low-risk opportunities to add to a position when price pulls back to the EMA10/20 during a strong trend.
Two-Stage Exit: Secures profits using either an ATR Trailing Stop or an Intraday RSI Breakdown, depending on your settings.
4. Divergence & Momentum
RSI Divergence: Automatically plots Regular Bullish and Bearish divergences to warn of potential reversals at tops or bottoms.
Darvas Boxes: Visualizes consolidation ranges to help identify breakouts.
5. Performance Dashboard A data table provides a snapshot of the asset's health:
Mean Reversion: Measures the % distance from key EMAs (10, 20, 50).
RVOL & ADR: Displays Relative Volume and Average Daily Range to gauge volatility.
Performance Tracker: A theoretical summary table showing how the trend signals have performed over the last 1W, 1M, and 1Y periods.
Settings & Customization
Visuals: Fully customizable colors for the Trend Cloud, Pivots, and Backgrounds.
Filters: Toggle specific filters (Volume, RSI, Trend Buffer) to adapt the sensitivity to different asset classes.
Disclaimer: This tool is for educational purposes and technical analysis assistance only. Past performance displayed in the dashboard does not guarantee future results.
ClearView Structure° by ClearViewLabsClearView Structure is a comprehensive market structure indicator that identifies key swing points, structural breaks, and imbalance zones in real-time.
Features:
Swing Structure Detection – Automatically identifies and labels swing highs/lows (HH, HL, LH, LL) to determine market bias
CISD Lines – Plots Change in State of Delivery levels that signal confirmed structural shifts
Fair Value Gaps (FVG) – Detects bullish and bearish imbalances with multi-timeframe support
Inverse FVG (iFVG) – Identifies when FVGs get invalidated and flip polarity
Volume Imbalance (VI) – Highlights gaps between candle bodies across timeframes
Real-time Dashboard – Displays current bias, internal direction, and distance to key levels
Customizable Alerts – Get notified on FVG approach, iFVG formation, and VI detection
Use Cases:
Ideal for traders who use price action and smart money concepts to identify trend direction, potential reversal zones, and high-probability entry areas.
Magic Swing Suite: Trend, Pullback & Risk DashboardMagic Swing Suite: Trend, Pullback & Risk Dashboard
This indicator is a complete Swing Trading System designed to identify high-probability trend continuation setups. It combines classic trend-following principles with a unique "3-Bar Retest" logic and provides a real-time Strategy Dashboard to help you manage positions without needing a separate strategy script.
How it Works:
The system looks for a "Confluence" of factors before generating a signal. It scores every bar out of 140 points based on the following criteria:
Trend Alignment: Price must be above EMA 10, and EMA 10 must be above EMA 20.
Momentum (RSI): RSI must be in the "Bullish Control Zone" (60-80) and above its SMA.
Volume: Volume must be significantly higher than the average (1.5x by default).
The "Magic" Retest: The script checks the last 2-5 bars to see if the price has pulled back to "kiss" the EMA 10. This ensures we are buying a dip in a trend, not chasing a top.
Breakout Confirmation: Checks for Darvas Box breakouts and price position relative to Pivot R1.
Features:
🎯 Virtual Strategy Dashboard: A table that mimics a strategy tester. It tracks Entry, Stop Loss (Trailing), Target 1, and Target 2 in real-time.
📊 Confluence Scorecard: A detailed table showing exactly why a signal was (or wasn't) generated (Trend, Retest, RSI, Volume, etc.).
🛡️ Risk Management: automatically calculates a Trailing Stop (EMA 10) and fixed Risk:Reward targets based on recent highs.
📉 Multi-Layered Overlays: Includes Auto-Pivots (Traditional, Fib, Woodie, etc.) and Darvas Boxes to identify support/resistance levels.
How to Use:
Wait for a Signal:
"FULL BUY SIGNAL" (Green): All conditions are met, including a recent retest of the EMA. This is the highest probability setup.
"BUY - NO RETEST" (Orange): Trend and momentum are strong, but price hasn't pulled back recently. Use caution, as this may be a breakout trade.
Monitor the Dashboard: Once a trade is active, the dashboard will change to "IN POSITION." Follow the "Action" row.
If the trend weakens, the Trailing Stop (EMA 10) will move up to protect profits.
Targets:
T1: Previous Swing High (or 5% if no high found).
T2: 1:1.6 Risk/Reward extension.
Settings:
Volume Spike Factor: Adjust how much volume is needed to confirm a move. Default is 1.2.
Retest Tolerance: Adjust how close the price needs to get to the EMA 10 to count as a "retest."
Dashboard Toggles: You can hide the tables if you prefer a clean chart.
Pivot Timeframes: customizable lookback for S/R levels.
FAQ:
Does this repaint?
No. All signals trigger only on confirmed bars.
Can I use this intraday?
Yes. Works great from 5m to 1D.
Are exits manual or automated?
The indicator tracks SL, T1, and T2, and marks them on the chart.
Does retest affect the buy signal?
Retest is optional. The buy logic does not require it, but adds weight to the score.
Disclaimer: This tool is for educational purposes only. The "Strategy Dashboard" is a simulation based on script calculations and does not execute real trades. Always manage your own risk.
LPC Rebate HunterLPC Rebate Hunter Version 1.3.5
From Static to Dynamic Momentum: Replaced the rigid RSI filter with a Multi-Engine Oscillator (WaveTrend, MFI, or RSI), allowing for smoother cycle detection.
From "Pivots" to "Smart Structure": The liquidity engine now detects Swing Failure Patterns (SFP)—identifying when price "pokes" a level to trap traders before reversing—and automatically cleans up mitigated zones.
Choppy Market Protection: Added an ADX (Average Directional Index) integration to strictly filter out signals during flat/sideways markets.
Risk Management Layer: Introduced a Smart Trailing Stop (ATR-based Chandelier Exit) to help traders manage active positions objectively.
Visual Overhaul: Features a modern gradient trend cloud and a fully adaptive "Heads-Up Display" (HUD) that provides real-time market stats.
Regime MapRegime Map — Volatility State Detector
This indicator is a PineScript friendly approximation of a more advanced Python regime-analysis engine.
The original backed identifies market regimes using structural break detection, Hidden-Markov Models, wavelet decomposition, and long-horizon volatility clustering. Since Pine Script cannot execute these statistical models directly, this version implements a lightweight, real-time proxy using realised volatility and statistical thresholds.
The purpose is to provide a clear visual map of evolving volatility conditions without requiring any heavy offline computation.
________________________________________
Mathematical Basis: Python vs Pine
1. Volatility Estimation
Python (Realised Volatility):
RVₜ = √N × stdev( log(Pₜ) − log(Pₜ₋₁) )
Pine Approximation:
RVₜ = stdev( log(Pₜ) − log(Pₜ₋₁), lookback )
Rationale:
Realised volatility captures volatility clustering — a key characteristic of regime transitions.
________________________________________
2. Regime Classification
Python (HMM Volatility States):
Volatility is modelled as belonging to hidden states with different means and variances:
State μ₁, σ₁
State μ₂, σ₂
State μ₃, σ₃
with state transitions determined by a probability matrix.
Pine Approximation (Z-Score Regimes):
Zₜ = ( RVₜ − mean(RV) ) / stdev(RV)
Regime assignment:
• Regime 0 (Low Vol): Zₜ < Zₗₒw
• Regime 1 (Normal): Zₗₒw ≤ Zₜ ≤ Zₕᵢgh
• Regime 2 (High Vol): Zₜ > Zₕᵢgh
Rationale:
Z-scores provide clean statistical boundaries that behave similarly to HMM state separation but are computable in real time.
________________________________________
3. Structural Break Detection vs Rolling Windows
Python (Bai–Perron Structural Breaks):
Segments the volatility series into periods with distinct statistical properties by minimising squared error over multiple regimes.
Pine Approximation:
Rolling mean and rolling standard deviation of volatility over a long window.
Rationale:
When structural breaks are not available, long-window smoothing approximates slow regime changes effectively.
________________________________________
4. Multi-Scale Cycles
Python (Wavelet Decomposition):
Volatility decomposed into long-cycle (A₄) and short-cycle components (D bands).
Pine Approximation:
Single-scale smoothing using long-horizon averages of RV.
Rationale:
Wavelets reveal multi-frequency behaviour; Pine captures the dominant low-frequency component.
________________________________________
Indicator Output
The background colour reflects the active volatility regime:
• Low Volatility (Green): trending behaviour, cleaner directional movement
• Normal Volatility (Yellow): balanced environment
• High Volatility (Red): sharp swings, traps, mean-reversion phases
Regime labels appear on the chart, with a status panel displaying the current regime.
________________________________________
Operational Logic
1. Compute log returns
2. Calculate short-horizon realised volatility
3. Compute long-horizon mean and standard deviation
4. Derive volatility Z-score
5. Assign regime classification
6. Update background colour and labels
This provides a stable, real-time map of market state transitions.
________________________________________
Practical Applications
Intraday Trading
• Low-volatility regimes favour trend and breakout continuation
• High-volatility regimes favour mean reversion and wide stop placement
Swing Trading
• Compression phases often precede multi-day trending moves
• Volatility expansions accompany distribution or panic events
Risk Management
• Enables volatility-adjusted position sizing
• Helps avoid leverage during expansion regimes
________________________________________
Notes
• Does not repaint
• Fully configurable thresholds and lookbacks
• Works across indices, stocks, FX, crypto
• Designed for real-time volatility regime identification
________________________________________
Disclaimer
This script is intended solely for educational and research purposes.
It does not constitute financial advice or a recommendation to buy or sell any instrument.
Trading involves risk, and past volatility patterns do not guarantee future outcomes.
Users are responsible for their own trading decisions, and the author assumes no liability for financial loss.
Arden SMC OTEThis indicator represents a comprehensive trading system based on Smart Money Concepts (SMC) and Optimal Trade Entry (OTE). The script's key feature is the built-in "Liquidity Trap" filter, which protects the trader from entering positions where the price is highly likely to hunt for stop losses before making the true move.
Key Features:
1. Automatic OTE Search: The indicator identifies market structure (Swing Highs/Lows) on the selected timeframe and draws a Fibonacci grid. Entry is based on the 0.62 level, and the target is the -0.27 extension (or a fixed Risk:Reward ratio).
2. "Liquidity Trap" Filter (Smart Logic):
The algorithm scans the chart for Equal Highs (EQH) and Equal Lows (EQL), based on precise candle body touches.
Protection Logic: If a liquidity zone (EQH/EQL) is located between your entry point and your Stop Loss, the indicator cancels the signal. This saves you from situations where the market maker first "sweeps" liquidity (hits your stop) and only then moves in the desired direction.
3. Flexible Risk Management:
3 Stop Loss modes (Conservative behind the swing, Aggressive behind 0.88 Fib, or ATR-based).
Take Profit selection (Structure-based or fixed RR).
4. SMC Filters:
Equilibrium: Checks if the price is in the Discount zone (for buys) or Premium zone (for sells).
Structure Size: Filters out structures that are too small (noise) using ATR.
How to read the chart:
Grey zones/lines: Your potential trade (Entry, Stop, Take Profit).
Orange boxes: Liquidity Zones (EQH/EQL). If they appear, it means orders have accumulated there.
Labels: "ENTRY 🚀" — entry triggered, "TP HIT" — target reached.
Disclaimer:
This indicator is an assistive tool. Always check the higher timeframe context yourself.
Liquidity Filter Settings
❌ Block on Liquidity (EQH/EQL): The main checkbox. If enabled, the script checks: "Is there an orange liquidity box right before my stop loss?". If yes — no signal is generated.
Show Liquidity Zones: Toggle the visibility of the orange boxes.
Touch Count (cNum): How many times the price must hit the exact same level (body-to-body) for it to count as liquidity. Usually 2 (Double Top/Bottom).
Gap Count (bars): Minimum distance (in bars) between touches.
Confirmation Bars: How many candles must pass after the touch for the zone to be confirmed and drawn.
Superior-Range Bound Renko - Alerts - 11-29-25 - Signal LynxSuperior-Range Bound Renko – Alerts Edition with Advanced Risk Management Template
Signal Lynx | Free Scripts supporting Automation for the Night-Shift Nation 🌙
1. Overview
This is the Alerts & Indicator Edition of Superior-Range Bound Renko (RBR).
The Strategy version is built for backtesting inside TradingView.
This Alerts version is built for automation: it emits clean, discrete alert events that you can route into webhooks, bots, or relay engines (including your own Signal Lynx-style infrastructure).
Under the hood, this script contains the same core engine as the strategy:
Adaptive Range Bounding based on volatility
Renko Brick Emulation on standard candles
A stack of Laguerre Filters for impulse detection
K-Means-style Adaptive SuperTrend for trend confirmation
The full Signal Lynx Risk Management Engine (state machine, layered exits, AATS, RSIS, etc.)
The difference is in what we output:
Instead of placing historical trades, this version:
Plots the entry and RM signals in a separate pane (overlay = false)
Exposes alertconditions for:
Long Entry
Short Entry
Close Long
Close Short
TP1, TP2, TP3 hits (Staged Take Profit)
This makes it ideal as the signal source for automated execution via TradingView Alerts + Webhooks.
2. Quick Action Guide (TL;DR)
Best Timeframe:
4H and above. This is a swing-trading / position-trading style engine, not a micro-scalper.
Best Assets:
Volatile but structured markets, e.g.:
BTC, ETH, XAUUSD (Gold), GBPJPY, and similar high-volatility majors or indices.
Script Type:
indicator() – Alerts & Visualization Only
No built-in order placement
All “orders” are emitted as alerts for your external bot or manual handling
Strategy Type:
Volatility-Adaptive Trend Following + Impulse Detection
using Renko-like structure and multi-layer Laguerre filters.
Repainting:
Designed to be non-repainting on closed candles.
The underlying Risk Management engine is built around previous-bar data (close , high , low ) for execution-critical logic.
Intrabar values can move while the bar is forming (normal for any advanced signal), but once a bar closes, the alert logic is stable.
Recommended Alert Settings:
Condition: one of the built-in signals (see section 3.B)
Options: “Once Per Bar Close” is strongly recommended for automation
Message: JSON, CSV, or simple tokens – whatever your webhook / relay expects
3. Detailed Report: How the Alerts Edition Works
A. Relationship to the Strategy Version
The Alerts Edition shares the same internal logic as the strategy version:
Same Adaptive Lookback and volatility normalization
Same Range and Close Range construction
Same Renko Brick Emulator and directional memory (renkoDir)
Same Fib structures, Laguerre stack, K-Means SuperTrend, and Baseline signals (B1, B2)
Same Risk Management Engine and layered exits
In the strategy script, these signals are wired into strategy.entry, strategy.exit, and strategy.close.
In the alerts script:
We still compute the final entry/exit signals (Fin, CloseEmAll, TakeProfit1Plot, etc.)
Instead of placing trades, we:
Plot them for visual inspection
Expose them via alertcondition(...) so that TradingView can fire alerts.
This ensures that:
If you use the same settings on the same symbol/timeframe, the Alerts Edition and Strategy Edition agree on where entries and exits occur.
(Subject only to normal intrabar vs. bar-close differences.)
B. Signals & Alert Conditions
The alerts script focuses on discrete, automation-friendly events.
Internally, the main signals are:
Fin – Final entry decision from the RM engine
CloseEmAll – RM-driven “hard close” signal (for full-position exits)
TakeProfit1Plot / 2Plot / 3Plot – One-time event markers when each TP stage is hit
On the chart (in the separate indicator pane), you get:
plot(Fin) – where:
+2 = Long Entry event
-2 = Short Entry event
plot(CloseEmAll) – where:
+1 = “Close Long” event
-1 = “Close Short” event
plot(TP1/TP2/TP3) (if Staged TP is enabled) – integer tags for TP hits:
+1 / +2 / +3 = TP1 / TP2 / TP3 for Longs
-1 / -2 / -3 = TP1 / TP2 / TP3 for Shorts
The corresponding alertconditions are:
Long Entry
alertcondition(Fin == 2, title="Long Entry", message="Long Entry Triggered")
Fire this to open/scale a long position in your bot.
Short Entry
alertcondition(Fin == -2, title="Short Entry", message="Short Entry Triggered")
Fire this to open/scale a short position.
Close Long
alertcondition(CloseEmAll == 1, title="Close Long", message="Close Long Triggered")
Fire this to fully exit a long position.
Close Short
alertcondition(CloseEmAll == -1, title="Close Short", message="Close Short Triggered")
Fire this to fully exit a short position.
TP 1 Hit
alertcondition(TakeProfit1Plot != 0, title="TP 1 Hit", message="TP 1 Level Reached")
First staged take profit hit (either long or short). Your bot can interpret the direction based on position state or message tags.
TP 2 Hit
alertcondition(TakeProfit2Plot != 0, title="TP 2 Hit", message="TP 2 Level Reached")
TP 3 Hit
alertcondition(TakeProfit3Plot != 0, title="TP 3 Hit", message="TP 3 Level Reached")
Together, these give you a complete trade lifecycle:
Open Long / Short
Optionally scale out via TP1/TP2/TP3
Close remaining via Close Long / Close Short
All while the Risk Management Engine enforces the same logic as the strategy version.
C. Using This Script for Automation
This Alerts Edition is designed for:
Webhook-based bots
Execution relays (e.g., your own Lynx-Relay-style engine)
Dedicated external trade managers
Typical setup flow:
Add the script to your chart
Same symbol, timeframe, and settings you use in the Strategy Edition backtests.
Configure Inputs:
Longs / Shorts enabled
Risk Management toggles (SL, TS, Staged TP, AATS, RSIS)
Weekend filter (if you do not want weekend trades)
RBR-specific knobs (Adaptive Lookback, Brick type, ATR vs Standard Brick, etc.)
Create Alerts for Each Event Type You Need:
Long Entry
Short Entry
Close Long
Close Short
TP1 / TP2 / TP3 (optional, if your bot handles partial closes)
For each:
Condition: the corresponding alertcondition
Option: “Once Per Bar Close” is strongly recommended
Message:
You can use structured JSON or a simple token set like:
{"side":"long","event":"entry","symbol":"{{ticker}}","time":"{{timenow}}"}
or a simpler text for manual trading like:
LONG ENTRY | {{ticker}} | {{interval}}
Wire Up Your Bot / Relay:
Point TradingView’s webhook URL to your execution engine
Parse the messages and map them into:
Exchange
Symbol
Side (long/short)
Action (open/close/partial)
Size and risk model (this script does not position-size for you; it only signals when, not how much.)
Because the alerts come from a non-repainting, RM-backed engine that you’ve already validated via the Strategy Edition, you get a much cleaner automation pipeline.
D. Repainting Protection (Alerts Edition)
The same protections as the Strategy Edition apply here:
Execution-critical logic (trailing stop, TP triggers, SL, RM state changes) uses previous bar OHLC:
open , high , low , close
No security() with lookahead or future-bar dependencies.
This means:
Alerts are designed to fire on states that would have been visible at bar close, not on hypothetical “future history.”
Important practical note:
Intrabar: While a bar is forming, internal conditions can oscillate.
Bar Close: With “Once Per Bar Close” alerts, the fired signal corresponds to the final state of the engine for that candle, matching your Strategy Edition expectations.
4. For Developers & Modders
You can treat this Alerts script as an ”RM + Alert Framework” and inject any signal logic you want.
Where to plug in:
Find the section:
// BASELINE & SIGNAL GENERATION
You’ll see how B1 and B2 are built from the RBR stack and then combined:
baseSig = B2
altSig = B1
finalSig = sigSwap ? baseSig : altSig
To use your own logic:
Replace or wrap the code that sets baseSig / altSig with your own conditions:
e.g., RSI, MACD, Heikin Ashi filters, candle patterns, volume filters, etc.
Make sure your final decision is still:
2 → Long / Buy signal
-2 → Short / Sell signal
0 → No trade
finalSig is then passed into the RM engine and eventually becomes Fin, which:
Drives the Long/Short Entry alerts
Interacts with the RM state machine to integrate properly with AATS, SL, TS, TP, etc.
Because this script already exposes alertconditions for key lifecycle events, you don’t need to re-wire alerts each time — just ensure your logic feeds into finalSig correctly.
This lets you use the Signal Lynx Risk Management Engine + Alerts wrapper as a drop-in chassis for your own strategies.
5. About Signal Lynx
Automation for the Night-Shift Nation 🌙
Signal Lynx builds tools and templates that help traders move from:
“I have an indicator” → “I have a structured, automatable strategy with real risk management.”
This Superior-Range Bound Renko – Alerts Edition is the automation-focused companion to the Strategy Edition. It’s designed for:
Traders who backtest with the Strategy version
Then deploy live signals with this Alerts version via webhooks or bots
While relying on the same non-repainting, RM-driven logic
We release this code under the Mozilla Public License 2.0 (MPL-2.0) to support the Pine community with:
Transparent, inspectable logic
A reusable Risk Management template
A reference implementation of advanced adaptive logic + alerts
If you are exploring full-stack automation (TradingView → Webhooks → Exchange / VPS), keep Signal Lynx in your search.
License: Mozilla Public License 2.0 (Open Source).
If you build improvements or helpful variants, please consider sharing them back with the community.
LarsTrades Order Flow ZonesLarsTrades Order Flow Zones
**Important:
-Futures charts only!
-Trust the default settings
-best on 2min or lower timeframe.
-if indicator error in replay mode: exit, ctrl+r - it will reset.
This indicator builds a full trade workflow from raw order flow imbalances. It finds aggressive buy and sell imbalances, promotes the strongest ones into key levels, and manages each level through its entire life cycle. Every level becomes a visual zone on the chart that updates in real time as the market moves.
It is built for short-term traders who want clarity, speed, and a structured decision process based on imbalances instead of guesswork.
If you rely on order flow, imbalance zones, or systematic retest setups, this tool helps you stay consistent and understand the story behind each move.
Option Premium + VWAP Dashboard1. What this indicator does
This tool creates a live option chain style dashboard on your chart for index options on NSE.
For a selected expiry and a band of strikes around a reference strike, it shows:
Strike price
CE LTP (Last Traded Price)
PE LTP
CE + PE total premium
Combined VWAP of CE + PE
Individual VWAP of CE
Individual VWAP of PE
Inference column describing who is stronger
(buyers or sellers, CE side or PE side, or mixed)
Rows are color coded based on which side is dominating around VWAP, so you get a quick visual sense of:
At which strikes buyers are aggressive
At which strikes sellers are aggressive
Where premiums are trading near VWAP and stay neutral
You can place this dashboard anywhere on the chart and adjust font size and colors as per your preference.
2. Supported indices
You can use this indicator on the following indices:
NIFTY
BANKNIFTY
FINNIFTY
MIDCAP
SENSEX
Input:
Spot Symbol = choose from BANKNIFTY, NIFTY, FINNIFTY, MIDCAP, SENSEX
Internally, the script maps this choice to the corresponding TradingView symbol:
NIFTY → NSE:NIFTY
BANKNIFTY → NSE:BANKNIFTY
FINNIFTY → NSE:CNXFINANCE
MIDCAP → NSE:CNXMIDCAP
SENSEX → BSE:SENSEX
For options, it uses an option prefix derived from this selection:
For all NSE index options → BANKNIFTY, NIFTY, FINNIFTY, MIDCAP
For SENSEX options → BSX (as per your earlier convention)
Options are then constructed in this format:
PREFIX + YYMMDD + C/P + Strike
Example: NIFTY251120C20000
So the expiry date must be set correctly, otherwise TradingView will not find the options.
3. How the logic works internally
For each strike in the selected range, the script:
Builds the CE and PE symbols using:
Underlying prefix (opt_prefix)
Expiry date in YYMMDD format
C or P
Strike price
Fetches from request.security() on your current chart timeframe:
ce_close, pe_close
ce_vwap, pe_vwap
Calculates:
combined_prem = CE LTP + PE LTP
combined_vwap = CE VWAP + PE VWAP
Compares premiums and VWAPs and creates a detailed inference string, for example:
"Optn buyers stronger | Both buyers strong"
"Optn sellers stronger | CE sellers, PE buyers"
"Near VWAP | Mixed"
Chooses row background color based on which side is stronger:
CE buyers strong → BG CE Buyers Strong
PE buyers strong → BG PE Buyers Strong
CE sellers strong → BG CE Sellers Strong
PE sellers strong → BG PE Sellers Strong
If none of the above is clearly dominant, the row is kept neutral.
This gives you an immediate view of:
Where option buyers are aggressively lifting offers
Where option sellers are dominating
Where the market is balanced near VWAP
4. Expiry settings
How to change expiry to get the correct option chain
The indicator uses a manual expiry input:
Group: Expiry Settings
Input: Expiry (manual)
Internally, it extracts:
year(expiry_manual)
month(expiry_manual)
dayofmonth(expiry_manual)
Then it converts this to YYMMDD and builds option symbols.
How to set this correctly:
Open the indicator settings.
Go to “Expiry Settings”.
In Expiry (manual) select the correct date and time of the option expiry.
For NSE weekly or monthly index options, you can simply select the calendar date of the expiry.
Time is not critical for symbol naming, it is used only to obtain year, month, day, but keeping it at market open time (for example, 09:15) is a good habit.
After changing the expiry:
The title row will update to show the new expiry as DD-MM-YY.
The script will start requesting data for symbols with that YYMMDD in their names.
If you see na in most rows, it usually means:
The expiry date does not match the actual symbol format on TradingView.
The strike prices are too far away from existing contracts.
You are using an expiry where this index does not have options.
In that case, double check the expiry date and strike range.
5. Strike settings
The script gives you a flexible way to control which strikes are shown.
Group: Strike Settings
5.1 Automatic strike interval
By default, the indicator uses index specific strike steps:
BANKNIFTY or SENSEX → 100 point interval
NIFTY or FINNIFTY → 50 point interval
MIDCAP also defaults to 50 points
This is controlled internally by:
use_manual_interval = false
and auto_interval is chosen based on the index.
Use case:
If you want a quick standard layout for a typical option chain view, simply leave “Use Manual Strike Interval” unchecked and let the script choose the appropriate interval automatically.
5.2 Manual strike interval
You can override the default step using:
Use Manual Strike Interval (bool)
Manual Strike Interval (int, default 50)
When Use Manual Strike Interval is true, the script will:
Ignore the automatic index based step.
Use your chosen step size for all strikes.
When to use manual interval:
When the exchange has changed strike spacing for a particular series.
When you want a denser view (for example, 25 point steps in NIFTY) around ATM.
When you want a wider spacing for a broad overview, for example, 200 or 500 point steps.
5.3 Reference strike and range
Two important inputs:
Reference Strike (manual)
Default: 26000
This is the center of the table. The script builds strikes above and below this level.
Strikes Above / Below Reference
Default: 5
The script calculates:
start_strike = ref_strike - half_range * strike_interval
Total number of strikes = 2 * half_range + 1
So with:
Reference Strike = 26000
Strike Interval = 100
Strikes Above / Below = 5
You will get strikes from 25500 to 26500 in steps of 100.
How to choose the reference strike in practice:
Set it close to the current spot price or the ATM strike.
For intraday trading, most of your focus is usually on:
ATM
2 or 3 strikes ITM and OTM on each side
If NIFTY is around 22,250, set Reference Strike to 22200 or 22250 based on available strikes.
If BANKNIFTY is around 49,800, set it to 49800 or 50000.
This keeps the dashboard concentrated around active and liquid strikes that you actually trade.
6. Dashboard layout and appearance
Group: Dashboard Layout
Dashboard Location
Choose where the table appears on your chart.
Options: top left, top center, top right, middle left, middle center, middle right, bottom left, bottom center, bottom right.
Font Size
Choose from Tiny, Small, Normal, Large, Huge depending on your screen size and personal preference.
Group: Colors
You can customize:
Header Background
Title Background
Header Text color
Row backgrounds based on strength:
BG CE Buyers Strong
BG PE Sellers Strong
BG CE Sellers Strong
BG PE Buyers Strong
Row BG neutral for mixed or unclear situations
Suggestion:
Keep buyers related backgrounds in green shades.
Keep sellers related backgrounds in red shades.
Keep neutral in grey.
This matches the logic in the Inference column and makes interpretation much easier.
7. How to read the “Inference” column
The inference logic checks:
Is total premium above or below total VWAP?
Is CE above its VWAP?
Is PE above its VWAP?
Then it combines this into messages like:
“Optn buyers stronger | Both buyers strong”
Both CE and PE trade above their respective VWAPs, and combined premium is above combined VWAP.
Buyers are clearly dominant at that strike.
“Optn sellers stronger | Both sellers strong”
Both CE and PE trade below VWAPs, and combined premium is below combined VWAP.
Sellers are in control at that strike.
“Optn buyers stronger | CE buyers stronger”
Combined premium is above combined VWAP, CE trades above its VWAP, PE is not as strong.
CE side buyers are leading.
“Optn buyers stronger | PE buyers stronger”
Similar, but PE side buyers are leading.
“Optn sellers stronger | CE sellers, PE buyers” or “PE sellers, CE buyers”
Mixed conditions, one side is selling aggressively while the other side has some buyer support.
“Near VWAP | Mixed”
Both premiums are hovering near their VWAP, market is balanced at that strike.
Use this to quickly decide:
Where to avoid trading due to mixed and choppy behaviour.
Where buyers or sellers are clearly dominating and trend can be extended or exhausted.
8. Practical usage tips
Use on intraday timeframes
The script uses timeframe.period for VWAP and LTP calculation. Use it on 1 minute, 3 minute, 5 minute, 15 minute charts for intraday decision making.
Align with index trend
Combine this dashboard with your main price action and trend tools.
For example, if the index trend is strongly up and the ATM and slightly OTM calls show “buyers stronger” with green backgrounds, it can support continuation trades.
Watch shifts in dominance
If you see a cluster of strikes shifting from “buyers stronger” to “sellers stronger”, that can signal distribution or trend exhaustion.
Change expiry when series rolls
For weekly options, you must change Expiry (manual) every week to get the correct option chain.
For monthly and quarterly contracts, update it whenever you roll over to a new series.
Adjust manual interval and reference strike
Before the session starts, quickly adjust:
Reference Strike near current spot
Strikes Above / Below based on how wide a range you want to watch
Optional Manual Strike Interval if you prefer finer or wider spacing
This ensures the dashboard shows the most relevant and liquid strikes instead of cluttering your screen with far OTM data.
9. Limitations and notes
This script depends on correct symbol naming on TradingView for NSE index options.
If the broker or data feed uses a different format, some rows may show na.
Expiry detection is manual by design.
Pine Script cannot reliably auto detect NSE weekly expiry series for every situation, so you are given full manual control to avoid wrong symbol requests.
If you change expiry or strike settings and see an error or many na values, try:
Checking the expiry date.
Bringing reference strike closer to spot.
Refreshing the chart if TradingView needs to load new option symbols.
Single AHR DCA (HM) — AHR Pane (customized quantile)Customized note
The log-regression window LR length controls how long a long-term fair value path is estimated from historical data.
The AHR window AHR window length controls over which historical regime you measure whether the coin is “cheap / expensive”.
When you choose a log-regression window of length L (years) and an AHR window of length A (years), you can intuitively read the indicator as:
“Within the last A years of this regime, relative to the long-term trend estimated over the same A years, the current price is cheap / neutral / expensive.”
Guidelines:
In general, set the AHR window equal to or slightly longer than the LR window:
If the AHR window is much longer than LR, you mix different baselines (different LR regimes) into one distribution.
If the AHR window is much shorter than LR, quantiles mostly reflect a very local slice of history.
For BTC / ETH and other BTC-like assets, you can use relatively long horizons (e.g. LR ≈ 3–5 years, AHR window ≈ 3–8 years).
For major altcoins (BNB / SOL / XRP and similar high-beta assets), it is recommended to use equal or slightly shorter horizons, e.g. LR ≈ 2–3 years, AHR window ≈ 2–3 years.
1. Price series & windows
Working timeframe: daily (1D).
Let the daily close of the current symbol on day t be P_t .
Main length parameters:
HM window: L_HM = maLen (default 200 days)
Log-regression window: L_LR = lrLen (default 1095 days ≈ 3 years)
AHR window (regime window): W = windowLen (default 1095 days ≈ 3 years)
2. Harmonic moving average (HM)
On a window of length L_HM, define the harmonic mean:
HM_t = ^(-1)
Here eps = 1e-10 is used to avoid division by zero.
Intuition: HM is more sensitive to low prices – an extremely low price inside the window will drag HM down significantly.
3. Log-regression baseline (LR)
On a window of length L_LR, perform a linear regression on log price:
Over the last L_LR bars, build the series
x_k = log( max(P_k, eps) ), for k = t-L_LR+1 ... t, and fit
x_k ≈ a + b * k.
The fitted value at the current index t is
log_P_hat_t = a + b * t.
Exponentiate to get the log-regression baseline:
LR_t = exp( log_P_hat_t ).
Interpretation: LR_t is the long-term trend / fair value path of the current regime over the past L_LR days.
4. HM-based AHR (valuation ratio)
At each time t, build an HM-based AHR (valuation multiple):
AHR_t = ( P_t / HM_t ) * ( P_t / LR_t )
Interpretation:
P_t / HM_t : deviation of price from the mid-term HM (e.g. 200-day harmonic mean).
P_t / LR_t : deviation of price from the long-term log-regression trend.
Multiplying them means:
if price is above both HM and LR, “expensiveness” is amplified;
if price is below both, “cheapness” is amplified.
Typical reading:
AHR_t < 1 : price is below both mid-term mean and long-term trend → statistically cheaper.
AHR_t > 1 : price is above both mid-term mean and long-term trend → statistically more expensive.
5. Empirical quantile thresholds (Opp / Risk)
On each new day, whenever AHR_t is valid, add it into a rolling array:
A_t_window = { AHR_{t-W+1}, ..., AHR_t } (at most W = windowLen elements)
On this empirical distribution, define two quantiles:
Opportunity quantile: q_opp (default 15%)
Risk quantile: q_risk (default 65%)
Using standard percentile computation (order statistics + linear interpolation), we get:
Opp threshold:
theta_opp = Percentile( A_t_window, q_opp )
Risk threshold:
theta_risk = Percentile( A_t_window, q_risk )
We also compute the percentile rank of the current AHR inside the same history:
q_now = PercentileRank( A_t_window, AHR_t ) ∈
This yields three valuation zones:
Opportunity zone: AHR_t <= theta_opp
(corresponds to roughly the cheapest ~q_opp% of historical states in the last W days.)
Neutral zone: theta_opp < AHR_t < theta_risk
Risk zone: AHR_t >= theta_risk
(corresponds to roughly the most expensive ~(100 - q_risk)% of historical states in the last W days.)
All quantiles are purely empirical and symbol-specific: they are computed only from the current asset’s own history, without reusing BTC thresholds or assuming cross-asset similarity.
6. DCA simulation (lightweight, rolling window)
Given:
a daily budget B (input: budgetPerDay), and
a DCA simulation window H (input: dcaWindowLen, default 900 days ≈ 2.5 years),
The script applies the following rule on each new day t:
If thresholds are unavailable or AHR_t > theta_risk
→ classify as Risk zone → buy = 0
If AHR_t <= theta_opp
→ classify as Opportunity zone → buy = 2B (double size)
Otherwise (Neutral zone)
→ buy = B (normal DCA)
Daily invested cash:
C_t ∈ {0, B, 2B}
Daily bought quantity:
DeltaQ_t = C_t / P_t
The script keeps rolling sums over the last H days:
Cumulative position:
Q_H = sum_{k=t-H+1..t} DeltaQ_k
Cumulative invested cash:
C_H = sum_{k=t-H+1..t} C_k
Current portfolio value:
PortVal_t = Q_H * P_t
Cumulative P&L:
PnL_t = PortVal_t - C_H
Active days:
number of days in the last H with C_k > 0.
These results are only used to visualize how this AHR-quantile-driven DCA rule would have behaved over the recent regime, and do not constitute financial advice.
顺势为王Disclaimer!!!
This script and indicators do not constitute any financial advice. Traders are fully responsible for their own trading decisions, and the script developer is not liable for any losses or gains resulting from the use of this script. Please use with caution and trade rationally. Fans of Chan Theory are welcome to learn and communicate together. QQ: 2508126812
All-in-One India v21. **Overview**: Multi-indicator strategy for NSE index options (NIFTY/BANKNIFTY) tracking CE/PE premiums as a synthetic asset (straddle or single-leg) on TradingView.
2. **Setup**: Input index, expiry (e.g., 21-08-24), strikes (e.g., 50800 CE/PE). Choose "Combined" for straddle premium or single option.
3. **Data**: Fetches OHLCV for options; plots premium as candlesticks (green up, red down).
4. **Indicators** (toggleable): EMA (7/12 cross), Supertrend (ATR7, factor2), VWAP (daily reset), RSI (7-period, 80/20 levels), SMA (7-period).
5. **Signals**: Buy/Sell on crosses/flips (e.g., EMA fast> slow for buy; one per day/direction). Multi-indicator: Sequential AND logic (best with 1 enabled).
6. **Buy Logic**: EMA cross up, Supertrend to up (-1), premium>VWAP/SMA, RSI>80 (momentum tweak).
7. **Sell Logic**: Opposite crosses/flips (e.g., EMA cross down, Supertrend to down +1, RSI<20).
8. **Trading**: Long premium on buy (volatility play); short on sell (decay). No exits—use opposite signal or targets.
9. **Visuals/Alerts**: Shapes for signals; lines for indicators; alerts on buy/sell.
10. **Tips**: Test intraday near expiry; ATM strikes; risk 1-2%; tweak RSI if needed.
趋势阻力集空间Disclaimer!!!
This script and indicators do not constitute any financial advice. Traders are fully responsible for their own trading decisions, and the script developer is not liable for any losses or gains resulting from the use of this script. Please use with caution and trade rationally. Fans of Chan Theory are welcome to learn and communicate together. QQ: 2508126812
CMEGap° - Daily Gap Levels for Bitcoin by ClearViewLabsCME Gap - BTC Futures Gap Tracker by ClearViewLabs
Tracks unfilled CME Bitcoin Futures gaps and displays them as horizontal levels on your chart.
What it detects:
Close-to-open gaps, the difference between the previous session's close and the current session's open. These are not visual gaps (empty space between candles), but price inefficiencies that tend to get revisited.
What it does:
Detects gaps between previous close and current open (≥0.5% default)
Draws levels that extend until filled or expired
Dashboard shows active gaps with age and distance from current price
Statistical edge (2017-2025 CME BTC data, n=992 gaps):
95% of gaps fill within 30 days
75% fill within the same day
Gaps act as price "magnets", price tends to revisit these levels
Use it for:
Identifying potential support/resistance levels
Setting take-profit targets
Understanding where unfilled liquidity exists
Note: This indicator identifies valid technical levels, not trade signals. Your entry strategy determines your edge.
Features:
Works on any BTC chart (pulls CME data via settings)
Auto-removes filled gaps
Color-coded by direction (red = gap up, green = gap down)
Fades older gaps automatically
Settings:
Gap Threshold: Minimum gap size to detect (default 0.5%)
Max Age: Days before unfilled gaps expire (default 30)
CME Symbol: Change source if needed






















