OPEN-SOURCE SCRIPT

UM EMA SMA WMA HMA with Directional Color Change

UM EMA SMA WMA HMA with Directional Color Change


Description:
This is a Swiss Army knife type of Moving Average tool. Select your favorite Moving Average type, EMA - Exponential Moving Average, SMA - Simple Moving Average, WMA - Weighted Moving Average, or HMA - Hull Moving Average. Then selection your number of periods. The MA line is green when trending higher and red when trending lower. The fill between price and the MA line matches the red/green of the direction.

Defaults and Configuration:
The default setting is 65 period and EMA. Line colors and optional fill colors are user-configurable.

Alerts:
An alert can be set on the MA for directional color changes (red to green, or green to red) Right click the indicator and select Add Alert. Then select Bullish or Bearish color change.

Suggested Uses:
Add this to any timeframe chart with your favorite Moving averages. A strategy I use frequently is to "stretch" the Moving average. For example if you like the 8 day moving average on the daily chart, try the 52 period Moving average on the hourly chart. (6.5 market hours per day * 8) By looking at smaller time frames with longer MAs you get smoother color transitions on the Moving average. Add multiple instances of the MA. I prefer to use a smaller quick MA with a longer MA that represents a longer time frame.

Another use case I also like is the color transition over a Moving Average crossover. While I do like the daily 2/6 and 8/3 moving average crossovers, red-to-green and green-to-red color transitions seem to work with less lag than the crossovers.

Suggested Settings:
Daily charts: 8 EMA
Hourly charts: 55 EMA
30 minute charts: 65 WMA. (I like this one for inverse ETFs)
3 minutes charts: 178 EMA and 233 EMA
I also like to round MA settings up or down to the nearest fibonacci number: 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, etc.
Moving Averages

Skrip open-source

Dengan semangat TradingView yang sesungguhnya, penulis skrip ini telah menerbitkannya sebagai sumber terbuka, sehingga para trader dapat memahami dan memverifikasinya. Hormat untuk penulisnya! Anda dapat menggunakannya secara gratis, namun penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk digunakan pada chart

Inggin menggunakan skrip ini pada chart?


David Franck

Pernyataan Penyangkalan