Support Board
Date/Time: Sat, 18 Jan 2025 01:58:35 +0000
Action after OK/Apply button
View Count: 782
[2018-01-14 14:15:16] |
User53601 - Posts: 106 |
In ACSIL, is there any possibility to call a piece of code when the OK or Apply buttons are pressed in the window Analysis >> Studies, however before recalculation. I want to delete drawings after pushing the button OK/Apply, however before the recalculation takes place. |
[2018-01-15 09:32:39] |
Sierra Chart Engineering - Posts: 104368 |
Yes. When sc.IsFullRecalculation is nonzero, then at that time do whatever you require at the beginning of the study function. And do not do them again until sc.IsFullRecalculation returns back to 0 and then back to 1.
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 |
[2018-01-16 16:10:08] |
User53601 - Posts: 106 |
Seems that this did not bring the solution. Piece of code I need to run before recalculation uses data stored in structure like sc.Subgraph[1].Arrays[1] . If I run the code the way as suggested, the data stored in sc.Subgraph[1].Arrays[1] get reset to zero beforehand, so I cannt use them: If I run the code this way: if (sc.LastCallToFunction ) { // In this situation the code run ok, it can use data stored in sc.Subgraph[1].Arrays[1] } I would need to run the code after use of button Apply/OK however before the process of recalculation starts, like it is in case of using button REMOVE/sc.LastCallToFunction . |
[2018-01-16 17:21:04] |
Sierra Chart Engineering - Posts: 104368 |
Piece of code I need to run before recalculation uses data stored in structure like sc.Subgraph[1].Arrays[1] . sc.GetPersistentInt() 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 |
[2018-01-16 18:24:22] |
User53601 - Posts: 106 |
I am aware of persistent variables, however I cannot use them in this case. I do not know beforehand how many of the variables I will need to use. can you give me an explicit answer, whether there is a way to put a code inbetween APPLY button and start of recalculation? |
[2018-01-16 19:25:14] |
Sierra Chart Engineering - Posts: 104368 |
can you give me an explicit answer, whether there is a way to put a code inbetween APPLY button and start of recalculation? You can also store up to 50000 persistent variables of any data type including strings and date-time variables. The key can just simply be an index, in the same way you use an index like this: sc.Subgraph[1].Arrays[1]
Using persistent variables should work well for you. 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: 2018-01-16 19:25:45
|
To post a message in this thread, you need to log in with your Sierra Chart account: