Support Board
Date/Time: Wed, 14 May 2025 10:53:44 +0000
Post From: Use of Global variable in other Study
[2016-04-20 21:15:49] |
User53601 - Posts: 106 |
I used your recommendation and it helped me to move forward with my task. thank you. However, I still have a question, I think it somehow relates to the first question. I need to do some processing during recalculation (and then I want to display the result on bars being recalculated): StudyB is processing an input ( sc.Index value) from persistent variable in StudyA . The issue is, that the value transferred to Study B is always the same on the recalculated bars, but it should be different value for each bar ( the sc.Index ). Seems that all the recalculated bars get as an input the same value, the sc.Index of the last recalculated bar. STUDY A int& TestIndex = sc.GetPersistentInt(5); sc.SetPersistentInt(5, sc.Index); STUDY B if ( sc.IsFullRecalculation ) { int AAA = sc.GetStudyPersistentIntFromChart(sc.ChartNumber,1,5); } |