Login Page - Create Account

Support Board


Date/Time: Sat, 15 Mar 2025 02:46:52 +0000



[Programming Help] - Enabling / disabling a trading system after trade is placed?

View Count: 409

[2022-07-04 11:50:34]
BenjFlame - Posts: 335
Hi,
once I entered manually a trade, is there a way, to choose an automated system to handle the trade?
For example in some cases, I may want an automated trailing stop to kick in, while in some other cases, I may want the trade to be handled with automated partial profits targets and breakeven stops.

I'm going to write the trade handling systems in ASCIL of course.... but I'm unsure how I can then decide to "enable" a system to handle the trades after they are placed manually.

How should this be done?
[2022-07-04 13:47:34]
Sierra Chart Engineering - Posts: 104368
We would recommend using an internal state, remembered through a persistent variable:
ACSIL Interface Members - Functions: sc.GetPersistentIntFast()


The initial state is the automated trading system is disabled/false. And then when a position comes into existence the automated trading system can enable itself by setting its state to true.

Check for Positions through:
Automated Trading From an Advanced Custom Study: Getting Trade Position Data
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: 2022-07-04 13:50:53
[2022-07-04 14:07:11]
BenjFlame - Posts: 335
Thank you.
This is exactly what i wanted to know.

I’m also thinking that keyboard shortcut can be used to change state of the persistant variable.

I read how ascil study can receive kb shortcuts.

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

Login

Login Page - Create Account