Login Page - Create Account

Support Board


Date/Time: Mon, 16 Sep 2024 19:23:11 +0000



OpenChartOrGetChartReference

View Count: 1080

[2014-07-05 06:35:54]
tickHunter - Posts: 14
I am trying to open a chart using sc.OpenChartOrGetChartReference().

Am I correct in thinking that I can use this function in an ACSIL study to open a chart set to some particular start time? Following the example provided in studies.cpp, here is a portion of the relevant code:


int& ChartNumber = sc.PersistVars->i1;
s_ACSOpenChartParameters OpenChartParameters;
OpenChartParameters.PriorChartNumber = ChartNumber;
OpenChartParameters.ChartDataType = INTRADAY_DATA; //This can also be set to: DAILY_DATA
OpenChartParameters.Symbol = sc.GetRealTimeSymbol();//When want to use the symbol of the chart the study function is on, use sc.GetRealTimeSymbol()
OpenChartParameters.IntradayBarPeriodType = IBPT_DAYS_MINS_SECS;
OpenChartParameters.IntradayBarPeriodLength = 30*SECONDS_PER_MINUTE; // 30 minutes

OpenChartParameters.SessionStartTime.SetTimeHMS(9,30,53); //some arbitrary start time
OpenChartParameters.SessionEndTime.SetTimeHMS(15,14,59);


The new chart which is opened using this function is always set to a start time of 00:00:00, regardless of the value set during initialization of the object.

Thanks!
Date Time Of Last Edit: 2014-07-05 22:35:11
[2014-07-07 16:22:57]
Sierra Chart Engineering - Posts: 104368
We will be testing this today.
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
[2014-07-08 02:10:13]
Sierra Chart Engineering - Posts: 104368
This will be solved in 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

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

Login

Login Page - Create Account