Support Board
Date/Time: Wed, 27 Nov 2024 00:27:19 +0000
Auto Trading after system restart
View Count: 1101
[2014-07-03 08:33:39] |
Shaharabin - Posts: 28 |
Hi, Say i have an auto trading system that has triggered and now runs a trade. it is designed to move the Stop Loss at some price. Now, let's say for some reason my computer/Sierra has restarted itself in the middle of the trade. Is there any way for me to let control of the trade back to the auto trading code? so it can resume control of that stop loss... Question#2 Can i manually create an order to just move the stop loss on an already open trade at some price level? (That can be another solution to my problem...) Thanks! |
[2014-07-07 19:09:35] |
Shaharabin - Posts: 28 |
NO is also an answer, it is better than no answer at all... Someone? |
[2014-07-07 21:30:14] |
Sierra Chart Engineering - Posts: 104368 |
We apologize for the delay. We were thinking about this and considered if we should put this into our documentation. So we had not gotten to it yet. Basically this is what you need to do: -Set up a scheduled task in Windows to start Sierra Chart. It should be started every minute. When Sierra Chart is started by the scheduled task and it is already running, another instance will not start. -Enable Global Settings >> Data/Trade Service Settings >> Connect On Program Startup and Reconnect on Failure options. - Save the chart that contains the automated trading system as part of a Chartbook. Here is the documentation for this: https://www.sierrachart.com/index.php?page=doc/doc_Chartbooks.html#SaveChartbook -Add the Chartbook to automatically open through Global Settings >> General Settings >> Files to Open on Startup. - Make sure there is no checkmark by Trade >> Disable Auto Trading on Startup. We think we will be adding this to the documentation. 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 |
[2014-07-07 21:31:12] |
Sierra Chart Engineering - Posts: 104368 |
This we do not understand: Can i manually create an order to just move the stop loss on an already open trade at some price level? In any case, it does not sound like something that is supported. 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: 2014-07-07 21:31:31
|
[2014-07-07 22:09:39] |
Shaharabin - Posts: 28 |
Well, First, thanks for the replay. I kind of got all that already taken care of. Now, What i actually asked is much more complicated, I'm sure it's not supported but if you can add it the future it will be awesome. This is what i meant: I have a custom study i wrote to auto trade. It opens a trade. when the trade is live it monitors the price change. At some point it will move the Stop loss order. all automatically according to the custom study i wrote. The problem is, if for some reason Sierra was shutdown, when it's turned back on, my custom study is restarted and goes back to its initial state (where it looks for an entry) rather then the state it was before the shutdown (the tracking of live position state). That's why i asked if there is a way that sierra can reload with "memory" of the study state. Which i understand now is probably impossible (and i should probably write some code in my study to take care of that state) Assuming there was no solution, i looked for a manual one. My problem was that after the restart, no process was going to update the Live trade's stop loss order. all i need is a way to update an existing stop loss order's price upon a trigger. the trigger is the market reached a certain price. i know sierra has a lot of manual trading functionality, therefor my second question was; can i automate the update of an existing order's (Stop loss) price based on a trigger? (like price destination) Hope this makes sense, Thanks. |
[2014-07-07 23:11:42] |
Sierra Chart Engineering - Posts: 104368 |
What you want to do is supported. You will want to use the sc.StorageBlock member of the ACSIL structure to store persistent data: https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scStorageBlock And you will want to set your Chartbook to automatically save periodically through Global Settings >> General Settings >> General 2 >> Autosave Chartbooks Time in Minutes. can i automate the update of an existing order's (Stop loss) price based on a trigger? (like price destination) Have a look at the Move to Breakeven functionality but this may not be exactly what you need: https://www.sierrachart.com/index.php?page=doc/doc_AttachedOrders.html#MoveBreakevenForStop 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 |
[2014-07-07 23:56:51] |
Shaharabin - Posts: 28 |
Thanks!
|
To post a message in this thread, you need to log in with your Sierra Chart account: