Blueshift: 9:16am candle (OHLC) includes pre-market (9:07am) activity

Hi,


I am facing an issue where the first candle of the day (at 9:16am) includes pre-market activity (at 9:07am). As seen in attached screenshot (Blueshift - includes premarket data), the open and low values are those of pre-market candle, while the high and close are that of 9:15 candle.

Is there a way to disable pre-market data in blueshift? I want data only after 9:15am.

Thanks
Gurpreet

It is not very clear from the chart how you conclude Blueshift includes pre-market prices. Can you please provide reference to the date and time range you queried the data and cross check? In general, Blueshift data.history calls will filter out pre-market data. However, they may include previous day's data if your query requires it so. For example, asking for 10 candles of minute bars at 9:20 will include 5 bars from today (from 9:15 today) and 5 from yesterday (til 15:30).

Symbol: NSE:AMBUJA CEMENTS

Date: June 6, 2022



Blueshift:

9:16 (first) candle from data.current gives OHLCV: 366, 368.50, 366, 367.45, 105904



Actual from Tradingview is:

9:15 candle: OHLCV: 367.50, 368.50, 366.85, 367.45, 84868

9:07 candle: OHLCV: 366, 366, 366, 366, 21036



Open and Low of 9:16 Blueshift is 366, which is actually those from 9:07 candle.

Volume of 9:16 Blueshift is sum of 9:15 and 9:07 candles.



So, you see Blueshift is combing pre-market 9:07 candle with first candle after trading hours.

I have observed this in many data points.



I think this is a major flaw and there should be a way to disable this.



 

Hmm, this is an interesting point you raised. I am sure you are aware how the opening auction works in NSE. Orders are accepted from 9 am and these can be updated/cancelled till 9:07 or 9:08 order. Then NSE does the order book matching and comes up at a single price for the clearance at 9:15 and record the volumes of the trades that happens (i.e. matched). This is the price which is marked as the day's open price (this is the whole purpose of the exercise - to discover the opening price). Naturally, this should be the open price for the first trading minute as well in my opinion. There is no bar at 9:07 at all (no trades happen between 9 to 9:15, only bidding and a single matching at 9:15).



So I have little idea how TradingView is showing a bar at 9:07 - perhaps you should not trust everything you see there. But I would say what you see in the Blueshift is pretty much what I would expect as far as the price is concerned.



Now on the volume, I guess opinions can differ. 366 is the official open price. But shall we record only 84.8K or 105.9K as the volume of the first minute bar? I think some people will prefer one or the other. I would not say it is a "major flaw" but a feature. Since we discard all pre and after market data (in all markets we cover), we do not do any adjustments and consider the whole volume at the first minute candle.