HPotter

Bill Williams Averages SMMA

This indicator calculates 3 Smoothed moving average for default values of
13, 8 and 5 days, with displacement 8, 5 and 3 days.
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).

Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v2.0 24/09/2014
// This indicator calculates 3 Smoothed moving average for default values of
// 13, 8 and 5 days, with displacement 8, 5 and 3 days: Median Price (High+Low/2).
// 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="Bill Williams Averages. 3Lines", shorttitle="3 Lines", overlay = true)
LLength = input(13, minval=1)
MLength = input(8,minval=1)
SLength = input(5,minval=1)
LOffset = input(8,minval=1)
MOffset = input(5,minval=1)
SOffset = input(3,minval=1)
SUM1 = sum(close, LLength)
SMMA1 = SUM1/LLength
PREVSUM1 = SMMA1[1] * LLength
SMMAL = (PREVSUM1-nz(SMMAL[1])+close)/LLength
SUM2 = sum(close, MLength)
SMMA2 = SUM2/MLength
PREVSUM2 = SMMA2[1] * MLength
SMMAM = (PREVSUM2-nz(SMMAM[1])+close)/MLength
SUM3 = sum(close, SLength)
SMMA3 = SUM3/SLength
PREVSUM3 = SMMA3[1] * SLength
SMMAS = (PREVSUM3-nz(SMMAS[1])+close)/SLength
plot(SMMAL[LOffset], color=blue, title="SMMA L")
plot(SMMAM[MOffset], color=red, title="SMMA M")
plot(SMMAS[SOffset], color=green, title="SMMA S")