StockFetcher Forums · Filter Exchange · CCI STOCHASTIC<< >>Post Follow-up
tomm1111
202 posts
msg #69134
Ignore tomm1111
modified
11/9/2008 11:47:09 PM

This filter calculates the CCI Stochastic. As written, it is based on a CCI(14) with a 5 day look back period and 3 day exponential moving average smoothing. Change to fit.

Go LONG as the cci_sto crosses above 20 and go SHORT as it crosses below 80.

Fetcher[
/*cci_sto*/
set{value,cci(14)}
set{clow,value 5 day low}
set{chigh,value 5 day high}
set{num,value - clow}
set{dnom,chigh - clow}
set{ccc3,num/dnom}
set{cci_calc,ccc3 * 100}

set{cci_sto,cema(cci_calc,3)}
draw cci_sto

draw cci_sto line at 80
draw cci_sto line at 20

show stocks where the close is above 1
and volume is above 100000
and not otcbb

add column cci_sto
]



chetron
2,817 posts
msg #69136
Ignore chetron
modified
11/10/2008 6:52:14 AM

THANX TOMM

MAYBE A CCI BILLY ALSO.....


Fetcher[

/* TACHIKAWA */

/*cci_billy*/
set{clow,cci(14) 2 day low}
set{chigh,cci(14) 2 day high}
set{num,CHIGH - cci(14)}
set{dnom,chigh - clow}
set{ccc3,num/dnom}
set{cci_calc,ccc3 * 100}

set{cci_BILLYA,cema(cci_calc,3)}
set{var1,-1}
SET{CCI_BILLY,CCI_BILLYA * var1}
draw cci_BILLY

draw cci_BILLY line at -80
draw cci_BILLY line at -20

show stocks where the close is above 1
and volume is above 100000
and not otcbb

add column cci_BILLY

]



chetron
2,817 posts
msg #69138
Ignore chetron
modified
11/10/2008 9:14:36 AM

maybe.....

Fetcher[


/* TACHIKAWA */

/*cci_billy*/
set{clow2,cci(14) 2 day low}
set{chigh2,cci(14) 2 day high}
set{num2,CHIGH2 - cci(14)}
set{dnom2,chigh2 - clow2}
set{ccc32,num2/dnom2}
set{cci_calc2,ccc32 * 100}

set{cci_BILLYA,cema(cci_calc2,3)}
set{var1,-1}
SET{CCI_BILLYb,CCI_BILLYA * var1}
set{cci_billy,cci_billyb + 100}

/* cci_sto */
set{clow,cci(14) 8 day low}
set{chigh,cci(14) 8 day high}
set{num,cci(14) - clow}
set{dnom,chigh - clow}
set{ccc3,num/dnom}
set{cci_calc,ccc3 * 100}

set{cci_sto,cema(cci_calc,3)}
draw cci_sto on plot cci_billy

draw cci_sto line at 80
draw cci_sto line at 20

show stocks where the close is above 1
and volume is above 100000
and not otcbb

add column cci_sto


show stocks where the close is above 1
and volume is above 100000
and not otcbb

add column cci_BILLY
cci_sto above -0
sort column 5 descending

]



tomm1111
202 posts
msg #69159
Ignore tomm1111
modified
11/10/2008 7:17:00 PM

Well, perhaps in my haste, I left out the cci part of the original filter. I updated the original post. The filter below includes the billy(2) work that Chetron put together (thanks Chetron!). I increased the cci-sto is based on cci(14) with a look back period of 5 days and then a 3 day exponential average smoothing. The billy(2) also has a a 3 day exponential average smoothing. This increases the lag, but reduces some of the whipsaws.

Current you cannot sort by cci_sto column. I believe this is due to a divide by zero issue. I will take a look at this later today.

Fetcher[
/*cci_sto*/
set{value,cci(14)}
set{clow,value 5 day low}
set{chigh,value 5 day high}
set{num,value - clow}
set{dnom,chigh - clow}
set{ccc3,num/dnom}
set{cci_calc,ccc3 * 100}

set{cci_sto,cema(cci_calc,3)}
draw cci_sto

draw cci_sto line at 80
draw cci_sto line at 20

/*smoothed_billy(2)*/
set{clow2,low 2 day low}
set{chigh2,high 2 day high}
set{num2,CHIGH2 - close}
set{dnom2,chigh2 - clow2}
set{ccc32,num2/dnom2}
set{calc2,ccc32 * 100}

set{BILLYA,cema(calc2,3)}
set{var1,-1}
SET{BILLYb,BILLYA * var1}
set{sm_billy,billyb + 100}

draw sm_billy on plot cci_sto

show stocks where the close is above 1
and volume is above 100000
and not otcbb

add column cci_sto
add column sm_billy
]



chetron
2,817 posts
msg #69161
Ignore chetron
11/10/2008 9:04:35 PM

sorry tomm, i should have paid better attention.
updated my filters to be cci indicators also.
billy calc should be with cci also.



tomm1111
202 posts
msg #69163
Ignore tomm1111
11/10/2008 9:29:51 PM

Yeah right Chetron. I haven't thought of calculating cci using the billy calc.

I can't figure out why "nan" shows up in the cci_sto and cci_billy columns. I believe this is what makes them unsortable. I experimented with eliminating any potential divides by zero but still getting the "nan"s. Any idea's.

chetron
2,817 posts
msg #69164
Ignore chetron
modified
11/10/2008 9:35:01 PM

i sorted my last filter by filtering out the nan with "cci_sto above -0"
but of course i don't get the nans
also you don't need the value variable just put "cci(14)" straight up.


chetron
2,817 posts
msg #69165
Ignore chetron
modified
11/10/2008 9:46:56 PM

and of course....

Fetcher[



/* TACHIKAWA */

/*cci_billy*/
set{clow2,cci(14) 2 day low}
set{chigh2,cci(14) 2 day high}
set{num2,CHIGH2 - cci(14)}
set{dnom2,chigh2 - clow2}
set{ccc32,num2/dnom2}
set{cci_calc2,ccc32 * 100}

set{cci_BILLYA,cema(cci_calc2,3)}
set{var1,-1}
SET{CCI_BILLYb,CCI_BILLYA * var1}
set{cci_billy,cci_billyb + 100}

/* cci_sto */
set{clow,cci(14) 8 day low}
set{chigh,cci(14) 8 day high}
set{num,cci(14) - clow}
set{dnom,chigh - clow}
set{ccc3,num/dnom}
set{cci_calc,ccc3 * 100}

set{cci_sto,cema(cci_calc,3)}
draw cci_sto on plot cci_billy

draw cci_sto line at 80
draw cci_sto line at 20

show stocks where the close is above 1
and volume is above 100000
and not otcbb

add column cci_sto


show stocks where the close is above 1
and volume is above 100000
and not otcbb

add column cci_BILLY
cci_sto above -0
rsi(2) below 1
cci_billy below 2

sort column 5 descending

]



tomm1111
202 posts
msg #69169
Ignore tomm1111
11/11/2008 1:21:23 AM

Chetron, thx for the help on this and the "nan" removal. It looks good.

four
5,087 posts
msg #143977
Ignore four
7/1/2018 2:06:44 AM

pop

StockFetcher Forums · Filter Exchange · CCI STOCHASTIC<< >>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.