Support Board
Date/Time: Sun, 26 Jan 2025 07:30:51 +0000
Dynamic SCFloatArray Names
View Count: 1079
[2019-02-17 20:02:22] |
User470516 - Posts: 78 |
Dear SC Team, The documentation explains how to create dynamic Graph Names, but I have both been unable to find how to create dynamic SCFloat Array Names in the documentation and failed when trying different ways. Is it possible and if yes could you please direct me to the documentation ? Thank you! Best regards, Laurent Date Time Of Last Edit: 2019-02-18 16:16:55
|
[2019-02-18 16:17:33] |
Sierra Chart Engineering - Posts: 104368 |
If you are referring to a study Subgraph, then you just simply change its Name at any point in the code: ACSIL Interface Members - sc.Subgraph Array: sc.Subgraph[].Name 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 |
[2019-02-18 17:08:24] |
User470516 - Posts: 78 |
Thanks for the answer. No, that is not what I would like to be doing. To better explain my question, below is a piece of code I wrote based on the documentation (ACSIL Programming Concepts: Dynamic Graph Names) and that does what I want: for (int i = 0; i < nbPZ_perChart.GetInt(); i++) { sc.Subgraph[2 * i].Name.Format("PZ_LT_H %d", i); } I would like to do the exact same thing with SCFloatArray: dynamically assigning a SCFLoatArray such as: SCFloatArray PZ_LT_L + std::to_string(i); But this does not work and I was wondering if the documentation explains how to do it with SCFloatArray. Thank you for the support. Regards, Laurent |
[2019-02-18 21:57:13] |
Sierra Chart Engineering - Posts: 104368 |
That code is not valid and we do not know what it is you are trying to do to begin with.
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 |
[2019-02-19 06:13:24] |
User470516 - Posts: 78 |
Thanks, I will be more specific then. In study A, I dynamically create n sc.Subgraphs, n being an user defined input. Study A code is as follows: SCInputRef n = sc.Input[0];
n.Name = "user_number"; n.SetInt(10); for (int i = 0; i < n.GetInt(); i++) { sc.Subgraph[i].Name.Format("subgraph_number %d", i); ... } This works fine and changes the names and number of study A Subgraphs to match the n Input value. Now, in study B, where my problem is, I would like to get the sc.Subgraphs[][] arrays from study A. Those arrays need to be set in the SubgraphArray parameter of the sc.GetStudyArrayFromChartUsingID() function I intend to use to do so. I therefore need to dynamically create n instructions that would look like: for (int i = 0; i < n.GetInt(); i++) { SCFloatArray StudyReference_i; sc.GetStudyArrayFromChartUsingID(StudyA.GetChartStudySubgraphValues(), StudyReference_i); ... } Of course written as such, it does not work and I do not find in the documentation something that would help me do this exactly the way ACSIL Programming Concepts: Dynamic Graph Names helped me dynamically create the sc.Subgraphs in study A. In other words I would need to create dynamic SubgraphArray parameters for sc.GetStudyArrayFromChartUsingID(). I hope this makes sense and I thank you for your support. Regards, Date Time Of Last Edit: 2019-02-20 02:41:26
|
[2019-02-20 02:39:16] |
Sierra Chart Engineering - Posts: 104368 |
This function is on the sc.Input[] structure: GetChartStudySubgraphValues You can create an array of SCFloatArray objects: SCFloatArray StudyReference[SC_SUBGRAPHS_AVAILABLE]; 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 Date Time Of Last Edit: 2019-02-20 02:42:34
|
To post a message in this thread, you need to log in with your Sierra Chart account: