HPotter

Dynamic Momentum Oscillator (Dynamo)

Hi,
In July 1996 Futures magazine, E. Marshall Wall introduces the
Dynamic Momentum Oscillator (Dynamo). Please refer to this article
for interpretation.
The Dynamo oscillator is a normalizing function which adjusts the
values of a standard oscillator for trendiness by taking the difference
between the value of the oscillator and a moving average of the oscillator
and then subtracting that value from the oscillator midpoint.

開源腳本

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

免責聲明

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

想在圖表上使用此腳本?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 28/04/2014
// In July 1996 Futures magazine, E. Marshall Wall introduces the 
// Dynamic Momentum Oscillator (Dynamo). Please refer to this article 
// for interpretation.
// The Dynamo oscillator is a normalizing function which adjusts the 
// values of a standard oscillator for trendiness by taking the difference 
// between the value of the oscillator and a moving average of the oscillator 
// and then subtracting that value from the oscillator midpoint.
////////////////////////////////////////////////////////////
study(title="Dynamo", shorttitle="Dynamo")
OscLen = input(10, minval=1)
MALen = input(20, minval=1)
HiBand = input(77, minval=1)
LowBand = input(23)
hline(HiBand, color=red, linestyle=line)
hline(LowBand, color=green, linestyle=line)
xOscK = stoch(close, high, low, OscLen)
xOscAvg = sma(xOscK, OscLen)
xMAVal = sma(xOscAvg, MALen)
maxNum = 9999999
LowestSoFar = iff(xOscAvg < nz(LowestSoFar[1], maxNum), xOscAvg, nz(LowestSoFar[1], maxNum))
HighestSoFar = iff(xOscAvg > nz(HighestSoFar[1]), xOscAvg, nz(HighestSoFar[1]))
MidPnt = (LowestSoFar + HighestSoFar) / 2
nRes = MidPnt - (xMAVal - xOscAvg)
plot(nRes, color=blue, title="Dynamo")