Edgoro
Compiler warning · Syntax and indentation

Pine Script warning: inline inputs might not align (fix)

Why Pine Script warns that inputs sharing an inline argument might not align in the Settings/Inputs tab, and the fix: a title on the first input only.

Pine Editor console
The inputs with the inline argument "bb" might not align correctly in the "Settings/Inputs" tab

Cause

Two or more inputs share the same inline argument (and the same group), and more than one of them has a title. Inputs with the same inline value are drawn on one line of the "Settings/Inputs" tab, and when several of them carry their own title the labels can't be lined up with the other rows. TradingView's documentation lists it as warning CW10026: the script still compiles and runs, only the settings layout is affected.

Broken code

This script compiles, but TradingView shows the warning above in the Pine Editor console.

Pine Script v6
//@version=6
indicator("Bollinger width")
// Three inputs on one line, each with its own title
len  = input.int(20, "Length", inline = "bb", group = "Bands")
mult = input.float(2.0, "Mult", step = 0.1, inline = "bb", group = "Bands")
src  = input.source(close, "Source", inline = "bb", group = "Bands")
[mid, up, lo] = ta.bb(src, len, mult)
plot((up - lo) / mid * 100, "Width %")

Fixed code

The same script, corrected for Pine Script v6. Paste it into the Pine Editor and save.

Pine Script v6
//@version=6
indicator("Bollinger width")
// One title for the line, the details in a tooltip
len  = input.int(20, "Length, mult, source", inline = "bb", group = "Bands")
mult = input.float(2.0, "", step = 0.1, inline = "bb", group = "Bands")
src  = input.source(close, "", inline = "bb", group = "Bands", tooltip = "Band length, standard-deviation multiplier and source, in that order.")
[mid, up, lo] = ta.bb(src, len, mult)
plot((up - lo) / mid * 100, "Width %")

Why it works

Alignment only works reliably when the first input on a line is the only one with a title. The other inputs get an empty title (""), and the tooltip on the last input explains what each field is. The values, the calculation and the plot are unchanged: only the way the settings tab is drawn changes.

Other ways to lay out inputs

  • One line per input. If every field needs its own label, give each input a different inline value (or none): each gets its own row, and the warning goes away.
  • Groups as headings. group puts lines under a heading in the settings tab. Two lines with the same inline value but different groups are separate lines and never conflict.
  • Tooltips. A tooltip shows at the end of its line, whichever input on the line carries it. If several inputs on one line have a tooltip, only the last one is shown.

The free Pine Script checker flags lines where more than one inline input has a title, before you open the Pine Editor.

Questions

Does the inline inputs warning stop my script?

No. It's a compiler warning: the script compiles and runs normally. It only means the labels in the Settings/Inputs tab may not line up with the other rows.

How do I put two inputs on the same line in Pine Script?

Give them the same inline argument, for example inline = "bb", and the same group. Keep a title on the first one only and use an empty string for the others.

The scripts on this page are minimal examples written to show the error and its fix, not trading systems. Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

Still getting an error?

Paste your script and the message into the free Pine Script error fixer: it explains what went wrong and returns a corrected v6 version. Or describe the indicator in plain English and let Edgoro write the code.