OPEN-SOURCE SCRIPT
Aggiornato

Multi EMA/SMA

2 142
Description:

This indicator combines both an Exponential Moving Average (EMA) and a Simple Moving Average (MA). The user can customize the lengths of both the EMA and the MA, as well as their respective colors and line widths.

Features:
  1. Custom Lengths for EMA and MA: The user can specify the desired length for both the EMA and the MA.
  2. Visibility Control: There are options to only display the MA and EMA during the times the price crosses them. This helps in highlighting significant crossover points. Additionally, the user can define how many bars before and after the crossover they wish to visualize the MA and EMA.
  3. Customizable Appearance: The color and line width for both the MA and the EMA can be adjusted as per user preferences.
  4. Dynamic Labels: The indicator provides labels that display the current values of the MA and the EMA. Additionally, these labels dynamically update to reflect any changes to the EMA or MA length input by the user.
Note di rilascio
Description:

This indicator combines both an Exponential Moving Average (EMA) and a Simple Moving Average (MA). The user can customize the lengths of both the EMA and the MA, as well as their respective colors and line widths.

Features:
  1. Custom Lengths for EMA and MA: The user can specify the desired length for both the EMA and the MA.
  2. Visibility Control: There are options to only display the MA and EMA during the times the price crosses them. This helps in highlighting significant crossover points. Additionally, the user can define how many bars before and after the crossover they wish to visualize the MA and EMA.
  3. Customizable Appearance: The color and line width for both the MA and the EMA can be adjusted as per user preferences.
  4. Dynamic Labels: The indicator provides labels that display the current values of the MA and the EMA. Additionally, these labels dynamically update to reflect any changes to the EMA or MA length input by the user.
Note di rilascio
Added an option to set a fixed TF
Note di rilascio
Added 1W option
Note di rilascio
Multi EMA/SMA Enhanced 📈

This indicator provides a flexible and visually enhanced way to use two common moving averages – a Simple Moving Average (SMA) and an Exponential Moving Average (EMA) – for trend analysis and signal generation.

Overview

Moving averages are fundamental tools for smoothing price action and identifying trend direction. This script plots both an SMA and an EMA, allowing you to leverage the characteristics of each. It goes beyond simple plotting by adding several visual aids and customization options to suit your trading style.

Key Features ✨

  • Dual Moving Averages: Plots one SMA and one EMA on your chart.
  • Full Customization: Independently set the Length, Color, and Line Width for both the SMA and EMA.
    Choose the Data Source (Close, Open, HL2, etc.) for calculations.
  • MA Crossover Signal Arrows: Optionally display Up Arrows (🔼, default green) when the SMA crosses above the EMA (potentially indicating a bullish shift).
    Optionally display Down Arrows (🔽, default red) when the SMA crosses below the EMA (potentially indicating a bearish shift).
    Customize the colors for bullish and bearish crossover arrows.
  • Trend Coloring: Optionally color the chart Background or the Price Bars based on the relationship between the two MAs.
    Helps provide an immediate visual cue for the trend defined by the MAs (e.g., Green background/bars when SMA > EMA, Red when SMA < EMA).
    Customize the colors used for bullish and bearish trend phases.
  • Price Cross Visualization (Segment Mode): Optionally, display the MA/EMA lines only as short segments around the points where the price crosses them.
    This can significantly declutter the chart, highlighting recent price interactions.
    Adjust the Segment Length (number of bars to show after the price cross).
  • Value Labels:
    • Display the current numerical value of the SMA and EMA near the right edge of the chart for quick reference.
    • Adjustable horizontal offset for label positioning.


How to Use

  • Trend Identification: Observe whether the price is generally above or below the MAs, and whether the faster MA (typically the one with the shorter length) is above or below the slower MA.
  • Support & Resistance: MAs can act as dynamic levels of support (in uptrends) or resistance (in downtrends).
  • Crossover Signals:MA Crossovers: Arrows signal potential trend changes when the two MAs cross. A cross of the shorter MA above the longer MA is often considered bullish ("Golden Cross"), while the opposite is bearish ("Death Cross").
    Price Crossovers: Observe how price interacts with the MAs. Crosses can signal entries or exits, especially when using the "Segment Mode".
  • Trend Coloring: Use the background or bar coloring for quick confirmation of the prevailing trend according to the MA positions.


Customization

Explore the Indicator Settings panel to fully configure the lengths, colors, visibility options (crossover signals, trend coloring, segment mode), and label preferences to match your charting needs and trading strategy. The settings are organized into logical groups for ease of use.Full Customization:
Independently set the Length, Color, and Line Width for both the SMA and EMA.
Choose the Data Source (Close, Open, HL2, etc.) for calculations.
MA Crossover Signals Arrows:
Optionally display Up Arrows (🔼, default green) when the SMA crosses above the EMA (potentially indicating a bullish shift).
Optionally display Down Arrows (🔽, default red) when the SMA crosses below the EMA (potentially indicating a bearish shift).
Customize the colors for bullish and bearish crossover arrows.
Trend Coloring:
Optionally color the chart Background or the Price Bars based on the relationship between the two MAs.
Helps provide an immediate visual cue for the trend defined by the MAs (e.g., Green background/bars when SMA > EMA, Red when SMA < EMA).
Customize the colors used for bullish and bearish trend phases.
Price Cross Visualization (Segment Mode):
Optionally, display the MA/EMA lines only as short segments around the points where the price crosses them.
This can significantly declutter the chart, highlighting recent price interactions.
Adjust the Segment Length (number of bars to show after the price cross).
Value Labels:
Display the current numerical value of the SMA and EMA near the right edge of the chart for quick reference.
Adjustable horizontal offset for label positioning.
How to Use
Trend Identification: Observe whether the price is generally above or below the MAs, and whether the faster MA (typically the one with the shorter length, though you configure both) is above or below the slower MA.
Support & Resistance: MAs can act as dynamic levels of support (in uptrends) or resistance (in downtrends).
Crossover Signals:
MA Crossovers: Arrows signal potential trend changes or confirmation when the two MAs cross. A cross of the shorter MA above the longer MA is often considered bullish (like a "Golden Cross"), while the opposite is bearish (like a "Death Cross").
Price Crossovers: Observe how price interacts with the MAs. Crosses can signal entries or exits, especially when using the "Segment Mode".
Trend Coloring: Use the background or bar coloring for quick confirmation of the prevailing trend according to the MA positions.
Customization
Explore the Indicator Settings panel to fully configure the lengths, colors, visibility options (crossover signals, trend coloring, segment mode), and label preferences to match your charting needs and trading strategy.
Note di rilascio
Minor fixes
Note di rilascio
fix
Note di rilascio
bug fix

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.