Appearance
Standard Deviation
Standard deviation of the source over N bars.
Kind indicator · Drawn in its own pane
Try it
On the chart, press / and choose Standard Deviation under Oscillators. To change it, copy the source below into the AlphaScript editor.
Inputs
| Input | Type | Default |
|---|---|---|
| Length | int | 20 |
| Source | source | "close" |
| Color | color | "#2962FF" |
Source
From packages/alphascript/indicators/stddev.as.js.
js
indicator({ name: "Standard Deviation", shortTitle: "StdDev", overlay: false });
const length = input.int("Length", 20, { min: 1 });
const src = input.source("Source", "close");
plot(ta.stdev(src, length), { title: "StdDev", color: input.color("Color", "#2962FF", { group: "Style" }) });