PROTECTED SOURCE SCRIPT
Aggiornato

♨️盛天®MACD背離Ⓜ️速效TopDog版🕯

82
📊功能概述
該指標整合了傳統 MACD(移動平均線收斂-發散指標)的核心功能,並新增了背離檢測、Top Dog Trading 的 MOM 和 DAD 模式、多時間框架支持以及靈活的視覺化和警報設置。
以下是其主要功能👇 :
1️⃣ MACD 核心計算MACD 線:由快速移動平均線(Fast MA)減去慢速移動平均線(Slow MA)計算得出,反映價格的短期與長期趨勢差異。
信號線:對 MACD 線進行平滑處理(通常使用 EMA 或 SMA),用於識別趨勢轉換點。
直方圖:MACD 線與信號線的差值,顯示動量的強弱和方向。
靈活性:用戶可選擇使用 EMA(指數移動平均線)或 SMA(簡單移動平均線)進行計算,並可設置快速均線、慢速均線和信號線的週期。
📊Feature Overview
This indicator integrates the core functionality of the traditional MACD (Moving Average Convergence-Divergence) indicator and adds divergence detection, Top Dog Trading's MOM and DAD modes, support for multiple time frames, and flexible visualization and alert settings.

Here are its key features:
1. MACD Core Calculation: The MACD Line is calculated by subtracting the Slow Moving Average (Slow MA) from the Fast Moving Average (Fast MA) and reflects the divergence between short-term and long-term price trends.
Signal Line: The MACD Line is smoothed (typically using an EMA or SMA) to identify trend reversals.
Histogram: The difference between the MACD Line and the Signal Line indicates the strength and direction of momentum.
Flexibility: Users can choose to use either EMA (Exponential Moving Average) or SMA (Simple Moving Average) for calculations, and can set the periods for the fast and slow moving averages, as well as the signal line.

2️⃣多時間框架支持通過 request.security 函數,允許用戶選擇不同的時間框架(例如 1 小時、日線等)來計算 MACD,適用於分析更高或更低時間框架的趨勢,無需改變圖表的當前時間框架。
2️⃣Multi-timeframe support is available through the request.security function, allowing users to select different timeframes (such as 1 hour, daily, etc.) to calculate the MACD. This is suitable for analyzing trends in higher or lower timeframes without changing the current timeframe of the chart.
3️⃣Top Dog Mode:
The Top Dog Mode is an advanced feature of the indicator that enhances the MACD's sensitivity to short-term momentum and its ability to identify long-term trends through specific moving average periods (5, 20, 30) and MOM/DAD visualization. It is particularly suitable for short-term traders, swing traders, and market participants who need fast momentum signals. Through crossover dots, MOM histograms, DAD direction alerts, and divergence detection, the Top Dog Mode provides traders with flexible signal generation tools suitable for various market environments.
The signal line period (30) is longer than the standard MACD's 9, which helps filter out short-term fluctuations and confirm long-term trends.
The Top Dog pattern is suitable for the following trading scenarios:
(🔵➤ Short-term trading scenario: In highly volatile markets (such as forex or cryptocurrencies), use the rapid crossover signals of the MOM and DAD to capture short-term price fluctuations.
Recommendation: Use this pattern on lower timeframes (such as the 5-minute or 15-minute timeframe) and set a stop-loss to control risk.
(🔵➤ Trend confirmation scenario: Use the direction of the DAD to confirm the long-term trend and combine it with the MOM histogram to determine entry points.
Recommendation: Use this pattern on higher timeframes (such as the 1-hour or 4-hour timeframe) and combine it with trendlines or moving averages.
(🔵➤ Reversal trading scenario: Combine the Top Dog pattern's divergence signals (labeled "divergence" or "hidden") to identify potential trend reversals.
Recommendation: Confirm divergence signals near key support/resistance levels to reduce the risk of false positives.
(🔵➤ Trend Continuation Scenarios: Using Hidden Divergences (labeled "Hidden") to Identify Trend Continuation Opportunities 👇
istantanea
4. Divergence Detection: Regular Divergences (labeled "Divergence"): Bullish Divergence: When the price makes lower lows, but the MACD histogram or MACD line makes higher lows, it indicates weakening bearish momentum and may signal a reversal.
Bearish Divergence: When the price makes higher highs, but the MACD histogram or MACD line makes lower highs, it indicates weakening bullish momentum and may signal a reversal. 👇
istantanea
Hidden Divergences (labeled "Hidden"): Hidden Bullish Divergence: When the price makes higher lows, but the MACD histogram or MACD line makes lower lows, it may signal the possibility of trend continuation.
Hidden Bearish Divergence: When the price makes lower highs, but the MACD histogram or MACD line makes lower highs, it may signal a reversal. The line has made a higher high, indicating the possibility of trend continuation👇
3️⃣Top Dog 模式:
Top Dog 模式是該指標的一個進階功能,通過特定的均線週期(5、20、30)和 MOM/DAD 的視覺化方式,增強了 MACD 對短期動量的敏感性和長期趨勢的確認能力。它特別適合短線交易者、波段交易者和需要快速動量信號的市場參與者。通過交叉圓點、MOM 直方圖、DAD 方向警報和背離檢測,Top Dog 模式為交易者提供了靈活的信號生成工具,適用於多種市場環境。
信號線週期(30)比標準 MACD 的 9 更長,有助於過濾短期波動,確認長期趨勢。
Top Dog 模式適用於以下交易場景:
(🔵➤短線交易場景:在高波動市場(如外匯或加密貨幣)中,利用 MOM 和 DAD 的快速交叉信號捕捉短期價格波動。
建議:在低時間框架(如 5 分鐘或 15 分鐘)使用,並設置止損以控制風險。
(🔵➤ 趨勢確認場景:利用 DAD 的方向確認長期趨勢,結合 MOM 直方圖判斷進場時機。
建議:在較高時間框架(如 1 小時或 4 小時)使用,結合趨勢線或移動平均線。
(🔵➤反轉交易場景:結合 Top Dog 模式的背離信號(標籤“背”或“隱”),識別潛在的趨勢反轉。
建議:在關鍵支撐/阻力位附近確認背離信號,降低假信號風險。
(🔵➤ 趨勢延續場景:利用隱藏背離(標籤“隱”)捕捉趨勢延續機會👇
istantanea
4. Divergence Detection: Regular Divergence (labeled "Divergence"): Bullish Divergence: When prices make lower lows, but the MACD histogram or MACD line makes higher lows, it indicates weakening downside momentum and may signal a reversal.
Bearish Divergence: When prices make higher highs, but the MACD histogram or MACD line makes lower highs, it indicates weakening upside momentum and may signal a reversal.
4️⃣背離檢測常規背離(標籤為“背”):看漲背離:當價格創出更低低點,但 MACD 直方圖或 MACD 線創出更高低點,表明下跌動量減弱,可能預示反轉。
看跌背離:當價格創出更高高點,但 MACD 直方圖或 MACD 線創出更低高點,表明上漲動量減弱,可能預示反轉👇。
istantanea
隱藏背離(標籤為“隱”):隱藏看漲背離:當價格創出更高低點,但 MACD 直方圖或 MACD 線創出更低低點,表明趨勢延續的可能。
隱藏看跌背離:當價格創出更低高點,但 MACD 直方圖或 MACD 線創出更高高點,表明趨勢延續的可能👇
istantanea
5️⃣ Trend Coloring MACD Line: Based on the position of the MACD line relative to the signal line (crossing above for an uptrend, crossing below for a downtrend), you can choose whether to display the trend color (default green for uptrend, red for downtrend)👇.
5️⃣ 趨勢著色MACD 線:根據 MACD 線相對於信號線的位置(上穿為上升趨勢,下穿為下降趨勢),可選擇是否顯示趨勢顏色(默認綠色為上升,紅色為下降)👇 。
istantanea
6️⃣ Crossover Dots:
When the MACD line crosses the signal line, a dot appears: Upward crossover (MACD line crosses above the signal line): a green dot.
Downward crossover (MACD line crosses below the signal line): a red dot. You can set whether to display the dot and its width.
6️⃣ 交叉圓點:
當 MACD 線與信號線交叉時,顯示圓點:上穿(MACD 線上穿信號線):綠色圓點。
下穿(MACD 線下穿信號線):紅色圓點。可設置是否顯示以及寬度👇 。
istantanea
7️⃣ Display Flexibility: Users can choose whether to display the MACD line, signal line, histogram, histogram outline, MOM histogram (Top Dog pattern), crossover dots, and divergence labels.
Line widths (MACD line, signal line, histogram, dots) and color settings are adjustable.
7️⃣顯示靈活性用戶可選擇是否顯示 MACD 線、信號線、直方圖、直方圖外框、MOM 直方圖(Top Dog 模式)、交叉圓點和背離標籤。
可調整線條寬度(MACD 線、信號線、直方圖、圓點)和顏色設置👇 。
istantanea
8️⃣警報功能:
MACD交叉警報:
🚨MACD 線上穿信號線(看漲信號)。
🚨MACD 線下穿信號線(看跌信號)。
🚨MACD > 0 且上穿(強看漲信號)。
🚨MACD < 0 且下穿(強看跌信號)。
背離警報:
🚨MACD 直方圖/MOM 的常規和隱藏看漲/看跌背離。
🚨MACD 線/DAD 的常規和隱藏看漲/看跌背離。
DAD 方向警報:
🚨DAD(信號線)方向改變(交叉前一根 K 線的信號線值)。
🚨DAD 向上(信號線上升)。
🚨DAD 向下(信號線下降)。
所有警報默認啟用,可通過 TradingView 的警報設置面板配置通知方式。
8️⃣Alert Features:
MACD Crossover Alerts:
🚨MACD Line crosses above Signal Line (bullish signal).
🚨MACD Line crosses below Signal Line (bearish signal).
🚨MACD > 0 and crosses upward (strong bullish signal).
🚨MACD < 0 and crosses downward (strong bearish signal).
Divergence Alerts:
🚨Regular and hidden bullish/bearish divergences of the MACD Histogram/MOM.
🚨Regular and hidden bullish/bearish divergences of the MACD Line/DAD.
DAD Direction Alerts:
🚨DAD (Signal Line) direction changes (crosses over the previous candlestick's Signal Line value).
🚨DAD up (Signal Line rising).
🚨DAD down (Signal Line falling).
All alerts are enabled by default, and notification methods can be configured through the TradingView Alerts panel.
Note di rilascio
♨️盛天®MACD背離Ⓜ️速效TopDog版🕯[English Description]
ShengTian MACD Divergence Enhanced is an advanced oscillator that combines MACD with regular and hidden divergence detection, Top Dog Trading MOM/DAD modes, and multi-timeframe support. It offers customizable alerts for crossovers, divergences, and trend changes, making it suitable for trend following and scalping strategies.

[中文描述]
盛天®MACD背離升級版是一個進階振盪器,結合MACD、常規和隱藏背離檢測、Top Dog Trading的MOM/DAD模式以及多時間框架支持。提供交叉、背離和趨勢變化的可定制警報,適用於趨勢跟踪和短線交易策略。
Note di rilascio
新增背離過濾
背離過濾設置:ATR 過濾默認關閉,勾選啟用。
ATR 週期:默認 14。
ATR 倍數:默認 1.5。
成交量過濾:默認關閉,勾選啟用。
成交量 MA 週期:默認 20。
成交量倍數:默認 1.2。
RSI 過濾:默認關閉,勾選啟用。
RSI 週期:默認 14。
RSI 過買/過賣閾值:默認 70 和 30。
K 線形態過濾:默認關閉,勾選啟用。
看漲形態:默認 (吞沒、錘頭線、十字星)。
看跌形態:默認 (吞沒、倒錘頭線、十字星)。
K 線實體比例:默認 0.1。
影線比例:默認 2.0。Added Divergence Filter
Divergence Filter Settings: ATR Filter (off by default, select to enable).
ATR Period: Default: 14.
ATR Multiplier: Default: 1.5.
Volume Filter: Off by default, select to enable.
Volume MA Period: Default: 20.
Volume Multiplier: Default: 1.2.
RSI Filter: Off by default, select to enable.
RSI Period: Default: 14.
RSI Oversold/Overbought Thresholds: Default: 70 and 30.
K-Line Pattern Filter: Off by default, select to enable.
Bullish Patterns: Default (Engulfing, Hammer, Doji).
Bearish Patterns: Default (Engulfing, Inverted Hammer, Doji).
Body Size: Default 0.1.
Shadow Size: Default 2.0.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.