glgene 616 posts msg #115380 - Ignore glgene |
9/15/2013 11:50:09 PM
Need some help with fixing my SF script. I'm trying to write a modification to the indicator CCI(20), called the
DCCI. By definition, DCCI is a dual CCI; that is, a 5-day EMA of the CCI. The DCCI is supposed to be a trigger line -- similar to the 9-day signal line of the MACD (12,26,9). Note: I chose the 5-day period.
But when I tried to script it, all it seems to do is just smooth the CCI(20). I think I'm supposed to be getting the output of a crossover of the DCCI line over the CCI line.
Could someone give me some help. I want to draw the DCCI-CCI crossover line, similiar to a MACD (12,26) crossover of the 9-period signal line.
Here's my start:
|
glgene 616 posts msg #115381 - Ignore glgene |
9/16/2013 12:56:51 AM
I tried to add the 2 plot-related script lines (below), and I'm still not getting a crossover on one plot. ???
draw cci(20) on plot CCI(20)
draw 5ema on plot cci(20)
|
tomm1111 202 posts msg #115382 - Ignore tomm1111 |
9/16/2013 5:19:57 AM
Is what you are looking for?
|
glgene 616 posts msg #115384 - Ignore glgene |
9/16/2013 9:18:16 AM
Bingo! That makes it work. Thanks. Now to experiment with the two input numbers (5 and 20) to come up with a combo that doesn't produce as much noise (too-frequent crossovers). One suggestion was 5 and 80. I think the low number 5 is causing the excess crossovers. CCI(20), I know, is an often-used CCI setting.
Why DCCI vs. CCI? Got the idea from the book, "Getting Started in Chart Patterns (2006)." That, plus some addt'l research via Google (but not much). Claims the DCCI (dual CCI measure) turns the standard (lagging) CCI indicator into a leading indicator. The crossover (using EMA5) as the signal line -- vs. using the slower 0 line crossover on the stand-alone CCI indicator -- would trigger faster buys/sells. Of course, no guarantees.
I would appreciate follow-up remarks from SF users. How would you improve the DCCI settings (dual CCI input numbers)? How would you use DCCI in conjunction with other indicators?
Gene
|