Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 22:28:04 +0000



Post From: sc.SetChartStudyInputInt() reverts when used with sc.LastCallToFunction()

[2023-09-09 20:06:48]
LudaTrades - Posts: 27
I have a custom study that modifies the numbers bars text type and volume multiplier based on visible bar count using sc.SetChartStudyInputInt(). When the script is first loaded I save the original values to be reset if the study is removed.

For some reason, resetting at sc.LastCallToFunction() is not possible; the values set for a split second then revert. I have logged everything and according to my log they set correctly.

I have tried sc.RecalculateChart(sc.ChartNumber) as the documentation suggests but I still run into this issue. I have reviewed the calculation precedence documentation and tried changing the study order and every sc.CalculationPrecedence with no luck either.

At this point I have come to the conclusion that there is something going on internally with Sierra Chart that is causing this, any help is greatly appreciated!
Private File