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

RE: [amibroker] Sort and rank an array - vbscript or jscript



PureBytes Links

Trading Reference Links

Sorry instead of URSC I meant to say ERSA ability,

 

Regards

 

Dave

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of dpweir
Sent: Thursday, 29 September 2005 9:22 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Sort and rank an array - vbscript or jscript

 

I think the Positionscore function should be expanded, lets say you did develop a system based on positionscore, how would you then trade that system using Amibroker outside of the backtester ?  How would you get a buy signal in the scan or explore, where the stock meets the criteria of having a ranking > 80% in the watchlist.

 

The metastock plug-in, Spyglass looks like it may do what I want, using the URSC ability, which ranks the stocks on a percentile level and allows me to filter them with ExtFml("ERSA.ExternalRelativeStrength") > 80 and my own other filters, I can use this an indicator, exploration etc.

 

Thanks.  Amibroker, pls consider expanding the functionality of Positionscore ... in the meantime I will use this Metastock plugin.

 

Regards

 

Dave

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of dpweir
Sent: Wednesday, 28 September 2005 7:51 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Sort and rank an array - vbscript or jscript

 

Hi Tomasz,

 

Sorry for asking soooo many questions about positionscore, I hope the mailinglist can have some patience with me (and perhaps others will benefit from my questioning with the answers).

 

I can see that the PositionScore does indeed do the type of ranking I require. If I run this in the backtester,

 

SetOption("MaxOpenPositions", 5 );

PositionSize = -20;

PositionScore = C;

Buy=1;

Sell=1;

 

Only the 5 highest priced stocks show. Kewl !

 

Questions:

 

1. Why is Positionscore limited to use in the backtester only ?

Can it be used in scan and exploration as well ? Can I run an exploration to show, as in the above example, the top 5 highest ranked symbols ?

 

2. How can you get the actually value of the rank/score of the symbol ?

 

Many thanks

 

Regards

 

Dave

 

 

 


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Tomasz Janeczko
Sent: Saturday, 24 September 2005 11:36 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Sort and rank an array - vbscript or jscript

 

Hello,

 

PositionScore does work on watch list as well and allows to enter trades being within top 80% of your rank.

How?
Let's assume you watch lists consists of 100 symbols.

You set the FILTER in AA to contain only your watch list,

and

use

SetOption("MaxOpenPositions", 20 );

PositionSize = -5; // 5% = 100% / 20 positions

 

 

20 open positions out of 100 symbols represent exactly symbols that are ranked 80% and more.

 


Best regards,
Tomasz Janeczko
amibroker.com

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

From: dpweir

Sent: Saturday, September 24, 2005 1:23 PM

Subject: [amibroker] Sort and rank an array - vbscript or jscript

 

Hello

I was wanting to sort and rank an array of all the symbols and corresponding value, example RS or close, in a watchlist.

I have knocked together an AFL script that does this, using example code from the AFL library, however it is incredibly slow on a watchlist of 300 symbols.

I was wondering if it was faster to do this using jscript (sort  method?) or vbscript (quick sort algorithm ?), and if example code could be provided.

Also I realise on the Amibroker library there is an example of both sort and rank, but there appears to be no doumentation on how to use this in the library or in the mailing list.

 

I realise there is positionscore, however it does not appear to do what I require in this instance, to me it only appears useful when you are comparing a few securities with each other, and it does not rank an entire watchlist, filtering a trade to within the top 80% of a value based on rank.

 

Regards

 

Dave

 

 








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