Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 03:58:29 +0000



ACSIL function to read Trade Window values and Default Order Quantity

View Count: 2422

[2018-11-06 15:01:41]
bradh - Posts: 854
In a recent thread on Position Sizing: Position Sizing | Post: 77245

And if there is a developer who is interested in this, we can then give them the necessary capabilities in the Advanced Custom Study Interface and Language to fully accomplish this if it does not already exist. So this is something we are willing to do to help out.

I am a developer interested in this, and would like to know if or when you can provide these ACSIL functions:
- Read the Stop(s), Target(s), and Order Quantity from the Trade Window
- Read the Default Order Quantity from the Global Symbols Settings

Thanks!
[2018-11-07 02:28:59]
Sierra Chart Engineering - Posts: 104368
- Read the Stop(s), Target(s), and Order Quantity from the Trade Window
You can already get/set the Order Quantity:
ACSIL Interface Members - Variables and Arrays: sc.TradeWindowOrderQuantity

It is far too involved for us to support accessing the Attached Orders on the Trade Window. That is not something that would come. Instead the ACSIL study should set the Attached Orders.

- Read the Default Order Quantity from the Global Symbols Settings
Is this really necessary?
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-11-07 12:18:32]
bradh - Posts: 854
In thread: Position Sizing you say:

The only other thing though that you would need to know would be the currently set Stop and Target offsets but perhaps there could be a way with a function to access those. Let us know if you would need that.

This is what we need. The stop and target offsets, even if it is only the closest of each.

Thanks.
[2018-11-07 19:06:54]
Sierra Chart Engineering - Posts: 104368
At this point in time we are not going to be able to help with this. Things have changed since those last messages. We just have too much other work to do.
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-11-11 10:02:02]
Sierra Chart Engineering - Posts: 104368
Check back with us in about one month to see what we can do.

We always want to be as helpful as we can but at the moment, we are quite overwhelmed with a lot of high-priority items.
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: 2018-11-11 10:02:22
[2018-12-13 22:38:07]
bradh - Posts: 854
Check back with us in about one month to see what we can do.

Checking back to see if it is possible yet to read the targets and stops of an attached order from the trade window.

Thanks!
[2018-12-14 00:12:58]
Sierra Chart Engineering - Posts: 104368
One solution is for your study to set the Attached Orders using this new function and then the study will know exactly what they are set to:
sc.SetAttachedOrders()

Although there is a potential issue where they can be changed by a user but they could always be periodically updated by the 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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-12-14 00:13:47
[2020-03-24 02:05:48]
User99735 - Posts: 234
Hi,
Any possibility of getting this functionality added now - "The only other thing though that you would need to know would be the currently set Stop and Target offsets but perhaps there could be a way with a function to access those. Let us know if you would need that."

Regards

Vivek
[2024-03-03 13:34:21]
User601931 - Posts: 10
This would be helpful to have a function which can see the values in the trade window for attached orders.

Example: I'm using "Trade Window Strategy A", but if there is a strong trend, I want to reduce the stop offset by 25% when I submit orders from ACSIL. The determination of "strong trend" is in the ACSIL code based on another indicator. I want the ACSIL code fairly generic and do not want to hard code every strategy. So, I want to read the UI values, then adjust them if necessary programmatically before submitting the orders.
[2024-03-03 17:16:32]
User719512 - Posts: 227
User601931, seems to me this can already be accomplished by

ACSIL Interface Members - Variables and Arrays: sc.TradeWindowConfigFileName

Get/Set depending on conditions. Can also be used to dynamically set these by asking for config names in your study inputs.

Astute readers will notice this API is documented just above the docs pointed to by post #2 in this thread.
[2024-03-04 16:49:34]
User601931 - Posts: 10
User719512: I can only find functions to read the configuration filename, not the values in configuration. (example: user set target & stop offset values)

If there are functions to read the configuration values, please do share. It would be helpful.

thanks.
[2024-03-05 00:26:17]
User719512 - Posts: 227
The point of my post was that if you know the name of the Config, then you know the values of the quantity, targets, stops, offsets, triggers, etc. since these are your configs, and presumably you know what's in them.
[2024-03-05 13:50:20]
User601931 - Posts: 10
Yes, sure... you could hard code the values from your config file in your ACSIL code, for each config file, and modify/debug/and re-compile every time you update a trade window configuration... however, it is a lot of maintenance & duplication of values which are already in the UI. If during trading, you want to change a parameter or create another scenario/config, your code is stuck with the old values until you stop & recompile. It's just not the best design approach.
[2024-03-05 17:16:52]
User719512 - Posts: 227
Agree, hard-coding these in the code is not the best design approach. If this were my project, I'd put them in a file (probably json/csv) the study reads to map config names to properties. Another option is don't use the Sierra config at all and have your study read all the info it needs from such a file and perform all it needs to manage the trades and attached orders/etc. from code. Maybe not ideal for everything you want to do, but it could be a path forward. Without more context, hard to know for sure if any of this is a workable solution for you or not and given the availability of more API access to this from ACSIL.

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

Login

Login Page - Create Account