OPEN-SOURCE SCRIPT

Dysmen signals

Mis à jour
Dysmen Signals Indicator

The "Dysmen Signals" indicator is designed to provide clear buy and sell signals based on the crossover of various Exponential Moving Averages (EMAs). This indicator employs a combination of short-term and long-term EMA crossovers to identify potential trading opportunities, while also highlighting significant market movements through specific signals such as the Golden Cross and Death Cross.

Indicator Components

1. Exponential Moving Averages (EMAs)
- EMA 14: A short-term EMA calculated over 14 periods.
- EMA 20: Another short-term EMA calculated over 20 periods.
- EMA 50: A mid-term EMA used as a trend filter.
- EMA 200: A long-term EMA representing the overall trend.

2. Buy and Sell Signals
- Buy Signal: This is triggered when the EMA 14 crosses above the EMA 20 and the closing price is above the EMA 50. This suggests a bullish trend in the market.
- Sell Signal: This is triggered when the EMA 14 crosses below the EMA 20 and the closing price is below the EMA 50. This indicates a bearish trend in the market.

3. Golden Cross and Death Cross
- Golden Cross (GC): Occurs when the EMA 50 crosses above the EMA 200. This is a strong bullish signal indicating a potential long-term upward trend.
- Death Cross (DC): Occurs when the EMA 50 crosses below the EMA 200. This is a strong bearish signal suggesting a potential long-term downward trend.

4. Signal Visualization
- Buy and Sell signals are marked on the chart with green and red triangles respectively. These signals help traders identify potential entry and exit points.
- Golden Cross and Death Cross signals are indicated with yellow and purple diamonds respectively, providing insight into major market trend shifts.

5. Candle Coloring
- Candles are colored green if a buy signal is active and red if a sell signal is active. This visual aid helps in quickly identifying the prevailing market sentiment.

6. EMA 200 Plotting
- The EMA 200 is plotted as a white, semi-thick line on the chart. This line serves as a reference for the overall long-term trend.

Detailed Code Explanation

- EMA Calculations: The script calculates the EMA for 14, 20, 50, and 200 periods using the ta.ema function.
- Crossover Conditions: It uses the ta.crossover and ta.crossunder functions to detect when the EMAs cross each other, triggering buy and sell signals.
- Plotting Signals: The plotshape function is utilized to display BUY and SELL signals as well as Golden Cross and Death Cross signals on the chart.
- Candle Coloring Logic: A variable direction is used to store the current market direction based on the latest signal, which then determines the candle colors using the barcolor function.
- EMA 200 Display: The plot function is used to draw the EMA 200 line on the chart with the specified color and thickness.

By employing this indicator, traders can gain valuable insights into potential market trends and make more informed trading decisions based on the crossover of key EMAs.
Notes de version
Dysmen Signals Indicator (use on 1m-5m-15m-1h)

The "Dysmen Signals" indicator is designed to provide clear buy and sell signals based on the crossover of various Exponential Moving Averages (EMAs). This indicator employs a combination of short-term and long-term EMA crossovers to identify potential trading opportunities while also highlighting significant market movements through specific signals such as the Golden Cross and Death Cross.

Indicator Components

1. Exponential Moving Averages (EMAs)
- EMA 14: A short-term EMA calculated over 14 periods.
- EMA 20: Another short-term EMA calculated over 20 periods.
- EMA 50: A mid-term EMA used as a trend filter.
- EMA 200: A long-term EMA representing the overall trend.

2. Buy and Sell Signals
- Buy Signal: Triggered when the EMA 14 crosses above the EMA 20, the closing price is above the EMA 50, and the closing price is above the EMA 200. This suggests a bullish trend in the market.
- Sell Signal: Triggered when the EMA 14 crosses below the EMA 20, the closing price is below the EMA 50, and the closing price is below the EMA 200. This indicates a bearish trend in the market.

3. Golden Cross and Death Cross
- Golden Cross (GC): Occurs when the EMA 50 crosses above the EMA 200. This is a strong bullish signal indicating a potential long-term upward trend.
- Death Cross (DC): Occurs when the EMA 50 crosses below the EMA 200. This is a strong bearish signal suggesting a potential long-term downward trend.

4. Signal Visualization
- Buy and Sell signals: Marked on the chart with green and red triangles respectively. These signals help traders identify potential entry and exit points.
- Golden Cross and Death Cross signals: Indicated with yellow and purple diamonds respectively, providing insight into major market trend shifts.

5. Candle Coloring
- Buy Trend: Candles are colored green if the EMA 14 is above the EMA 20 and the closing price is above the EMA 50 and EMA 200.
- Sell Trend: Candles are colored red if the EMA 14 is below the EMA 20 and the closing price is below the EMA 50 and EMA 200.
- If the EMA 14 crosses the EMA 20 and the closing price is below the EMA 50 but above the EMA 200, the candles are colored red, but no sell signal is given.
- If the EMA 14 crosses above the EMA 20 and the closing price is above the EMA 50 but below the EMA 200, the candles are colored green, but no buy signal is given.

6. EMA 200 Plotting
- The EMA 200 is plotted as a yellow, semi-thick line on the chart. This line serves as a reference for the overall long-term trend.

Detailed Code Explanation

- EMA Calculations: The script calculates the EMA for 14, 20, 50, and 200 periods using the ta.ema function.
- Crossover Conditions: It uses the ta.crossover and ta.crossunder functions to detect when the EMAs cross each other, triggering buy and sell signals.
- Plotting Signals: The plotshape function is utilized to display BUY and SELL signals as well as Golden Cross and Death Cross signals on the chart.
- Candle Coloring Logic: A variable direction is used to store the current market direction based on the latest signal, which then determines the candle colors using the barcolor function. The candles remain colored according to the trend until the trend is broken.
- EMA 200 Display: The plot function is used to draw the EMA 200 line on the chart with the specified color and thickness.
Notes de version
### Dysmen Signals Indicator (use on 1m-5m-15m-1h)

The "Dysmen Signals" indicator is designed to provide clear buy and sell signals based on the crossover of various Exponential Moving Averages (EMAs). This indicator combines short-term and long-term EMA crossovers to identify potential trading opportunities while also highlighting significant market movements through specific signals such as the Golden Cross and Death Cross.

#### Indicator Components

1. Exponential Moving Averages (EMAs)
- EMA 14: A short-term EMA calculated over 14 periods.
- EMA 20: Another short-term EMA calculated over 20 periods.
- EMA 50: A mid-term EMA used as a trend filter.
- EMA 200: A long-term EMA representing the overall trend.

2. Buy and Sell Signals
- Buy Signal: Triggered when the EMA 20 crosses above the EMA 50 or the EMA 200. This suggests a bullish trend in the market.
- Sell Signal: Triggered when the EMA 20 crosses below the EMA 50 or the EMA 200. This indicates a bearish trend in the market.

3. Golden Cross and Death Cross
- Golden Cross (GC): Occurs when the EMA 50 crosses above the EMA 200. This is a strong bullish signal indicating a potential long-term upward trend.
- Death Cross (DC): Occurs when the EMA 50 crosses below the EMA 200. This is a strong bearish signal suggesting a potential long-term downward trend.

4. Signal Visualization
- Buy and Sell signals: Marked on the chart with green and red triangles respectively, helping traders identify potential entry and exit points.
- Golden Cross and Death Cross signals: Indicated with yellow and purple diamonds respectively, providing insight into major market trend shifts.

5. Candle Coloring
- Buy Trend: Candles are colored green if the EMA 14 is above the EMA 20.
- Sell Trend: Candles are colored red if the EMA 14 is below the EMA 20.
- The EMA 50 and EMA 200 do not affect the candle colors, only the appearance of the signals.

6. EMA 200 Plotting
- The EMA 200 is plotted as a yellow, semi-thick line on the chart. This line serves as a reference for the overall long-term trend.

#### Detailed Code Explanation

- EMA Calculations: The script calculates the EMA for 14, 20, 50, and 200 periods using the ta.ema function.
- Crossover Conditions: It uses the ta.crossover and ta.crossunder functions to detect when the EMAs cross each other, triggering buy and sell signals.
- Plotting Signals: The plotshape function is utilized to display BUY and SELL signals as well as Golden Cross and Death Cross signals on the chart.
- Candle Coloring Logic: A variable direction is used to store the current market direction based on the latest signal, which then determines the candle colors using the barcolor function. The candles remain colored according to the trend until the trend is broken.
- EMA 200 Display: The plot function is used to draw the EMA 200 line on the chart with the specified color and thickness.
Exponential Moving Average (EMA)ema-crossoveremacrossoverEMASemassignalemastrategyMoving Averages

Script open-source

Dans le plus pur esprit TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par nos Règles. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Vous voulez utiliser ce script sur un graphique ?

Clause de non-responsabilité