PureBytes Links
Trading Reference Links
|
Why is I see an error as soon as sent it
Change this line
DifferenceD5 = Close - Ref(Close,-5);
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm
On 12/20/05, Graham <kavemanperth@xxxxxxxxx> wrote:
> Try this
> ATRD180 = ATR(180);
> ATRD90 = ATR(90);
> ATRD45 = ATR(45);
> ATRD20 = ATR(20);
> ATRD5 = ATR(5);
>
> DifferenceD180 = Close - Ref(Close,-180);
> DifferenceD90 = Close - Ref(Close,-90);
> DifferenceD90 = Close - Ref(Close,-90);
> DifferenceD45 = Close - Ref(Close,-45);
> DifferenceD20 = Close - Ref(Close,-20);
> DifferenceD5 = Close - Ref(Close,5);
>
> EfficiencyD180 = IIf(ATRD180!=0,DifferenceD180/ATRD180,1);
> EfficiencyD90 = IIf(ATRD90!=0,DifferenceD90/ATRD90,1);
> EfficiencyD45 = IIf(ATRD45!=0,DifferenceD45/ATRD45,1);
> EfficiencyD20 = IIf(ATRD20!=0,DifferenceD20/ATRD20,1);
> EfficiencyD5 = IIf(ATRD5!=0,DifferenceD5/ATRD5,1);
>
> Averageeff = (EfficiencyD180 + EfficiencyD90 + EfficiencyD45 +
> EfficiencyD20 ) / 4;
>
> Plot( averageeff, "AvgEff", colorRed, styleLine );
>
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
>
>
> On 12/20/05, aajohnah <aajohnah@xxxxxxxxxxxxxxx> wrote:
> >
> >
> > Efficiency Rating for stocks. It is a system for picking stocks that have a
> > strong trending action and go up 'no matter what'. The concept is credited
> > to Van K Tharpe,
> >
> >
> >
> >
> >
> > Below is the code from a Tradestation Indicator
> >
> > works fine as a plot or as a RadarScreen indicator for those of you who use
> > Tradestation.
> >
> >
> >
> > Thank you for any help on this
> >
> >
> >
> >
> >
> > Tradestation EasyLanguage.
> >
> >
> >
> > {Indicator: Avg Eff.}
> >
> >
> >
> > inputs:
> >
> > Price(close),
> >
> > Length1(20),
> >
> > Length2(20),
> >
> > Displace(0),
> >
> > D180( 180 ),
> >
> > D90( 90 ),
> >
> > D45( 45 ),
> >
> > D20( 20 ),
> >
> > D5( 5 );
> >
> >
> >
> > variables:
> >
> > ATRD180(0),
> >
> > ATRD90(0),
> >
> > ATRD45(0),
> >
> > ATRD20(0),
> >
> > ATRD5(0),
> >
> > DifferenceD180(0),
> >
> > DifferenceD90(0),
> >
> > DifferenceD45(0),
> >
> > DifferenceD20(0),
> >
> > DifferenceD5(0),
> >
> > EfficiencyD180(0),
> >
> > EfficiencyD90(0),
> >
> > EfficiencyD45(0),
> >
> > EfficiencyD20(0),
> >
> > EfficiencyD5(0),
> >
> > AverageEff(0);
> >
> >
> >
> >
> >
> > ATRD180 = AvgTrueRange(D180);
> >
> > ATRD90 = AvgTrueRange(D90);
> >
> > ATRD45 = AvgTrueRange(D45);
> >
> > ATRD20 = AvgTrueRange(D20);
> >
> > ATRD5 = AvgTrueRange(D5);
> >
> >
> >
> > DifferenceD180 = close - close[180];
> >
> > DifferenceD90 = close - close[90];
> >
> > DifferenceD90 = close - close[90];
> >
> > DifferenceD45 = close - close[45];
> >
> > DifferenceD20 = close - close[20];
> >
> > DifferenceD5 = close - close[5];
> >
> >
> >
> > EfficiencyD180 =
> > IFF(ATRD180<>0,DifferenceD180/ATRD180,1);
> >
> > EfficiencyD90 =
> > IFF(ATRD90<>0,DifferenceD90/ATRD90,1);
> >
> > EfficiencyD45 =
> > IFF(ATRD45<>0,DifferenceD45/ATRD45,1);
> >
> > EfficiencyD20 =
> > IFF(ATRD20<>0,DifferenceD20/ATRD20,1);
> >
> > EfficiencyD5 =
> > IFF(ATRD5<>0,DifferenceD5/ATRD5,1);
> >
> > Averageeff = (EfficiencyD180 + EfficiencyD90 +
> > EfficiencyD45 + EfficiencyD20 ) / 4;
> >
> >
> >
> >
> >
> >
> >
> > Plot1( AverageEff, "AverageEff" ) ;
> >
> >
> >
> >
> >
> > Mark
> >
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
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:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|