StockFetcher Forums · Filter Exchange · Creating an Accumulation Line w/in a Filter<< >>Post Follow-up
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,


Kevin_in_GA
4,599 posts
msg #108610
Ignore Kevin_in_GA
modified
10/29/2012 11:04:11 AM

Use the sum function. You can sum any user-defined variable up to 100 days.

Example:

Fetcher[

set{rsi2sum, sum(rsi(2), 100)}

draw rsi2sum

symlist(spy)
]



StockFetcher Forums · Filter Exchange · Creating an Accumulation Line w/in a Filter<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2022 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.