StockFetcher Forums · Filter Exchange · IBD COMPARATIVE RELATIVE STRENGTH<< >>Post Follow-up
erdoc888
3 posts
msg #146960
Ignore erdoc888
3/17/2019 9:10:57 AM

Has anyone constructed a summed smoothed multi ROC like IBD's relative strength?

I think the formula is : ((((C - C63) / C63) * .4) + (((C - C126) / C126) * .2) + (((C - C189) / C189) * .2) + (((C - C252) / C252) * .2)) * 100 but am not sure how to write it in SF.

Any ideas???

Thanks

graftonian
810 posts
msg #146968
Ignore graftonian
3/17/2019 3:40:04 PM

Fetcher[

optionable
Average Volume(30) > 12345678

set{var21a, close - close 21 days ago}
set{var21b, var21a / close 21 days ago}
set{var21, var21b * 40}

set{var63a, close - close 63days ago}
set{var63b, var63a / close 63 days ago}
set{var63, var63b * 25230}

set{var126a, close - close 126 days ago}
set{var126b, var126a / close 126 days ago}
set{var126, var126b * 20}

set{var252a, close - close 252 days ago}
set{var252b, var252a / close 252 days ago}
set{var252, var252b * 10}

set{ibd1, var21 + var63}
set{ibd2, ibd1 + var126}
set{ibd3, ibd2 + var252}
set{ibd, ibd1 * 1}

add column separator
add column ibd {ibd_rsi}

draw ibd
/**/
set{spy21a, ind(spy,close) - ind(spy,close) 21 days ago}
set{spy21b, spy21a / ind(spy,close) 21 days ago}
set{spy21, spy21b * 40}

set{spy63a, ind(spy,close) - ind(spy,close) 63 days ago}
set{spy63b, spy63a / ind(spy,close) 63 days ago}
set{spy63, spy63b * 30}

set{spy126a, ind(spy,close) - ind(spy,close) 126 days ago}
set{spy126b, spy126a / ind(spy,close) 126 days ago}
set{spy126, spy126b * 20}

set{spy252a, ind(spy,close) - ind(spy,close) 252 days ago}
set{spy252b, spy252a / ind(spy,close) 252 days ago}
set{spy252, spy252b * 10}

set{spyrsi1, spy21 + spy63}
set{spyrsi2, spyrsi1 + spy126}
set{spyrsi, spyrsi2 + spy252}
draw spyrsi on plot ibd
add column spyrsi{spy_rsi}


]



erdoc888
3 posts
msg #147328
Ignore erdoc888
4/12/2019 8:34:01 AM

Thank you graftonian!!!


graftonian
810 posts
msg #147336
Ignore graftonian
4/12/2019 2:22:41 PM

Erdoc, Copy and paste the following to do a little manual backtesting.

/*for backtest*/
set{signal, count(ibd crossed above spyrsi, 1)}
draw signal
signal equals 1

With a little work I think this theory could yield some good results
Graf



StockFetcher Forums · Filter Exchange · IBD COMPARATIVE RELATIVE STRENGTH<< >>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 2018 - 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