How to get Bar number for a given date and time  [SOLVED]

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

How to get Bar number for a given date and time

Postby arjfca » 01 Oct 2013

Hello

If I got in variables, a date and time. How could I get a bar number that correspond to it.
Is there a better way than to go bar by bar and comparing the date & time?

Martin

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: How to get Bar number for a given date and time  [SOLVED]

Postby TJ » 01 Oct 2013

Hello
If I got in variables, a date and time. How could I get a bar number that correspond to it.
Is there a better way than to go bar by bar and comparing the date & time?
Martin
There is no easy way to pinpoint a bar in history. Because in your chart the date/time are not continuous; you have missing dates and times between now and the bar you are looking for. eg. weekends, holidays. And you won't know which date/time are missing unless you go and check them bar by bar.

Dru
Posts: 107
Joined: 28 Aug 2007
Has thanked: 4 times
Been thanked: 171 times

Re: How to get Bar number for a given date and time

Postby Dru » 02 Oct 2013

Is there a better way than to go bar by bar and comparing the date & time?
symbol_date+symbol_time+binary search algorithm


Return to “MultiCharts”