## What Is Weighted Moving Average (WMA)

The weighted moving average (WMA) is a technical indicator that assigns a greater weighting to the most recent data points and less weighting to data points in the distant past. The WMA is obtained by multiplying each number in the data set by a predetermined weight and summing up the resulting values.

## WMA Indicator

The Weighted Moving Average (WMA) is a momentum indicator. Unlike the traditional Moving Average (MA), the WMA assigns a heavier weighting to recent data points than the data points in the past. This is because the recent data points are more relevant.

## How To Calculate Weighted Moving Average

Formula:- weights = range(1, period + 1)

• coef = 2 / (period * (period + 1))
• WMA = coef * Sum(weight[i] * data[period – i] for i in range(period))

## Why Use Weighted Moving Average

Traders use the WMA technical indicator to generate trade direction, helping them decide to buy or sell. It will assign a greater weighing to recent data points rather than distributing an equal weighing. When the prices dip near or just below the WMA, it can be an indication to buy, and when prices rally towards or just above the WMA, it can be an indication to sell.

## How to Use Weighted Moving Average Trading Strategy

Bullish Scenario:- WMA gives more weightage to the recent data points. Thus when the WMA for a shorter time period crosses over a longer period, WMA indicating that the prices are rising recently and, therefore, a bullish scenario.

Bearish Scenario:- When the WMA for a shorter time period crosses below a longer period, WMA indicating that the prices are decreasing recently and thus a bearish scenario.

## Building Weighted Moving Average Trading Strategy in Mudrex

#### Strategy:-

BUY:- WMA(15 days) crosses up WMA(30 days)

SELL:- WMA(15 days) crosses down WMA(30 days)

TIME FRAME:- 4Hrs

Creating on Mudrex:-

We will use 2 WMA compare blocks- one for selling and one for buying.

For buying, we will use the following settings:-

For selling, we will use the following settings:-

Final Strategy:-

Testing:-

Running on Binance Futures: BTC/USDT with tick interval of 4H yielded an overall profit of 151.29%