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

RE: [amibroker] Filter Trick



PureBytes Links

Trading Reference Links

Graham:
 
Thanks for the reminder (new for me).
 
For those who are relatively new, yet might be interested in using this
command, I found how to use it non-obvious.  After playing around with it, I
discovered that it is like the Excel function that finds the number of the
character in the total string on which the substring starts. It returns zero
if it does not find the substring.  In any case, I crafted the following
Filter statement which does the job I want (which eliminates any Fullname
containing the phrases).
 
 
 
Filter = StrFind(FullName(),"Income") == 0 AND StrFind(FullName(),"Real
Estate") == 0 AND
StrFind(FullName(),"High Yield") == 0 AND StrFind(FullName(),"REIT") == 0
AND
StrFind(FullName(),"Realty") == 0 AND StrFind(FullName(),"Reserves") == 0;
 
 
 
Thanks, Graham.
Ken

  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of Graham
Sent: Thursday, February 01, 2007 4:54 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Filter Trick


use StrFind( string, substring ) 


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com 


On 02/02/07, Ken Close <ken45140@xxxxxxxxx> wrote: 

Is there a way to write a filter that will look at the FullName field and
filter out any that have "Income" or "REIT" in the full name?
 
Filter statements (or should I say conditions) in AFL are not like searching
in dos or google.  Can you actually look for a string of characters in a
varying length string like FullName?
 
Ken





 

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.19/663 - Release Date: 2/1/2007 2:28 PM