daily, monthly Volume with percent % change exploration

gktk

New Member
#1
Hi Traders

I am looking for a basic exploration AFL for volume and price moving averages, firstly the AFL works out daily volume (easy) as well as monthly volume average (easy), I would then like to work out the percentage change of todays volume compared to the last month and the last year i.e. today volume is 1mill, but average daily volume over the last month is 300000 so the % increase is 300, likewise for annual volume increase.

If possible within the same exploration i'd like to find out how far away today's close price is from the 50SMA and 200SMA as a percentage, so today's close is say $10 and the 50MA is $20, 200MA is $30. Then the % percent of todays close would be 50% of 50MA and 33% of 200MA.

I know it must be easy but beginner so struggling at the moment

AddColumn(MA(V, 1), "Volume(1day moving ave", 1.0);
AddColumn(MA(V, 252), "Volume(1 year moving ave", 1.0);
AddColumn(MA(V, 252), "Volume(1 year moving ave", 1.0);

AddColumn(MA(C, 50), "50day moving ave.", 1.2);
AddColumn(MA(C, 200), "200day moving ave.", 1.2);

Any help appreciated
 

Similar threads