OPEN-SOURCE SCRIPT

Customizable MTF Multiple Moving Averages

Title:
Customizable Multiple Moving Averages with Dynamic Colors

Description:
This script allows you to calculate up to three customizable moving averages, offering the flexibility to choose from multiple moving average types:

SMA (Simple Moving Average)
EMA (Exponential Moving Average)
WMA (Weighted Moving Average)
VWMA (Volume Weighted Moving Average)
SMMA (Smoothed Moving Average)
Key Features:
Separate Timeframe for Each Moving Average:
Each moving average can be calculated on a different timeframe. For instance, you can display a 1D moving average while working on a 4H chart.

Dynamic Colors:
Moving averages dynamically change color based on their trend:

Uptrend Color: When the moving average is increasing compared to the previous bar of its timeframe.
Downtrend Color: When the moving average is decreasing.
Full Customization:

Length: Adjust the period for each moving average.
Source: Choose any price data source (e.g., close, open, high, low).
Colors: Set custom colors for uptrend and downtrend behavior.
Perfect For:
Multi-Timeframe Trend Analysis:
Observe trends from higher timeframes without switching your current chart.
Crossover Strategies:
Combine multiple moving averages to identify entry and exit signals.
How to Use:
Load the Script: Apply it to your chart.
Configure Inputs: Adjust each moving average's settings from the input panel.
Analyze Trends: Visualize dynamic trend movements with easy-to-identify colors.
Example Configuration:
Set MA1 to a 50-period EMA on a 4H timeframe.
Set MA2 to a 100-period SMMA on a 1D timeframe.
Set MA3 to a 200-period VWMA on a 1W timeframe.
Moving Averagesmultitimeframe

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal