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

RE: [amibroker] Relative Strength Comparitive and ROC (newbie)



PureBytes Links

Trading Reference Links

xx = (PDI(45)-MDI(45));

zz = (EMA(PDI(45)-MDI(45),20));



// Close Short & Enter long

Value=EMA(PDI(44)-MDI(44),5);

Trigger=EMA(EMA(PDI(44)-MDI(44),5),3);

Buy= Value > Trigger AND Ref(Value,-1) <= Ref(Trigger,-1);

//Close Long & Enter Short

Value=EMA(PDI(44)-MDI(44),5);

Trigger=EMA(EMA(PDI(44)-MDI(44),5),3);

Sell=Value < Trigger AND Ref(Value,-1) >= Ref(Trigger,-1);

Short=Sell;

Cover=Buy;

Buy=ExRem(Buy,Sell);

Sell=ExRem(Sell,Buy);

Plot(xx,"",colorGreen,8);

Plot(zz,"",colorRed,8);

Title=Date()+" "+EncodeColor(colorBlue)+Name()+" "+FullName()

+"Directional Oscillator";

PlotShapes(Buy*shapeUpArrow,colorGreen);

PlotShapes(Sell*shapeDownArrow,colorRed);

----- Original Message ----- 
From: "bruiserbbq" <bruiserbbq@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, September 04, 2004 7:43 PM
Subject: [amibroker] Re: Directional Oscillator/Bruiser


> Hi Brian, thanks for your interest in this code. It comes from a
> newsletter I subscribe to here in Australia. The code has been
> devised for a "always in" system for the ASX 200 ie go long on the
> crossover and short when it re-crosses.
>
> I started trying to just convert the indicator code over to AB and
> then hopefully convert the whole system over to AB.....but as you
> can tell...my understanding of code is very poor!
>
> Maybe you could help convert the rest for me? Here's the rest of the
> code below.
>
> Close Short & Enter long
> Value:=Mov(PDI(44)-MDI(44),5,E);
> Trigger:=Mov(Mov(PDI(44)-MDI(44),5,E),3,E);
> Value>Trigger AND Ref(Value,-1)<=Ref(Trigger,-1)
>
> Close Long & Enter Short
> Value:=Mov(PDI(44)-MDI(44),5,E);
> Trigger:=Mov(Mov(PDI(44)-MDI(44),5,E),3,E);
> Value<Trigger AND Ref(Value,-1)>=Ref(Trigger,-1)
>
>
> The newsletter also goes on about optimizing the code to fine tune
> the signals............but I haven't a clue on how to do the basic
> system...never mind optimizing it :-)
>
>
> So Brian...if you can cast your eye over the above and convert the
> system over to AB...that would be much appreciated :-)
>
> Cheers Bruiser
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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