hello togehter,
i´m searching for an indicator, that show me the seasonality of an commodity or curency chart.
for 5 years and 15 years.
here is a popular example from moore resarch:
http://www.mrci.com/client/futures/strat/f3832.php
http://www.seasonalcharts.com/classics_ro[censored]l.html
here is another version of code that can be helpful:
dp_y = 252;
// day's avg Close for 5, 10, 20, 40 yrs and 15 yrs Close
ac5y =
(Ref(C,-dp_y*5)+Ref(C,-dp_y*4)+Ref(C,-dp_y*3)+Ref(C,-dp_y*2)+Ref(C,-dp_y))/5;
ac10y =
(Ref(C,-dp_y*10)+Ref(C,-dp_y*9)+Ref(C,-dp_y*8)+Ref(C,-dp_y*7)+Ref(C,-dp_y*6)+
Ref(C,-dp_y*5)+Ref(C,-dp_y*4)+Ref(C,-dp_y*3)+Ref(C,-dp_y*2)+Ref(C,-dp_y))/10;
ac20y = (Ref(C,-dp_y*20)+Ref(C,-dp_y*19)+Ref(C,-dp_y*18)+Ref(C,-dp_y*17)+Ref(C,-dp_y*16)+
Ref(C,-dp_y*15)+Ref(C,-dp_y*14)+Ref(C,-dp_y*13)+Ref(C,-dp_y*12)+Ref(C,-dp_y*11)+
Ref(C,-dp_y*10)+Ref(C,-dp_y*9)+Ref(C,-dp_y*8)+Ref(C,-dp_y*7)+Ref(C,-dp_y*6)+
Ref(C,-dp_y*5)+Ref(C,-dp_y*4)+Ref(C,-dp_y*3)+Ref(C,-dp_y*2)+Ref(C,-dp_y))/20;
ac40y = (Ref(C,-dp_y*40)+Ref(C,-dp_y*39)+Ref(C,-dp_y*38)+Ref(C,-dp_y*37)+Ref(C,-dp_y*36)+
Ref(C,-dp_y*35)+Ref(C,-dp_y*34)+Ref(C,-dp_y*33)+Ref(C,-dp_y*32)+Ref(C,-dp_y*31)+
Ref(C,-dp_y*30)+Ref(C,-dp_y*29)+Ref(C,-dp_y*28)+Ref(C,-dp_y*27)+Ref(C,-dp_y*26)+
Ref(C,-dp_y*25)+Ref(C,-dp_y*24)+Ref(C,-dp_y*23)+Ref(C,-dp_y*22)+Ref(C,-dp_y*21)+
Ref(C,-dp_y*20)+Ref(C,-dp_y*19)+Ref(C,-dp_y*18)+Ref(C,-dp_y*17)+Ref(C,-dp_y*16)+
Ref(C,-dp_y*15)+Ref(C,-dp_y*14)+Ref(C,-dp_y*13)+Ref(C,-dp_y*12)+Ref(C,-dp_y*11)+
Ref(C,-dp_y*10)+Ref(C,-dp_y*9)+Ref(C,-dp_y*8)+Ref(C,-dp_y*7)+Ref(C,-dp_y*6)+
Ref(C,-dp_y*5)+Ref(C,-dp_y*4)+Ref(C,-dp_y*3)+Ref(C,-dp_y*2)+Ref(C,-dp_y))/40;
// plot price and seasonality overlay
//Plot(C, "", colorWhite, styleBar);
//SetChartOptions(0, chartShowDates);
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title
= StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g,
Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) )
));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
FiveYear = ParamToggle("5YrPlot", "No | Yes");
TenYear = ParamToggle("10YrPlot", "No | Yes");
TwentyYear = ParamToggle("20YrPlot", "No | Yes");
FortyYear = ParamToggle("40YrPlot", "No | Yes");
if( FiveYear )
{
Plot(ac5y, "5yr", colorYellow, styleOwnScale);
}
if( TenYear )
{
Plot(ac10y, "10yr", colorLightOrange, styleOwnScale);
}
if( TwentyYear )
{
Plot(ac20y, "20yr", colorRed, styleOwnScale);
}
if( FortyYear )
{
Plot(ac40y, "40yr", colorBrightGreen, styleOwnScale);
}