DevBush
DevBush

Reputation: 551

Pinescript/Tradingview limited iterations

As follow the picture below the vertical lines stop after some time. enter image description here

How to make it to process all the way to beginning of available data?

The code is below

//@version=4
study("script time lines", overlay=true)

LineLengthMult = 10
LineLength = 100

drawVerticalLine(offset, cor) =>
    line.new(bar_index[offset], low-LineLength, bar_index[offset], high+LineLength, color=cor, width=3)

yellow = color.new(color.yellow, 50)

if bar_index % 21 == 0
    drawVerticalLine(0, yellow)

Upvotes: 0

Views: 79

Answers (1)

PineCoders-LucF
PineCoders-LucF

Reputation: 8789

You are limited to 500 lines per script. Only the last ~50 are kept by default, to increase that number, use:

study("script time lines", overlay=true, max_lines_count = 500)

Upvotes: 1

Related Questions