If your problem is that you don't get a proper graph you may want to change "param" in "optimize". For me it produced a proper graph. I have seen this also with other AFL's. Don't ask me why this is, have no clue.
Willem Jan --- In [email protected], "Terry" <[EMAIL PROTECTED]> wrote: > > I wasn't completely clear: > > EMA requires integers. > > AMA requires a smoothing factor between 0 and 1. > > You are now using integers in AMA, see red below. This won't work. > (Before your value was 2 / (1 + .213) = 1.6488). Use SmoothingFactor1 in > your AMA formula with the FastLength = integer value as you have it. > This will provide the required value 0-1. If you simply need the values > you show (0.108) you don't need to compute a smoothing factor, just use > it in the AMA formula. > > > > However, given the formula you found, I believe you will need to build a > loop to compute this bar by bar as EMA and AMA are both array formulas > that compute all bars at once. > > -- > > Terry > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Tony Lei > Sent: Tuesday, March 28, 2006 15:19 > To: [email protected] > Subject: Re: [amibroker] Dinapoli MACD > > > > It still does not work. > > These are the settings : > fast= .108, slow = .213, average = .199 > > Formula: > > EMA1current = EMA1previous + SF1 ( Close - EMA1previous ) > EMA2current = EMA2previous + SF2 ( Close - EMA2previous ) > MACDcurrent = EMA1current - EMA2current > Signal Line = MACD previous + SLSF ( MACDcurrent - MACDprevious ) > > SF=2/(N+1) > > > //Dinapoli MACD > FastLength = Param("FastLength",8,0,36,2); > SlowLength = Param("SlowLength",17,0,52,2); > MACMA = Param("MACMA",9,0,15,1); > > > SmoothingFactor1 = 2 / ( fastlength + 1 ) ; > SmoothingFactor2 = 2 / ( slowlength + 1 ) ; > SmoothingFactor3 = 2 / ( MACMA + 1 ) ; > > EMA1 = AMA (Close,fastlength) ; > EMAfast = EMA1 + ( SmoothingFactor1 * (Close-EMA1) ) ; > > EMA2 = AMA (Close,slowlength) ; > EMAslow = EMA2 + ( SmoothingFactor2 * (Close - EMA2) ) ; > > MACD1 = EMAfast-EMAslow ; > > > Plot( MACD1, StrFormat(_SECTION_NAME()+"(%g,%g)", > fastlength,slowlength), ParamColor("MACD color", colorRed ), > ParamStyle("MACD style") ); > > > > On 3/28/06, Terry <[EMAIL PROTECTED]> wrote: > > EMA requires bars (or days) as integers. You are using a formula that > converts number of bars (as integers) into a fractional smoothing > factor. This smoothing factor works with AMA and should be between 0 and > 1.00. Change your two EMA() to AMA() and your Param statements must use > integers if you're going to use smoothing. The param statement should be > something like this: > > > > FastLength = Param("FastLength",8,2,200,1); > > -- > > Terry > > -----Original Message----- > From: [email protected] [mailto: [email protected] ] On > Behalf Of Tony Lei > Sent: Tuesday, March 28, 2006 13:22 > To: [email protected] > Subject: [amibroker] Dinapoli MACD > > > > There is something wrong with this formula and I can't figure it out. > > FastLength = Param("FastLength",.213,0,36,2); > SlowLength = Param("SlowLength",.108,0,52,2); > MACMA = Param("MACMA",.199,0,15,1); > > > SmoothingFactor1 = 2 / ( fastlength + 1 ) ; > SmoothingFactor2 = 2 / ( slowlength + 1 ) ; > SmoothingFactor3 = 2 / ( MACMA + 1 ) ; > > EMA1 = EMA (Close, fastlength) ; > EMAfast = EMA1 + ( SmoothingFactor1 * (Close-EMA1) ) ; > > EMA2 = EMA (Close, slowlength ); > EMAslow = EMA2 + ( SmoothingFactor2 * (Close - EMA2) ) ; > > MACD1 = EMAfast-EMAslow ; > > > Plot (MACD1, "", 5, 4 ) ; > > > > 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 other support material please check also: > http://www.amibroker.com/support.html > > > > > > > SPONSORED LINKS > > > Investment > <http://groups.yahoo.com/gads? t=ms&k=Investment+management+software&w1=I > nvestment+management+software&w2=Real+estate+investment+software&w3=I nve > stment+property+software&w4=Software+support&w5=Real+estate+investmen t+a > nalysis+software&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZ NcM > u4KNQ> management software > > Real > <http://groups.yahoo.com/gads? t=ms&k=Real+estate+investment+software&w1= > Investment+management+software&w2=Real+estate+investment+software&w3= Inv > estment+property+software&w4=Software+support&w5=Real+estate+investme nt+ > analysis+software&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKG MtJ > 9tFSJA> estate investment software > > Investment > <http://groups.yahoo.com/gads? t=ms&k=Investment+property+software&w1=Inv > estment+management+software&w2=Real+estate+investment+software&w3=Inv est > ment+property+software&w4=Software+support&w5=Real+estate+investment+ ana > lysis+software&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6 oX5 > WZw> property software > > > Software > <http://groups.yahoo.com/gads? t=ms&k=Software+support&w1=Investment+mana > gement+software&w2=Real+estate+investment+software&w3=Investment+prop ert > y+software&w4=Software+support&w5=Real+estate+investment+analysis+sof twa > re&w6=Investment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w> > support > > Real > <http://groups.yahoo.com/gads? t=ms&k=Real+estate+investment+analysis+sof > tware&w1=Investment+management+software&w2=Real+estate+investment+sof twa > re&w3=Investment+property+software&w4=Software+support&w5=Real+estate +in > vestment+analysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8 PlA > JASx0wrSaX5-Zlw> estate investment analysis software > > Investment > <http://groups.yahoo.com/gads? t=ms&k=Investment+software&w1=Investment+m > anagement+software&w2=Real+estate+investment+software&w3=Investment+p rop > erty+software&w4=Software+support&w5=Real+estate+investment+analysis+ sof > tware&w6=Investment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg> > software > > > > _____ > > YAHOO! GROUPS LINKS > > > > * Visit your group "amibroker > <http://groups.yahoo.com/group/amibroker> " on the web. > > > * To unsubscribe from this group, send an email to: > <mailto:[EMAIL PROTECTED] subject=Unsubscribe> > [EMAIL PROTECTED] > > > * Your use of Yahoo! Groups is subject to the Yahoo! > <http://docs.yahoo.com/info/terms/> Terms of Service. > > > > _____ > > > > > 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 other support material please check also: > http://www.amibroker.com/support.html > > > > > > > SPONSORED LINKS > > > Investment > <http://groups.yahoo.com/gads? t=ms&k=Investment+management+software&w1=I > nvestment+management+software&w2=Real+estate+investment+software&w3=I nve > stment+property+software&w4=Software+support&w5=Real+estate+investmen t+a > nalysis+software&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZ NcM > u4KNQ> management software > > Real > <http://groups.yahoo.com/gads? t=ms&k=Real+estate+investment+software&w1= > Investment+management+software&w2=Real+estate+investment+software&w3= Inv > estment+property+software&w4=Software+support&w5=Real+estate+investme nt+ > analysis+software&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKG MtJ > 9tFSJA> estate investment software > > Investment > <http://groups.yahoo.com/gads? t=ms&k=Investment+property+software&w1=Inv > estment+management+software&w2=Real+estate+investment+software&w3=Inv est > ment+property+software&w4=Software+support&w5=Real+estate+investment+ ana > lysis+software&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6 oX5 > WZw> property software > > > Software > <http://groups.yahoo.com/gads? t=ms&k=Software+support&w1=Investment+mana > gement+software&w2=Real+estate+investment+software&w3=Investment+prop ert > y+software&w4=Software+support&w5=Real+estate+investment+analysis+sof twa > re&w6=Investment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w> > support > > Real > <http://groups.yahoo.com/gads? t=ms&k=Real+estate+investment+analysis+sof > tware&w1=Investment+management+software&w2=Real+estate+investment+sof twa > re&w3=Investment+property+software&w4=Software+support&w5=Real+estate +in > vestment+analysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8 PlA > JASx0wrSaX5-Zlw> estate investment analysis software > > Investment > <http://groups.yahoo.com/gads? t=ms&k=Investment+software&w1=Investment+m > anagement+software&w2=Real+estate+investment+software&w3=Investment+p rop > erty+software&w4=Software+support&w5=Real+estate+investment+analysis+ sof > tware&w6=Investment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg> > software > > > > _____ > > YAHOO! GROUPS LINKS > > > > * Visit your group "amibroker > <http://groups.yahoo.com/group/amibroker> " on the web. > > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > > * Your use of Yahoo! Groups is subject to the Yahoo! > <http://docs.yahoo.com/info/terms/> Terms of Service. > > > > _____ > 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 other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
