Login Page - Create Account

Support Board


Date/Time: Thu, 20 Mar 2025 18:34:11 +0000



[Programming Help] - Numbers Bars Background Colors not Updating Correctly Using ACSIL

View Count: 415

[2022-11-06 01:55:36]
deltaFlow - Posts: 12
I am using ACSIL to update the Numbers Bars input for "Column 1 Actual Volume Compare Thresholds (In:112)". My custom study creates a new setting string based on market conditions.

However, even though the input setting is correctly updated by the ACSIL code (as corroborated by looking at the "Settings and Inputs" dialog box) the background colors themselves will not update according to the new setting.

I've reviewed the Support Board for this issue and so far found no answer.

Here is the code I am using for updating Numbers Bars, Input# 112 after computing the newSettingStr:
sc.SetChartStudyInputString( sc.ChartNumber, 1, 111, newSettingStr );
sc.RecalculateChartImmediate(sc.ChartNumber);

If, after displaying the study settings dialog, I hit the "Apply" or "OK" buttons the background colors DO update correctly. It seems like sc.RecalculateChartImmediate() will not "Apply" the new setting.

Is my code incorrect or is it an issue with Numbers Bars supporting this kind of ACSIL input update?
[2022-11-10 14:54:15]
deltaFlow - Posts: 12
Dear Sierra Support,

As described above, it seems like sc.RecalculateChartImmediate() does not do what manually hitting the "Apply" button does (for Numbers Bars background coloring setting).

I am wondering if I sent the above support request to the right place since I have not heard from you. It was a question regarding either a (1) a possible bug in the background coloring in the Numbers Bars feature or (2) a problem with my ACSIL.

However, I am not asking for ACSIL programming support.
I just don't want to spend resources trying to do something in ACSIL that cannot be done, at this time. It may be the case that ACSIL simply cannot apply changes in Settings and Inputs for Numbers Bars (specifically, background coloring) at this time.

If that is the case, please let me know.

If you do want any attached files please specify.

Thanks.
[2022-11-10 15:20:39]
User431178 - Posts: 617
It is not possible to recalculate the chart that the study function instance that is calling this function is applied to. In this case 0 is returned and nothing happens.

ACSIL Interface Members - Functions: sc.RecalculateChartImmediate()

From your code snippet above, using sc.ChartNumber, you are obviously doing what is described above as not being possible.

Did you try sc.RecalculateChart?

Also maybe:
ACSIL Interface Members - Variables and Arrays: sc.FlagFullRecalculate
ACSIL Interface Members - Variables and Arrays: sc.FlagToReloadChartData
Date Time Of Last Edit: 2022-11-10 15:21:34
[2022-11-10 17:37:43]
deltaFlow - Posts: 12
Thanks, User431178.

I did try sc.RecalculateChart first before using sc.RecalculateChartImmediate and found similar problem.

I had read that statement in the documentation you pointed out: "It is not possible to recalculate the chart that the study function instance that is calling this function is applied to." I cannot figure out what it is trying to say. (The function does return 0.)

I'll check out those flags you referred to.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account