Hi I am trying to write a simple afl on finding stocks with volume higher than their average volume for the previous 10 bars.
the code that i wrote was
Filter = Volume > MA(Volume,10);
AddColumn(Volume, "Volume", 1);
I am trying to do it on 5 minute bars on realtime intraday data. Since i am using a trial version of amibroker, i applied it to current symbol. It is set to scan every 2 minutes. Range was set for last n quotations with n=1.
However with the above formula, i was not getting any results.I did not know if it is because this condition was not satisfied at that time ( the volume of the last bar is less than the average volume of the previous 10 bars), I reversed the condition.
Filter = Volume < MA(Volume,10);
Either of these two conditions has to be fullfilled by any bar !!!
So I concluded it is something to do with the my expression MA (Volume,10).
Next I tried
Filter = volume > Ref(Volume,-1);
This did produce a result !!!
Could anyone please tell me what is wrong ?
the code that i wrote was
Filter = Volume > MA(Volume,10);
AddColumn(Volume, "Volume", 1);
I am trying to do it on 5 minute bars on realtime intraday data. Since i am using a trial version of amibroker, i applied it to current symbol. It is set to scan every 2 minutes. Range was set for last n quotations with n=1.
However with the above formula, i was not getting any results.I did not know if it is because this condition was not satisfied at that time ( the volume of the last bar is less than the average volume of the previous 10 bars), I reversed the condition.
Filter = Volume < MA(Volume,10);
Either of these two conditions has to be fullfilled by any bar !!!
So I concluded it is something to do with the my expression MA (Volume,10).
Next I tried
Filter = volume > Ref(Volume,-1);
This did produce a result !!!
Could anyone please tell me what is wrong ?