I am trying to implement a bracketorder on quantconnect. I am sending a marketorder and OnOrderEvent I am placing a limit and stoporder. If the limitorder is filled I want to cancel the stop and vice versa. 

Anyone already implemented such a logic? Any sample code would be much appreciated.