Support Board
Date/Time: Sun, 11 May 2025 01:40:02 +0000
Incorrect ACSIL Function (SCALE_CONSTRANGE)
View Count: 326
[2024-08-29 21:57:42] |
User688525 - Posts: 284 |
Hello Sierra Chart, As per the Base Graph Scale Range Types (ACSIL Interface Members - Variables and Arrays: sc.BaseGraphScaleRangeType), I have discovered that SCALE_CONSTRANGE generates an error when compiling, however, SCALE_CONSTANT_RANGE generates without errors and also functions correctly. When trying to set the Scale Range using sc.ScaleConstRange, there is no error with compiling, but the function doesn't set the scale range. As per your documentation, it specifies that this only works when the Scale Range Type is "SCALE_CONSTRANGE". As above, if SCALE_CONSTRANGE is generating errors, could this explain why setting the scale range is not working? "sc.ScaleConstRange is the range, that is the difference between the high and the low, for the constant range scale types. This is only used when sc.ScaleRangeType is either SCALE_CONSTRANGE or SCALE_CONSTRANGECENTER. If sc.ScaleRangeType is set to one of these constant range types, sc.ScaleConstRange needs to be greater than 0." Thank you |
[2024-08-30 03:47:45] |
Sierra_Chart Engineering - Posts: 19539 |
We are not understanding this. What is meant by "SCALE_CONSTRANGE generates an error when compiling". We do not know what you are referring to.
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 |
[2024-08-30 04:44:50] |
User688525 - Posts: 284 |
Hello Sierra, By compiling, I am referring to building the study (Analysis > Build Custom Studies DLL > Build > Remote Build) which generates the following error when using "SCALE_CONSTRANGE": Server: https://build.sierrachart.com The remote build is complete. The build failed. Ticks-Range-FP.cpp: In function 'void scsf_TicksRange(SCStudyInterfaceRef)': Ticks-Range-FP.cpp:10:38: error: 'SCALE_CONSTRANGE' was not declared in this scope; did you mean 'SCALE_CONSTANT_RANGE'? 10 | sc.BaseGraphScaleRangeType = SCALE_CONSTRANGE; // set scale range type to constant range | ^~~~~~~~~~~~~~~~ | SCALE_CONSTANT_RANGE Using SCALE_CONSTANT_RANGE in place of "SCALE_CONSTRANGE" results in a successful build, however, as per the above, "sc.ScaleConstRange' does not work. |
[2024-08-30 18:36:36] |
Sierra_Chart Engineering - Posts: 19539 |
We have corrected the documentation. We see no problem with these variables. Below is a test function: /*==========================================================================*/
SCSFExport scsf_TestFunction9(SCStudyInterfaceRef sc) { SCSubgraphRef Subgraph_Test = sc.Subgraph[0]; if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Test Function 9"; sc.AutoLoop = 0; sc.GraphRegion = 0; return; } if (sc.IsFullRecalculation) { // constant range testing sc.BaseGraphScaleRangeType = SCALE_CONSTANT_RANGE; sc.BaseGraphScaleConstRange = 30; } } 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: 2024-08-30 18:37:14
|
[2024-08-30 20:49:54] |
User688525 - Posts: 284 |
Hello Sierra, Thank you for correcting the documentation. The sample/test code functions correctly. I was using "sc.ScaleConstRange" instead of "sc.BaseGraphScaleConstRange". |
To post a message in this thread, you need to log in with your Sierra Chart account: