I need real time streaming data in both 15sec and 30sec timeframes. What’s the best way to do it:
Option 1: use minute bars with these settings:
**
{
“symbol”: “ESM6”, // Your instrument symbol
“chartDescription”: {
“underlyingType”: “MinuteBar”, // Options: Tick, DailyBar, MinuteBar, Custom
“elementSize”: 0.25, // For 15-second bars
“elementSizeUnit”: “UnderlyingUnits”,
“withHistogram”: false
},
“timeRange”: {
“asMuchAsElements”: 100 // Number of historical bars to load first
}
}
Option 2: use tick bars with these settings. My concern with tick bars is how to consistently aggregate them into 15- and 30-sec bars, since these bars are not time-based.
**
{
“symbol”: “ESM6”,
“chartDescription”: {
“underlyingType”: “Tick”,
“elementSize”: 15,
“elementSizeUnit”: “Seconds”,
“withHistogram”: false
},
“timeRange”: {
“asMuchAsElements”: 100
}
}