# WMA - Weighted Moving Average

#### Description <a href="#description_76" id="description_76"></a>

The Weighted Moving Average is the most well-known of the weighted averages, and is implemented to identify and quickly react to price changes. Current prices are given higher weighting than older ones. In addition, bad signals in sideways markets are minimized. The WMA smoothes the price changes and makes more efficient trade identification possible.

#### Further information <a href="#further-information_28" id="further-information_28"></a>

<http://www.tradesignalonline.com/de/lexicon/view.aspx?id=Moving+Average+Weighted+%28WMA%29>

#### Usage <a href="#usage_76" id="usage_76"></a>

```csharp
WMA(int period)
WMA(IDataSeries inSeries, int period)
WMA(int period)[int barsAgo]
WMA(IDataSeries inSeries, int period)[int barsAgo]
```

#### Return value <a href="#return-value_73" id="return-value_73"></a>

**double**

When using this method with an index (e.g. **WMA**(14)\[**int** barsAgo] ), the value of the indicator will be issued for the referenced bar.

#### Parameters <a href="#parameters_66" id="parameters_66"></a>

inSeries Input data series for the indicator

period Number of bars included in the calculations

#### Visualization <a href="#visualization_71" id="visualization_71"></a>

![WMA - Weighted Moving Average](https://agenatrader.github.io/AgenaIndicator-documentation/media/WMA.jpg)

#### Example <a href="#example_72" id="example_72"></a>

```csharp
//Output for the WMA
Print("The current value of the WMA is " + WMA(14)[0]);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indicators.agenatrader.com/standard-indicators/moving-averages/wma-weighted-moving-average.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
