Modulus Financial Engineering HomeModulus Financial Engineering
RMD Server™

Connection.CompressTicks Method

 

This method compresses part or all of a tick table into a bar table. Bar tables may be of any type listed in the DataType enumeration except for dtTick.

Bar tables can be thought of as temporary or intermediate tables soley for requesting historic data. After using a bar table, you should drop it using DropTable and then Subscribe to watch real time updates. You can keep your local copy of the bar table up to date by using the BarUpdateManager utility class.

 

Return Type

    BOOL

 

Syntax

 CompressTicks (BSTR Symbol, DataType BarType, short BarInterval, DateTimeInfo StartDateTime, DateTimeInfo EndDateTime)

Parameters

BarType specifies the type of bar table to create (e.g. dtSecond, dtMinute, dtHour, dtDay, etc.).

BarInterval is the interval of bars (e.g. 5 second bars, 8 minute bars, 10 hour bars, 1 day bars, etc.)

StartDateTime and EndDateTime specify the range of ticks to use in calculating the bar table.

 

Remarks

If compressing daily data (dtDay), this method assumes that the first tick of the day is the opening price. This function does not average prices during the first minute of trading. You must modify the CConnection::_CompressTicks method to change this behavior, or when appending data to a tick table be sure to insert the actual opening price for the first tick of the day for this reason.

 

See Also

    DateTimeInfo, DataType, Connection Object, Subscribe, Update Event