Accessing Data from Different Periodicities

Login or Register

Please login or register in order to view and post in the Forum.

2 posts / 0 new
Last post
cpayne
Last seen: 1 year 8 months ago
Joined: 03/30/2009 - 00:00
Accessing Data from Different Periodicities

To access the data of a different periodicity from the bars in the chart (in our example we'll load 5t Renko bars)....use the RTBARS class.

RTBARS(PERIODICITY period = PD_INTRA, int interval = 1, RTBOOL bVolumeAtPrice = false, const char *ticker = NULL, RTBOOL bAlignToMaster = false, RTDATE startDateTime = 0, RTBOOL bPersistent = true, short sSession = kDefaultSession);

RTBARS            renkoBars(PD_RENKOBAR, kTimeBarYear, false, NULL, false, (RTDATE)(currentDate() - 10 * DtDaySecs), false, kDefaultSession);

To access a price like the high of these bars...

RTARRAY            *hiArr;

hiArr = renkoBars.hi;

float ourHigh;

for(int i = 0; i < hiArr.count; i++)
{
ourHigh = (*hiArr)[i];
}

Another approach is to use the createTechind() function to instantiate a instance of MPD (TC_MPD).

0
Venkat Raju
Last seen: 3 years 10 months ago
Joined: 01/15/2021 - 16:17
Getting OHLC - Tick chart...

Hi, Is it possible to get Open, High, Low and Close values using aggregation periods like Daily, Three Day, Weekly and Monthly on a tick chart? Any code sample will be helpful. Thank you.