I am confused between these 2 methods. I have code that generates an unmanaged bracket order in opposite directions of the current price. They are NOT tied together via OCO. However when one order is filled I would like to trigger a trailing stop loss that "chases" my live order to capture profits.
I've placed my initial unmanaged bracket orders in OnMarketData(). I also place stop loss orders in OnExecutionUpdate() to generate when one of my initial bracket orders are filled.
My question is this. I am placing a ChangeOrder() function for my stop loss order in OnBarUpdate() so as to adjust the order every time price moves into profit. Should I be using OnPositionUpdate instead or is OnBarUpdate better???

Comment