Support Board
Date/Time: Sat, 28 Jun 2025 01:24:44 +0000
Post From: OCO orders still showing after a filled sell order is bought using ACSIL
[2021-09-21 05:31:58] |
User133994 - Posts: 81 |
Support, I am trying to scale out of a 4 contract position. I'm using ACSIL with all the settings for Unmanaged Automated trading and have succeeded in entering a position with 4 contracts (sell entries) each with their own OCO groups (4 total). When I get to a price when I'm ready to *exit* the 1st contract (i.e. only flatten 1 of the 4) I tried moving the OCO group to a nearby price so that it would convert to a market order and flatten only the 1 contract...but that didn't work. This is a situation when the OCO group didn't trigger, but I need to get out of 1 contract "now." Then I tried several other things--including manually "buying" one contract from the chart. And that didn't work until I changed the quantity to 1 on the chart that the ACSIL Trading study was attached to. After much effort (I'm still confused as to how many orders I should see and positions (via ACSIL variables): simple math is 4 initially then 3...but I'm seeing 1 and 0 and 13...etc.) I finally got it to do what I want...but in an unconventional method> I simply did a sc.buyentry (SC_ordertype_market) and that action got me down to 3; however, the Trade Orders Window still showed the 1st sell entry as "open" even though the trade window chart position was reduced to 3? So the Trade Orders window also still had the OCO group 1 still active even though there were really only 3 open sell positions (with their 3 OCO groups). And, after all positions were "flat" the OCO group 1 was still "working" on the Trade Orders window... Please let me know the correct way to do this...it seems I've discovered a way to accomplish what I want..but I don't think it is using the code properly because the Trade Orders window isn't displaying as expected and the OCO group 1 isn't being cancelled automatically as expected. Would you please provide an example Trading System that uses a "market" order to flatten only 1 out of 4+ existing open contracts or maybe an ACSIL "flatten only 1 contract" function (when there 4 or more open contracts) that would be wonderful. I need to be able to use OCO groups as well...so this would be a separate override ACSIL function that operates similarly to the "flatten" button on the trade window, but only affects 1 contract at a time ( or more) of a larger total # of open positions. Put another way...if I could do a "modify order" function that immediately changes the current open "filled" position so that it exits at current market value and cancels its associated OCO group. But, I know modify only works on "working" orders...not filled orders. Please let me know. Please help. Thanks in advance. Date Time Of Last Edit: 2021-09-21 05:33:24
|