Support Board
Date/Time: Tue, 25 Feb 2025 14:06:36 +0000
[User Discussion] - accessing CFCO_VOLUME_BASED_ROLLOVER
View Count: 690
[2021-04-12 16:49:25] |
User785302 - Posts: 8 |
Hello In the study that I am writing, I would like to know if the Chart is using the setting "Continuous Futures Contract - Volume Based Rollover". I believe this is the enum below as in scconstants.h. enum ContinuousFuturesContractOptionsEnum
{ CFCO_NONE = 0 , CFCO_DATE_RULE_ROLLOVER = 1 , CFCO_VOLUME_BASED_ROLLOVER = 2 , CFCO_DATE_RULE_ROLLOVER_BACK_ADJUSTED = 3 , CFCO_VOLUME_BASED_ROLLOVER_BACK_ADJUSTED = 4 , CFCO_FORWARD_CURVE_CURRENT_DAY = 5 , CFCO_ROLLOVER_EACH_YEAR_SAME_MONTH = 6 , CFCO_FORWARD_CURVE_STUDY_SUPPORT = 7 }; If I would be able to read the setting then I could log an error message sc.AddMessageToLog(true) to alert the user that the study is not going to work well without that setting active. Is this possible? Kind regards |
[2021-04-13 05:21:20] |
Sierra_Chart Engineering - Posts: 18555 |
Refer to: ACSIL Interface Members - Variables and Arrays: sc.ContinuousFuturesContractOption Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2021-04-13 06:50:24] |
User785302 - Posts: 8 |
Thank you for the quick reply. Embarrassingly, I really thought to have searched all the documentation before hitting you up but there you go, I totally missed that. Thanks! Apart from that, for info...checking if it's a futures contract. I tried to use sc.SecurityType() to check if it's a futures contract but the function returned null. As a workaround, I am checking if sc.ContractRolloverDate > 0. Seems to do the trick for now. |
To post a message in this thread, you need to log in with your Sierra Chart account: