to_ticks: Convert candles to ticks

Description Usage Arguments Details Examples

View source: R/to_ticks.R

Description

Convert candles to ticks

Usage

1

Arguments

x

candles, read 'Candles' in Processor

Details

Convert OHLCV candles to ticks using the following model. One candle is equivalent to four ticks ( time, price, volume ): ( time - period, open, volume / 4 ); ( time - period / 2, high, volume / 4 ); ( time - period / 2, low, volume / 4 ); ( time - period / 100, close, volume / 4 ). Assuming provided candles have frequent period ( less than a minute ) it is a good approximation for tick data which can be used to speed up back testing or if no raw tick data available.

Examples

1
2
3
data( ticks )
candles = to_candles( ticks, timeframe = 60 )
to_ticks( candles )

QuantTools documentation built on Oct. 23, 2020, 7:54 p.m.