Login Page - Create Account

Support Board


Date/Time: Sun, 12 May 2024 09:31:17 +0000



[Programming Help] - ASCIL - Set Chart Auto Trading to OFF on sierra or computer restarts

View Count: 620

[2018-10-20 13:59:01]
User316362 - Posts: 210
Is there an ASCIL example of how to reset (turn off) auto trading on a chart if a restart of sierra or computer restart occurs?
I want to do this programmatically and NOT advise people to Manually set global "Disable auto trading on Startup".

Or better yet, If an Input , say "tradingEnabled", is set to yes and Sierra gets restarted, How might one programmatically reset the Input to No on the chart when sierra restarts? forcing the user to turn it back to yes?
Date Time Of Last Edit: 2018-10-20 17:34:43
[2018-10-20 20:28:49]
bradh - Posts: 857
An easy way to do this is to check Trade >> Disable Auto Trading On Startup.
[2018-10-20 21:29:02]
User316362 - Posts: 210
Thanks. Agreed, that's an easy manual way to do it.

However, if deploying a trade system, I need to programmatically be able to disable trading, since I can't depend on users manually disabling it.

Don't want trading program to fire unwanted trades at start up, potentially.

I think I just need a way to reset an input variable on startup that a user may have changed previously
Date Time Of Last Edit: 2018-10-20 21:34:29
[2018-10-20 22:17:03]
Sierra Chart Engineering - Posts: 104368
The best way to do this is to use a persistent variable using the persistent variable functions. Check the persistent variable and see if it is false. If it is false, then set sc.SendOrdersToTradeService to false and then set the persistent variable to true. This will then prevent the study from setting sc.SendOrdersToTradeService to false again.
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
[2018-10-21 15:23:41]
User316362 - Posts: 210
Perfect, thank you!
Date Time Of Last Edit: 2018-10-21 15:25:03

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

Login

Login Page - Create Account