Support Board
Date/Time: Tue, 15 Apr 2025 14:06:23 +0000
[ACSIL] - Max allowed Position size question
View Count: 306
[2025-01-01 18:27:09] |
backinblack - Posts: 40 |
Hello, Currently there is a limit of 5 on position sizing, how do I place orders bigger than that? Place multiple orders of 5 each? I could do that by disabling 'sc.AllowOnlyOneTradePerBar = true;' to false. Is there a danger or in-deterministic behavior wrt to total number of open positions - eg I am looking to open 10 but I may end up with 15 open positions? Thank you! J Date Time Of Last Edit: 2025-01-01 19:38:51
|
[2025-01-02 10:25:02] |
User431178 - Posts: 646 |
Currently there is a limit of 5 on position sizing, how do I place orders bigger than that?
Set sc.MaximumPositionAllowed and/or global/symbol position limit to a higher number.Place multiple orders of 5 each? I could do that by disabling 'sc.AllowOnlyOneTradePerBar = true;' to false
That alone won't help, max position is based on total position, once you have hit sc.MaximumPositionAllowed (or global/symbol limit) then that's it.Is there a danger or in-deterministic behavior wrt to total number of open positions - eg I am looking to open 10 but I may end up with 15 open positions?
If you are checking the open position quantity then how would that be possible? You have control over the orders submitted.
Date Time Of Last Edit: 2025-01-02 10:25:24
|
[2025-03-28 21:26:53] |
backinblack - Posts: 40 |
Thanks for your reply. I did not do a good job of specifying what I am looking for. I am using my own code to move targets and stops; A custom trailing strategy. I store the order Ids for Targets and Stops in persistent variables and use those ids to then move Stops/Targets. The issue I am facing is, s_SCNewOrder struct has members going only up to 5 orders. I cannot figure out how do I trade with 6 orders for example. Any help will be highly appreciated. Thanks! |
[2025-03-29 10:52:45] |
User431178 - Posts: 646 |
The issue I am facing is, s_SCNewOrder struct has members going only up to 5 orders. I cannot figure out how do I trade with 6 orders for example. Your initial question makes more sense now. If I need to have more than 5 stops/targets, I break up the quantity accordingly and send as separate orders. You could store the requirements in an appropriate container (e.g. queue) and pop them off as each order is sucessfuly submitted. |
[2025-03-29 16:40:26] |
backinblack - Posts: 40 |
Thank you. I tried to submit the orders in loop. on reply, it opened the first 5 positions with SL and Targets as expected on the first loop invocation but it returned a -1 for the 2nd iteration. Got following message in the trade service log: SellEntry | Bar start date-time: 2025-03-28 14:06:46.000 | SellEntry signal is ignored because working orders exist. My settings in the code: sc.AllowMultipleEntriesInSameDirection = true; sc.MaximumPositionAllowed = 10; sc.SupportReversals = false; sc.AllowOppositeEntryWithOpposingPositionOrOrders = true; sc.SupportAttachedOrdersForTrading = true; sc.CancelAllOrdersOnEntriesAndReversals = true; sc.AllowEntryWithWorkingOrders = false; sc.CancelAllWorkingOrdersOnExit = true; sc.AllowOnlyOneTradePerBar = false; sc.MaintainTradeStatisticsAndTradesData = true; sc.SupportTradingScaleIn = true; sc.SupportTradingScaleOut = true; I tried to follow the below advice but 1) I am not sure I understand the settings fully 2) ramifications of these settings fully BuyEntry signal is ignored because working orders exists Thanks Date Time Of Last Edit: 2025-03-29 16:46:12
|
[2025-03-29 16:53:21] |
User431178 - Posts: 646 |
sc.AllowEntryWithWorkingOrders needs to be true for it to work.
|
[2025-03-29 17:19:06] |
backinblack - Posts: 40 |
That helped but now I am getting: SellEntry signal is ignored because maximum Short Position quantity allowed has been reached or would be exceeded with new order. Max. Position allowed: 5. Resulting Position without working orders: -10. Resulting Position with all working orders except exits: -10. Resulting Position with Market working orders: -10. Current Position: -5 I have set max to 10. Not sure what I am doing wrong here now. One thing slightly odd I noticed, when I try to print the sc.MaximumPositionAllowed, it gives me 0 in the logs. Date Time Of Last Edit: 2025-03-29 17:52:04
|
[2025-03-29 18:39:07] |
backinblack - Posts: 40 |
I got it working finally. Was just being silly with certain part of my code. Thanks a ton my friend for all the help! |
To post a message in this thread, you need to log in with your Sierra Chart account: