OPEN-SOURCE SCRIPT
Güncellendi Vegas Trend Filter[SpeculationLab]

This script combines Vegas Tunnel trend filtering with Engulfing Pattern detection to identify trend-following reversal entries.
It uses multi-timeframe EMA tunnels to determine market direction, and filters signals by combining engulfing patterns with price proximity to the tunnel.
Key Features:
1. Vegas Tunnel Trend Filter
・Short tunnel: 144 EMA & 169 EMA
・Long tunnel: 576 EMA & 676 EMA
・Trend definition: Short tunnel entirely above/below the long tunnel
・ATR gap filter to avoid false signals when tunnels are overlapping
2.Engulfing Pattern Detection
・Mode options:
・Body: Current candle’s body fully engulfs the previous body
・Range (default): Current candle’s wicks fully cover the previous high/low range
・Optional “Require opposite previous candle” filter
3.Touch Filter
・Mode options:
・Body: Candle body touches/approaches the Vegas tunnel
・Wick (default): Candle wick touches/approaches the Vegas tunnel
・Adjustable tolerance for proximity detection
4.Short-Term Trend Filter
・Linear regression slope to identify pullbacks or rebounds
・Avoids entering mid-trend without a retracement
5.Signal Marking
・BUY: Trend up + touch filter + bullish engulfing + EMA data valid
・SELL: Trend down + touch filter + bearish engulfing + EMA data valid
・Signals are confirmed at candle close to avoid intrabar repainting
Originality Statement:
This script is originally developed by SpeculationLab, with all logic independently designed and coded by the author. Do not copy, resell, or publish under another name.
Disclaimer:
This script is for technical research and market analysis purposes only and does not constitute financial advice. Any trading decisions made based on this script are solely at the user’s own risk.
本脚本结合 Vegas 通道趋势过滤 与 吞没形态识别,用于识别顺势反转的交易机会。
通过多周期 EMA 构建的 Vegas 通道判断趋势方向,并结合吞没形态与价格接触通道的条件,过滤掉大部分低质量信号。
主要功能:
1.Vegas Tunnel 趋势过滤
・短周期隧道(144 EMA、169 EMA)与长周期隧道(576 EMA、676 EMA)
・趋势判定:短隧道整体高于/低于长隧道
・ATR 间距过滤,避免通道缠绕产生假信号
2.吞没形态识别(Engulfing Pattern)
・模式选择:
・Body:实体包裹前一根实体
・Range(默认):影线包裹前一根区间
・可选“上一根必须颜色相反”条件
3.接触判定(Touch Filter)
・模式选择:
・Body:实体接触/接近 Vegas 通道
・Wick(默认):影线接触/接近 Vegas 通道
・容差可调(Tolerance)
4.短期趋势过滤
・线性回归斜率判断短期回调或反弹
・避免顺势中途乱入
5.信号标记
・多头信号(BUY):顺势 + 接触通道 + 符合吞没条件 + EMA 数据有效
・空头信号(SELL):顺势 + 接触通道 + 符合吞没条件 + EMA 数据有效
・信号在 K 线收盘确认后生成,避免盘中反复变化
原创声明:
本脚本为 SpeculationLab 原创开发,全部逻辑均由作者独立设计与编写。请勿抄袭、售卖或冒充作者发布。
免责声明:
本脚本仅供技术研究与市场分析参考,不构成投资建议。任何基于本脚本的交易决策及其后果,由使用者自行承担。
It uses multi-timeframe EMA tunnels to determine market direction, and filters signals by combining engulfing patterns with price proximity to the tunnel.
Key Features:
1. Vegas Tunnel Trend Filter
・Short tunnel: 144 EMA & 169 EMA
・Long tunnel: 576 EMA & 676 EMA
・Trend definition: Short tunnel entirely above/below the long tunnel
・ATR gap filter to avoid false signals when tunnels are overlapping
2.Engulfing Pattern Detection
・Mode options:
・Body: Current candle’s body fully engulfs the previous body
・Range (default): Current candle’s wicks fully cover the previous high/low range
・Optional “Require opposite previous candle” filter
3.Touch Filter
・Mode options:
・Body: Candle body touches/approaches the Vegas tunnel
・Wick (default): Candle wick touches/approaches the Vegas tunnel
・Adjustable tolerance for proximity detection
4.Short-Term Trend Filter
・Linear regression slope to identify pullbacks or rebounds
・Avoids entering mid-trend without a retracement
5.Signal Marking
・BUY: Trend up + touch filter + bullish engulfing + EMA data valid
・SELL: Trend down + touch filter + bearish engulfing + EMA data valid
・Signals are confirmed at candle close to avoid intrabar repainting
Originality Statement:
This script is originally developed by SpeculationLab, with all logic independently designed and coded by the author. Do not copy, resell, or publish under another name.
Disclaimer:
This script is for technical research and market analysis purposes only and does not constitute financial advice. Any trading decisions made based on this script are solely at the user’s own risk.
本脚本结合 Vegas 通道趋势过滤 与 吞没形态识别,用于识别顺势反转的交易机会。
通过多周期 EMA 构建的 Vegas 通道判断趋势方向,并结合吞没形态与价格接触通道的条件,过滤掉大部分低质量信号。
主要功能:
1.Vegas Tunnel 趋势过滤
・短周期隧道(144 EMA、169 EMA)与长周期隧道(576 EMA、676 EMA)
・趋势判定:短隧道整体高于/低于长隧道
・ATR 间距过滤,避免通道缠绕产生假信号
2.吞没形态识别(Engulfing Pattern)
・模式选择:
・Body:实体包裹前一根实体
・Range(默认):影线包裹前一根区间
・可选“上一根必须颜色相反”条件
3.接触判定(Touch Filter)
・模式选择:
・Body:实体接触/接近 Vegas 通道
・Wick(默认):影线接触/接近 Vegas 通道
・容差可调(Tolerance)
4.短期趋势过滤
・线性回归斜率判断短期回调或反弹
・避免顺势中途乱入
5.信号标记
・多头信号(BUY):顺势 + 接触通道 + 符合吞没条件 + EMA 数据有效
・空头信号(SELL):顺势 + 接触通道 + 符合吞没条件 + EMA 数据有效
・信号在 K 线收盘确认后生成,避免盘中反复变化
原创声明:
本脚本为 SpeculationLab 原创开发,全部逻辑均由作者独立设计与编写。请勿抄袭、售卖或冒充作者发布。
免责声明:
本脚本仅供技术研究与市场分析参考,不构成投资建议。任何基于本脚本的交易决策及其后果,由使用者自行承担。
Sürüm Notları
Alert conditions have been added now.Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.