Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

30-bar CCI Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Putt4Dough
Posted : Sunday, May 19, 2013 2:18:23 PM

Registered User
Joined: 7/30/2007
Posts: 1,072

Hi Bruce,

Can you please whip up a PCF for a 30-bar CCI (Commodity Channel Index)?
I'd like to use that as a starting point for a few other PCFs I have in mind.

Thanks!

 

 

Bruce_L
Posted : Monday, May 20, 2013 8:30:06 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

An Indicator Formula for a 30-Period Commodity Channel Index (CCI) could be written as:

CCI INDICATOR

(H + L + C - AVGH30 - AVGL30 - AVGC30) * 6000 / 3 / (ABS(H + L + C - AVGH30 - AVGL30 - AVGC30) + ABS(H1 + L1 + C1 - AVGH30 - AVGL30 - AVGC30) + ABS(H2 + L2 + C2 - AVGH30 - AVGL30 - AVGC30) + ABS(H3 + L3 + C3 - AVGH30 - AVGL30 - AVGC30) + ABS(H4 + L4 + C4 - AVGH30 - AVGL30 - AVGC30) + ABS(H5 + L5 + C5 - AVGH30 - AVGL30 - AVGC30) + ABS(H6 + L6 + C6 - AVGH30 - AVGL30 - AVGC30) + ABS(H7 + L7 + C7 - AVGH30 - AVGL30 - AVGC30) + ABS(H8 + L8 + C8 - AVGH30 - AVGL30 - AVGC30) + ABS(H9 + L9 + C9 - AVGH30 - AVGL30 - AVGC30) + ABS(H10 + L10 + C10 - AVGH30 - AVGL30 - AVGC30) + ABS(H11 + L11 + C11 - AVGH30 - AVGL30 - AVGC30) + ABS(H12 + L12 + C12 - AVGH30 - AVGL30 - AVGC30) + ABS(H13 + L13 + C13 - AVGH30 - AVGL30 - AVGC30) + ABS(H14 + L14 + C14 - AVGH30 - AVGL30 - AVGC30) + ABS(H15 + L15 + C15 - AVGH30 - AVGL30 - AVGC30) + ABS(H16 + L16 + C16 - AVGH30 - AVGL30 - AVGC30) + ABS(H17 + L17 + C17 - AVGH30 - AVGL30 - AVGC30) + ABS(H18 + L18 + C18 - AVGH30 - AVGL30 - AVGC30) + ABS(H19 + L19 + C19 - AVGH30 - AVGL30 - AVGC30) + ABS(H20 + L20 + C20 - AVGH30 - AVGL30 - AVGC30) + ABS(H21 + L21 + C21 - AVGH30 - AVGL30 - AVGC30) + ABS(H22 + L22 + C22 - AVGH30 - AVGL30 - AVGC30) + ABS(H23 + L23 + C23 - AVGH30 - AVGL30 - AVGC30) + ABS(H24 + L24 + C24 - AVGH30 - AVGL30 - AVGC30) + ABS(H25 + L25 + C25 - AVGH30 - AVGL30 - AVGC30) + ABS(H26 + L26 + C26 - AVGH30 - AVGL30 - AVGC30) + ABS(H27 + L27 + C27 - AVGH30 - AVGL30 - AVGC30) + ABS(H28 + L28 + C28 - AVGH30 - AVGL30 - AVGC30) + ABS(H29 + L29 + C29 - AVGH30 - AVGL30 - AVGC30) + .000001)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Putt4Dough
Posted : Monday, May 20, 2013 8:33:03 AM

Registered User
Joined: 7/30/2007
Posts: 1,072

Thanks Bruce ... you're AWESOME!!

Putt4Dough
Posted : Wednesday, June 19, 2013 2:20:04 PM

Registered User
Joined: 7/30/2007
Posts: 1,072

Hi Bruce,

I really miss StockFinder's "Sequence Condition" feature in TC2000, but maybe you can help me with a workaround.

Not sure if a PCF is the best way to go, or using "Days Ago", or ... but I've been using a 30-period CCI lately. I'm currently following a small number of tradeables, so I'd like to set up alerts when a symbol crosses up through -100, or crosses down through +100, but there's a catch ...

For example, I'm not interested in a symbol where the CCI rises above 100 to 110, 120, or even 150 before turning down and crossing down thru 100. The symbols I'm more interested in are those that first rise above 200 THEN cross down thru 100, or the inverse: symbols that dip below -200 and THEN cross up thru -100.

Hope that makes sense. Any ideas?

Bruce_L
Posted : Wednesday, June 19, 2013 3:08:42 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

The formula for CCI is too long to utilize the technique outlined in the Days Since Last Peak (or other day-counting needs) topic (which is what I assume you mean by "Days Ago").

About the only thing I can think of would be to check for the maximum value of CCI over some arbitrary period of time. Since it isn't going to be checking that CCI was above 200 since the last time it was below 100, it certainly isn't perfect. The formula for CCI is also too long to utilize the technique outlined in the Min Max PCFs topic, so we will have to use Donchian Channels to check for the maximum CCI.

The basic technique would be to add Donchian Channels of the desired period to the CCI indicator. Then click on the Donchian Channels and select Create Scan Condition to check for Chan Top - Greater Than 200.

Create Conditions from Your Chart

You will then need to add the condition to the same EasyScan as a condition for CCI crossing down through 100.

Building a Scan with Multiple Conditions



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Putt4Dough
Posted : Wednesday, June 19, 2013 3:16:35 PM

Registered User
Joined: 7/30/2007
Posts: 1,072

Thanks, Bruce!

Yeah, I was considering Donchian Channels as well (great minds think alike!) but I wanted to see if you had any alternative solutions.

The good news is that since I can count the number of symbols I'm using this for on one hand, I can still eyeball the chart after getting an alert before pulling the trigger.

Thanks again.

Bruce_L
Posted : Wednesday, June 19, 2013 3:17:51 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.