Support Board
Date/Time: Sat, 10 May 2025 04:00:46 +0000
How to set sc.BaseGraphGraphDrawType?
View Count: 1076
[2015-10-13 19:00:20] |
DarthSidious - Posts: 63 |
I like my charts as candlesticks when the spacing is 4 or more. But sometimes I change to bar spacing quickly using the keyboard to see a "bigger picture" before I go back to bar spacing of 4 or more. Then, Candlestick is aweful. I can read sc.ChartBarSpacing which is helpful. but sc.BaseGraphGraphDrawType being read-only, I can't change that. Is there some way I can do this? That is change the main chart from GDT_CANDLESTICK to GDT_HLCBAR and vice versa from a study? Date Time Of Last Edit: 2015-10-13 19:01:17
|
[2015-10-15 14:09:52] |
DarthSidious - Posts: 63 |
Can this be done please? It will be very helpful. Thanks!
|
[2015-10-16 01:48:39] |
|
sc.BaseGraphGraphDrawType can be changed in the next release. We hope it will not cause a problem though. Probably not.
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 |
[2015-10-20 16:10:39] |
DarthSidious - Posts: 63 |
Is it in "1313 Release Date: 2015-10-19"? Didn't see anything specifically mentioned in the release notes. Thanks!
|
[2015-10-20 18:07:39] |
|
Yes it is.
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 |
[2015-10-20 20:28:36] |
DarthSidious - Posts: 63 |
Works great! But it waits for a chart update for the data processing loop to kick in. So is it possible to track user initiated changing of sc.ChartBarSpacing? Just needed to know if there are any existing mechanism. If not, not really asking for it. Perhaps a way to ask the chart to redraw itself from ASCIL? Many thanks! /******************************************************************************* * Change bar type based on bar spacing; if spacing 4 or more, Candle, else HLC ******************************************************************************/ SCSFExport scsf_AutoChangeBarType(SCStudyInterfaceRef sc) { // Study variables ///////////////////////////////////////////////////////// SCInputRef MinBarSpacingForCandleType = sc.Input[0]; if(sc.SetDefaults) { sc.GraphName = "AutoChangeBarType"; sc.StudyDescription = "Change bar type based on bar spacing; if spacing 4 or more, Candle, else HLC"; sc.GraphRegion = 0; #if defined(_DEBUG) sc.FreeDLL = 1; // Set to 1 during development; when done, set to 0 #else sc.FreeDLL = 0; #endif sc.AutoLoop = 1; MinBarSpacingForCandleType.Name = "MinBarSpacingForCandleType"; MinBarSpacingForCandleType.SetInt(4); return; // Must return before doing any data processing if sc.SetDefaults is true } // Data processing ///////////////////////////////////////////////////////// if(sc.Index >= sc.DataStartIndex) { if(sc.ChartBarSpacing >= MinBarSpacingForCandleType.GetInt()) sc.BaseGraphGraphDrawType = GDT_CANDLESTICK; else sc.BaseGraphGraphDrawType = GDT_HLCBAR; } } Date Time Of Last Edit: 2015-10-20 20:29:49
|
[2015-10-23 03:41:25] |
|
You need to use: https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scUpdateAlways 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: