SetScaleCompressed treats last 15-min bar as new 60-min bar
Author: burunduk
Creation Date: 11/1/2015 9:06 AM
profile picture

burunduk

#1
Hi,

I'm going to turn 15-min bars into 60-min through the method SetScaleCompressed(60). It's working fine except the last 15-min bar for each day at the time of 23:45:00. In fact it treats this bar as new 60-min bar.

Here is my simple code.

CODE:
Please log in to see this code.


Could you please look at this issue and advise how I can fix it.

Thank you
Pavel
profile picture

Eugene

#2
Hi Pavel,

At first glance, there may be nothing wrong with that. In Wealth-Lab, bars are timestamped with the time at the end of bar (FAQ). 23:45 is the time the bar ends on. This must be the last 15-minute bar that spans 23:30 to 23:45. Consequently, the 23:00 bar includes the data from 22:00:01 to 23:00:00.
profile picture

burunduk

#3
Hi,

Yes, that makes sense. So, the only solution is to rearrange my dataset to be timestamped with the time at the end of bar, right? I was surprised by your quik reply on Sunday.

Thanks a lot
profile picture

Cone

#4
QUOTE:
rearrange my dataset to be timestamped with the time at the end of bar, right?
Definitely. Wealth-Lab always assumes end-of-bar timestamps and this is important for scaling operations.
profile picture

KEVINP

#5
What does "rearrange my dataset" mean?
profile picture

Eugene

#6
@kevinp
"To use data vendor's capabilities to export the data timestamped differently (end-of-bar)".

@burunduk
You might also find this conversation helpful: Intraday bar compression is unexpected
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).