[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Cci -macci



PureBytes Links

Trading Reference Links

Greetings all --

The constant used to define an exponential moving average is related to the "length equivalent" of that exponential moving average.

constant = 2 / (length + 1)

0.4 = 2 / 5 = 2 / (4 + 1)

So, an exponential moving average using a smoothing constant of 0.4 corresponds to a 4 bar exponential moving average.

new = EMA(old,4);

The constant being described is the weight assigned to the new value being added to the average.  1.0 minus that constant is the weight assigned to the previous value of the average.

newseries[i] = 0.4 * newvalue[i] + 0.6 * newseries[i-1];

Thanks,
Howard


On Sat, Apr 26, 2008 at 9:16 PM, jon <jonowm@xxxxxxxxxxxx> wrote:

Hi droskill
Sorry - should have made myself clearer.
Standard cci period yes - 14.
Ema set as 14 period as well.
You have me on the 0.4 smoothing - never heard of it before so was
hoping that someone might be able to explain.
Thanks for the code - will try and play around with it.
Cheers, jon



--- In amibroker@xxxxxxxxxxxxxxx, "droskill" <droskill@xxx> wrote:
>
> I think you are going to need to answer more questions: what's the
> period of the CCI? What's the period of the EMA? What does smoothing
> of 0.4 mean?
>
> In terms of what I see, the code would, from my point of view, look
> like this:
>
> myCCI = CCI(14); //I'm assuming the standard CCI in terms of days
> MACCI = MA(myCCI,2);
> SmoothedMACCI = EMA(MACCI,4)://I don't know what 0.4 smoothing means
>
> Plot(SmoothedMACII,"MACCI",colorRed);
>
> --- In amibroker@xxxxxxxxxxxxxxx, "jon" <jonowm@> wrote:
> >
> > Hi there
> > I'm a total novice when it comes to AB coding but learning slowly.
> > Just wondering if anyone has an idea of how to go about coding the
> > following. I came across it on a BB and it intrigued me.
> > >>>>
> > MACCI is a 3 period SMA of the CCI which is then put through an exp MA
> > with smoothing 0.4. I.e Auto regressed @ 40%.
> > >>>>
> > Is this possible to code?
> > Thanks in advance
> > Cheers, Jon
> >
>


__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___