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 <[EMAIL PROTECTED]> 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 [email protected] <amibroker%40yahoogroups.com>, "droskill" > <[EMAIL PROTECTED]> 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 [email protected] <amibroker%40yahoogroups.com>, "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 > > > > > > > >
