Can Anyone help me writing this AFL pls ?

#1
Hi All,

This is a filter used to identify the potential swing trading opportunities.Can anyone help me writing an AFL with the below conditions ?



(sma(volume,20) >= 500000)
and
(close() > 12)
and
(force_index(3) <= 0)
and
(force_index(13) >= 0)
and
(adx(10) > 30)
and
(high() < high()[-1])
and
(high()[-1] < high()[-2])
and
(close() > sma(close,10))
and
(close() > sma(close,20))
 
#3
Here it is....

Code:
FI3= (Close-Ref(Close,-3))*Volume;
FI13= (Close-Ref(Close,-13))*Volume;


Cond=(MA(Volume,20) >= 500000) AND Close > 12 AND (FI3 <= 0 AND FI13 >= 0) AND (ADX(10) > 30) AND 
High < Ref(High,-1) AND Ref(High,-1) < Ref(High,-2) 
AND Close > MA(Close,10) AND Close > MA(Close,20);

Filter=Cond;

AddColumn(Close,"LTP");