This function is an Pine version of the moving average described in the January, 1998 issue of S&C magazine, p.57, "Smoothing Techniques for More Accurate Signals", by Tim Tillson. It is translated from the MetaStock code presented in the article. The function uses a version of the XAverage, written by me, which allows variables as inputs.
The most popular method of interpreting a moving average is to compare the relationship between a moving average of the security's price with the security's price itself (or between several moving averages).