Open-source scriptindicator/v1
On Balance Volume
Accumulate volume positively or negatively according to each closing-price change.
#money-flow#obv#volume
Description
On Balance Volume adds volume when price closes higher and subtracts it when price closes lower. The cumulative line is commonly used to compare volume pressure with the price trend and to study potential divergences.
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 updatedOn Balance Volume · Aug 31, 2026
Source codempl-2.0View sourceHide source
indicator("On Balance Volume", { overlay: false });
const line = obv();
plot(line, { title: "OBV", color: "#2962ff", lineWidth: 2 });
plot(ema(line, 20), { title: "EMA", color: "#ff9800" });
Community discussion
0 comments
No comments yet. Start the discussion.