StockFetcher Forums · General Discussion · Setting up CCI indicator from scratch<< >>Post Follow-up
kirk123
22 posts
msg #115178
Ignore kirk123
9/1/2013 11:23:37 PM

Hi,

I need help in the CCI indicator. The thing is although there is already a CCI filter ready to be used, I do not want to use the ready made filter since I 'd like to experiment with changing variables within the CCI formula.

Can somebody please help me set up the program for doing the CCI filter from scratch? I'd like to change the constant as an experiment since I think I found a way to make it more accurate.

CCI = (Typical Price - 20-period SMA of TP) / (.015 x Mean Deviation)

Typical Price (TP) = (High + Low + Close)/3

Constant = .015

thanks in advance!


SAFeTRADE
630 posts
msg #115179
Ignore SAFeTRADE
9/2/2013 9:02:05 AM

Here is a little diddy to get you started.

Fetcher[
set{hl, high + low}
set{hlc, hl + close}
set{tp, hlc / 3}
set{tpavg, cma(tp,20)}
set{tpx, tp - tpavg}
set{a, .015 x standard deviation(20)}

set{ccix, tpx / a}

draw ccix line at 0
draw cci(20) line at 0

symlist(spy)
]



Kevin_in_GA
4,599 posts
msg #115180
Ignore Kevin_in_GA
9/2/2013 9:13:03 AM

I would think that the standard deviation would need to be on the typical price, not the close for this one. Something like this:

Fetcher[

set{hl, high + low}
set{hlc, hl + close}
set{tp, hlc / 3}
set{tpavg, cma(tp,20)}
set{tpx, tp - tpavg}
set{stdv, cstddev(tp,20)}
set{a, 0.15 * stdv}

set{ccix, tpx / a}

draw ccix line at 0
draw cci(20) line at 0

symlist(spy)

]



but to be honest, the curves are identical in action and crossovers. Not sure if this is any actual improvement over the standard indicator.

kirk123
22 posts
msg #115184
Ignore kirk123
9/3/2013 7:00:38 AM

thanks a lot guys! much appreciated.

rgds,

StockFetcher Forums · General Discussion · Setting up CCI indicator from scratch<< >>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.