question

Upvotes
Accepted
3 1 1 4

how do we calculate the open and closed price knowing that we have more than 15 ticks per millisecond

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apipricing
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@liyarthomas

Could you please elaborate more on the question or the issue you are trying to resolve?

Usually, you don't have to calculate the open and closed price as there are Opening Price (OPEN_PRC) field and Historic Close (HST_CLOSE) field.

Upvotes
Accepted
4.4k 10 6 9

@liyarthomas

As @Gurpreet. said, Tick History can offer you the intraday dataset.

Otherwise, you have to create a function that calculates the OHLC of each interval.

If you already capture every single ticks to your database, then it is easier to do the calculation from the database.

Every price or quote ticks have their time fields. For example, the quote tick from forex has Quote Time "QUOTIM" field.

name="AUD="
FieldEntry fid="22" name="BID" dataType="Real" value="0.7982"
FieldEntry fid="393" name="PRIMACT_1" dataType="Real" value="0.7982"
FieldEntry fid="25" name="ASK" dataType="Real" value="0.7986"
FieldEntry fid="275" name="SEC_ACT_1" dataType="Real" value="0.7986"
FieldEntry fid="875" name="VALUE_DT1" dataType="Date" value="16 FEB 2018"
FieldEntry fid="1010" name="VALUE_TS1" dataType="Time" value="09:09:00:000:000:000"
FieldEntry fid="5" name="TIMACT" dataType="Time" value="09:09:00:000:000:000"
FieldEntry fid="11" name="NETCHNG_1" dataType="Real" value="0.0039"
FieldEntry fid="17" name="ACTIV_DATE" dataType="Date" value="16 FEB 2018"
FieldEntry fid="32" name="ACVOL_1" dataType="Real" value="49175"
FieldEntry fid="56" name="PCTCHNG" dataType="Real" value="0.49"
FieldEntry fid="114" name="BID_NET_CH" dataType="Real" value="0.0039"
FieldEntry fid="115" name="BID_TICK_1" dataType="Enum" value="2"
FieldEntry fid="134" name="MID_PRICE" dataType="Real" value="0.7984"
FieldEntry fid="135" name="MID_NET_CH" dataType="Real" value="0.0038"
FieldEntry fid="211" name="NUM_BIDS" dataType="Real" value="49175"
FieldEntry fid="270" name="ACT_TP_1" dataType="Enum" value="27"
FieldEntry fid="831" name="CTBTR_1" dataType="Rmtes" value="RBS         "
FieldEntry fid="836" name="CTB_LOC1" dataType="Rmtes" value="LON"
FieldEntry fid="841" name="CTB_PAGE1" dataType="Rmtes" value="RBSL"
FieldEntry fid="1025" name="QUOTIM" dataType="Time" value="09:09:00:000:000:000"
. . .

You should use the time field when you do the interval cut-off.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 1 1 4

That is fine. what about the high and low values. What is the time frame which we are receiving these values

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

There are TODAY'S HIGH (HIGH_1) and TODAY'S LOW (LOW_1) fields.

HIGH_1 and LOW_1 will update in real-time when there are new high or new low trades during trading hours.

Upvotes
3 1 1 4

Thanks but we need to calculate the OHLC price for 1 minute time frame, 5 minute time frame etc. How can we do that from the data we receive?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@liyarthomas

Are you trying to create an Intraday Minute Charts? Which means you want OHLC of each minute interval, not the OHLC of the day, right?

Upvotes
3 1 1 4

Yes we are: m1, m5, m15, H1, H4, H8, H12, D1, W1, M1, Y1

We will do it at database level, but thing is that we also have the historic price service and our calculations need to match exactly you historic periods.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
14.7k 39 12 18

@liyarthomas Thomson Reuters Tick History will readily offer a data set like that. It has a REST interface to access that data. It is however a separate service from the Elektron real time.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.