Inverse Distance Weighted Moving Average (IDWma)

0
(0)
Name:
Inverse Distance Weighted Moving Average (IDWma)
Author: WHRoeder (2012.02.27 15:42)
Rating: 10
Downloaded: 3873
Download:
Inverse Distance Weighted Moving Average (IDWma) 1
 IDWma.mq4 (5.3 Kb) View

Description:

This multi-timeframe capable moving average discounts prices far from the average. It is smoother than SMA but follows price similar to an EMA of the same length.

I came across en.wikipedia.org/wiki/Distance-weighted_estimator, thought it might be useful and coded it.

It does have some overshoot and initial lag just like SMA, but converges to nearer to price than the corresponding EMA. The initial lag may be useful in a trailing stop and when the market has reversed direction.

There are four (4) parameters, the first three are the same as the standard moving average

extern int MA_Period = 14; // Default Moving Average
extern int MA_Shift  =  0; // Default Moving Average
extern int MA_Price  =  0; // PRICE_CLOSE=0, Open=1, High=2, Low=3, median=4, typical=5, weighter=6
extern int MA_TF     =  0; // Chart=0, PERIOD_H1...

Image:

Inverse Distance Weighted Moving Average (IDWma) 2

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?



Author: Forex Wiki Team
We are a team of highly experienced Forex Traders [2000-2023] who are dedicated to living life on our own terms. Our primary objective is to attain financial independence and freedom, and we have pursued self-education and gained extensive experience in the Forex market as our means to achieve a self-sustainable lifestyle.