Open-source scriptindicator/v1
Weighted Moving Average
Smooth price while linearly increasing the weight assigned to newer observations.
#moving-average#trend#wma
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
Source codempl-2.0View sourceHide 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
No comments yet. Start the discussion.