Login Page - Create Account

Support Board


Date/Time: Mon, 15 Sep 2025 13:37:32 +0000



Post From: Autotrader live order modification fails

[2025-09-11 11:49:08]
User327556 - Posts: 7
Hey,
I have created my own autotrader within ASCIL. Everything seems to be working in sim, Placement of orders to cancelation of the attached orders when profit target is hit. However, when connected to my broker (rithmic), this seems to work differently. When a target is filled, rithmic cancels the order within their server so it is not exsistent, while in sierra the order remains active creating a ghost order. It will not fill, but it is there and locks the autotrading (no trades when active orders or positions).

the code for the target 1 (2 / 3 are identical):
NewOrder.Target1Offset = Input_target1_fixed_value.GetInt() * sc.TickSize;
NewOrder.AttachedOrderTarget1Type = SCT_ORDERTYPE_LIMIT;
NewOrder.OCOGroup1Quantity = Target1Quantity_short;    
              

the code for the stop 1 ( 2/3 are identical just different group):
if(Target1Quantity_short>0){
NewOrder.Stop1Offset=Stop_price_short;
NewOrder.OCOGroup1Quantity=Target1Quantity_short;
NewOrder.AttachedOrderStop1Type=SCT_ORDERTYPE_STOP;
}

In the tradingsettings I have turned on:
Use server side bracket orders (if supported)
Use server side OCO orders (if supported)

When I add an extra line to flatten and cancel everything after trade position is closed, it rejects because the order doesn't exsist at rithmic.

Do you guys have any idea what I could do to fix it?

Kind regards,