I scripted an indy for S/R lines from higher time frames and I use Data.Bars.GetBars() to load up extra history so that I don't need to have a chart showing huge amounts of history of the smaller time frame.
Now I'm just refining the indy now and I am parameterizing the number of days of secondary data that I load in the OnStartup() event e.g. so the user is displaying the 5min chart and wants to see S/R based on the daily time frame using 60 days of data, the user would set this new parameter to 60, logically.
However in the circumstance that the user is displaying 15 days of data on the chart, I want to load up only 60 - 15 = 45 days, to keep it consistent relative to the 'Days To Load' setting on the chart's data settings.
How can I get this DaysToLoad setting? It doesn't seem to exist.
From guesswork looking at the C# auto-completion options, I can use "Bars.From" and "Bars.To" which equals DaysToLoad.
However this isn't documented - why is that? Is there a better way to do it?
Comment