Login Page - Create Account

Support Board


Date/Time: Fri, 22 Nov 2024 17:01:32 +0000



[Programming Help] - Order Quantity

View Count: 131

[2024-10-08 07:08:06]
User781731 - Posts: 26
I have a custom study that is calculating the order quantity based on current price relative to a line drawing which represents my stop loss. So the value being output by this study is the order quantity.

Is it possible using ACSIL to have the the order quantity change based on the changing value in another study subgraph? If it is, do you know the basic code that would enable this?

I ask because it is obviously much quicker this way than it is if I am manually changing the order quantity myself based on me visually looking at the value that is displayed by the custom study. I enter trades by market order so every fraction of a second I can cut down matters.
[2024-10-08 08:51:32]
User781731 - Posts: 26
e.g. in this message thread: ACSIL function to read Trade Window values and Default Order Quantity

it is suggested that "You can already get/set the Order Quantity" using "sc.TradeWindowOrderQuantity". is this still correct?
[2024-10-14 11:17:24]
User781731 - Posts: 26
Hello, is anybody going to respond?
[2024-10-14 15:26:27]
gcUserStudies - Posts: 106
it is suggested that "You can already get/set the Order Quantity" using "sc.TradeWindowOrderQuantity". is this still correct?


Yes. This works just fine. I’m using it in a study to change the order quantity after a position is opened for example.
[2024-10-14 15:45:15]
User781731 - Posts: 26
My question is, can it be used to change order quantity BEFORE a position? Can it be used to dynamically adjust the order quantity based on a value in another study? For example; let's say another study has a value being outputted that is changing as price moves, 10, 4, 8, 2, 3 etc. As these changes occur, can I use sc.TradeWindowOrderQuantity to dynamically adjust the order quantity in line with that study BEFORE a position is open?

I ask because it is obviously much quicker this way than it is if I am manually changing the order quantity myself based on me visually looking at the value that is displayed by the custom study. I enter trades by market order so every fraction of a second I can cut down matters.
[2024-10-14 15:53:49]
gcUserStudies - Posts: 106
Yes. You can change it anytime you want. Before a position is open, during, after position is closed. Etc.
Date Time Of Last Edit: 2024-10-14 15:54:31

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

Login

Login Page - Create Account