Hi,
The interaction between 3 parameters for this function are confusing me: <number of bars>, <start time>, <End TIme>.
My Goal is to get all bars of data between 8am EST and 15:59 EST. Nothing more, nothing less. But I can't seem to achieve this. For example:
If I set <start time> to 480 (my interval is 1 minute) for 8am
<end time> to 959 for 15:59
<number of bars> = 959 - 480 = 480 (adj by 1) for number of minutes between these two times and presumably the consequent number of bars
What I get back is data from 8:30 to 18:04 (not the requested times)!! Both my end time and start time are ignored! I analyzed the results and I think what is going on is the fn is delivering back the number of bars requested at expense of bounds I set. I think is because some bars are missing (no trades on those minutes presumably) so to reach requested 480 bars it has to go past my limits. I could live with this if at least paid attention to my start time and then returned more data then I needed. But as you can see it isntead shifts the time window to achieve it's 480 bars by starting at 8:30!
Since I can't know in advance what bars will be missing I can't assess <number of bars> any more accurately! I tried using 'btDAY parameter instead but that just gives a fixed 8am to 4pm set of data regardless of bounds I set.
How do I get this function to respect the bounds I set on start and end??? Help!!!
Thanks,
Lin
The interaction between 3 parameters for this function are confusing me: <number of bars>, <start time>, <End TIme>.
My Goal is to get all bars of data between 8am EST and 15:59 EST. Nothing more, nothing less. But I can't seem to achieve this. For example:
If I set <start time> to 480 (my interval is 1 minute) for 8am
<end time> to 959 for 15:59
<number of bars> = 959 - 480 = 480 (adj by 1) for number of minutes between these two times and presumably the consequent number of bars
What I get back is data from 8:30 to 18:04 (not the requested times)!! Both my end time and start time are ignored! I analyzed the results and I think what is going on is the fn is delivering back the number of bars requested at expense of bounds I set. I think is because some bars are missing (no trades on those minutes presumably) so to reach requested 480 bars it has to go past my limits. I could live with this if at least paid attention to my start time and then returned more data then I needed. But as you can see it isntead shifts the time window to achieve it's 480 bars by starting at 8:30!
Since I can't know in advance what bars will be missing I can't assess <number of bars> any more accurately! I tried using 'btDAY parameter instead but that just gives a fixed 8am to 4pm set of data regardless of bounds I set.
How do I get this function to respect the bounds I set on start and end??? Help!!!
Thanks,
Lin
Comment