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

[amibroker] Re: How to exclude symbols?



PureBytes Links

Trading Reference Links

Anthony,

I see what you are saying but unfortunately that doesn't work either.
I need something like:
 if( Barcount(Foreign( symbol, "C" )) >=  500) 
 
but that syntax does not work either....I'm just not expert enough 
with AFL to see the solution although I'm sure there is one????

Thanks,
Tom

--- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso" <ajf1111@xxx> 
wrote:
>
> Maybe something like:
> FC = Foreign( symbol, "C" ) and Cum(1) >=  500 ;
> 
> 
>   ----- Original Message ----- 
>   From: trb0428 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   Sent: Tuesday, July 25, 2006 5:05 PM
>   Subject: [amibroker] How to exclude symbols?
> 
> 
>   I am trying to create an indicator that will calculate the 
percentage 
>   of stocks within an industry that are trading above their 50 day 
>   moving average. 
> 
>   My problem is if there is a stock in the list that has a short 
>   trading history, say only trading for 200 days, the entire 
indicator 
>   is limited by this short symbol. How can I exclude stocks that 
fail 
>   to meet a minimum number of bars in my formula below? I do not 
want 
>   to use ATC for this. Thanks.
> 
>   ----------------------------------------------------------
> 
>   summing = 0;
>   list = CategoryGetSymbols( categoryIndustry, IndustryID(0) ); 
> 
>   for( i = 0; ( symbol = StrExtract( list, i ) ) != ""; i++ )
>   {
>   FC = Foreign( symbol, "C" );
>   VarSet("C"+i, MA(FC,50)); 
>   VarSet("S"+i, IIf(FC > MA(FC,50),1,0)); 
>   summing = summing + VarGet("S"+i);
>   Plot(VarGet("C"+i),"C"+i,colorWhite,styleLine); 
>   }
>   ratio = (summing / i) * 100;
> 
>   Plot(ratio, "%stocks > 50 DMA", colorBrightGreen, styleLine | 
>   styleThick);
> 
>   _N( Title = "# stocks = " + i + " # above 50DMA = " + summing );
> 
> 
> 
>    
> 
> 
> -------------------------------------------------------------------
---------
> 
>     avast! Antivirus: Inbound message clean. 
> 
>     Virus Database (VPS): 0630-1, 07/24/2006
>     Tested on: 7/25/2006 5:30:01 PM
>     avast! - copyright (c) 1988-2006 ALWIL Software.
>