[FONT=Calibri][SIZE=3]//Original Entry[/SIZE][/FONT] [COLOR=black][FONT=Courier New]activeOrder = EnterLongLimit([/FONT][/COLOR][COLOR=purple][FONT=Courier New]0[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=blue][FONT=Courier New]true[/FONT][/COLOR][COLOR=black][FONT=Courier New], 2, Bars[[/FONT][/COLOR][COLOR=purple][FONT=Courier New]0[/FONT][/COLOR][COLOR=black][FONT=Courier New]], “Test1”);[/FONT][/COLOR] [COLOR=black][FONT=Courier New]// Setting the stop in OnOrderUpdate(). I do make sure the tokens match and this is the right order[/FONT][/COLOR] [COLOR=black][FONT=Courier New]stopLossOrder = ExitLongStop([/FONT][/COLOR][COLOR=purple][FONT=Courier New]0[/FONT][/COLOR][COLOR=black][FONT=Courier New], [/FONT][/COLOR][COLOR=blue][FONT=Courier New]true[/FONT][/COLOR][COLOR=black][FONT=Courier New], Position.Quantity, stopVal, [/FONT][/COLOR][COLOR=maroon][FONT=Courier New]"Stop Loss"[/FONT][/COLOR][COLOR=black][FONT=Courier New], “Test1”);[/FONT][/COLOR] [COLOR=black][FONT=Courier New]// At some point I will take profits on the position like this:[/FONT][/COLOR] [COLOR=black][FONT=Courier New]ExitLong(1, [/FONT][/COLOR][COLOR=maroon][FONT=Courier New]"First Target"[/FONT][/COLOR][COLOR=black][FONT=Courier New], “Test1”);[/FONT][/COLOR] [COLOR=black][FONT=Courier New]// Once my next target is reached, I close out like this:[/FONT][/COLOR] [COLOR=black][FONT=Courier New]managedExitOrder = ExitLong([/FONT][/COLOR][COLOR=maroon][FONT=Courier New]"Second Target”)[/FONT][/COLOR][COLOR=black][FONT=Courier New], “Test1”);[/FONT][/COLOR]
[COLOR=black][FONT=Courier New]managedExitOrder = ExitLong(Position.Quantity, [/FONT][/COLOR][COLOR=maroon][FONT=Courier New]Second Target"[/FONT][/COLOR][COLOR=black][FONT=Courier New], “Test1”);[/FONT][/COLOR]
Also, is the returned IOrder object that comes back in the original EnterLongLimit() valid for the life of the position? Should I continue to reference the original EnterSignal on all these orders?
Thanks,
-Scott
Comment