Distance from EMA (Points/%) [ATN]"Distance from MA (Points or %) "
This indicator calculates the real-time distance between price and a user-defined moving average (EMA or SMA). It allows you to display the output either in raw price points or as a percentage.
Features include:
Toggle between EMA or SMA (on price)
Switch between points and percentage mode
Optional smoothing of the distance line using EMA or SMA
Clean plotting with correct format and precision (5 decimals for points, 2 for %)
Visual zero line for easy reference
Ideal for identifying overextensions, trend strength, and reversion opportunities.
“ If this tool helps your trading, give it a Boost to support more releases! ”
Developed by ATN
Candlestick analysis
Dynamic Daily Range with Hourly Signals[Serhio]The strategy "Dynamic Daily Range with Hourly Signals" uses the daily high and low as dynamic support/resistance levels (upperBand and lowerBand). It generates signals when the price breaks out of these levels on 5-minute candles but then re-enters the range before the hourly candle closes.
Key rules:
Buy signal: Price breaks below lowerBand then closes back above it within the same hour.
Sell signal: Price breaks above upperBand then closes back below it within the same hour.
Only one signal per hour is allowed (prevent duplicates).
The strategy plots the dynamic range lines and labels for signals. No position management logic is included.
If you have any ideas or suggestions for improvement, write to us and we will improve it, profit for everyone.
20-Bar Breakout + 20-Day High/LowIt marks High/Low of last 20 days and also breakout of high low of last 20 bars on any timeframe
Compare Strength with SLOPE Description
This indicator compares the relative strength between the current asset and a benchmark (e.g., BTC vs. ETH or AAPL vs. SPY) using a linear regression slope of their ratio over time.
The ratio is calculated as: close / benchmark
A linear regression slope is computed over a user-defined window
The slope represents trend strength: if it’s rising, the current asset is outperforming the benchmark
Plots
Gray Line: The raw ratio between the asset and benchmark
Orange Line: The slope of the ratio (shows momentum)
Background Color :
Green: The asset is significantly stronger than the benchmark
Red: The asset is significantly weaker than the benchmark
No color: No clear trend
Settings
Slope Window Length: Number of candles used in the regression (default = 10)
Slope Threshold: Sensitivity of trend detection. Smaller values detect weaker trends.
Example Use Cases
Style Rotation Strategy: Use the slope to determine whether "Growth" or "Value" style is leading.
Pair Trading / Relative Performance: Track which asset is leading in a pair (e.g., BTC vs ETH).
Factor Timing: Serve as a timing model to allocate between different sectors or factors.
Happy trading!
ORB-DrawThis indicator draws the Opening Range Breakout (ORB) lines for New York, London, and China sessions. It also marks the first breakout above and below the ORB and highlights the neutral range between the high and low of the ORB. It includes adjustable settings for line style, width, and colors, as well as options for displaying the neutral zone.
First 5-Minute Candle: Adjusted Levels with Middle Levelfirst five min candle high low mid 2611 level daily basis
Day of Week and HTF Period SeparatorThis indicator displays vertical lines to separate each day of the week, along with optional 1H and 4H period separators. It also shows day-of-week labels (MON, TUE, etc.) at a specified hour for quick visual reference. Useful for intraday traders who want a clear view of daily and higher timeframe transitions.
Imperfect Candle DetectorThis Script works in all timeframes less than or equal to 15 mins and Daily Timeframe. The blue lines denote the areas where the price has a 85% chance to revisiting and so does the red lines. Use this indicator after testing. It works in all instruments. Not advisable to use in higher timeframes. From red lines try taking trade towards blue lines following specific bullish or bearish candlestick patterns.
First 5-Minute Candle: Adjusted Levelsdifference of first five levels of high and low pine script code
Chan Theory - Chanlun UltraChan Theory -Chanlun Ultra
Overview
This script is based on the core technical framework of Chan Theory, transforming complex market fluctuations into a multi-layered, quantifiable structural analysis system. Through real-time dynamic computation, it automatically parses key components in price movements such as fractals, pens, segments, and pivot zones. Integrated with momentum analysis and trading signal alerts, it provides traders with comprehensive market insights from micro to macro perspectives. The core distinction of Chan Theory from traditional technical indicators lies in its rigorous recursive logic and human-centric market philosophy. This script faithfully restores Chan Theory's essence of "using Zen to resolve market complexity," decomposing spiral price movements into an orderly trading decision system.
Technical Principles
This indicator implements the complete recognition process from candlesticks to fractals, pens, segments, and pivot zones using pure Pine Script under Chan Theory's framework. Core technical implementations include:
1. Candlestick Containment Processing
Employs specific algorithms to handle candlestick containment relationships, eliminating random noise:
In uptrends: Select the higher high and higher low values
In downtrends: Select the lower high and lower low values
Ensure complete elimination of containment through recursive processing
2. Fractal Identification System
Performs strict fractal judgment on processed candlesticks:
Top Fractal: The middle candlestick's high is higher than both adjacent candlesticks
Bottom Fractal: The middle candlestick's low is lower than both adjacent candlesticks
Validate fractal effectiveness via the filterOperateType function
3. Pen Construction Mechanism & Type Selection
Connects valid top/bottom fractals to form pen structures, offering four pen types:
Classic Pen: Traditional Chan Theory definition, strictly following classic rules
Optimized Pen: Enhanced algorithm for short-term volatility recognition
4K Pen: Builds pens based on fractals formed by at least 4 candlesticks (improves stability)
Strict Pen: Employs the most stringent validation conditions for reliability
4. Segment Partitioning Algorithm
Applies segment rules to pen sequences with three modes:
- Dynamic Real-time Progressive Correction: Adjusts forming segments continuously with new data
- Strict Mode: Fully complies with Chan Theory definitions
- Extension Mode: Flexible handling of trend developments
5. Pivot Zone Recognition Technology
Identifies pen-level and segment-level pivot zones
Calculates pivot zone price ranges and time durations
Analyzes pivot zone evolution characteristics
Supports display of pivot zones across different levels
Trading Signal System & Filters
Trading Signal Filtering System
This indicator provides comprehensive filtering functions:
Fractal Validity Filter: Verifies fractal patterns and post-fractal developments
Basic Fractal Filter: Eliminates non-compliant fractals through basic feature checks
Type I MACD Divergence Filter: Enhances Type I signal reliability via MACD divergence analysis
Type II Signal Filter: Custom conditions for Type II signals
-False Signal Trap Avoidance: Detects and bypasses deceptive price patterns
Chan Theory Trading Signal Principles
Type I Signals (Trend Reversals)
Principle: Forms when price makes new highs/lows with weakening internal momentum (divergence)
Identification: Compares structural features of adjacent same-direction pens
Application: Early trend reversal signals for swing trading
Type II Signals (Pullback Entries)
Principle: Occurs during retracements as sub-level reversal signals
Identification: Determined by pivot zone support/resistance and fractal combinations
Application: Optimal positions for pullback trades with controlled risk
Type III Signals (Breakout Confirmations)
Principle: Confirms pivot zone breakouts
Identification: Price breaks prior pivot zone boundaries with valid fractals
Application: Trend continuation signals for trend-following strategies
Indicator Features
Multi-Level Structural Analysis
Distinguishes structures across levels via level parameters
Higher-level trends guide lower-level operations
Implements cross-level collaborative logic
Displays sub-level pivot zones
Structural Visualization
Pens: Displayed per selected pen type
Segments: Rendered according to chosen segment mode
Pivot Zones: Color gradients indicate consolidation strength
Technical Implementation
Data Structure Design
Pen Object: Stores direction, timestamps, and price attributes
Segment Object: Manages segments and constituent pens
Pivot Object: Defines pivot zone ranges and characteristics
Grade Object: Organizes analysis results across levels
User Guide
Parameter Settings
Pen Type: Classic/Optimized/4K/Strict (adapt to analysis needs)
Segment Mode: Dynamic/Strict/Extension (match trading strategies)
Signal Filters: Enable/disable specific filters
Pivot Display: Toggle sub-level pivot zones
Divergence Settings: Configure types (regular/hidden) and display styles
Strategy Settings: Set trading rules linked to signals
Strategy Configuration
Follow Segments: Trade in alignment with segment direction
Signal Participation: Enable/disable Type I/II/III signals
Signal Conditions: Require signals to appear post-pivot zone formation
Prevent Early Entries:
Type I signals require ≥1 pivot zone or 5 pens
Type II Safety Control: Participate only if Type III signals are absent
Practical Recommendations
Select pen types/segment modes per market conditions
Adjust filters for different instruments and timeframes
Enhance accuracy through multi-level analysis
Confirm Type I signals with divergence indicators
Choose strategy parameters aligned with risk tolerance
Value Proposition
Systematizes Chan Theory into computable structures
Multiple pen/segment methods adapt to diverse markets
Advanced filtering significantly improves signal quality (historically validated)
Multi-level analysis provides holistic market insights
This tool is for technical analysis only. It does not constitute investment advice. Users must exercise independent judgment based on personal risk tolerance and objectives.
概述
本脚本基于缠论核心技术框架,将复杂的市场波动转化为多层次、可量化的结构分析系统。通过实时动态演算,自动解析价格走势中的分型、笔、线段、中枢等核心组件,并融合动量分析与交易信号预警功能,为交易者提供从微观到宏观的全方位市场透视。缠论区别于传统技术指标的核心在于其严格的递归逻辑与人性化市场哲学,本脚本忠实还原缠论"以禅破缠"的思想精髓,将螺旋缠绕的价格运动分解为有序的交易决策体系。
技术原理
本指标基于缠论技术分析框架,通过纯Pine Script实现了从K线到分型、笔、线段和中枢的完整识别流程。核心技术实现包括:
1. K线包含处理
采用特定算法处理K线包含关系,消除随机波动干扰:
- 上涨趋势中取高点高值、低点高值
- 下跌趋势中取高点低值、低点低值
- 通过递归处理确保包含关系完全消除
2. 分型识别系统
在处理后的K线基础上实现严格的分型判断:
- 顶分型:中间K线高点高于两侧K线
- 底分型:中间K线低点低于两侧K线
- 通过`filterOperateType`函数实现分型有效性验证
3. 笔的构建机制与类型选择
连接有效顶底分型形成笔结构,提供四种笔类型选择:
- **老笔**:传统缠论笔定义,严格遵循经典规则
- **新笔**:优化算法,增强对短期波动的识别能力
- **4K**:基于至少4根K线形成的分型构建笔,提高稳定性
- **严笔**:采用最严格的条件验证,确保形成的笔结构可靠
4. 线段划分算法
基于笔序列应用线段划分规则,支持三种线段模式:
- **当下延伸后修正**:实时计算当前形成中的线段,并随新数据更新修正
- **严格模式**:要求线段完全符合缠论定义,减少假信号
- **延伸模式**:更灵活地处理线段延伸情况,适合趋势分析
5. 中枢识别技术
- 实现笔中枢和线段中枢识别
- 计算中枢价格区间与时间范围
- 分析中枢演变特征
- 支持显示不同级别中枢功能
买卖点系统与过滤机制
买卖点过滤系统
本指标提供全面的买卖点过滤功能:
- **买卖点分型过滤**:检验分型形态有效性,验证分型后续发展
- **买卖点分型基础过滤**:针对分型基本特征进行验证,排除不合格分型
- **1买卖macd背驰过滤**:通过MACD判断背驰情况,提高一类买卖点可靠性
- **2买卖点过滤**:专门针对二类买卖点的过滤条件
- **防狼术**:避免陷阱式买卖点,提高交易安全性
缠论买卖点原理
1. **一类买卖点**
- 原理:基于趋势背驰原理,当价格创新高/低但内部结构力度减弱时形成
- 识别方法:通过比较相邻同向笔的结构特征判断力度变化
- 应用:提供趋势可能反转的早期信号,适合波段操作
2. **二类买卖点**
- 原理:发生在回调过程中,属于次级别转折信号
- 识别方法:通过中枢支撑位与分型组合判断
- 应用:回调买入或做空的较佳位置,风险相对可控
3. **三类买卖点**
- 原理:中枢突破确认信号
- 识别方法:价格突破前中枢边界并形成有效分型
- 应用:趋势延续的确认信号,适合追踪趋势
指标特点
多级别结构分析
本指标支持多级别联动分析:
- 通过级别参数区分不同级别结构
- 高级别趋势指导低级别操作
- 实现级别间的协同判断逻辑
- 支持显示次级别中枢功能
结构可视化
- 笔结构:根据选择的笔类型显示
- 线段结构:按照选定的线段模式呈现
- 中枢区域:颜色渐变标识不同强度
技术实现说明
数据结构设计
指标设计了完整的面向对象结构:
- Pen结构:存储笔的方向、时间、价格等属性
- Segment结构:管理线段及其组成笔
- Pivot结构:表示中枢范围和特性
- Grade结构:区分不同级别的分析结果
使用指南
参数设置
- 笔的类型:选择老笔、新笔、4K或严笔以适应不同分析需求
- 线段模式:根据交易策略选择合适的线段计算方式
- 买卖点过滤:根据需要启用不同的过滤机制
- 中枢显示:选择是否显示次级别中枢
- 背离设置:选择背离类型、显示方式和样式
- 策略设置:配置与买卖点相关的交易策略选项
策略应用配置
- 跟随线段:根据线段方向进行交易
- 买卖点参与设置:可选择性参与一类、二类和三类买卖点
- 买卖点条件限制:可设置买卖点需要在中枢形成后出现
- 防止过早进场:可要求一类买卖点至少出现一个中枢后或至少5笔后才参与
- 二类买卖点安全性控制:可选择仅在未出现三类买卖点的情况下参与
实际应用建议
- 结合市场环境选择合适的笔类型和线段模式
- 针对不同品种和时间周期调整过滤设置
- 通过多级别分析提高判断准确性
- 使用背离指标确认一类买卖点的有效性
- 根据策略风格选择适合的策略配置参数
技术特点与价值
本指标通过系统化实现缠论结构分析,提供了一种客观的技术分析工具。它的核心价值在于:
1. 将复杂的缠论理论系统化为可计算的结构
2. 提供多种笔、线段判断方法以适应不同市场环境
3. 完善的买卖点过滤系统大幅提高信号质量
4. 多级别联动分析提供全面市场视角
*本指标仅提供技术分析参考,不构成投资建议。用户应根据自身风险承受能力和投资目标进行判断。*
Umesh BC IST 3:30 AM Session Tracker + 4H Candles📌 IST 3:30 AM Session Tracker + 4H Candle Marker
This indicator is designed for traders who follow Indian Standard Time (IST) and want precise session tracking and 4H candle insights.
🔧 Features:
🕒 Daily Session Start at 3:30 AM IST
Automatically detects and marks the beginning of each new trading day based on 3:30 AM IST, not midnight.
Displays session Open, High, and Low lines.
Background shading for each session.
Customizable alert when a new day starts.
🟧 4H Candle Start Markers (IST Time)
Identifies every new 4-hour candle that starts at:
3:30, 7:30, 11:30, 3:30 PM, 7:30 PM, 11:30 PM IST
Adds a vertical line and label ("🟧 4H") above the candle.
Plots a dynamic line for the 4H candle's opening price.
Includes optional alert for new 4H candles.
🔔 Alerts Included:
"🕒 New IST Day Start": Triggers at 3:30 AM IST.
"🟧 New 4H Candle": Triggers at each 4H candle start (IST).
✅ Best for:
Intraday, swing, and institutional traders using IST-based analysis.
Those wanting more accurate daily sessions and clear candle structuring.
HTF Countdown by Silver Mountain Trading)Stay sharp and time your trades with precision.
This simple but effective tool shows a real-time countdown to the next Higher Time Frame (HTF) candle — such as 4H, 1H, or whatever timeframe you choose.
The countdown is always placed just below the current day’s low, with clean design and no clutter.
🔹 Displays remaining time in H:M:S
🔹 Anchored visually to current day’s LOD
🔹 Works in replay mode
🔹 Open-source and free to use
🔹 From Silver Mountain Trading
🙌 If you found this helpful, a like and subscribe to the Silver Mountain Trading YouTube channel would be much appreciated as a thank-you. www.youtube.com
Candle Open Below 5 EMA (No Touch)Certainly! Here's a detailed explanation of how the indicator works:
### **Purpose:**
The indicator is designed to alert you when a **candle opens below the 5 EMA** (Exponential Moving Average) and **does not touch** or **cross** the 5 EMA at any point during its formation. This condition can potentially signal a bearish momentum, as the price opens below the 5 EMA but does not go back up to test or reach the EMA during the duration of the candle.
### **Steps in the Indicator:**
1. **5 EMA Calculation**:
The script calculates the **5-period Exponential Moving Average** of the regular candles' closing prices. The 5 EMA is a fast-moving average, which reacts quicker to price changes compared to longer-period EMAs (like 20 or 50 periods). This makes it a sensitive indicator of short-term price trends.
```pinescript
ema5 = ta.ema(close, 5)
```
2. **Candle Data**:
For each candle on the chart, the script checks its **open** and **high** prices. It’s essential because:
- **Candle Open** is compared with the 5 EMA to determine if the candle opened below the EMA.
- **Candle High** is compared with the 5 EMA to verify if the candle **does not touch** or **cross** the EMA during its formation.
```pinescript
candleOpen = open
candleHigh = high
```
3. **Condition for Signal**:
The key condition is that the **candle opens below the 5 EMA** and **does not touch or cross** the 5 EMA (its **high remains below** the 5 EMA). If both of these conditions are true, then the script flags it as a potential signal. This is the core logic of the indicator.
```pinescript
condition = candleOpen < ema5 and candleHigh < ema5
```
4. **Visualizing the Signal**:
When the condition is met, the indicator will plot a **red triangle** above the bar (candle) where the condition was true. This gives a visual cue that a candle meeting the criteria occurred.
```pinescript
plotshape(condition, title="Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
```
5. **Alert Condition**:
The indicator also sets up an alert condition. If the condition is met (candle opens below the 5 EMA and doesn’t touch it), the alert will trigger. You can then set up an alert in TradingView based on this condition, which will notify you in real-time.
```pinescript
alertcondition(condition, title="Candle Opened Below EMA and Didn't Touch", message="Candle opened below and did not touch the 5 EMA.")
```
### **How It Helps in Trading:**
This indicator can be useful in the following ways:
- **Bearish Continuation Signal**: If a candle opens below the 5 EMA and doesn’t reach it, it might be signaling that the bearish trend is intact, and price is unlikely to reverse or consolidate at the EMA level.
- **Avoids False Signals**: The condition that the high of the candle must remain below the EMA reduces false signals where a candle might briefly cross above the EMA but fail to sustain that level.
### **How to Use the Indicator:**
- **Alert Setup**: You can set up an alert based on this script to notify you whenever a candle opens below the 5 EMA and doesn’t touch the 5 EMA.
- **Trend Confirmation**: This could be used alongside other indicators (like RSI, MACD, or volume) to confirm the trend and get a more reliable signal.
### **Example:**
If you're trading on a 1-minute chart and see a red triangle above a candle, you’ll know that this candle opened below the 5 EMA and didn't go back up to touch or test the 5 EMA during its duration. This could signal that price might continue to move lower, so it might be a good time to consider entering a short position (if confirmed by other factors).
---
Let me know if you need further details on any part of this explanation or additional features!
💲🤑Money generation signal V4💲sdfasdsasffasdfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
【沣润量化】趋势+背离+止损止盈 专业版🌟【FengRun Quant】Trend + Divergence + Stop Loss/Take Profit Pro Edition —— Multi-Dimensional Smart Trading Strategy!
Key Features:
1️⃣ Dual Timeframe MACD Dynamic Adaptation
Automatically adjusts MACD parameters (fast/slow/signal) for 15M/60M charts, capturing trend resonance across timeframes!
2️⃣ AI-Powered Divergence Detection
Real-time scanning for Regular & Hidden Divergence between price and MACD using pivot points.
Labels "Bullish/Bearish" signals with trendlines and triggers alerts, visualizing reversal/continuation patterns instantly!
3️⃣ Triple-Layer Trend Filtering & Risk Control
EMA Trend Engine: 7/21/50-period EMA crossover + RSI thresholds for high-confidence entries.
ATR Dynamic Stops: Adaptive stop loss (1.5x ATR) and two-tier take profit (1x/2x ATR) based on market volatility.
Phased Exit Strategy: Lock 50% profits at TP1, let the rest ride with trailing logic – maximize risk-reward!
4️⃣ Pro-Level Visualization
Real-time plots of key EMAs (7/21/50/200), entry/exit labels, and stop levels.
Color-coded signals (green for long/red for short) for lightning-fast decision-making!
Ideal For:
Trend Traders: EMA crossover + RSI filter to catch trend ignitions!
Reversal Hunters: Divergence signals pre-warn price reversals!
Risk Masters: ATR-based stops adapt to volatility – no more fixed pips!
Load This Strategy Now & Empower Your Trading with Quant Precision!
(Compatible with TradingView – backtest/live trade seamlessly across stocks, futures, and crypto!)
DCA马丁格尔网格策略**Core Objective**
To reduce the average cost of holding (DCA) through "doubling down on the dip + grid-based diversified entry," and to take profit when the price rebounds to the target profit level.
**Key Mechanisms**
✅ **Initial Position Setup**
On the first entry, purchase a fixed amount (e.g., $100).
✅ **Martingale Trigger (Doubling Down on the Dip)**
Trigger Condition: The current price falls by X% (e.g., 4%) compared to the last trigger point (or the initial entry price).
Position Addition Method:
Set N grids (e.g., 8 levels) below the trigger point.
Each grid’s purchase amount increases exponentially (e.g., doubling each time).
✅ **Grid Trading (Diversified Buying)**
Grid Spacing: The distance between each grid is Y% (e.g., 0.5%).
Stacked Grids:
If the price crashes through multiple grids (e.g., 8 levels) in a single candlestick, combine the buy orders and execute a single buy at 8 times the amount (instead of buying layer by layer).
✅ **Take Profit Logic**
Target Profit: When the price rebounds to the current average holding cost + X% (e.g., 2%), close all positions.
核心目标
通过“下跌加倍买入 + 网格分散建仓”降低持仓平均成本(DCA),并在反弹至目标利润时统一止盈。
关键机制
✅ 初始建仓
首次入场时,按固定金额(如 $100)买入。
✅ 马丁格尔触发(下跌加倍买入)
触发条件:当前价格比上一次触发点(或初始建仓价)下跌 X%(如 4%)。
加仓方式:
在触发点下方设置 N 个网格(如 8 层)。
每层网格的买入金额按指数增长(如 1 倍递增)。
✅ 网格交易(分散买入)
网格间距:每层网格间隔 Y%(如 0.5%)。
堆叠网格(Stacked Grids):
如果价格单根K线暴跌穿透多个网格(如 8 层),则合并加仓单,一次性买入 8 倍金额(而非逐层买入)。
✅ 止盈逻辑
目标利润:当价格反弹至当前平均持仓成本 + X%(如 2%)时,全部平仓。
fano 2.0 – completo sin etiquetas FVG🔐 Fano 2.0 – Protected version without FVG tags
This indicator detects FVGs (Fair Value Gaps) on multiple timeframes and combines them with key PDH/PDL and PWH/PWL levels using horizontal lines.
✔️ Includes automatic alerts when the price enters a FVG
✔️ No tags on FVGs for a cleaner view
✔️ Compatible with funded accounts and prop firms
✔️ Optimized for intraday trading and scalping in gold, NASDAQ, and BTC
⚠️ Protected code. For access, please request the creator.
fano 2.0 – completo sin etiquetas FVGThis indicator detects FVGs (Fair Value Gaps) from multiple timeframes and combines them with key PDH/PDL and PWH/PWL levels using horizontal rays. It also integrates automatic alerts when the price enters an active FVG.
🔹 Developed by: @Estefanobaez1
// 🔹 Based on ICT
// 🔹 This indicator automatically detects:
// • FVGs (Fair Value Gaps) from 5M to 1D
// • Key levels: PDH, PDL, PWH, PWL with rays
// • Automatic alerts when entering an FVG
fano 2.0 – completo sin etiquetas FVGThis indicator detects FVGs (Fair Value Gaps) from multiple timeframes and combines them with key PDH/PDL and PWH/PWL levels using horizontal rays. It also integrates automatic alerts when the price enters an active FVG.
🔹 Developed by: @Estefanobaez1
// 🔹 Based on ICT
// 🔹 This indicator automatically detects:
// • FVGs (Fair Value Gaps) from 5M to 1D
// • Key levels: PDH, PDL, PWH, PWL with rays
// • Automatic alerts when entering an FVG
Filled/Unfilled Candles + Gap ZonesFilled unfilled filled candlestick
To help traders identify bullish/bearish candles and price gaps that may offer trade opportunities.
---
Features:
1. Candle Coloring:
Green = Unfilled Bullish Candle (close > open).
Red = Filled Bearish Candle (close < open).
2. Gap Detection:
Detects Gap-Up (today's open > yesterday's high).
Detects Gap-Down (today's open < yesterday's low).
3. Gap Zones:
Draws a box around the gap area.
If price fills the gap, the box color turns green to confirm.
4. Alerts:
Alerts you when a gap is filled, signaling potential reversal or continuation setup.