transform_ohlc: Transform to OHLC from tick data / order book data

Description Usage Arguments Details Value

Description

Input data dt should have these columns: Code, Date, Time, Price, Volume (Vol), Turnover (Tnvr)

Usage

1
transform_ohlc(dt, vol_acc)

Arguments

dt

tick data or order book data

vol_acc

whether volume data is accumulated, auto detected if not supplied

Details

Output data contains these columns: Code, Date, Time, Open, High, Low, Close, Vol, Tnvr, VWAP, Avg

Note: this function sets key to dt on Code, Date, Time

Value

a data.table


imlijunda/tswbench documentation built on June 12, 2021, 12:45 p.m.