Page 1 of 1
Load more than 300 bars?
Posted:
Thu Jan 24, 2019 2:47 pm
by jellison
I have written an indicator to draw support and resistance lines. I would like it to be able to look back more than the 300 bars that are loaded by default. Does anyone know how to achieve this?
Re: Load more than 300 bars?
Posted:
Mon Jan 28, 2019 12:00 pm
by Alexander.Gettinger
How do you load the data?
Re: Load more than 300 bars?
Posted:
Mon Jan 28, 2019 5:16 pm
by jellison
Through the standard indicator framework (skeletal code below) - I can't get any data if history_length is greater than 300.
- Code: Select all
function Prepare()
source = instance.source;
first = source:first();
...
end
function Update(period, mode)
start_date = source:date(period - history_length);
...
end
Re: Load more than 300 bars?
Posted:
Tue Jan 29, 2019 2:54 pm
by Alexander.Gettinger
Your indicator takes data from the chart and it can use as much data as you downloaded to the chart.