Hello everyone,
I am new to afl programming. I want a afl ( I use daily candle) which will explore the stocks with the following condition:
i want candle low is less than 50 Period simple moving average within last 3 days
i want candle Open is greater than 50 Period simple moving average within last 3 days
i want candle Close is greater than 50 Period simple moving average within last 3 days
after reading few faq of this forum, i have come to derive the following code:
Filter = (Low<Ref(MA(Close,50),-2)) AND (Open>Ref(MA(Close,50),-2)) AND (Close>Ref(MA(Close,50),-2));
AddColumn (Open,"Open",1.2);
AddColumn (close,"Close",1.2);
AddColumn(Ref(Volume,-1),"Vol t-1",1.2);
is the above code is meaning the same of what i want to achive.
please help. Thanks in advance.