Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 10:36:35 +0000



[Programming Help] - ACSIL Custom Study Button to Control Trading System

View Count: 495

[2023-02-04 15:23:20]
Tahir - Posts: 35
Hi,
Is it possible to control existing study inputs with a Custom Study Button?
I'm a beginner in Acsil and coding in general. I'm trying to build a custom study button that enables or disables the trading system based on alert condition.
I have two systems one for buy and one for sell, so I want to have control over the system with a single click. I don't want to turn both of them off and I know yo can do that with menu item "auto trading enabled".
thank you
[2023-02-04 17:45:34]
ondafringe - Posts: 286
Assuming I understand what you're trying to accomplish, IMO, you should put both systems -- buy and sell -- in one study. Then you can configure two keyboard shortcuts, one to turn the buy on/off and the other to turn the sell on/off. That's a manual way of doing it, but you also said you wanted it based on an alert condition (?), which can be automated and accomplished with your code.
[2023-02-04 17:54:55]
Tahir - Posts: 35
I think I did a bad job of explaining what I need.

In my chart I have a "Trading System Based On Alert Condition" study.
I want to add a button that controls it's "Enable/Disable" input.

Is there a way to do that without actually having to write the study?
[2023-02-04 18:47:01]
ondafringe - Posts: 286
Take a look at this:

sc.SetChartStudyInputInt()
[2023-02-04 19:50:49]
Tahir - Posts: 35
Thank you that worked!
[2023-02-19 03:40:31]
Ticks - Posts: 183
Could you post the code to how you got this to work?

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

Login

Login Page - Create Account