Support Board
Date/Time: Tue, 28 Oct 2025 20:30:58 +0000
Post From: ASCIL- Passing value to/from custom study
| [2017-10-31 03:46:29] |
| CustomIndicators - Posts: 126 |
|
For local persistent ints, you use: sc.GetPersistentInt(key); sc.SetPersistentInt(key, newValue); For ints on other charts, you use: sc.GetStudyPersistentIntFromChart(chartNumber, studyID, key); sc.SetStudyPersistentIntFromChart(chartNumber, studyID, key, newValue); To get a subgraph from another chart, use: SCFloatArray StudyReference; sc.GetStudyArrayFromChartUsingID(chartNumber, targetChartStudyID, subgraphNumber, StudyReference); float oscValue0 = StudyReference[StudyReference.GetArraySize() - 1]; That stores the current value of the subgraph into oscValue0. If you wanted the last locked value, you just increase that number 1 to number 2. |
