Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

CCI INDICATOR Topic Rating:
Previous Topic · Next Topic Watch this topic · Print this topic ·
winwon
Posted : Wednesday, December 15, 2004 5:15:41 PM
Registered User
Joined: 11/19/2004
Posts: 130

This topic currently has 3 pages. There are numbers at the top of the page that allow you to select pages 2 and 3.

DOES TC2K HAVE A SIMILAR INDICATOR TO CCI
COMMODITY CHANNEL INDEX?

OR DOES ANYONE HAVE A FORMULA FOR A CCI CUSTOM
INDICATOR ???

THANKS
MIKE MADRID

Bruce_L
Posted : Tuesday, January 4, 2005 10:48:46 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The Commodity Channel Index is not currently part of the TeleChart, but it is possible to add the indicator on your own.

20-Period Commodity Channel Index:
(H+L+C-AVGH20-AVGL20-AVGC20)*4000/3/ (ABS(H+L+C-AVGH20-AVGL20-AVGC20)+ABS(H1+L1+C1-AVGH20-AVGL20-AVGC20) +ABS(H2+L2+C2-AVGH20-AVGL20-AVGC20)+ABS(H3+L3+C3-AVGH20-AVGL20-AVGC20) +ABS(H4+L4+C4-AVGH20-AVGL20-AVGC20)+ABS(H5+L5+C5-AVGH20-AVGL20-AVGC20) +ABS(H6+L6+C6-AVGH20-AVGL20-AVGC20)+ABS(H7+L7+C7-AVGH20-AVGL20-AVGC20) +ABS(H8+L8+C8-AVGH20-AVGL20-AVGC20)+ABS(H9+L9+C9-AVGH20-AVGL20-AVGC20) +ABS(H10+L10+C10-AVGH20-AVGL20-AVGC20)+ABS(H11+L11+C11-AVGH20-AVGL20-AVGC20) +ABS(H12+L12+C12-AVGH20-AVGL20-AVGC20)+ABS(H13+L13+C13-AVGH20-AVGL20-AVGC20) +ABS(H14+L14+C14-AVGH20-AVGL20-AVGC20)+ABS(H15+L15+C15-AVGH20-AVGL20-AVGC20) +ABS(H16+L16+C16-AVGH20-AVGL20-AVGC20)+ABS(H17+L17+C17-AVGH20-AVGL20-AVGC20) +ABS(H18+L18+C18-AVGH20-AVGL20-AVGC20)+ABS(H19+L19+C19-AVGH20-AVGL20-AVGC20)+.00001)

1. Select Chart Template | Add Indicator | Indicator
2. Add Indicator To: Top, Middle or Bottom
3. Check ‘Center Zero Line’
4. Copy the formula and paste it into the ‘Indicator Formula’ window

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
syeh
Posted : Tuesday, January 4, 2005 11:30:42 AM
Registered User
Joined: 12/24/2004
Posts: 1
Thank you Bruce for CCI 20. Could you write another formula for CCI 5? Thanks.


Bruce_L
Posted : Tuesday, January 4, 2005 12:38:38 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
We should have a formula for CCI 5 later today.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Doug_H
Posted : Tuesday, January 4, 2005 4:02:37 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
syeh:

Give this a try for CCI 5.

(H+L+C-AVGH5-AVGL5-AVGC5)*1000/3/
(ABS(H+L+C-AVGH5-AVGL5-AVGC5)+ABS(H1+L1+C1-AVGH5-AVGL5-AVGC5)
+ABS(H2+L2+C2-AVGH5-AVGL5-AVGC5)+ABS(H3+L3+C3-AVGH5-AVGL5-AVGC5)
+ABS(H4+L4+C4-AVGH5-AVGL5-AVGC5))

- Doug
Teaching Online!
jfisamm
Posted : Wednesday, February 2, 2005 4:49:57 AM
Registered User
Joined: 12/18/2004
Posts: 44
somebody at TcNet club wrote the CCI 5 formula as follows:
CCI(5) PCF:
(((H+L+C)/3)-((AVGH5+AVGL5+AVGC5)/3))/(0.015*
((ABS(((AVGH5+AVGL5+AVGC5)/3)- (H+L+C)/3)+
ABS(((AVGH5+AVGL5+AVGC5)/3)-(H1+L1+C1)/3)+
ABS(((AVGH5+AVGL5+AVGC5)/3)- (H2+L2+C2)/3)+
ABS(((AVGH5+AVGL5+AVGC5)/3)-(H3+L3+C3)/3)+
ABS(((AVGH5+AVGL5+AVGC5)/3)- (H4+L4+C4)/3))/5))
ThirdGrader
Posted : Saturday, February 26, 2005 4:03:28 PM
Registered User
Joined: 10/7/2004
Posts: 27
Copy & Paste for CCI 5 gives an error.What next?
thirdgrader
rkd998
Posted : Saturday, February 26, 2005 6:48:25 PM
Registered User
Joined: 2/13/2005
Posts: 26
thirdgrader,

I've entered both formulas into TC2000, and both work OK for me. Both lie ontop of one another, so they both give the same result.

Roy D
delano
Posted : Sunday, February 27, 2005 8:36:27 PM
Registered User
Joined: 1/28/2005
Posts: 6
Thanks for the 5 and 20. I would like a 6 and 14. In the 5 you used a 1000 constant, and 4000 in the 20. What they be for cci6 and cci14, please? How do you get them from Lambert's .015 constant?
tjent
Posted : Tuesday, March 1, 2005 12:02:17 AM
Registered User
Joined: 1/16/2005
Posts: 5
Doug, I've tried this formula and it works great, sometimes.
If the formula is used as a pcf, it will always give you a value,
but when used as an indicator, it will, on some stocks,
give you a divide by zero error. Stock symbol EXM for example.
The only thing I can figure is the software only goes out so far
on decimal places when the formula is used as an indicator,
giving the appearance that your trying to divide by zero.
(.0000139) would appear to be zero if it only went out three decimal
places and rounded down. Just a guess. I can't figure why else it
would give a good test result, but an error on the idicator. Any ideas?

QUOTE (Doug_H)
syeh:

Give this a try for CCI 5.

(H+L+C-AVGH5-AVGL5-AVGC5)*1000/3/
(ABS(H+L+C-AVGH5-AVGL5-AVGC5)+
ABS(H1+L1+C1-AVGH5-AVGL5-AVGC5)+
ABS(H2+L2+C2-AVGH5-AVGL5-AVGC5)+
ABS(H3+L3+C3-AVGH5-AVGL5-AVGC5)+
ABS(H4+L4+C4-AVGH5-AVGL5-AVGC5))
Doug_H
Posted : Tuesday, March 1, 2005 7:56:47 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
I don't have any ideas myself right off hand, but I'll get some help and see what we can find out for you.

- Doug
Teaching Online!
Tanstaafl
Posted : Tuesday, March 1, 2005 8:28:11 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Hi, tjent:

The reason that the formula that you quoted in your posting fails sometimes is that denominator term can evaluate to zero if the stock price has flatlined for ten days or more, i.e. O=H=L=C for the most recent ten days of trading.

To fix it, just add .001 to the very end of the denominator series, thus:
(H+L+C-AVGH5-AVGL5-AVGC5)*1000/3/
(ABS(H+L+C-AVGH5-AVGL5-AVGC5)+ABS(H1+L1+C1-AVGH5-AVGL5-AVGC5)
+ABS(H2+L2+C2-AVGH5-AVGL5-AVGC5)+ABS(H3+L3+C3-AVGH5-AVGL5-AVGC5)
+ABS(H4+L4+C4-AVGH5-AVGL5-AVGC5)+.001)

Alternatively, create a PCF that you use in your EasyScans to filter OUT those kinds of stocks, since you probably don't want to trade them anyways! I actually have a pretty sophisticated version of this that I use regularly, to reject stocks that have flatlined ANY time in the last 2 or three months ... but here's the easy version:

MaxH10 > MinL10

If this PCF is True, it means that sometime in the last ten days, the price changed.

Also, to help kill off any "dead" stocks, you might want to also include the condition that the last ten days have all had at least 2000 shares per day traded:

MinV10 > 20

So, a ten-day "Bury the Dead" PCF would be:

MaxH10 > MinL10 and MinV10 &> 20

If that PCF is False, you should NOT consider trading the stock, IMHO.


Jim Dean

Doug_H
Posted : Tuesday, March 1, 2005 9:54:24 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
EXM, the symbol you referred to, doesn't generate a divide by zero error here until I'm zoomed out to zoom one. With that time frame, there are several periods where the price is unchanged for 5 days in a row or longer (9/16/03 - 9/23/03 for example). For your 5 day formula, if the price is flat for five days or more, the denominator really is zero.

Tanstaafl's comments above should be helpful.

- Doug
Teaching Online!
tjent
Posted : Tuesday, March 1, 2005 11:32:01 PM
Registered User
Joined: 1/16/2005
Posts: 5
Hey, thanks guys. I took Tanstaafl's advice and added .000001 to the denominator. This didn't change the value and it fixed the divide by zero problem. I don't use the CCI in an easyscan, it's just there as a visual for confirmation of other things. Now I can actually see it on everything. Thanks again.
Doug_H
Posted : Tuesday, March 1, 2005 11:59:20 PM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
Glad everything's working for you now!

- Doug
Teaching Online!
Tanstaafl
Posted : Wednesday, March 2, 2005 8:41:53 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
You're welcome.

Jim Dean

Rosie
Posted : Sunday, August 14, 2005 1:38:26 PM
Registered User
Joined: 11/14/2004
Posts: 33
I just added your suggested formula for CCI-20 and added the suggested +.001, and IT WORKS! Am I being greedy to ask for one minor change? Each chart has it's own changing high, middle, and low value lines, but I would LOVE to have a standard +100, 0, and -100 line on all charts as are available on stockcharts.com and other places that show the CCI-20. Strong signals are given by a CCI crossing up from -100 or down from +100. I'd like to see this visually, but if this can't be seen, can I scan for these transition points?
Bruce_L
Posted : Sunday, August 14, 2005 5:23:50 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Selecting Center Zero Line in the Custom Indicator Settings window will do just that, but I do not know of a practical way to add +100 and -100 lines.

To scan for these transition points, you will need a formula for yesterday's 20-Period Commodity Channel Index:

(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1)*4000/3/( ABS(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H2+L2+C2-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H3+L3+C3-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H4+L4+C4-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H5+L5+C5-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H6+L6+C6-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H7+L7+C7-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H8+L8+C8-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H9+L9+C9-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H10+L10+C10-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H11+L11+C11-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H12+L12+C12-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H13+L13+C13-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H14+L14+C14-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H15+L15+C15-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H16+L16+C16-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H17+L17+C17-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H18+L18+C18-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H19+L19+C19-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H20+L20+C20-AVGH20.1-AVGL20.1-AVGC20.1)+.00001)

Create both formulas as Personal Criteria Formulas and add them to EasyScans to find the transitions:

CCI20 crossing up from -100:
-CCI20: Value: -100 to Max
-CCI20.1: Value: Min to -100

CCI20 crossing down from +100:
-CCI20: Value: Min to 100
-CCI20.1: Value: 100 to Max

How to create a Personal Criteria Forumula (PCF)
Using EasyScan to find stocks that meet your own criteria

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Rosie
Posted : Tuesday, August 16, 2005 5:19:05 PM
Registered User
Joined: 11/14/2004
Posts: 33
Adding the center line helped a lot, and I 'm not sure that I'll need the exact +100 and -100 lines. However, I'm still lost, both in theory and practice. Instead of finding stocks at the exact crossing points, I'd be VERY HAPPY if I could find all the stocks within +/- 2% of each 100 line. I've tried a bunch of ways, but I'm obviously not getting it. Can you get me closer to being able to do these scans. I'm not sure that I can show you what I've done or the results that happen, and the CCI's selected are all over the map.

QUOTE (Bruce_L)
Selecting Center Zero Line in the Custom Indicator Settings window will do just that, but I do not know of a practical way to add +100 and -100 lines.

To scan for these transition points, you will need a formula for yesterday's 20-Period Commodity Channel Index:

(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1)*4000/3/( ABS(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H2+L2+C2-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H3+L3+C3-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H4+L4+C4-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H5+L5+C5-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H6+L6+C6-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H7+L7+C7-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H8+L8+C8-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H9+L9+C9-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H10+L10+C10-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H11+L11+C11-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H12+L12+C12-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H13+L13+C13-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H14+L14+C14-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H15+L15+C15-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H16+L16+C16-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H17+L17+C17-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H18+L18+C18-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H19+L19+C19-AVGH20.1-AVGL20.1-AVGC20.1)+ ABS(H20+L20+C20-AVGH20.1-AVGL20.1-AVGC20.1)+.00001)

Create both formulas as Personal Criteria Formulas and add them to EasyScans to find the transitions:

CCI20 crossing up from -100:
-CCI20: Value: -100 to Max
-CCI20.1: Value: Min to -100

CCI20 crossing down from +100:
-CCI20: Value: Min to 100
-CCI20.1: Value: 100 to Max

How to create a Personal Criteria Forumula (PCF)
Using EasyScan to find stocks that meet your own criteria
Bruce_L
Posted : Tuesday, August 16, 2005 5:28:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
You shouldn't need yesterday's CCI to do this:

CCI20 near -100:
-CCI20: Value: -102 to -98

CCI20 near +100:
-CCI20: Value: 98 to 102

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Rosie
Posted : Thursday, August 18, 2005 8:50:15 PM
Registered User
Joined: 11/14/2004
Posts: 33
QUOTE (Bruce_L)
You shouldn't need yesterday's CCI to do this:

CCI20 near -100:
-CCI20: Value: -102 to -98

CCI20 near +100:
-CCI20: Value: 98 to 102


I'm trying this, and it just isn't working. The CCI-20's that result from my scan are all over the map, not near +/-100 in any consistant way. My guess is that I have a bad CCI-20 formula. Here is what I've copied. Can you find the enbedded error?

(H + L + C - AVGH20 - AVGL20 - AVGC20) * 4000 / 3 / (ABS(H + L + C - AVGH20 - AVGL20 - AVGC20) + ABS(H1 + L1 + C1 - AVGH20 - AVGL20 - AVGC20) + ABS(H2 + L2 + C2 - AVGH20 - AVGL20 - AVGC20) + ABS(H3 + L3 + C3 - AVGH20 - AVGL20 - AVGC20) + ABS(H4 + L4 + C4 - AVGH20 - AVGL20 - AVGC20) + ABS(H5 + L5 + C5 - AVGH20 - AVGL20 - AVGC20) + ABS(H6 + L6 + C6 - AVGH20 - AVGL20 - AVGC20) + ABS(H7 + L7 + C7 - AVGH20 - AVGL20 - AVGC20) + ABS(H8 + L8 + C8 - AVGH20 - AVGL20 - AVGC20) + ABS(H9 + L9 + C9 - AVGH20 - AVGL20 - AVGC20) + ABS(H10 + L10 + C10 - AVGH20 - AVGL20 - AVGC20) + ABS(H11 + L11 + C11 - AVGH20 - AVGL20 - AVGC20) + ABS(H12 + L12 + C12 - AVGH20 - AVGL20 - AVGC20) + ABS(H13 + L13 + C13 - AVGH20 - AVGL20 - AVGC20) + ABS(H14 + L14 + C14 - AVGH20 - AVGL20 - AVGC20) + ABS(H15 + L15 + C15 - AVGH20 - AVGL20 - AVGC20) + ABS(H16 + L16 + C16 - AVGH20 - AVGL20 - AVGC20) + ABS(H17 + L17 + C17 - AVGH20 - AVGL20 - AVGC20) + ABS(H18 + L18 + C18 - AVGH20 - AVGL20 - AVGC20) + ABS(H19 + L19 + C19 - AVGH20 - AVGL20 - AVGC20) + .00001)

Also, if we get this formula right, I only want the CCI moving in one direction, up from below -100 or down from above +100. Is there a second PCF that will block out the other side? We must be getting close on this, but still no cigar.
Craig_S
Posted : Thursday, August 18, 2005 9:04:06 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Are you limiting the values as Bruce suggests in EasyScan?

- Craig
Here to Help!
Tanstaafl
Posted : Friday, August 19, 2005 12:22:50 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
There is a plus sign missing in the Yesterday formula above, between the last and the second to last Abs() term. The correct formula for yesterday is:

(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1)*4000/3/(
ABS(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H2+L2+C2-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H3+L3+C3-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H4+L4+C4-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H5+L5+C5-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H6+L6+C6-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H7+L7+C7-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H8+L8+C8-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H9+L9+C9-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H10+L10+C10-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H11+L11+C11-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H12+L12+C12-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H13+L13+C13-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H14+L14+C14-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H15+L15+C15-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H16+L16+C16-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H17+L17+C17-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H18+L18+C18-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H19+L19+C19-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H20+L20+C20-AVGH20.1-AVGL20.1-AVGC20.1)+
.00001)

The formula for today seems to be correct - it is:

(H + L + C - AVGH20 - AVGL20 - AVGC20) * 4000 / 3 / (
ABS(H + L + C - AVGH20 - AVGL20 - AVGC20) +
ABS(H1 + L1 + C1 - AVGH20 - AVGL20 - AVGC20) +
ABS(H2 + L2 + C2 - AVGH20 - AVGL20 - AVGC20) +
ABS(H3 + L3 + C3 - AVGH20 - AVGL20 - AVGC20) +
ABS(H4 + L4 + C4 - AVGH20 - AVGL20 - AVGC20) +
ABS(H5 + L5 + C5 - AVGH20 - AVGL20 - AVGC20) +
ABS(H6 + L6 + C6 - AVGH20 - AVGL20 - AVGC20) +
ABS(H7 + L7 + C7 - AVGH20 - AVGL20 - AVGC20) +
ABS(H8 + L8 + C8 - AVGH20 - AVGL20 - AVGC20) +
ABS(H9 + L9 + C9 - AVGH20 - AVGL20 - AVGC20) +
ABS(H10 + L10 + C10 - AVGH20 - AVGL20 - AVGC20) +
ABS(H11 + L11 + C11 - AVGH20 - AVGL20 - AVGC20) +
ABS(H12 + L12 + C12 - AVGH20 - AVGL20 - AVGC20) +
ABS(H13 + L13 + C13 - AVGH20 - AVGL20 - AVGC20) +
ABS(H14 + L14 + C14 - AVGH20 - AVGL20 - AVGC20) +
ABS(H15 + L15 + C15 - AVGH20 - AVGL20 - AVGC20) +
ABS(H16 + L16 + C16 - AVGH20 - AVGL20 - AVGC20) +
ABS(H17 + L17 + C17 - AVGH20 - AVGL20 - AVGC20) +
ABS(H18 + L18 + C18 - AVGH20 - AVGL20 - AVGC20) +
ABS(H19 + L19 + C19 - AVGH20 - AVGL20 - AVGC20) +
.00001)

Jim Dean

Tanstaafl
Posted : Friday, August 19, 2005 12:26:02 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
The formula for the ROC1 of the CCI20 (i.e. today minus yesterday) can provide an APPROX idea of the slope ... here is a PCF that yields +1 if the slope is positive, -1 if negative, or 0 (rare) if perfectly flat:

SGN(
(H + L + C - AVGH20 - AVGL20 - AVGC20) / (
ABS(H + L + C - AVGH20 - AVGL20 - AVGC20) +
ABS(H1 + L1 + C1 - AVGH20 - AVGL20 - AVGC20) +
ABS(H2 + L2 + C2 - AVGH20 - AVGL20 - AVGC20) +
ABS(H3 + L3 + C3 - AVGH20 - AVGL20 - AVGC20) +
ABS(H4 + L4 + C4 - AVGH20 - AVGL20 - AVGC20) +
ABS(H5 + L5 + C5 - AVGH20 - AVGL20 - AVGC20) +
ABS(H6 + L6 + C6 - AVGH20 - AVGL20 - AVGC20) +
ABS(H7 + L7 + C7 - AVGH20 - AVGL20 - AVGC20) +
ABS(H8 + L8 + C8 - AVGH20 - AVGL20 - AVGC20) +
ABS(H9 + L9 + C9 - AVGH20 - AVGL20 - AVGC20) +
ABS(H10 + L10 + C10 - AVGH20 - AVGL20 - AVGC20) +
ABS(H11 + L11 + C11 - AVGH20 - AVGL20 - AVGC20) +
ABS(H12 + L12 + C12 - AVGH20 - AVGL20 - AVGC20) +
ABS(H13 + L13 + C13 - AVGH20 - AVGL20 - AVGC20) +
ABS(H14 + L14 + C14 - AVGH20 - AVGL20 - AVGC20) +
ABS(H15 + L15 + C15 - AVGH20 - AVGL20 - AVGC20) +
ABS(H16 + L16 + C16 - AVGH20 - AVGL20 - AVGC20) +
ABS(H17 + L17 + C17 - AVGH20 - AVGL20 - AVGC20) +
ABS(H18 + L18 + C18 - AVGH20 - AVGL20 - AVGC20) +
ABS(H19 + L19 + C19 - AVGH20 - AVGL20 - AVGC20) +
.00001)
-
(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1) / (
ABS(H1+L1+C1-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H2+L2+C2-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H3+L3+C3-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H4+L4+C4-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H5+L5+C5-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H6+L6+C6-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H7+L7+C7-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H8+L8+C8-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H9+L9+C9-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H10+L10+C10-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H11+L11+C11-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H12+L12+C12-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H13+L13+C13-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H14+L14+C14-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H15+L15+C15-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H16+L16+C16-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H17+L17+C17-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H18+L18+C18-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H19+L19+C19-AVGH20.1-AVGL20.1-AVGC20.1)+
ABS(H20+L20+C20-AVGH20.1-AVGL20.1-AVGC20.1)+
.00001) )

Jim Dean

Tanstaafl
Posted : Friday, August 19, 2005 12:34:01 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Here is a PCF that yields +1 if the CCI20 is within two +/- points of +100, and yields -1 if the CCI20 is within two +/- points of -100.

( ABS(
(H + L + C - AVGH20 - AVGL20 - AVGC20) * 4000 / 3 / (
ABS(H + L + C - AVGH20 - AVGL20 - AVGC20) +
ABS(H1 + L1 + C1 - AVGH20 - AVGL20 - AVGC20) +
ABS(H2 + L2 + C2 - AVGH20 - AVGL20 - AVGC20) +
ABS(H3 + L3 + C3 - AVGH20 - AVGL20 - AVGC20) +
ABS(H4 + L4 + C4 - AVGH20 - AVGL20 - AVGC20) +
ABS(H5 + L5 + C5 - AVGH20 - AVGL20 - AVGC20) +
ABS(H6 + L6 + C6 - AVGH20 - AVGL20 - AVGC20) +
ABS(H7 + L7 + C7 - AVGH20 - AVGL20 - AVGC20) +
ABS(H8 + L8 + C8 - AVGH20 - AVGL20 - AVGC20) +
ABS(H9 + L9 + C9 - AVGH20 - AVGL20 - AVGC20) +
ABS(H10 + L10 + C10 - AVGH20 - AVGL20 - AVGC20) +
ABS(H11 + L11 + C11 - AVGH20 - AVGL20 - AVGC20) +
ABS(H12 + L12 + C12 - AVGH20 - AVGL20 - AVGC20) +
ABS(H13 + L13 + C13 - AVGH20 - AVGL20 - AVGC20) +
ABS(H14 + L14 + C14 - AVGH20 - AVGL20 - AVGC20) +
ABS(H15 + L15 + C15 - AVGH20 - AVGL20 - AVGC20) +
ABS(H16 + L16 + C16 - AVGH20 - AVGL20 - AVGC20) +
ABS(H17 + L17 + C17 - AVGH20 - AVGL20 - AVGC20) +
ABS(H18 + L18 + C18 - AVGH20 - AVGL20 - AVGC20) +
ABS(H19 + L19 + C19 - AVGH20 - AVGL20 - AVGC20) +
.00001) + 100 ) <= 2 )
-
( ABS(
(H + L + C - AVGH20 - AVGL20 - AVGC20) * 4000 / 3 / (
ABS(H + L + C - AVGH20 - AVGL20 - AVGC20) +
ABS(H1 + L1 + C1 - AVGH20 - AVGL20 - AVGC20) +
ABS(H2 + L2 + C2 - AVGH20 - AVGL20 - AVGC20) +
ABS(H3 + L3 + C3 - AVGH20 - AVGL20 - AVGC20) +
ABS(H4 + L4 + C4 - AVGH20 - AVGL20 - AVGC20) +
ABS(H5 + L5 + C5 - AVGH20 - AVGL20 - AVGC20) +
ABS(H6 + L6 + C6 - AVGH20 - AVGL20 - AVGC20) +
ABS(H7 + L7 + C7 - AVGH20 - AVGL20 - AVGC20) +
ABS(H8 + L8 + C8 - AVGH20 - AVGL20 - AVGC20) +
ABS(H9 + L9 + C9 - AVGH20 - AVGL20 - AVGC20) +
ABS(H10 + L10 + C10 - AVGH20 - AVGL20 - AVGC20) +
ABS(H11 + L11 + C11 - AVGH20 - AVGL20 - AVGC20) +
ABS(H12 + L12 + C12 - AVGH20 - AVGL20 - AVGC20) +
ABS(H13 + L13 + C13 - AVGH20 - AVGL20 - AVGC20) +
ABS(H14 + L14 + C14 - AVGH20 - AVGL20 - AVGC20) +
ABS(H15 + L15 + C15 - AVGH20 - AVGL20 - AVGC20) +
ABS(H16 + L16 + C16 - AVGH20 - AVGL20 - AVGC20) +
ABS(H17 + L17 + C17 - AVGH20 - AVGL20 - AVGC20) +
ABS(H18 + L18 + C18 - AVGH20 - AVGL20 - AVGC20) +
ABS(H19 + L19 + C19 - AVGH20 - AVGL20 - AVGC20) +
.00001) - 100 ) <= 2 )

I think that provides you with precise solutions for all of your requests.

You might have some problems using Easyscans for this - the decile rank assignments to values can cause to you see some hits that are not valid, and to miss some that are. If you MUST use an Easyscan, these +1/0/-1 PCF's should be converted to pairs of T/F PCF's for each of the boundary conditions (and slopes).

Instead of an Easyscan, just assign these to WL tab columns and sort on the columns.

Jim Dean

Tanstaafl
Posted : Friday, August 19, 2005 12:36:46 AM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Final comment, to ANYONE who posts long formulae like these:

Build and post them with neat line breaks. This makes them much easier to understand, AND to check for nasty little omissions like a plus sign or whatever.

I've been doing this kind of huge-formula stuff as long as anybody in the community ... and I can't tell you HOW many times the clean format thing has helped me stay on track.


Jim Dean

Bruce_L
Posted : Friday, August 19, 2005 6:39:52 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
Thanks! The originally posted formula for yesterday's CCI20 (from Sunday, August 14, 2005 5:23:50 PM) now has its missing "+".

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
hobbit
Posted : Sunday, October 23, 2005 2:48:02 AM
Registered User
Joined: 10/7/2004
Posts: 14
Just a thought, why doesn't Wordens just add the CCI indicator to the next update like most other software packages. It looks like it would solve alot of problems and extra work for customers.
Doug_H
Posted : Sunday, October 23, 2005 11:15:11 AM


Worden Trainer

Joined: 10/1/2004
Posts: 4,308
It has been suggested. The best place to make your suggestions is over in the Comments/Suggestions forum. The posts there are reviewed regularly by the decision makers.

- Doug
Teaching Online!
Mousefinger
Posted : Friday, November 11, 2005 7:22:48 PM
Registered User
Joined: 3/30/2005
Posts: 18
QUOTE (Tanstaafl)
The formula for today seems to be correct - it is:

(H + L + C - AVGH20 - AVGL20 - AVGC20) * 4000 / 3 / (
ABS(H + L + C - AVGH20 - AVGL20 - AVGC20) +
ABS(H1 + L1 + C1 - AVGH20 - AVGL20 - AVGC20) +
ABS(H2 + L2 + C2 - AVGH20 - AVGL20 - AVGC20) +
ABS(H3 + L3 + C3 - AVGH20 - AVGL20 - AVGC20) +
ABS(H4 + L4 + C4 - AVGH20 - AVGL20 - AVGC20) +
ABS(H5 + L5 + C5 - AVGH20 - AVGL20 - AVGC20) +
ABS(H6 + L6 + C6 - AVGH20 - AVGL20 - AVGC20) +
ABS(H7 + L7 + C7 - AVGH20 - AVGL20 - AVGC20) +
ABS(H8 + L8 + C8 - AVGH20 - AVGL20 - AVGC20) +
ABS(H9 + L9 + C9 - AVGH20 - AVGL20 - AVGC20) +
ABS(H10 + L10 + C10 - AVGH20 - AVGL20 - AVGC20) +
ABS(H11 + L11 + C11 - AVGH20 - AVGL20 - AVGC20) +
ABS(H12 + L12 + C12 - AVGH20 - AVGL20 - AVGC20) +
ABS(H13 + L13 + C13 - AVGH20 - AVGL20 - AVGC20) +
ABS(H14 + L14 + C14 - AVGH20 - AVGL20 - AVGC20) +
ABS(H15 + L15 + C15 - AVGH20 - AVGL20 - AVGC20) +
ABS(H16 + L16 + C16 - AVGH20 - AVGL20 - AVGC20) +
ABS(H17 + L17 + C17 - AVGH20 - AVGL20 - AVGC20) +
ABS(H18 + L18 + C18 - AVGH20 - AVGL20 - AVGC20) +
ABS(H19 + L19 + C19 - AVGH20 - AVGL20 - AVGC20) +
.00001)
Hi.

So if I want to make that a 14 period CCI instead of 20, would I just change all the AVGH20, AVGL20 & AVGC20 to AVGH14, AVGL14 & AVGC14?

Any help would be great. Thanks.

Keith
Bruce_L
Posted : Friday, November 11, 2005 10:28:28 PM


Worden Trainer

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

Try this:

(H + L + C - AVGH14 - AVGL14 - AVGC14) * 2800 / 3 / (ABS(H + L + C - AVGH14 - AVGL14 - AVGC14) + ABS(H1 + L1 + C1 - AVGH14 - AVGL14 - AVGC14) + ABS(H2 + L2 + C2 - AVGH14 - AVGL14 - AVGC14) + ABS(H3 + L3 + C3 - AVGH14 - AVGL14 - AVGC14) + ABS(H4 + L4 + C4 - AVGH14 - AVGL14 - AVGC14) + ABS(H5 + L5 + C5 - AVGH14 - AVGL14 - AVGC14) + ABS(H6 + L6 + C6 - AVGH14 - AVGL14 - AVGC14) + ABS(H7 + L7 + C7 - AVGH14 - AVGL14 - AVGC14) + ABS(H8 + L8 + C8 - AVGH14 - AVGL14 - AVGC14) + ABS(H9 + L9 + C9 - AVGH14 - AVGL14 - AVGC14) + ABS(H10 + L10 + C10 - AVGH14 - AVGL14 - AVGC14) + ABS(H11 + L11 + C11 - AVGH14 - AVGL14 - AVGC14) + ABS(H12 + L12 + C12 - AVGH14 - AVGL14 - AVGC14) + ABS(H13 + L13 + C13 - AVGH14 - AVGL14 - AVGC14) + .000001)

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Tanstaafl
Posted : Friday, November 11, 2005 11:41:29 PM
Registered User
Joined: 10/7/2004
Posts: 799
Location: Duluth, GA
Mousefinger ...

Use Bruce's solution.

You also would need to elim some extra terms from my CCI20 formula, and change the divisor, to get to the CCI14 that Bruce has provided.

Jim

bknight
Posted : Monday, January 2, 2006 10:01:56 PM
Registered User
Joined: 12/19/2004
Posts: 415
I have a generic question, what would be the generalized formula for a CCI of N periods? I am wrestling with the constant values presented in the two CCI's i this thread.
jaded1
Posted : Wednesday, February 8, 2006 10:09:18 AM
Registered User
Joined: 10/6/2005
Posts: 37
first, thanks for all your help on this CCI topic. Most appreciated.

Next, can someone help me in writing a weekly CCI based on 10 day period ? I've wrestled with this but come up with crazy numbers compared to my chart. My goal is to have the value to sort by.

thanks,

Bruce_L
Posted : Wednesday, February 8, 2006 11:13:55 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bknight,
The general pattern of the CCI formula should be fairly clear. The 4000 and 2800 from the 20-Period and 14-Period versions is equal to 200 times the period. The /3 and +.00001 portions of the formula stay the same when changing the period.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
barbler
Posted : Saturday, February 25, 2006 11:59:58 AM
Registered User
Joined: 2/22/2006
Posts: 29
hi craig. i met you at the expo and am trying out telechart. i am an investools person and would like to set up the indicators as i have learned them to date. can you please provide the formulas for the cci 14 & cci 7.
thank you very much.

barbara
Craig_S
Posted : Saturday, February 25, 2006 12:13:20 PM


Worden Trainer

Joined: 10/1/2004
Posts: 18,819
Hello barbler! Welcome to the TeleChart family!

Check out this short video on how to create a Custom Indicator:

Plotting Custom Indicators with Examples

Here are your formulas (be sure to check the ZERO line option for each of these):

14-Period Commodity Channel Index:
(H+L+C-AVGH14-AVGL14-AVGC14)*2800/3/ (ABS(H+L+C-AVGH14-AVGL14-AVGC14)+ABS(H1+L1+C1-AVGH14-AVGL14-AVGC14) +ABS(H2+L2+C2-AVGH14-AVGL14-AVGC14)+ABS(H3+L3+C3-AVGH14-AVGL14-AVGC14) +ABS(H4+L4+C4-AVGH14-AVGL14-AVGC14)+ABS(H5+L5+C5-AVGH14-AVGL14-AVGC14) +ABS(H6+L6+C6-AVGH14-AVGL14-AVGC14)+ABS(H7+L7+C7-AVGH14-AVGL14-AVGC14) +ABS(H8+L8+C8-AVGH14-AVGL14-AVGC14)+ABS(H9+L9+C9-AVGH14-AVGL14-AVGC14) +ABS(H10+L10+C10-AVGH14-AVGL14-AVGC14)+ABS(H11+L11+C11-AVGH14-AVGL14-AVGC14) +ABS(H12+L12+C12-AVGH14-AVGL14-AVGC14)+ABS(H13+L13+C13-AVGH14-AVGL14-AVGC14)+.00001)

7-Period Commodity Channel Index:
(H+L+C-AVGH7-AVGL7-AVGC7)*1400/3/ (ABS(H+L+C-AVGH7-AVGL7-AVGC7)+ABS(H1+L1+C1-AVGH7-AVGL7-AVGC7) +ABS(H2+L2+C2-AVGH7-AVGL7-AVGC7)+ABS(H3+L3+C3-AVGH7-AVGL7-AVGC7) +ABS(H4+L4+C4-AVGH7-AVGL7-AVGC7)+ABS(H5+L5+C5-AVGH7-AVGL7-AVGC7) +ABS(H6+L6+C6-AVGH7-AVGL7-AVGC7)+.00001)


- Craig
Here to Help!
happy1398
Posted : Monday, February 27, 2006 5:19:15 AM
Registered User
Joined: 11/14/2005
Posts: 77
anyone know how to plot an indicator CCI(72) and its 5 MA?
motmouth
Posted : Monday, February 27, 2006 5:46:58 AM
Registered User
Joined: 10/7/2004
Posts: 166
This may be presumptuous of me, but in case any other newbie was lost in this discusion and looking for a "quick & dirty" definition of CCI, here is one gleened using a search on MSN.com for cci (spelled out of course):

"...Since Lambert's original guidelines, traders have also found the CCI valuable for identifying reversals. The CCI is a versatile indicator capable of producing a wide array of buy and sell signals.

- CCI can be used to identify overbought and oversold levels. A security would be deemed oversold when the CCI dips below -100 and overbought when it exceeds +100. From oversold levels, a buy signal might be given when the CCI moves back above -100. From overbought levels, a sell signal might be given when the CCI moved back below +100.
- As with most oscillators, divergences can also be applied to increase the robustness of signals. A positive divergence below -100 would increase the robustness of a signal based on a move back above -100. A negative divergence above +100 would increase the robustness of a signal based on a move back below +100.
- Trend line breaks can be used to generate signals. Trend lines can be drawn connecting the peaks and troughs. From oversold levels, an advance above -100 and trend line breakout could be considered bullish. From overbought levels, a decline below +100 and a trend line break could be considered bearish.

Traders and investors use the CCI to help identify price reversals, price extremes and trend strength. As with most indicators, the CCI should be used in conjunction with other aspects of technical analysis. CCI fits into the momentum category of oscillators.

I haven't used it myself, but it sounds like an indicator worth considering.
Does anyone have an opinion on the CCI and its use (ie. ability to identify good opportunities when used with TC2000)?
Happy Charting

QUOTE (winwon)
DOES TC2K HAVE A SIMILAR INDICATOR TO CCI
COMMODITY CHANNEL INDEX?

OR DOES ANYONE HAVE A FORMULA FOR A CCI CUSTOM
INDICATOR ???

THANKS
MIKE MADRID
barbler
Posted : Monday, February 27, 2006 2:10:14 PM
Registered User
Joined: 2/22/2006
Posts: 29
thank you, craig for providing the cci 14 & cci7. just wondering, on investools, they use the overbought/oversold lines that are different than tc. for instance, on the cci 14 for aapl on tc, the lines are 134.71 & -134.71...on investools, they use more round numbers which show up as 100 & -100. can you briefly tell me what these numbers actually mean.
and also, can you confirm that it does not matter what these numbers are, but it is the cross that signals the buy or sell signal.

thanks so much!!
barbara
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.