The indicator calculates the average of the fluctuations in the last X closing prices. This setting can be adjusted using the variable "Period." In the original version, only this value could be adjusted, and the length of the period was used for smoothing.
Now, it's possible to adjust the smoothing length separately. In my opinion, this indicator works well when the line is understood as resistance or support. Often, the price tests the indicator and then moves in the opposite direction.