Support Board
Date/Time: Fri, 31 Jan 2025 22:07:24 +0000
Post From: Non-zero Open Values in Intraday tick Records
[2019-05-23 18:26:38] |
skelcap - Posts: 139 |
Hi, I just started programming again against SC after a couple of years off and it seems there has been a change in the convention for the Open value in s_IntradayRecord for tick/trade data. The Open value for tick/trade value was always 0 in my experience (and this is what the notes still say Intraday Data File Format). However I notice now that there are lots of non-zero values which are always one of two large negative floats and the Intraday Data Editor interprets these values as either "FIRST_TRADE" or "LAST_TRADE". Please could you explain the rationale behind these values? Unfortunately my old code depended on checking Open == 0 to decide whether a record was a tick/trade or a compressed bar in taking some actions (e.g. creating my own bar data on the fly), so now I need to modify this code. What is the best way now to definitively test whether an intraday record is a tick/trade or bar assuming you don't know this a priori? My data files tend to be a mix of tick/trade data and 1 second compressed bars (even within the same file) depending on how recently I've compressed them, and I have a bunch of code which runs against 1 minute bars which I create myself and used to work for both tick/trade data and bars by checking if Open == 0 (e.g. when creating the bar high you use the high price if the input record is a bar but for a tick/trade that's the ask so you need to use the last price). I guess I could change the condition to (Open == 0 | Open == A | Open == B) where A and B are these large negative floats I mentioned, but I need to confirm whether these are the only two non-zero open values that arise in tick/trade data. Date Time Of Last Edit: 2019-05-25 19:38:11
|