Search code examples
labelpine-scriptpine-script-v5

Pinescript labels are invisible


if barstate.islastconfirmedhistory
    for i = 0 to 99
        label.new(x=bar_index - i,
                  y=na,
                  yloc=yloc.belowbar,
                  text="x",
                  style=label.style_none,
                  textcolor=color.blue)

Only the last 20 labels or so are visible.

I wanted to use the label, because it also has a tooltip option.

The documentation doesn't say anything about this.

Does anyone know how to fix this issue?


Solution

  • One must set the max_labels_count argument.

    indicator("My Indicator", overlay=true, max_labels_count=500)