Skip to main content

eVWMA - Elastic Volume Weighted Moving Average for Amibroker (AFL)

demon over 15 years ago Amibroker (AFL)

  • Rating:
    2 / 5 (Votes 3)
  • Tags:
    amibroker, moving average

Another version of Volume Weighted MA. Use it like any other moving average.
See more here

On screenshot – grey dashed is Simple MA, violet is eVWMA

Screenshots

Indicator / Formula

Copy & Paste Friendly
/* eVWMA - Elastic Volume Weighted Moving Average */

/* Elastic Volume Weighted Moving Average by Christian B. Fries */
function eVWMA(array, N)
{
  result[0] = array[0];
  for (i = 1; i < BarCount; i++) 
  {
    result[i] = ((N - Volume[i]) * result[i - 1] + Volume[i] * array[i]) / N;
  }
  return result;
}

P = ParamField("Price field", -1);
N = Param("Number of shares mult", 1, -100, 100, 0.1, 10);
Plot(eVWMA(P, 10^(N / 100) * LastValue(Highest(Volume))), _DEFAULT_NAME(), ParamColor("Color", colorCycle), ParamStyle("Style")); 

0 comments

Leave Comment

Please login here to leave a comment.