Hello To build an indicator and strategy that uses a volume adjusted moving average, I heavily searched the internet, but I couldn't get hold of the formula. Who can help me and provide me the formula (easylanguage) ? Thanks

Pretty simple - Just add up each bar's closing price times its volume in the MA's length and divide the total by the total volume in the MA's length and then divide that by the # of bars in the MA's length Something like this (don't use/like EasyLanguage - but you should be able to adapt as necessary): Function VolWeightMA(n as long) as double 'where n=# of periods in MA dim VW as double, V as double VW=0 'Used to aggregate Volume*Price V=0 'Used to aggregate Volume for i=lastbar to lastbar-n+1 step -1 'lastbar=# of last bar in series VW=VW+Volume(i)*ClosePrice(i) 'i=bar # V=V+Volume(i) next i VolWeightMA=(VW/V)/n End Function 'Note for smplicity of notation Volume(n)=volume of the Nth bar and ClosePrice(n)=closing price of the Nth bar

Many thanks ArchAngel , I have studied you formula and build the Function in EL as follows: Input: Price(NumericSeries), Length(NumericSimple); Variable: VA(0), TotalVolume(0), n(0); VA = 0; TotalVolume = 0; For n = 0 to Length Begin VA = VA + (Price[n] * Volume[n]); TotalVolume = TotalVolume + Volume[n]; End; VolumeAdjustedMA = VA / TotalVolume; I removed the division of # of bars, so when printing this function as an indicator, you have a direct relation with the Close price. Then you can also compare this indicator with a normal MA.

leen - sorry, you're right. I mistakenly included the extra divide by N (shouldn't be in the formula).

I have entered this code into TradeStation 2000i using Easy Language and the moving average line it produces is alot different to the Volume Adjusted Moving Average that MetaStock 5.1 plots for the same data, comparing the 2 charts. As I dont have Meta 5.1, I cannot verify if they are using a different code for the indicator or that the difference is down to data differences between mine and the other computer. Can anyone verify that this is the same code that Metastock uses or better still, if you have TradeStation and MetaStock5.1 perhaps you can test it out and let me know. Many thanks

I have found this explanation of the formula .. which is different to the one posted here .. is this the correct one ? http://www.paritech.com/education/technical/indicators/strength/movavg.asp Can anyone code this in Trade Station Easy Language ? Thanks again Bill