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

[amibroker] Re: Call Indicator - Dinapoli



PureBytes Links

Trading Reference Links

Hi Keith,

I'm trying to workout how to code the Dinapoli Stochastic, did this 
formula work for you? did the comparison of your charts match?

I know it's a long time ago, but if you can remember, it would be 
much appreciated.

Also, did you produce any AFL for the Dinapoli MACD?

Many Thanks,
Pete



--- In amibroker@xxxxxxxxxxxxxxx, "Keith Newhouse" <knewhous@xxx> 
wrote:
>
> Mohan,
> 
> Thank you for the code. I shall palce the MS chart and the AB chart 
> for comparison in the files area under name of Stochastic.doc.  
> Pretty close thank you.
> Regards,
> Keith.
> 
> 
> 
> 
> --- In amibroker@xxxx, "Mohan Yellayi" <yellayi@xxxx> wrote:
> > I took a shot at translating it to AFL. I don't know what 
LastVALUE
> > (X) will do. I assumed it to be the same as what is declared.
> > 
> > Mohan
> > 
> > Di_STO_FAST_K = ( (C - LLV(L,8))/ (HHV(H,8) - LLV(L,8) ) )* 100;
> > 
> > Z = 3;
> > 
> > MV = 1/Z;
> > 
> > Day1 = Cum(1) + 1;
> > 
> > Di_STO_FAST_D = IIf(Day1 < (Z+2), Di_STO_FAST_K, IIf(Day1 = 
(Z+2), 
> MA
> > (Di_STO_FAST_K, Z), AMA(Di_STO_FAST_K, MV)));
> > 
> > NH_Di_STO = IIf(Day1 < (Z+2), Di_STO_FAST_D, IIf(Day1 = (Z+2), MA
> > (Di_STO_FAST_D, Z), AMA(Di_STO_FAST_D, MV)));
> > 
> > //Plot(Di_STO_FAST_K,"Di_STO_FAST_K",colorBlack,styleLine);
> > 
> > Plot(Di_STO_FAST_D,"Di_STO_FAST_D",colorRed,styleLine);
> > Plot(NH_Di_STO,"NH_Di_STO",colorPaleBlue,styleLine);     
> > 
> > --- In amibroker@xxxx, "Ken Close" <closeks@xxxx> wrote:
> > > Keith:
> > > 
> > > Other than dealing with the PREV in the formula, the only way 
> > to "call" a
> > > formula is to include it in the code above the portion that 
uses 
> > it:
> > > 
> > > //Formula1 code
> > > a=....
> > > b=....
> > > Form1 = a + b;
> > > 
> > > //Formula2 code
> > > c=....
> > > d=....
> > > Form2 = c + d + Form1;
> > > 
> > > 
> > > //Formula3 code
> > > Form3 = Form2 .....
> > > 
> > > Copy and paste and you have it all together.
> > > Not as reusable in other formulas as "calling" the formula, but 
> > then copy
> > > and paste is not that complex, just time consuming.
> > > I thought Tomasz has said in the past he was thinking about a 
way 
> > to "call"
> > > formulas (beyond the #include approach.
> > > 
> > > Now, how are you going to integrate that pesky PREV command?
> > > 
> > > Ken
> > > 
> > > 
> > > 
> > > -----Original Message-----
> > > From: Keith Newhouse [mailto:knewhous@xxxx]
> > > Sent: Monday, October 28, 2002 5:56 AM
> > > To: amibroker@xxxx
> > > Subject: [amibroker] Re: Call Indicator
> > > 
> > > 
> > > Below are three formulae that comprise the DiNapoli Stochastic 
in
> > > Metastock code. Each is set up as a custom indicator  You can 
see
> > > that the code Fml("NH_Di_STO_FAST_K") calls the indicator of 
that
> > > name into another indicator.  How can we do the same with AB?
> > > 
> > > Formula Name : NH_Di_STO_FAST_K
> > > ( (C - LLV(L,8))/ (HHV(H,8) - LLV(L,8) ) )* 100
> > > 
> > > Formula Name : NH_Di_STO_FAST_D
> > > Day:=Cum(1)+1;
> > > Z:=3;
> > > MV:=(1/Z);
> > > If(Day<(Z+2),Fml("NH_Di_STO_FAST_K"),
> > > If(day=(Z+2),Mov(Fml("NH_Di_STO_FAST_K"),
> > > LastValue(Z),S),PREV+(MV*(Fml("NH_Di_STO_FAST_K")-PREV))))
> > > 
> > > Formula Name : NH_Di_STO
> > > Day:=Cum(1)+1;
> > > Z:=3;
> > > MV:=(1/Z);
> > > If(Day<(Z+2),Fml("NH_Di_STO_FAST_D"),
> > > If(day=(Z+2),Mov(Fml("NH_Di_STO_FAST_D"),
> > > LastValue(Z),S),PREV+(MV*(Fml("NH_Di_STO_FAST_D")-PREV))))
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > 
> > > Check group FAQ at:
> > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > 
> > > Your use of Yahoo! Groups is subject to 
> > http://docs.yahoo.com/info/terms/
>




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
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/