# Gradient RSI Candles

> Gradient RSI Candles is an indicator drawn in its own pane.

Source: https://algobarsx.com/docs/ex-40-gradient-rsi-candles/

```algobarsx
indicator "Gradient RSI Candles"
    pane: new

input length = 14

strength = rsi(close, length)
tint = gradient(strength, low: red, high: green, from: 30, to: 70)

pane "RSI", height: 30%
candles open: open, high: high, low: low, close: close, color: tint, pane: "RSI"
plot strength, color: tint, width: 2, pane: "RSI"
hline 70, style: dashed, color: gray
hline 30, style: dashed, color: gray
```
What this script says

Gradient RSI Candles is an indicator drawn in its own pane.

You can change one input: `length` (default 14).

It calculates `strength` as the RSI over `length` bars and `tint` as the gradient (value `strength`, low red, high green, from 30, to 70).

On the chart, it draws a pane, draws a candles, plots `strength`, draws a horizontal line at 70 and draws a horizontal line at 30.
