| tmazanec 1 posts
 msg #108609
 - Ignore tmazanec
 | 10/29/2012 10:46:21 AM 
 Hi,
 
 How do I create an Accumulation Line for an indicator that I have created within a filter?
 In the code below the attempted Accumulated Line is k2:
 
 When you see the charts it appears that k2 is a 2 day Accumulation Line for i2, which is a start, but I would like to see an Accumulation Line that is much longer, say 3 to 6 months or so in order to know the longer term trend.
 
 
 apply to sharedlist(sector etf)
 
 set{c,day change 1 days ago}
 set{d,0}
 set{e, c + d}
 set{ee, e * 0.1}
 set{f, c}
 set{g, 0}
 set{h, f + g}
 set{hh,h*0.2}
 set{i, ee - hh}
 set{k,i}
 
 
 set{c2, day change}
 set{d2, 0 - ee}
 set{e2, c2 + d2}
 set{ee2, e2 * 0.1}
 set{f2, c2}
 set{g2, 0 - hh}
 set{h2, f2 + g2}
 set{hh2,h2*0.2}
 set{i2, ee2 - hh2}
 set{k2,k + i2}
 
 draw i2
 draw k2
 
 
 Thank you,
 
 
 
 |