Compress 1 Minute into 5 minute bar
Author: tradercn
Creation Date: 8/23/2013 1:14 PM
profile picture

tradercn

#1
Try to test a strategy based on 5 minute bar while my current dataset is 1 minute. Since testing is massive, I try to compress 1 minute bar to be 5 minute csv files by a program before backtesting, but no idea to do that. Is there any example code which helps? Thanks.
profile picture

Eugene

#2
See SetScaleCompressed(*) in the QuickRef and "Multi-Time Frame Analysis" in the WealthScript Programming Guide.
profile picture

tradercn

#3
Thanks. It does help. :)
profile picture

tradercn

#4
To support the forum, here is the code to compress bars. Actually it is much easier than my expectation.

It is used to convert 1 minute bar to 5 minute bar.
CODE:
Please log in to see this code.
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).