Skip to content

RSI + pool depth ​

Kind indicator · Drawn in its own pane

An indicator that combines a classic oscillator with pool data: RSI with its oversold crosses shaded, and the TAO in the pool in a second pane, so you can see when liquidity was thin.

Try it ​

Copy the source below into the AlphaScript editor and click Add to chart.

Inputs ​

InputTypeDefault
RSI lengthint14

Source ​

From packages/alphascript/examples/rsi_indicator.as.js.

js
indicator({ name: "RSI + pool depth", version: "0.1", overlay: false });

const len = input.int("RSI length", 14, { min: 2, max: 100 });
const rsi = ta.rsi(candle.close, len);
plot(rsi, { title: "RSI", color: "#8b98a8", pane: 1 });
hline(70, { color: "#e35c70", style: "dashed" });
hline(30, { color: "#2bb889", style: "dashed" });
bgcolor(ta.crossunder(rsi, 30), { color: "rgba(43,184,137,0.12)" });

plot(block.taoIn, { title: "TAO in pool", style: "area", pane: 2 });

AlphaScript language v0.1 · runtime 0.2.0