TradingView
crasher
17 กุมภา 2015 เวลา 1 นาฬิกา 34 นาที

5x Period Cycle Seasonality 

Apple Inc.NASDAQ

คำอธิบาย

Shows the average from the last 5 periods for close price cycle. For example to see the annual seasonality of a stock for the last 5 years use on daily chart with the default setting of 252, the number of trading days in a year, approximately.
ความคิดเห็น
motcha1
I know what seasonality is, but I don't really get this indicator. What does it do exactly?
jennifer1987
I really dont understand this could you please explain to me the red,orange and green lines
Anderson-FX
Nice!!!
Maybe u make some improvements
rainboo
Hi, You are really Great .
accidentje
Great idea!

I've experimented with it some bit and find the following also interesting... It plots the average %-change instead of the average nominal change.

==

study("5 Period Cycle Seasonality")

Period = input(title="Period Cycle", type=integer , defval=252)

LastYear = (close[Period]-close[2 * Period])/close[2 * Period]
TwoYearsAgo = (close [2 * Period]-close[3 * Period])/close[3 * Period]
ThreeYearsAgo = (close [3 * Period]-close[4 * Period])/close[4 * Period]
FourYearsAgo = (close [4 *Period]-close[5 * Period])/close[5 * Period]
FiveYearsAgo = (close [5 * Period]-close[6 * Period])/close[6 * Period]

Offset = Period
LastYearE = (close[Period - Offset]-close [2 * Period - Offset])/close [2 * Period - Offset]
TwoYearsAgoE = (close [2 * Period - Offset]-close [3 * Period - Offset])/close [3 * Period - Offset]
ThreeYearsAgoE = (close [3 * Period - Offset]-close [4 * Period - Offset])/close [4 * Period - Offset]
FourYearsAgoE = (close [4 *Period - Offset]-close [5 * Period - Offset])/close [5 * Period - Offset]
FiveYearsAgoE = (close [5 * Period - Offset]-close [6 * Period - Offset])/close [6 * Period - Offset]

plot((LastYearE + TwoYearsAgoE + ThreeYearsAgoE + FourYearsAgoE + FiveYearsAgoE) / 5, color = #00ff00, linewidth = 2, offset = Offset)
plot((LastYear + TwoYearsAgo + ThreeYearsAgo + FourYearsAgo + FiveYearsAgo) / 5, color = #ff0000, linewidth = 2)
hline(0)

==
accidentje
Seems TV can't handle code in the 'comment' field. I refer to tradingview.com/v/fXwHPijr/
IvanLabrie
Excellent, thanks for sharing!
เพิ่มเติม