Author |
Topic: How to request historical weekly and monthly bars (3 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
CWeber984 Posts: 226 Joined: Apr 24, 2012 |
I'm having a hard time finding out the expected interval to use when making a history request for weekly and monthly bars.
Here's what my request looks like so far: OECAPI()->RequestBars( valid contract, 0, now.m_dt, OECAPICOM::SubscriptionType::SubscriptionType_Bar, 1440 * 7 ); My primary questions: 1) Should I be using a different subscription type? 2) What is the int interval the api recognizes for weekly and monthly bars? Thanks, CHW |
||||
VictorV Posts: 746 Joined: May 08, 2007 |
Please try to use SubscriptionType_WeeklyBar and SubscriptionType_MonthlyBar with interval=1
Victor Vins Lead Software Developer |
||||
CWeber984 Posts: 226 Joined: Apr 24, 2012 |
OK. I did that:
OECAPI()->RequestBars( valid contract, from time as double, to time as double, OECAPICOM::SubscriptionType::SubscriptionType_WeeklyBar, 1 ); Works great. Same for the monthly equivalent. Thanks, Edited by CWeber984 on Mar 11, 2014 at 21:10:44 |
||||