← Script Marketplace
Open-source scriptindicator/v1

Weighted Moving Average

by Kodexius·@kodexius·

Smooth price while linearly increasing the weight assigned to newer observations.

#moving-average#trend#wma
Weighted Moving Average chart preview

Description

The Weighted Moving Average gives the newest value the greatest linear weight and gradually reduces weight for older values. It balances smoothing with a relatively quick response to changes in price.

Open-source script. Everyone can inspect the source code, use the script on a chart, and save an editable copy.

Release notes

Version history · 1 published version

Version 1CurrentChart updatedWeighted Moving Average · Aug 31, 2026
Release notes

Initial classic indicator release.

View current source ↓
Source codempl-2.0View source

indicator("Weighted Moving Average", { overlay: true });
const length = input.int("Length", 9, { min: 1, max: 500 });
const source = input.source("Source", "close");
plot(wma(source, length), { title: "WMA", color: "#e040fb", lineWidth: 2 });
  

Community discussion

0 comments

Loading…

No comments yet. Start the discussion.