OPEN-SOURCE SCRIPT

MACD Divergence Strategy

shany123의
Strategy Description: MACD Divergence with SMA Crossover Strategy
Overview:

The MACD Divergence with SMA Crossover Strategy is designed to identify high-probability trading opportunities based on the interaction of the MACD (Moving Average Convergence Divergence) indicator and key moving averages. This strategy focuses on detecting divergences between the MACD line and the signal line, combined with specific conditions related to the 50-period and 800-period SMAs. It ensures that the MACD and signal lines do not cross the zero line between the current and previous divergence points, thereby filtering out weaker signals and enhancing the accuracy of trade entries.

Key Components:

Simple Moving Averages (SMAs):

50-period SMA: A short-term trend indicator that helps identify the prevailing market direction.
800-period SMA: A long-term trend indicator used to gauge the overall market trend.
MACD Indicator:

MACD Line: Represents the difference between the 12-period EMA and the 26-period EMA.
Signal Line: A 9-period EMA of the MACD line.
Histogram: The difference between the MACD line and the signal line, used to visualize the strength of the signal.
Trade Conditions:

Long Position (Buy):

The 50 SMA is above the 800 SMA, indicating a bullish market trend.
The MACD line and signal line are both below zero, signifying a potential bullish reversal.
A bullish divergence is detected when the MACD line crosses above the signal line below zero, without either line crossing the zero level between the current and previous cross.
Short Position (Sell):

The 50 SMA is below the 800 SMA, indicating a bearish market trend.
The MACD line and signal line are both above zero, signaling a potential bearish reversal.
A bearish divergence is detected when the MACD line crosses below the signal line above zero, without either line crossing the zero level between the current and previous cross.
Signal Plotting:

Long Signals: Displayed when the conditions for a bullish divergence and SMA alignment are met, marked with a green upward arrow on the chart.
Short Signals: Displayed when the conditions for a bearish divergence and SMA alignment are met, marked with a red downward arrow on the chart.
Chart patternsMoving AveragesTrend Analysis

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항