private void Submit() { try { if (BuyrOrderStatus.Equals(ApplicationHelper.EMPTY)) { Order order = ApplicationHelper.MarketOrder(CurrentOrderID, ApplicationHelper.BUY, ContractQuantity); ibClient.placeOrder(CurrentOrderID, contract, order); } if (BuyrOrderStatus.Equals(ApplicationHelper.FILLED)) { Order order = ApplicationHelper.TralingStop(CurrentOrderID, ApplicationHelper.BUY, ContractQuantity, 0, TrailingStopPrice); ibClient.placeOrder(CurrentOrderID, contract, order); } } catch (Exception ex) { throw ex; } }