Inputs and constants

What the person running the script may change.

An input becomes a setting in the script's panel. Its type comes from its default value, so input risk = 1% is a percent and input higher_tf = 4h is a bar size. A const is fixed.

AlgoBarsX
input fast = 20, label: "Fast length", min: 2, max: 500, group: "Trend"
input source = close, label: "Source"
input higher_tf = 4h, label: "Higher timeframe"
input session = "london", options: ["london", "new_york", "asia"]
input risk = 1%, min: 0.1%, max: 5%, step: 0.1%
input show_zones = true, group: "Display"
input zone_color = blue.fade(70), group: "Display", visible_if: show_zones
const RISK_CAP = 2%
OptionWhat it does
labelThe name shown in the panel.
min, max, stepLimits and step size.
optionsA fixed list of choices.
groupGroups inputs under a heading.
visible_ifShows this input only when another one is on.

An input nobody reads is flagged as a hint (AS0601).

Try this in the Terminal. AlgoBars is free: $0 a month, no card needed.

Create my free account