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


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.
20Period Commodity Channel Index: (H+L+CAVGH20AVGL20AVGC20)*4000/3/ (ABS(H+L+CAVGH20AVGL20AVGC20)+ABS(H1+L1+C1AVGH20AVGL20AVGC20) +ABS(H2+L2+C2AVGH20AVGL20AVGC20)+ABS(H3+L3+C3AVGH20AVGL20AVGC20) +ABS(H4+L4+C4AVGH20AVGL20AVGC20)+ABS(H5+L5+C5AVGH20AVGL20AVGC20) +ABS(H6+L6+C6AVGH20AVGL20AVGC20)+ABS(H7+L7+C7AVGH20AVGL20AVGC20) +ABS(H8+L8+C8AVGH20AVGL20AVGC20)+ABS(H9+L9+C9AVGH20AVGL20AVGC20) +ABS(H10+L10+C10AVGH20AVGL20AVGC20)+ABS(H11+L11+C11AVGH20AVGL20AVGC20) +ABS(H12+L12+C12AVGH20AVGL20AVGC20)+ABS(H13+L13+C13AVGH20AVGL20AVGC20) +ABS(H14+L14+C14AVGH20AVGL20AVGC20)+ABS(H15+L15+C15AVGH20AVGL20AVGC20) +ABS(H16+L16+C16AVGH20AVGL20AVGC20)+ABS(H17+L17+C17AVGH20AVGL20AVGC20) +ABS(H18+L18+C18AVGH20AVGL20AVGC20)+ABS(H19+L19+C19AVGH20AVGL20AVGC20)+.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


Registered User Joined: 12/24/2004 Posts: 1

Thank you Bruce for CCI 20. Could you write another formula for CCI 5? Thanks.


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


Worden Trainer
Joined: 10/1/2004 Posts: 4,308

syeh:
Give this a try for CCI 5.
(H+L+CAVGH5AVGL5AVGC5)*1000/3/ (ABS(H+L+CAVGH5AVGL5AVGC5)+ABS(H1+L1+C1AVGH5AVGL5AVGC5) +ABS(H2+L2+C2AVGH5AVGL5AVGC5)+ABS(H3+L3+C3AVGH5AVGL5AVGC5) +ABS(H4+L4+C4AVGH5AVGL5AVGC5))
 Doug Teaching Online!


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))


Registered User Joined: 10/7/2004 Posts: 27

Copy & Paste for CCI 5 gives an error.What next? thirdgrader


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


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?


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+CAVGH5AVGL5AVGC5)*1000/3/ (ABS(H+L+CAVGH5AVGL5AVGC5)+ ABS(H1+L1+C1AVGH5AVGL5AVGC5)+ ABS(H2+L2+C2AVGH5AVGL5AVGC5)+ ABS(H3+L3+C3AVGH5AVGL5AVGC5)+ ABS(H4+L4+C4AVGH5AVGL5AVGC5))


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!


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+CAVGH5AVGL5AVGC5)*1000/3/ (ABS(H+L+CAVGH5AVGL5AVGC5)+ABS(H1+L1+C1AVGH5AVGL5AVGC5) +ABS(H2+L2+C2AVGH5AVGL5AVGC5)+ABS(H3+L3+C3AVGH5AVGL5AVGC5) +ABS(H4+L4+C4AVGH5AVGL5AVGC5)+.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 tenday "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


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!


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.


Worden Trainer
Joined: 10/1/2004 Posts: 4,308

Glad everything's working for you now!
 Doug Teaching Online!


Registered User Joined: 10/7/2004 Posts: 799 Location: Duluth, GA

You're welcome.
Jim Dean


Gold Customer
Joined: 11/14/2004 Posts: 33

I just added your suggested formula for CCI20 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 CCI20. 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?


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 20Period Commodity Channel Index:
(H1+L1+C1AVGH20.1AVGL20.1AVGC20.1)*4000/3/( ABS(H1+L1+C1AVGH20.1AVGL20.1AVGC20.1)+ ABS(H2+L2+C2AVGH20.1AVGL20.1AVGC20.1)+ ABS(H3+L3+C3AVGH20.1AVGL20.1AVGC20.1)+ ABS(H4+L4+C4AVGH20.1AVGL20.1AVGC20.1)+ ABS(H5+L5+C5AVGH20.1AVGL20.1AVGC20.1)+ ABS(H6+L6+C6AVGH20.1AVGL20.1AVGC20.1)+ ABS(H7+L7+C7AVGH20.1AVGL20.1AVGC20.1)+ ABS(H8+L8+C8AVGH20.1AVGL20.1AVGC20.1)+ ABS(H9+L9+C9AVGH20.1AVGL20.1AVGC20.1)+ ABS(H10+L10+C10AVGH20.1AVGL20.1AVGC20.1)+ ABS(H11+L11+C11AVGH20.1AVGL20.1AVGC20.1)+ ABS(H12+L12+C12AVGH20.1AVGL20.1AVGC20.1)+ ABS(H13+L13+C13AVGH20.1AVGL20.1AVGC20.1)+ ABS(H14+L14+C14AVGH20.1AVGL20.1AVGC20.1)+ ABS(H15+L15+C15AVGH20.1AVGL20.1AVGC20.1)+ ABS(H16+L16+C16AVGH20.1AVGL20.1AVGC20.1)+ ABS(H17+L17+C17AVGH20.1AVGL20.1AVGC20.1)+ ABS(H18+L18+C18AVGH20.1AVGL20.1AVGC20.1)+ ABS(H19+L19+C19AVGH20.1AVGL20.1AVGC20.1)+ ABS(H20+L20+C20AVGH20.1AVGL20.1AVGC20.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


Gold Customer
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 20Period Commodity Channel Index: (H1+L1+C1AVGH20.1AVGL20.1AVGC20.1)*4000/3/( ABS(H1+L1+C1AVGH20.1AVGL20.1AVGC20.1)+ ABS(H2+L2+C2AVGH20.1AVGL20.1AVGC20.1)+ ABS(H3+L3+C3AVGH20.1AVGL20.1AVGC20.1)+ ABS(H4+L4+C4AVGH20.1AVGL20.1AVGC20.1)+ ABS(H5+L5+C5AVGH20.1AVGL20.1AVGC20.1)+ ABS(H6+L6+C6AVGH20.1AVGL20.1AVGC20.1)+ ABS(H7+L7+C7AVGH20.1AVGL20.1AVGC20.1)+ ABS(H8+L8+C8AVGH20.1AVGL20.1AVGC20.1)+ ABS(H9+L9+C9AVGH20.1AVGL20.1AVGC20.1)+ ABS(H10+L10+C10AVGH20.1AVGL20.1AVGC20.1)+ ABS(H11+L11+C11AVGH20.1AVGL20.1AVGC20.1)+ ABS(H12+L12+C12AVGH20.1AVGL20.1AVGC20.1)+ ABS(H13+L13+C13AVGH20.1AVGL20.1AVGC20.1)+ ABS(H14+L14+C14AVGH20.1AVGL20.1AVGC20.1)+ ABS(H15+L15+C15AVGH20.1AVGL20.1AVGC20.1)+ ABS(H16+L16+C16AVGH20.1AVGL20.1AVGC20.1)+ ABS(H17+L17+C17AVGH20.1AVGL20.1AVGC20.1)+ ABS(H18+L18+C18AVGH20.1AVGL20.1AVGC20.1)+ ABS(H19+L19+C19AVGH20.1AVGL20.1AVGC20.1)+ ABS(H20+L20+C20AVGH20.1AVGL20.1AVGC20.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


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


Gold Customer
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 CCI20'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 CCI20 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.


Worden Trainer
Joined: 10/1/2004 Posts: 18,819

Are you limiting the values as Bruce suggests in EasyScan?
 Craig Here to Help!


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+C1AVGH20.1AVGL20.1AVGC20.1)*4000/3/( ABS(H1+L1+C1AVGH20.1AVGL20.1AVGC20.1)+ ABS(H2+L2+C2AVGH20.1AVGL20.1AVGC20.1)+ ABS(H3+L3+C3AVGH20.1AVGL20.1AVGC20.1)+ ABS(H4+L4+C4AVGH20.1AVGL20.1AVGC20.1)+ ABS(H5+L5+C5AVGH20.1AVGL20.1AVGC20.1)+ ABS(H6+L6+C6AVGH20.1AVGL20.1AVGC20.1)+ ABS(H7+L7+C7AVGH20.1AVGL20.1AVGC20.1)+ ABS(H8+L8+C8AVGH20.1AVGL20.1AVGC20.1)+ ABS(H9+L9+C9AVGH20.1AVGL20.1AVGC20.1)+ ABS(H10+L10+C10AVGH20.1AVGL20.1AVGC20.1)+ ABS(H11+L11+C11AVGH20.1AVGL20.1AVGC20.1)+ ABS(H12+L12+C12AVGH20.1AVGL20.1AVGC20.1)+ ABS(H13+L13+C13AVGH20.1AVGL20.1AVGC20.1)+ ABS(H14+L14+C14AVGH20.1AVGL20.1AVGC20.1)+ ABS(H15+L15+C15AVGH20.1AVGL20.1AVGC20.1)+ ABS(H16+L16+C16AVGH20.1AVGL20.1AVGC20.1)+ ABS(H17+L17+C17AVGH20.1AVGL20.1AVGC20.1)+ ABS(H18+L18+C18AVGH20.1AVGL20.1AVGC20.1)+ ABS(H19+L19+C19AVGH20.1AVGL20.1AVGC20.1)+ ABS(H20+L20+C20AVGH20.1AVGL20.1AVGC20.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


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+C1AVGH20.1AVGL20.1AVGC20.1) / ( ABS(H1+L1+C1AVGH20.1AVGL20.1AVGC20.1)+ ABS(H2+L2+C2AVGH20.1AVGL20.1AVGC20.1)+ ABS(H3+L3+C3AVGH20.1AVGL20.1AVGC20.1)+ ABS(H4+L4+C4AVGH20.1AVGL20.1AVGC20.1)+ ABS(H5+L5+C5AVGH20.1AVGL20.1AVGC20.1)+ ABS(H6+L6+C6AVGH20.1AVGL20.1AVGC20.1)+ ABS(H7+L7+C7AVGH20.1AVGL20.1AVGC20.1)+ ABS(H8+L8+C8AVGH20.1AVGL20.1AVGC20.1)+ ABS(H9+L9+C9AVGH20.1AVGL20.1AVGC20.1)+ ABS(H10+L10+C10AVGH20.1AVGL20.1AVGC20.1)+ ABS(H11+L11+C11AVGH20.1AVGL20.1AVGC20.1)+ ABS(H12+L12+C12AVGH20.1AVGL20.1AVGC20.1)+ ABS(H13+L13+C13AVGH20.1AVGL20.1AVGC20.1)+ ABS(H14+L14+C14AVGH20.1AVGL20.1AVGC20.1)+ ABS(H15+L15+C15AVGH20.1AVGL20.1AVGC20.1)+ ABS(H16+L16+C16AVGH20.1AVGL20.1AVGC20.1)+ ABS(H17+L17+C17AVGH20.1AVGL20.1AVGC20.1)+ ABS(H18+L18+C18AVGH20.1AVGL20.1AVGC20.1)+ ABS(H19+L19+C19AVGH20.1AVGL20.1AVGC20.1)+ ABS(H20+L20+C20AVGH20.1AVGL20.1AVGC20.1)+ .00001) )
Jim Dean


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


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 hugeformula 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


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


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.


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!


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


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


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


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.


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,


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 20Period and 14Period 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


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


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):
14Period Commodity Channel Index: (H+L+CAVGH14AVGL14AVGC14)*2800/3/ (ABS(H+L+CAVGH14AVGL14AVGC14)+ABS(H1+L1+C1AVGH14AVGL14AVGC14) +ABS(H2+L2+C2AVGH14AVGL14AVGC14)+ABS(H3+L3+C3AVGH14AVGL14AVGC14) +ABS(H4+L4+C4AVGH14AVGL14AVGC14)+ABS(H5+L5+C5AVGH14AVGL14AVGC14) +ABS(H6+L6+C6AVGH14AVGL14AVGC14)+ABS(H7+L7+C7AVGH14AVGL14AVGC14) +ABS(H8+L8+C8AVGH14AVGL14AVGC14)+ABS(H9+L9+C9AVGH14AVGL14AVGC14) +ABS(H10+L10+C10AVGH14AVGL14AVGC14)+ABS(H11+L11+C11AVGH14AVGL14AVGC14) +ABS(H12+L12+C12AVGH14AVGL14AVGC14)+ABS(H13+L13+C13AVGH14AVGL14AVGC14)+.00001)
7Period Commodity Channel Index: (H+L+CAVGH7AVGL7AVGC7)*1400/3/ (ABS(H+L+CAVGH7AVGL7AVGC7)+ABS(H1+L1+C1AVGH7AVGL7AVGC7) +ABS(H2+L2+C2AVGH7AVGL7AVGC7)+ABS(H3+L3+C3AVGH7AVGL7AVGC7) +ABS(H4+L4+C4AVGH7AVGL7AVGC7)+ABS(H5+L5+C5AVGH7AVGL7AVGC7) +ABS(H6+L6+C6AVGH7AVGL7AVGC7)+.00001)
 Craig Here to Help!


Registered User Joined: 11/14/2005 Posts: 77

anyone know how to plot an indicator CCI(72) and its 5 MA?


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


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


Guest1 