PROTECTED SOURCE SCRIPT

Enhanced MACD Swing Analysis

Cập nhật
增強版 MACD 擺動分析

概述

增強版 MACD 擺動分析是一個適用於 TradingView 的技術指標,它通過額外的視覺工具增強了傳統的 MACD(移動平均收斂背離),以幫助識別擺動高點和低點。該指標旨在幫助交易者可視化動能的變化,並更準確地確定市場進出位置。它提供基於可自定義閾值的動態顏色變化直方圖,並直接在圖表上繪製擺動高/低點的線條,方便分析。

功能

MACD 計算:該腳本包括傳統的 MACD 計算,並且允許調整快速長度、慢速長度和信號平滑參數。
擺動高/低點檢測:根據用戶定義的回看週期,自動檢測擺動高點和低點,並在圖表右上角顯示這些數值。
動態顏色變化直方圖:根據 MACD 比率動態改變直方圖的顏色,使交易者可以輕鬆識別不同的動能強度。顏色可以自定義,正負動能都有多種色調。
擺動高/低點線條:繪製線條以視覺化顯示擺動高點和低點,並向右延伸這些線條,以便更好地視覺指引。

參數

快速長度 (MACD Fast Length):計算快速移動平均的週期數。預設值為 12。
慢速長度 (MACD Slow Length):計算慢速移動平均的週期數。預設值為 26。
信號平滑 (MACD Signal Smoothing):平滑 MACD 信號線的週期數。預設值為 9。
擺動回看範圍 (Swing Lookback Range):回看多少根 K 線以檢測擺動高點和低點。預設值為 25。
顏色變化比率 (Color Change Ratios):逗號分隔的比率,用於定義直方圖顏色變化的閾值。這些閾值允許用戶自定義何時基於 MACD 比率改變直方圖的顏色強度。提供了默認值。

工作原理

MACD 計算:該腳本使用用戶定義的快速和慢速長度,以及信號線平滑來計算 MACD。
直方圖顏色變化:根據 MACD 線和信號線之間的差值,計算比率以確定直方圖顏色的強度。顏色根據用戶指定的閾值進行變化,以視覺化顯示動能的變化。
擺動高/低點檢測:腳本回看一定數量的 K 線來檢測擺動高點和低點,並在圖表上繪製向右延伸的線條,方便識別。

使用方法

添加到圖表:將指標應用到您的 TradingView 圖表上,以更清晰地可視化 MACD 動能。
調整參數:根據您的交易風格自定義參數。您可以調整 MACD 長度、擺動回看範圍和顏色變化閾值。
解讀信號:使用顏色編碼的直方圖來判斷動能的強弱和方向。擺動高/低點線條有助於識別潛在的市場反轉或進出場位置。

實際應用

動能分析:使用顏色變化直方圖來評估趨勢的強度。顏色越亮表示動能越強,顏色越暗表示趨勢減弱。
擺動識別:擺動高/低點線條便於識別價格可能反轉的支撐和阻力區域。
進出場信號:當直方圖顏色強度變化時,這可能是動能轉變的早期信號,提供潛在的買入或賣出機會。

自定義

該指標高度可自定義,允許交易者修改 MACD 參數、擺動回看範圍和顏色變化閾值。這種靈活性使其適合於不同的交易風格,無論是日內交易者、擺動交易者,還是長期投資者。

Enhanced MACD Swing Analysis

Overview

The Enhanced MACD Swing Analysis script is a technical indicator for TradingView that enhances the traditional MACD (Moving Average Convergence Divergence) with additional visual tools to identify swing highs and swing lows. This indicator is designed to help traders visualize momentum shifts and determine market entry/exit points with greater accuracy. It provides dynamic color-changing histograms based on customizable thresholds and draws swing high/low lines directly on the chart for easy analysis.

Features

MACD Calculation: The script includes the traditional MACD calculation, with adjustable parameters for fast length, slow length, and signal smoothing.
Swing High/Low Detection: Automatically detects swing highs and lows based on a user-defined lookback period and displays the values in the top-right corner of the chart.
Dynamic Color-Changing Histogram: The histogram colors change dynamically based on the MACD ratio, allowing traders to easily identify different levels of momentum. The colors are customizable, with a variety of shades for both positive and negative momentum.
Swing High/Low Lines: Draws lines to visually indicate swing highs and lows, extending these lines to the right for better visual guidance.

Parameters

快速長度 (MACD Fast Length): The number of periods for the fast moving average. Default is 12.
慢速長度 (MACD Slow Length): The number of periods for the slow moving average. Default is 26.
信號平滑 (MACD Signal Smoothing): The number of periods for smoothing the MACD signal line. Default is 9.
擺動回看範圍 (Swing Lookback Range): The number of bars to look back for detecting swing highs and lows. Default is 25.
顏色變化比率 (Color Change Ratios): Comma-separated values for defining the ratios at which histogram colors change. These thresholds allow users to customize when the histogram changes its color intensity based on the MACD ratio. Default values are provided.

How It Works

MACD Calculation: The script calculates the MACD using the user-defined fast and slow lengths, along with a signal line for smoothing.
Histogram Color Change: Based on the difference between the MACD line and the signal line, a ratio is calculated to determine the intensity of the histogram's color. The color changes depending on user-specified thresholds to visually indicate shifts in momentum.
Swing High/Low Detection: The script looks back over a specified number of bars to detect swing highs and lows, which are then plotted on the chart using lines that extend to the right for easier identification.

How to Use

Add to Chart: Apply the indicator to your TradingView chart to visualize MACD momentum with enhanced clarity.
Adjust Parameters: Customize the parameters to suit your trading style. You can adjust the MACD lengths, swing lookback range, and color change thresholds as needed.
Interpret the Signals: Use the color-coded histogram to gauge momentum strength and direction. The swing high/low lines help identify key levels for potential market reversals or entry/exit points.

Practical Applications

Momentum Analysis: Use the color-changing histogram to assess the strength of a trend. Brighter colors indicate stronger momentum, while darker colors suggest weakening trends.
Swing Identification: The swing high and low lines make it easy to identify support and resistance areas where price may reverse.
Entry and Exit Signals: When the histogram color intensity changes, it could be an early indication of a shift in momentum, providing potential buy or sell opportunities.

Customization

This indicator is highly customizable, allowing traders to modify the MACD parameters, swing lookback range, and color change thresholds. This flexibility makes it suitable for different trading styles, whether you're a day trader, swing trader, or long-term investor.
Phát hành các Ghi chú
nothing
Phát hành các Ghi chú
Add more MA methods to provide more choices for fast lines, slow lines, and signal lines
加入更多MA方式讓快線,慢線,信號線更多選擇
Phát hành các Ghi chú
nothing
Moving AveragesTrend Analysis

Mã được bảo vệ

Tập lệnh này được xuất bản mã nguồn đóng và bạn có thể sử dụng một cách tự do.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm