Yearly Ticker Index


Just trying to create a composite ticker based on the same ticker but using annual days as the data. In the example below I am plotting current vs the composite last 2 years data. I'm not really sure how well it lines up with leap years , days of the week ect , any suggestions would be helpful. I tried with ohlc candles with odd results ( close > highs, sometimes) , so I'm questioning if the plot is even accurate.

c1 = Ref(C,-365) - Ref(C,-366);
C2 = Ref(C,-365*2) - Ref(C,-365*2-1);
cC = Cum( c1 + c2);
Plot( C,"",colorwhite,stylecandle);
Plot( cC,"",colorblue,styleLine |styleownscale);

Hello ak47, welcome to the forum.

I'm not sure of your question but I have noticed you appear to be using calendar days versus trading days. This link may clarify the difference: Get past yearly gains - #4 by thankyou18

Good luck, John

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.