Hi all,
I'm in the process of coding up my trading platform using IB's API in java. My strategy looks at the previous 10 (5 minutes bar) to determine entry. I just can't figure out a way to aggregate the info from reqRealTimeBars (5 seconds interval) to a 5 minute info. I understand I need to collect 60 instances of RealTimeBars callback which I have absolutely no problem in doing, but the problem is... How the heck should I approach in storing until the 5 minute mark hits and make it into one 5 minute "bar"? Much thanks and I hope i did a good job explaining it.
I'm in the process of coding up my trading platform using IB's API in java. My strategy looks at the previous 10 (5 minutes bar) to determine entry. I just can't figure out a way to aggregate the info from reqRealTimeBars (5 seconds interval) to a 5 minute info. I understand I need to collect 60 instances of RealTimeBars callback which I have absolutely no problem in doing, but the problem is... How the heck should I approach in storing until the 5 minute mark hits and make it into one 5 minute "bar"? Much thanks and I hope i did a good job explaining it.