Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 08:23:40 +0000



Continuous contract - with sc.OpenChartOrGetChartReference - spawns charts from expired symbols

View Count: 1279

[2013-10-18 18:04:03]
T44 - Posts: 363
When I select checkbox for Continuous Futures Contract in a chart which has a study using sc.OpenChartOrGetChartReference, I get a bunch of new charts loaded for each of the prior months which loads in before the data is combined.

Is there a way to only update studies when the data has been merged up to present? Currently I would have to manually close all the additional charts which were spawned...and this will happen every time I change the symbol.

Could this be changed in a later release, or is there code I could add to the study to ensure it did not update until all data from all the months has been merged?

Thanks.
[2013-10-18 18:13:52]
Sierra Chart Engineering - Posts: 104368
What we can do in this case is add a flag, sc.ContinuousFuturesContractLoading, which when set to 1 will mean that you should avoid calling sc.OpenChartOrGetChartReference.

We will add this to the next release.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-10-18 18:42:41]
Sierra Chart Engineering - Posts: 104368
Here is the documentation for the new ACSIL variable member to be added:
http://www.sierrachart.com/index.php?l=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scContinuousFuturesContractLoading
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-27 14:50:48]
T44 - Posts: 363
I've implemented a check for sc.OpenChartOrGetChartReference=0 in my code before calling sc.OpenChartOrGetChartReference.

Unfortunately,the new version of the continuous contracts feature appears to use two symbols. Under chart settings I have e.g.
Symbol: E6H14
AND
Trade and Current Quote Symbol: 6E.CME_20130300_6EH4.CME_Fo

Any time I add a study calling sc.OpenChartOrGetChartReference(OpenChartParameters) with OpenChartParameters.Symbol = sc.Symbol.GetChars() Sierra rapidly spawns duplicate charts until the application crashes.

Please advise.
[2013-12-27 19:55:04]
Sierra Chart Engineering - Posts: 104368
You definitely should be checking the return value from that function.

There will be two symbols used in your particular case and as the documentation says, you need to use the Trade and Current Symbol. Refer to the documentation here:
http://www.sierrachart.com/index.php?l=doc/doc_ACSIL_Members_Functions.html#scOpenChartOrGetChartReference

Sierra rapidly spawns duplicate charts until the application crashes.
It is your code doing this. Not Sierra Chart.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-27 21:58:21]
T44 - Posts: 363
For example, in the case where there is a different underlying symbol for a Historical chart, you will need to specify the symbol you see in Chart >> Chart Settings >> Trade and Current Quote Symbol. When you need to use the Symbol of the chart the study function is on, the easiest way to get the correct symbol is to call the sc.GetRealTimeSymbol() function.

Compiling with this function, I get error: 'structs_sc' has no member named 'GetRealTimeSymbol'

I cannot find documentation for sc.GetRealTimeSymbol() function.

It is your code doing this. Not Sierra Chart.
Understood. My code did not contemplate Trade and Current Symbol differing from the ScString sc.Symbol.
[2013-12-27 22:11:34]
T44 - Posts: 363
There is a reference to an ScString sc.TradeAndCurrentQuoteSymbol http://www.sierrachart.com/index.php?l=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scTradeAndCurrentQuoteSymbol

This appears to be what I need, however once again error struct s_sc has no member named 'TradeAndCurrentQuoteSymbol'.

Top of my code is
#include <iterator>
#include "sierrachart.h"
#include "scstudyfunctions.h"

SCDLLName("StudyName")

SCSFExport scsf_StudyName(SCStudyInterfaceRef sc)
Do I need to include anything else in order to access TradeAndCurrentQuoteSymbol string or GetRealTimeSymbol function?
[2013-12-28 00:39:56]
Sierra Chart Engineering - Posts: 104368
The documentation has been updated before we did a new release. We are releasing version 1066 in the next 15 minutes. You will need this version.

We recommend using sc.GetRealTimeSymbol() .

We have also contemplated this whole situation with different Historical chart symbols and we are going to be implementing a comprehensive solution to this in the next few days. There will no longer be 2 symbols but just a single symbol and background translation where needed.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-12-28 03:57:54]
T44 - Posts: 363
My studies are now working as expected with 1066 using sc.GetRealTimeSymbol.
Happily the continuous contracts load far faster than previously.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account