Skip to content

Session Volume Profile ​

A volume profile for every day or week, with value area and POC.

Kind indicator · Drawn on the price pane

Try it ​

On the chart, press / and choose Session Volume Profile under Volume. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Sessionselect"day"
Row sizeint24
Value area volume (%)int70
Placementselect"left"
Show POCbooltrue
Up volumecolor"rgba(41,98,255,0.3)"
Down volumecolor"rgba(251,192,45,0.3)"
Value area upcolor"rgba(41,98,255,0.65)"
Value area downcolor"rgba(251,192,45,0.65)"
POC colorcolor"#FF5252"
Width (% of session)int70

Source ​

From packages/alphascript/indicators/svp.as.js.

js
indicator({ name: "Session Volume Profile", shortTitle: "SVP", overlay: true });
const session = input.select("Session", "day", ["day", "week"]);
const rows = input.int("Row size", 24, { min: 1, max: 500 });
const valueArea = input.int("Value area volume (%)", 70, { min: 0, max: 100 });
const placement = input.select("Placement", "left", ["right", "left"]);
const showPoc = input.bool("Show POC", true);
const upColor = input.color("Up volume", "rgba(41,98,255,0.3)", { group: "Style" }), downColor = input.color("Down volume", "rgba(251,192,45,0.3)", { group: "Style" });
const vaUpColor = input.color("Value area up", "rgba(41,98,255,0.65)", { group: "Style" }), vaDownColor = input.color("Value area down", "rgba(251,192,45,0.65)", { group: "Style" });
const pocColor = input.color("POC color", "#FF5252", { group: "Style" });
const width = input.int("Width (% of session)", 70, { min: 1, max: 100 });
plotVolumeProfile({ title: "Volume Profile", range: "session", session, rows, valueArea, placement, showPoc, upColor, downColor, vaUpColor, vaDownColor, pocColor, widthPercent: width });

AlphaScript language v0.1 · runtime 0.2.0