[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

Hi Bruiser,

Change it to this, I like this better.

Cover = xx > zz;
Short = zz > xx;
Buy = xx > zz;
Sell = zz > xx;
Cover = Buy;
Short = Sell;


Best,
Brian


--- In amibroker@xxxxxxxxxxxxxxx, "Brian" <cadvantag@xxxx> wrote:
> Hi Bruiser,
> 
> Give this a look and see if it does what you think it should.
> 
> Best,
> Brian
> 
> 
> xx = (PDI(45)-MDI(45));
> zz = (EMA(PDI(45)-MDI(45),20));
> Value= EMA(PDI(44)-MDI(44),5);
> Trigger=EMA(EMA(PDI(44)-MDI(44),5),3);
> //Close Short & Enter long
> Enter = Value>Trigger AND Ref(Value,-1)<=Ref(Trigger,-1);
> //Close Long & Enter Short
> Exit = Value<Trigger AND Ref(Value,-1)>=Ref(Trigger,-1);
> Cover = Enter > 0;
> Short = Exit > 0;
> Buy = Enter > 0;
> Sell = Exit > 0;
> Cover = Buy;
> Short = Sell;
> 
> 
> Plot(xx,"",colorGreen,8);
> Plot(zz,"",colorRed,8);
> Title=Date()+" "+EncodeColor(colorBlue)+Name()+" "+FullName()
> +"Directional Oscillator"; 
> Buynow = xx > zz ;
> SellNow = zz > xx;
> 
> 
> Equity(1);
> Plot(2, /* defines the height of the ribbon in percent of pane width
> */"Chebyshev Approximation v2",IIf( BuyNow, colorGreen, IIf( SellNow,
> colorRed, 7 )), /* choose color*/styleOwnScale|styleArea|styleNoLabel,
> -0.5, 100);
> GraphXSpace =2;
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Brian" <cadvantag@xxxx> wrote:
> > Hi Bruiser,
> > 
> > >Value:=Mov(PDI(44)-MDI(44),5,E);
> > 
> > What does "E" stand for?
> > 
> > Brian
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "bruiserbbq" <bruiserbbq@xxxx>
wrote:
> > > 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



------------------------ 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/