My question is how do I extract the price of the secondary instrument at the time stamp of the primary instrument? See below for more details.
In other words, I need the following:
1) A primary instrument 1 contract volume bar (i.e., volume = 1)
2) The price for a second instrument at the most recent time stamp for the primary instrument 1 volume bar.
Example:
primary instrument = ES, volume = 1
secondary instrument = NQ
//Note: when volume = 1, we just have a Close price, there is no OHLC bar
bar[1]: ES (primary) 1 volume bar price = 1681.50, time = 10:00:55, NQ (secondary) price @ 10:00:55 = 3722.25, spread = 2040.75
//Question: How do I get the NQ price at 10:00:55?
bar[2]: ES (primary) 1 volume bar price = 1681.75, time = 10:01:01, NQ (secondary) price @ 10:01:01 = 3722.00, spread = 2040.25
Comment