EaseOfMovement

Calculates the Ease of Movement indicator.

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
periodNumber5-

Returns: Series<Number>

EaseOfMovement is a built-in function - you can use it directly. Below is an example implementation:

12345678
function EaseOfMovement(period = 5):
distance = median - median[1]
boxRatio = (volume / 100000000) / (high - low)
singleEmv = distance / boxRatio

series EMV: once: SMA(singleEmv, period) rest: EMV if (high == low) else (EMV + (singleEmv - singleEmv[period]) / period)