Appearance
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
| Input | Type | Default |
|---|---|---|
| Session | select | "day" |
| Row size | int | 24 |
| Value area volume (%) | int | 70 |
| Placement | select | "left" |
| Show POC | bool | true |
| Up volume | color | "rgba(41,98,255,0.3)" |
| Down volume | color | "rgba(251,192,45,0.3)" |
| Value area up | color | "rgba(41,98,255,0.65)" |
| Value area down | color | "rgba(251,192,45,0.65)" |
| POC color | color | "#FF5252" |
| Width (% of session) | int | 70 |
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 });