Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 15:05:33 +0000



[User Discussion] - Help setting staggered outputs

View Count: 227

[2023-04-30 00:43:03]
WeroTrader - Posts: 46
Is there a way, in ACSIL code, to place limit orders by price to partially exit a given position?

I know that an alternative is limited orders defined by offset, but I want to define them by price.

Please, Sierra team, I ask for your help to get some documentation to help me, I AM NOT REQUESTING CODE
[2023-04-30 11:01:41]
User431178 - Posts: 406
but I want to define them by price

Then set the target(s) by price not offset: Automated Trading From an Advanced Custom Study: [Type: double] s_SCNewOrder::Target1Price
[2023-05-03 03:14:53]
WeroTrader - Posts: 46
Thanks for the answer it really helped me!!!

I was able to find the solution.

However, a different issue arose for me to resolve.

I notice that the amount in main order (buy or sell entry) is divided N times by the number of targets it includes. This causes me a conflict since my broker requests a lottery in multiples of 100 and, for example, if my main order is 300 contracts, and I place two targets, the system will try to send two orders of 150 contracts, which will be rejected by my broker.

Is there anything I can do so that the main order is kept for a total batch and not split or do I only have to place batches that are multiples of 200?
[2023-05-03 10:19:50]
User431178 - Posts: 406
Are you setting the individual OCO group quantities?

Automated Trading From an Advanced Custom Study: [Type: unsigned integer] s_SCNewOrder::OCOGroup1Quantity

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

Login

Login Page - Create Account