Skip to main content

WMA

Type: wma • Category: indicators

Description

Calculates Weighted Moving Average based on price list

Parameters

NameTypeDescriptionRequiredDefault
dataExpstringprices datano
pricestringPrice field to use to calculate WMAno
timeperiodnumberNumber of periods to use for WMA calculationno30

Help

WMA (Weighted Moving Average)

Description

The WMA (Weighted Moving Average) worker is an indicator used in financial analysis to calculate the weighted moving average of a given price list. This indicator gives more importance to recent data points, making it a useful tool for identifying trends and patterns in financial markets.

What does this worker do?

The WMA worker calculates the weighted moving average of a given price list based on a specified time period. It takes three parameters:

  • dataExp: The prices data used for calculation.
  • price: The price field to use for WMA calculation.
  • timeperiod: The number of periods to use for WMA calculation.

How to interpret the results

The WMA indicator can be used to:

  • Identify trends: A rising WMA indicates an upward trend, while a falling WMA indicates a downward trend.
  • Detect patterns: WMA can help identify patterns such as crossovers, divergences, and convergences.
  • Make predictions: By analyzing the WMA, traders can make predictions about future price movements.

How to use it

To use the WMA worker, simply provide the required parameters:

  • dataExp: The prices data used for calculation.
  • price: The price field to use for WMA calculation.
  • timeperiod: The number of periods to use for WMA calculation.

Example usage

Here is an example of how to use the WMA worker:

## Example usage
To calculate the WMA of a price list with a time period of 10:

* `dataExp`: `[{"date": "2022-01-01", "price": 100}, {"date": "2022-01-02", "price": 120}, ...]`
* `price`: `price`
* `timeperiod`: `10`

The WMA worker will return the weighted moving average of the price list for the specified time period.

Visualizing the WMA

For a visual representation of how to use the WMA worker, please see the following GIFs:

Full GIF

[![Full GIF](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_full.gif)](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_full.gif)

Short GIF

[![Short GIF](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_short.gif)](https://pub-6c7cc7f707d94ca98153d59a039b9a3d.r2.dev/indicator_short.gif)

Additional Information

The Weighted Moving Average (WMA) is a type of moving average that gives more importance to recent data points. It is calculated by multiplying each data point by a weight, with the most recent data points receiving the highest weights. The WMA is a popular indicator used in technical analysis to identify trends and patterns in financial markets.