Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 16:26:51 +0000



OCO across assets

View Count: 247

[2023-01-27 11:26:49]
User166108 - Posts: 67
Say I have multiple linked charts and I only want to trade one of them at a time. For example the stock futures (ES, NQ, RTY, YM).

I put in multiple entries, but if one of them hits, then I don't want any of the others to fill. So an OCO across assets.

Is there a way to do this aside from writing custom ACSIL code?
[2023-01-27 16:04:59]
Sierra_Chart Engineering - Posts: 14088
No there is not a way to do this. You would need to write a custom study to cancel orders.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-01-27 16:10:46]
User166108 - Posts: 67
OK I figured as much. Is the only way to communicate between charts through socket programming?
[2023-01-27 16:20:03]
Sierra_Chart Engineering - Posts: 14088
You definitely can access all working orders from a custom study for a particular chart and cancel those orders. Refer to:
Automated Trading From an Advanced Custom Study
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-01-27 16:20:25
[2023-01-27 16:44:15]
User166108 - Posts: 67
Yes, but I would need to sync between multiple charts to cancel only when one gets filled.

So for example, ES gets filled, I would want to cancel all orders on NQ, RTY and YM.

I don't see how the page you linked lets me cancel orders on NQ, RTY and YM if ES gets filled. Specifically, how would the NQ/RTY/YM charts know that ES got filled?
[2023-01-27 16:54:32]
Sierra_Chart Engineering - Posts: 14088
Refer to this section for getting the orders:
Automated Trading From an Advanced Custom Study: sc.GetOrderByIndex


You can get the orders for all symbols and check the status of the orders. Including if one of them has filled.

You can cancel an order with this function:
Automated Trading From an Advanced Custom Study: sc.CancelOrder
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-01-27 16:55:10
[2023-01-27 17:04:17]
User166108 - Posts: 67
Ah, I see this one: Automated Trading From an Advanced Custom Study: sc.GetOrderForSymbolAndAccountByIndex()

That should suffice, thank you.

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

Login

Login Page - Create Account