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).

Script open-source

Dans le véritable esprit de TradingView, l'auteur de ce script l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par le règlement. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?
////////////////////////////////////////////////////////////
//  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")

Idées en relation