HPotter

T3 3 Averages

This function is an Pine version of the moving average described in
the January, 1998 issue of S&C magazine, p.57, "Smoothing Techniques
for More Accurate Signals", by Tim Tillson. It is translated from the
MetaStock code presented in the article. The function uses a version
of the XAverage, written by me, which allows variables as inputs.

The most popular method of interpreting a moving average is to compare
the relationship between a moving average of the security's price with
the security's price itself (or between several moving averages).

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 21/05/2014
// This function is an Pine version of the moving average described in
// the January, 1998 issue of S&C magazine, p.57, "Smoothing Techniques
// for More Accurate Signals", by Tim Tillson. It is translated from the
// MetaStock code presented in the article. The function uses a version
// of the XAverage, written by me, which allows variables as inputs.
// The most popular method of interpreting a moving average is to compare
// the relationship between a moving average of the security's price with
// the security's price itself (or between several moving averages).
////////////////////////////////////////////////////////////
study(title="T3 3 Averages", shorttitle="T3")
Length = input(5, minval=1)
hline(0, color=gray, linestyle=line)
xPrice = close
xe1 = ema(xPrice, Length)
xe2 = ema(xe1, Length)
xe3 = ema(xe2, Length)
xe4 = ema(xe3, Length)
xe5 = ema(xe4, Length)
xe6 = ema(xe5, Length)
b = 0.7
c1 = -b*b*b
c2 = 3*b*b+3*b*b*b
c3 = -6*b*b-3*b-3*b*b*b
c4 = 1+3*b+b*b*b+3*b*b
nT3Average = c1 * xe6 + c2 * xe5 + c3 * xe4 + c4 * xe3
nSlope = nT3Average - nT3Average[2]
Res1 = nSlope
Res2 = nSlope[1]
Res3 = nT3Average - nT3Average[1]
plot(iff(Res2 > 10 or Res3 > 10,na, Res1), color=blue, title="Slope")
plot(iff(Res2 > 10 or Res3 > 10,na, Res2), color=red, title="Slope2")
plot(iff(Res2 > 10 or Res3 > 10,na, Res3), color=green, title="Slope1per")

関連のアイデア