Skip to content
ChartDeck ChartScript docs Account Open the terminal

CS2724

error The lower default lo is above the upper default hi.

#What it means

input.range takes a lower and an upper default. Here the lower one is larger than the upper one.

#Typical cause

  • The two defaults written in the wrong order.

#How to fix it

Swap them so the lower default comes first.

#Example

ChartScriptError: CS2724
//@chartscript 1
indicator("RSI band")
const [lo, hi] = input.range(70, 30, "Band")
plot(ta.rsi(close, 14))
hline(lo)
hline(hi)

Fixed

ChartScriptOpen in editor
//@chartscript 1
indicator("RSI band")
const [lo, hi] = input.range(30, 70, "Band")
plot(ta.rsi(close, 14))
hline(lo)
hline(hi)
  • CS2716 — The preset preset gives name the value value, which the input does not allow.

The ChartScript documentation is in English for now; translations will follow.