The afl you gave worked properly but i still need buy/sell codes for the signals generated .
Below is the afl
var1 = (Ref(close,-2) > Ref(close,-1)) and (ref(volume,-2) > Ref(volume,-1)) and (volume > Ref(volume,-2)); filter = var1; AddColumn(close, "close",1.2); AddColumn(var1,"var1",1.2);