Login Page - Create Account

Support Board


Date/Time: Sun, 26 Jun 2022 23:59:38 +0000



OpenChartOrGetChartReference() DaysToLoad incorrect

View Count: 232

[2022-04-13 14:05:51]
User660727 - Posts: 40
Sierra Chart version 2383

The DaysToLoad value passed to OpenChartOrGetChartReference() is not being correctly set.
In the example below, setting the value to 15 results in an actual value of 45.
Set the attached screenshot for the actual result of running this example.


#include <sierrachart.h>

SCDLLName("SCTest");
int dcNum {};

void CrupdateDataChart(SCStudyGraphRef sc) {
  s_ACSOpenChartParameters cfg;
  cfg.PriorChartNumber = dcNum;
  cfg.Symbol = sc.GetRealTimeSymbol();
  cfg.ChartDataType = INTRADAY_DATA;
  cfg.IntradayBarPeriodType = IBPT_DAYS_MINS_SECS;
  cfg.IntradayBarPeriodLength = 1;
  cfg.DaysToLoad = 15;
  cfg.SessionStartTime.SetTime(sc.StartTime1);
  cfg.SessionEndTime.SetTime(sc.EndTime1);
  cfg.EveningSessionStartTime.SetTime(sc.StartTime2);
  cfg.EveningSessionEndTime.SetTime(sc.EndTime2);
  cfg.LoadWeekendData = 1;
  cfg.UseEveningSession = 1;
  cfg.HideNewChart = 1;
  cfg.UpdatePriorChartNumberParametersToMatch = 1;
cfg.ContinuousFuturesContractOption = sc.ContinuousFuturesContractOption!=CFCO_NONE ?sc.ContinuousFuturesContractOption :CFCO_DATE_RULE_ROLLOVER;

  dcNum = sc.OpenChartOrGetChartReference(cfg);
}

SCSFExport scsf_SCTest(SCStudyGraphRef sc) {
if (sc.SetDefaults) {
sc.AutoLoop = 0;
return;
}
if (sc.LastCallToFunction) { return; }
if( sc.UpdateStartIndex==0 && sc.IsFullRecalculation )
CrupdateDataChart(sc);

}

imagedaystoload.png / V - Attached On 2022-04-13 14:05:13 UTC - Size: 82.73 KB - 38 views
[2022-05-01 00:22:51]
User660727 - Posts: 40
Bump. This is a clear bug including sample code to reproduce. Please fix.
[2022-05-06 02:28:48]
Sierra_Chart Engineering - Posts: 2699
We apologize for the delay. We are checking on this.
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
[2022-05-06 15:18:01]
Sierra_Chart Engineering - Posts: 2699
As we suspected, the problem is not reproducible even when we have set a default number of Intraday Days to Load.

We have added this to the documentation:
When getting a reference to an existing chart, if the existing chart has a higher Days to Load setting, then that chart will be returned and that Days to Load setting for the existing chart will remain.

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
[2022-05-06 15:59:56]
User660727 - Posts: 40
My study requires data at second granularity regardless of the granularity of the user's chart. In order to get second level data, my study creates a hidden chart that attempts to match the user's chart settings, including number of days to load. When the user changes their "days to load" to a smaller value (say from 45 to 15), I need to have the second data match. Do I just need to avoid trying to reuse the existing chart and recreate the chart each time to accomplish this?
[2022-05-08 17:15:51]
Sierra_Chart Engineering - Posts: 2699
We will implement a solution for this by adding a new variable to always use the exact number of days specified.
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
Date Time Of Last Edit: 2022-05-08 17:15:57
[2022-05-09 14:15:24]
Sierra Chart Engineering - Posts: 103469
This has not yet been tested but we have added this variable which you can set to 1:
s_ACSOpenChartParameters::UseExactMatchForDaysToLoad

This is in the latest prerelease.
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
[2022-05-09 14:28:27]
User660727 - Posts: 40
How will I know when this moves to production?

Also, a similar problem exists with timezones. The attached chart time zone does not match the study time zone. This makes using the data difficult as there is no way to even query the time zone. See https://www.sierrachart.com/SupportBoard.php?ThreadID=70034
[2022-05-09 14:32:45]
Sierra Chart Engineering - Posts: 103469
It already has been released. It is considered production at this time.

There is a new function in ACSIL to get the time zone and you can specify the time zone with s_ACSOpenChartParameters.

This has all been developed and released.

Check the latest SierraChart.h file.
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
[2022-05-09 14:48:13]
User660727 - Posts: 40
What is the name of the new time zone function? What is the name and possible values for the new s_ACSOpenChartParameters time zone parameter?
[2022-05-09 16:50:33]
Sierra_Chart Engineering - Posts: 2699
The function is:

SCString sc.GetChartTimeZone(const int ChartNumber);

When opening a chart use this string member to set the time zone string:
s_ACSOpenChartParameters::ChartTimeZone
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
[2022-05-13 15:47:17]
User660727 - Posts: 40
Is there a reason that documentation is not updated with these features? Will there be long term support for this new functionality?

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

Login

Login Page - Create Account