Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
if lastDate <> symbol_date[count] then begin
tdlim = tdlim + 1;
lastDate = symbol_date[count];
end;
count = count - 1;
end;
I am having a problem when I reach the end of the bar series, I dont know how to stop it tring to refer to bars that dont exist, is there a way to tel the number of bars loaded?
I don't understand why this would matter? CurrentBar + MaxBarsBack (if it's 0, 100 or 500 does not matter) gives you the total number of bars on the chart. You can use this value then in your loop to make sure that you don't try to look beyond data available on the chart.
I am looking forward not backwards. in my while loop I am counting bars ahead of current bar where future bar month is the same as current bar. If I dont know the total number of bars in the price series and I try and reference a bar that does not exist Multiharts throws error.
Current bar gives me the bar I am currently referencing, maxbarsback is always 0.