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

RE: [amibroker] AFL language from a Trade Station scan



PureBytes Links

Trading Reference Links

Been playing with it and some of the ranking on the Efficiency are off from what Trade station gives back

Looks like it really does not have anything to do with the parameter setting though as to changing the number on the efficiency rating

 

 

 

Mark

 

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of NW Trader
Sent: Tuesday, December 20, 2005 2:57 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] AFL language from a Trade Station scan

 

Hi Mark,

 

Try the attached exploration for efficient stocks.  Use the parameters to set your price, volume and efficiency levels, plus some other output info.  I wrote this quickly last night, it runs, but I've not tested it for optimal settings.  Seemingly an efficiency of > 8 or > 10 will find some stocks, but I also see good runners whose levels are lower so I don't know if this really is a good filter.  Perhaps tweaking the periods used for the efficiency as I'm a lot shorter term trader.  If you play with it, let us know what you find.  Enjoy.

 

Peace and Justice   ---   Patrick

----- Original Message -----

From: Mark Keitel

Sent: Tuesday, December 20, 2005 7:25 AM

Subject: RE: [amibroker] AFL language from a Trade Station scan

 

Dan,

 

Alright I was trying to use it as an Explore or something like that and did not try it as just an indicator

 

 

Mark

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Dan Clark
Sent: Tuesday, December 20, 2005 9:50 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] AFL language from a Trade Station scan

 

Mark,

 

When you say “…will not work…”, what do you mean?  When I tried it, it worked fine. 

 

Regards,

 

Dan.

 

p.s. Just so we are on the same page, here’s the code that I used:

 

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);

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 );


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Mark Keitel
Sent: Tuesday, December 20, 2005 6:00 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] AFL language from a Trade Station scan

 

Thank you

Though it will not work using the exact format as below

I must be missing something here

 

 

 

Mark

 

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Graham
Sent: Tuesday, December 20, 2005 12:24 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] AFL language from a Trade Station scan

 

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





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