OPEN-SOURCE SCRIPT

SMA DMA Crossing Signal

업데이트됨
SMA and DMA Crossing Buy Sell Signals

This script implements a Double Moving Average (DMA) strategy, a popular technical analysis technique used by traders to identify trends and potential buy/sell signals in financial markets.

**Description:**

The Double Moving Average strategy involves the calculation of two moving averages – a short-term moving average and a long-term moving average. In this script, we calculate these moving averages as follows:

1. **Short-term DMA (`dmaShort`):**
- Calculated using a 28-bar Simple Moving Average (SMA).
- Represents the shorter-term trend in the price movement.

2. **Long-term DMA (`dmaLong`):**
- Also calculated using a 28-bar SMA.
- Displaced backward by 14 bars (`dmaLong := request.security(syminfo.tickerid, "D", dmaLong[14])`), effectively creating a 28-bar SMA with a -14 bar displacement.
- Represents the longer-term trend in the price movement.

**Signals:**

Buy and sell signals are generated based on the crossing of the short-term DMA over or under the long-term DMA:

- **Buy Signal (`DMA BUY`):** Occurs when the short-term DMA crosses above the long-term DMA (`dmaBuySignal`).
- **Sell Signal (`DMA SELL`):** Occurs when the short-term DMA crosses below the long-term DMA (`dmaSellSignal`).

**How to Use:**

- **Buy Signal:** Consider entering a long position when the short-term DMA crosses above the long-term DMA, indicating a potential uptrend.
- **Sell Signal:** Consider exiting a long position or entering a short position when the short-term DMA crosses below the long-term DMA, indicating a potential downtrend.

This script provides a visual representation of the DMA crossover signals on the chart, helping traders identify potential entry and exit points in the market.

**Note:** It's important to combine DMA signals with other technical analysis tools and risk management strategies for informed trading decisions.

All comments are welcome..
릴리즈 노트
Double Moving Average Crossings Indicator
Overview
The Double Moving Average (DMA) Crossings indicator is a powerful tool designed to help traders identify potential buy and sell signals based on the crossover of two moving averages with different displacements. This indicator combines short and long Double Moving Averages (DMA) along with traditional Simple Moving Averages (SMA) to provide a comprehensive view of market trends and potential reversal points.

Key Features
DMA Short and Long: The indicator calculates two DMAs with the same period but different displacements, providing a more dynamic view of the market.
DMA Short: Plotted in fuchsia color with a circle style line for better visibility.
DMA Long: Plotted in aqua color with a cross style line to distinguish from the short DMA.

Simple Moving Averages:
SMA 30: Plotted in yellow, representing the short-term trend.
SMA 50: Plotted in blue, indicating the intermediate trend.
SMA 200: Plotted in green, showing the long-term trend.

Buy and Sell Signals:
Buy Signal: Generated when the short DMA crosses above the long DMA, indicated by a green upward arrow below the bar.
Sell Signal: Generated when the short DMA crosses below the long DMA, shown by a red downward arrow above the bar.

Usage
This indicator is suitable for traders looking for clear and actionable signals in the market. The combination of DMAs and SMAs allows traders to:

Identify potential entry and exit points based on DMA crossovers.
Observe short-term, intermediate, and long-term trends with SMAs.
Make informed trading decisions with the help of visual buy and sell signals.
How to Interpret
Buy Signal: A green arrow below a bar indicates a potential buying opportunity. This occurs when the short DMA (fuchsia) crosses above the long DMA (aqua).

Sell Signal: A red arrow above a bar signals a potential selling point. This happens when the short DMA (fuchsia) crosses below the long DMA (aqua).

Trend Analysis: The SMAs provide additional context for trend direction:
SMA 30 (yellow) shows the short-term trend.
SMA 50 (blue) reflects the intermediate trend.
SMA 200 (green) represents the long-term trend.

When SMA 30 crosses over the SMA 50 it is bullish and When it crosses below it is bearish trend

Conclusion
The Double Moving Average Crossings indicator is a versatile tool for traders seeking to enhance their market analysis with reliable trend and crossover signals. By combining DMAs and SMAs, this indicator offers a comprehensive view of market dynamics, making it easier to identify profitable trading opportunities.

릴리즈 노트
Update: Swapped the DMA Short and DMA Long Colors
Chart patternsMoving AveragesTrend Analysis

오픈 소스 스크립트

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

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

면책사항