Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 19:54:38 +0000



[Programming Help] - Using ACSIL, how can more than one ACS Control Bar button be active?

View Count: 958

[2020-05-25 03:15:43]
JacquesSauve - Posts: 7
The documentation says: "Only one ACS Control Bar button can be active at any time, so turning on an ACS Control Bar button also effectively turns off the currently active ACS Control Bar button."
So it is quite clear that I cannot have more than one active button. Is there any way this can be circumvented or would I have to use checked menu options to have several possible options for my study? I know about Inputs in the study settings, but I would like something that can be toggled on and off easily with a simple click.
Or is there another SC best practice to do the equivalent?
[2020-05-26 04:08:32]
Sierra Chart Engineering - Posts: 104368
We would like to help with this, and support multiple ACS Control Bar buttons to be enabled at the same time but that would cause an issue with existing studies that are relying on the current model.

As an alternative, what we recommend you do is that when a button is enabled, internally invert a boolean state variable that the button is associated with to remember the current state. After that disable the button so that it is no longer in an on and pushed in-state:
Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events: sc.SetCustomStudyControlBarButtonEnable()

And then change the text of the button to indicate the current state (whether on or off):
Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events: sc.SetCustomStudyControlBarButtonText()
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: 2020-05-26 04:09:13
[2020-05-26 10:11:06]
bradh - Posts: 854
We would like to help with this, and support multiple ACS Control Bar buttons to be enabled at the same time but that would cause an issue with existing studies that are relying on the current model.

Perhaps an alternative type of button could also be supported? You could keep the radio buttons and add a new type of button that behaves like the ATC button which is local to each chart?
[2020-05-26 16:23:54]
JacquesSauve - Posts: 7
Thank you, engineering, for the answer.
Your suggestion doesn't solve my problem because this button is used to enable/disable the reception of pointer clicks.
Therefore, I need the button to actually stay on to receive pointer clicks. However, by pressing another (unrelated) button my study uses, the button is turned off and the study no longer receives pointer click events.
In other words, I can use your suggestion to set an internal boolean state variable but I cant use that variable to enable/disable the reception of pointer clicks.
[2020-05-26 19:10:38]
Sierra Chart Engineering - Posts: 104368
Yes we could create new buttons. But for now refer to the alternative we came up with related to this:
Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events: Maintaining Multiple On States For Advanced Custom Study Control Bar Buttons



As long as one of the custom study buttons is enabled, then pointer events will be received:
Advanced Custom Study Interaction With Menus, Control Bar Buttons, Pointer Events: Receiving Pointer Events

You have all of these various options to work with:
To have the study function instance receive these events, set sc.ReceivePointerEvents to one of the following constants: ACS_RECEIVE_NO_POINTER_EVENTS, ACS_RECEIVE_POINTER_EVENTS_WHEN_ACS_BUTTON_ENABLED, ACS_RECEIVE_POINTER_EVENTS_ALWAYS, ACS_RECEIVE_POINTER_EVENTS_ALWAYS_FOR_ALL_TOOLS anywhere within the study function.

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: 2020-05-26 19:12:20
[2021-03-09 09:44:27]
ABTrader - Posts: 32

#2 Perhaps an alternative type of button could also be supported? You could keep the radio buttons and add a new type of button that behaves like the ATC button which is local to each chart?
It is going to be a useful implementation if available as buttons which perform similar to Auto-trading/enable for chart. I have found some user has workaround with ACSIL whcih is able to Enable/disable "Send to trade service" as well .


Hope SC team could bring this as standard feature in the upcoming release/update.

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

Login

Login Page - Create Account