akoetraolrkhoecrxhifbyf

MA of MAs [nostdal.duckdns.org]

Draws the average moving average of several moving averages (averageception)
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
// Modifications of ChrisMoody's "CM_Ultimate_MA_MTF" script
// Draws the average moving average of several moving averages (averageception)

study(title="MA of MAs [nostdal.duckdns.org]", shorttitle="MA of MAs [nostdal.duckdns.org]", overlay=true)

// Inputs
src = close
useCurrentRes = input(true, title="Use Current Chart Resolution?")
resCustom = input(title="Use Different Timeframe? Uncheck Box Above", type=resolution, defval="D")
len = input(20, title="Moving Average Length - LookBack Period")
cc = input(true, title="Change Color Based On Direction?")
smoothe = input(2, minval=1, maxval=10, title="Color Smoothing - 1 = No Smoothing")


res = useCurrentRes ? period : resCustom

hullma = wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))

ema1 = ema(src, len)
ema2 = ema(ema1, len)
ema3 = ema(ema2, len)
tema = 3 * (ema1 - ema2) + ema3

avg = (sma(src, len) + ema(src, len) + wma(src, len) + hullma + vwma(src, len) + rma(src, len)) / 6


out = security(tickerid, res, avg)
ma_up = out >= out[smoothe]
ma_down = out < out[smoothe]
col = cc ? ma_up ? #006600 : ma_down ? #660000 : aqua : aqua
plot(out, title="MA of MAs", style=line, linewidth=4, color = col)