API Support Forum
OEC API > API Support > Continuous Contracts
Author Topic: Continuous Contracts
(7 messages, Page 1 of 1)
Moderators: VPfau
JVillegas Lin6721
Posts: 5
Joined: Oct 06, 2017


Posted: Oct 06, 2017 @ 07:07 PM             Msg. 1 of 7
Hi,

we are new using this API.

Our trading strategy is based on Continuous charts and i haven't found enough information (demos, snippet or more detailed documentation) about the use of OEC.ContinuousContracts Namespace and ContinuousContractRule Class.

Can you help me how to setup (or subscribe bars) a contract using the volume as a continuos contract rule

thanks
JSmith5611
Posts: 187
Joined:


Posted: Oct 10, 2017 @ 12:52 PM             Msg. 2 of 7
Volume isn't actually supported. It should be excluded from the documentation and was missed in being removed from the enum.
Jason Smith
JVillegas Lin6721
Posts: 5
Joined: Oct 06, 2017


Posted: Oct 10, 2017 @ 01:27 PM             Msg. 3 of 7
do you have any example how to use this class?

public ContinuousContractRule(
BaseContract baseContract,
SplicingRule ruleSplicing,
SplicingRulePriceAdjustment adjustment
)

i need that because i haven't understood how you retrieve the data because the continuos data doesnt match with any contract.

Example:

@6E 10/10/2017 12:36:00 O:1,18030 H:1,18130 L:1,18020 C:1,18130 Vol:16 Ticks:10 UpVol:5 DownVol:11
@6E 10/10/2017 12:37:00 O:1,18040 H:1,18040 L:1,18030 C:1,18030 Vol:8 Ticks:3 UpVol:0 DownVol:8
@6E 10/10/2017 12:38:00 O:1,18120 H:1,18210 L:1,18120 C:1,18210 Vol:33 Ticks:20 UpVol:18 DownVol:15
@6E 10/10/2017 12:40:00 O:1,18250 H:1,18300 L:1,18250 C:1,18290 Vol:7 Ticks:3 UpVol:6 DownVol:1
@6E 10/10/2017 12:48:00 O:1,18190 H:1,18190 L:1,18180 C:1,18180 Vol:10 Ticks:2 UpVol:0 DownVol:10
@6E 10/10/2017 12:50:00 O:1,18130 H:1,18130 L:1,18130 C:1,18130 Vol:5 Ticks:2 UpVol:0 DownVol:5

6EZ7 10/10/2017 12:36:00 O:1,18515 H:1,18540 L:1,18390 C:1,18475 Vol:4106 Ticks:2336 UpVol:1676 DownVol:2430
6EZ7 10/10/2017 12:37:00 O:1,18470 H:1,18495 L:1,18400 C:1,18410 Vol:2848 Ticks:1642 UpVol:1331 DownVol:1517
6EZ7 10/10/2017 12:38:00 O:1,18410 H:1,18625 L:1,18410 C:1,18595 Vol:5724 Ticks:3335 UpVol:3360 DownVol:2364
6EZ7 10/10/2017 12:40:00 O:1,18630 H:1,18695 L:1,18600 C:1,18670 Vol:2305 Ticks:1217 UpVol:1388 DownVol:917
6EZ7 10/10/2017 12:50:00 O:1,18555 H:1,18560 L:1,18510 C:1,18530 Vol:581 Ticks:278 UpVol:237 DownVol:344
JSmith5611
Posts: 187
Joined:


Posted: Oct 10, 2017 @ 01:40 PM             Msg. 4 of 7
The default for @6E is Spot month, switching 5 days before expiration, so right now, it is using 6EV7, should switch to 6EZ7 tomorrow.

For creating rules, the basecontract you should be able to get from OECClient.BaseContracts

Available Splicing rules are:

SpotMonthSplicingRule, for example
new SpotMonthSplicingRule(5)
means use contract closest to expiration, and switch to next month 5 days before expiration.

ScheduleSplicingRule
is the other one, that one is more complex.
you'll need to do:

new ScheduleSplicingRule { Items = new List()};
then add every contract, in expiration order under the selected base contract.
for each Schedule rule item, the switchdate is the date you want to switch to the next active one in the list
if you don't want to include a contract in the schedule, set the disabled flag on the item.
Jason Smith
JVillegas Lin6721
Posts: 5
Joined: Oct 06, 2017


Posted: Oct 10, 2017 @ 01:48 PM             Msg. 5 of 7
Yes because the contract you said 6EV7 is not in the CME 6E contract list

For 6E -> Contracts listed for the first 3 consecutive months and 20 months in the March quarterly cycle (Mar, Jun, Sep, Dec)

any snippet using ScheduleSplicingRule please?
JVillegas Lin6721
Posts: 5
Joined: Oct 06, 2017


Posted: Oct 10, 2017 @ 02:09 PM             Msg. 6 of 7
Are you going to develop the volume part for continuos contract?

Because what we really need is a combination of volume and openinterest to determine when to switch from one contract to the next one, our system need that kind of data.
JSmith5611
Posts: 187
Joined:


Posted: Oct 11, 2017 @ 02:59 PM             Msg. 7 of 7
Unfortunately, if you rely on volume and open interest to determine switch dates for expired contracts, you will need a 3rd-party data vendor to get that information, we do not plan on developing the volume setting in the foreseeable future.
Jason Smith