Stop and Reverse using Bracket orders


#1

Hello, I tried to use a bracket order to do a stop and reverse instead of a stop but seems that quantity of bracket orders is overwritten internally with quantity of first order (OrderID)

Do you know how to solve this?

if( ParamTrigger( "Order", "GO !" ) )
{
    ibc = GetTradingInterface( "IB" );
    
    OrderID = ibc.PlaceOrder( symbolTWS , "Buy", 1 , "STPLMT", 12415, 12420, "GTC", True, 1 ) ;    
    
    ibc.PlaceOrder( symbolTWS , "Sell", 3 , "STP", 0, 12400,  "GTC", true,1,"",OrderID, "OCA") ;    // but 3 becomes 1 !
   
    ibc.PlaceOrder( symbolTWS , "Sell", 1  , "LMT", 12440, 0,  "GTC", true,1,"",OrderID, "OCA" ) ;    
}

#2

Child orders ALWAYS are linked to parent and use same size. This is how TWS API works.
You would need to create normal orders (without parent) if you wish to use different sizes