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

RE: [amibroker] Why is my AA result and watchlist different after Explore?



PureBytes Links

Trading Reference Links

Ok then,
 
To be on the AA result list all it has to do is pass the filter test but you're using another test (lastvalue(cum(filter  to add to the watchlist. 
 
Try making them the exact same.  Seems to me that's where the diff is..
 
Also make sure the
CategoryRemoveSymbol("", categoryWatchlist, DestinationWatchlist);  is working as expected.
 
d


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Markus Hoffmann
Sent: Sunday, June 03, 2007 4:21 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: AW: [amibroker] Why is my AA result and watchlist different after Explore?

I think my problem is not related to the for-loop. In the meanwhile I replaxed it by:
 
 
Filter = (AveTurnover > LowerTurnoverLimit) AND (AveClose > LowerStockPriceLimit);
if(LastValue(Cum(Filter)))
{
CategoryAddSymbol( "", categoryWatchlist, DestinationWatchlist );
}
 
The effect is still the same, the watchlist contains more symbols than AA result list.
 


Von: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] Im Auftrag von dingo
Gesendet: Sonntag, 3. Juni 2007 22:16
An: amibroker@xxxxxxxxxxxxxxx
Betreff: RE: [amibroker] Why is my AA result and watchlist different after Explore?

The question you should be asking yourself is "why did I choose to use a 'for loop'" ..
 
d


From: amibroker@xxxxxxxxxps.com [mailto:amibroker@yahoogroups.com] On Behalf Of Markus Hoffmann
Sent: Sunday, June 03, 2007 2:29 PM
To: amibroker@xxxxxxxxxps.com
Subject: [amibroker] Why is my AA result and watchlist different after Explore?

Hi all,
 
I have some strange behaviour with the Explore function and could not yet find out
the reason, maybe somebody has an idea?
 
I want to run an exploration over a symbol list (I did it with S&P500 and Prime All Share),
and the filtered symbols should be stored in a watchlist. In the AA I specified for "Range"
to check the "n last quotes" with n=1, therefore AA result is max. 1 hit per symbol. The
interesting thing is that the results which are listed in the AA dialog and the contents of
my watchlist is different, my resulting watchlist has always some more symbols included
than the AA result list (which is correct, and the additional watchlist symbols do in fact not
fulfill the filter criteria of LowerStockPriceLimit). I used the code below:
 
--- cut here ---
// filter rule:
// position size must not be larger than 3% of the average trade volume
// within the last 5 days and average stock price must be larger than 1$
// example:
// portfolio equity = 100000$
// position size = 5% => 0.05 * 100000$ = 5000$
// minimum trade volume = 5000$ / 0.03 = 166667$

PositionSize = 5000;
PositionSizeToTurnoverRatio = 0.03;
LowerStockPriceLimit = 100;
// set here the watchlist number to store the results
DestinationWatchlist = 1;
// remove symbol from watchlist (clean up from previous run)
CategoryRemoveSymbol("", categoryWatchlist, DestinationWatchlist);
 
LowerTurnoverLimit = PositionSize / PositionSizeToTurnoverRatio ;
 
AveVolume = MA(Volume, 5);
AveClose = MA(Close, 5);
AveTurnover = AveVolume * AveClose;
 
Filter = (AveTurnover > LowerTurnoverLimit) AND (AveClose > LowerStockPriceLimit);
 
AddColumn(Close, "Close");
AddColumn(Volume, "Volume");
AddColumn(AveVolume, "Ø Volume");
AddColumn(AveTurnover, "Ø Turnover");
 
for(i=0; i<BarCount;i++)
{
  if(Filter[i] == True)
// if((AveTurnover[i] > LowerTurnoverLimit) AND (AveClose[i] > LowerStockPriceLimit))
  {
    CategoryAddSymbol( "", categoryWatchlist, DestinationWatchlist );
  }
}
--- cut here ---
 
I tried both if-statements to check if the criteria to add the symbol to watchlist is ok, both
show the same effect. No idea if maybe my code is wrong or AB behaviour is wrong ...
 
Thanks in advance for your help and best regards,
Markus
 

__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___