Australian (ASX) Stock Market Forum

Selecting code in Amibroker AFL code

Joined
16 January 2008
Posts
111
Reactions
0
Can someone tell me how I can select stock for a particular code. E.G. API and for a particular date in AFL code?
 
Hello to any AB users in here. I have a question regarding the following filter.

L1 = MA(C*V, 21);
L2 = L1 > 100000;

The above code is a dollar value filter. It filters out stocks that have an average daily dollar turnover of less than $100k for the past 21 day bars. Can the above code be changed to this below?

L1 = MA(C*V, 21) > 1000000;

or does this code revert to a volume filter.

:)
 
Well I suppose there could be more worthwhile questions but why I asked is because this is the original statement that it was dollar value and not number of shares traded(volume). I think it is number of shares traded(volume)not dollar value.

The average daily liquidity (dollar volume) over the past year to be
at least $1,000,000.

// Compute the average daily Liquidity
// (Closing Price times Volume) for the past Year.
Liquidity = MA(C*V,252);
LiquidityOK = Liquidity > 1000000;
 
Okay, I run a few trials and combining the two works the same. Don't know why the additional line is in there. So ...

L1 = MA(C*V, 252);
L2 = L1 > 100000;

is the same as

L1 = MA(C*V, 252) > 100000;

The code picks up stocks that have had an average dollar turnover for the past 252 day bars (approx. trading days per year) greater than $100k.
 
Top