Lipi Reference Lipi

Functions

talib.wma()

The wma function returns weighted moving average of source for length bars back. In wma weighting factors decrease in arithmetical progression.

Syntax

                talib.wma(series float source, series int length) → series float
              

Arguments

source required series float Series of values to process.
length required series int Number of bars (length).

Return Type

series float

Example


          indicator("Weighted Moving Average (WMA)", overlay=true)
length = input(20, "WMA Length")
wmaValue = ta.wma(close, length)
plot(wmaValue, color=color.blue, title="WMA")