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

[amibroker] Re: Cycle indicator



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "miche1a" <mguibert@xxx> wrote:
>
> Just starting with amibroker , In metastock I use this cycle 
indicator 
> and want to convert it in amibroker language, one in 9 period and 
one 
> in 15 period , here is the exemple of the 15 period
> 
> Period:= 15;
>       denom1:= If(HHV(H,Period)-LLV(L,Period)>0, HHV(H,Period)-LLV
> (L,Period), 1);
>       P1:= Mov(((C-LLV(L,Period))/ denom1)*100,3,E);
>       denom2 := If(HHV(P1,Period)-LLV(P1,Period)>0, HHV(P1,Period)-
LLV
> (P1,Period), 1);
>       Mov(((P1-LLV(P1,Period))/denom2)*100,3,E)
> 
> Thank's in advance
>
Period1= 15;
denom1= IIf(HHV(H,Period1)-LLV(L,Period1)>0, HHV(H,Period1)-LLV
(L,Period1), 1);
P1= EMA(((C-LLV(L,Period1))/ denom1)*100,3);
denom2= IIf(HHV(P1,Period1)-LLV(P1,Period1)>0, HHV(P1,Period1)-LLV
(P1,Period1), 1);
Plot(EMA(((P1-LLV(P1,Period1))/denom2)*100,3),"", colorRed);

Period2= 9;
denom1= IIf(HHV(H,Period2)-LLV(L,Period2)>0, HHV(H,Period2)-LLV
(L,Period2), 1);
P1= EMA(((C-LLV(L,Period2))/ denom1)*100,3);
denom2= IIf(HHV(P1,Period2)-LLV(P1,Period2)>0, HHV(P1,Period2)-LLV
(P1,Period2), 1);
Plot(EMA(((P1-LLV(P1,Period2))/denom2)*100,3),"", colorBlue);

or you can use this:

Period= Param( "Periods", 15, 1, 200, 1 );
denom1= IIf(HHV(H,Period)-LLV(L,Period)>0, HHV(H,Period)-LLV
(L,Period), 1);
P1= EMA(((C-LLV(L,Period))/ denom1)*100,3);
denom2= IIf(HHV(P1,Period)-LLV(P1,Period)>0, HHV(P1,Period)-LLV
(P1,Period), 1);
Plot(EMA(((P1-LLV(P1,Period))/denom2)*100,3),"", colorRed);

Better still: use StochK% with 14,4 or 15,5 and so on....

cheers



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/