When is the preferred section of code to call SetStopLoss/SetProfitTarget?
1) I've seen older sample code which sets the stop loss/profit target within the (State == State.Configure) section
2) Then, in new sample code, it seems like the stop loss/profit target are being set within the OnExecutionUpdate() section
3) In other code, I've seen the stop loss/profit target call in the OnBarUpdate() section, either before or after the EnterShort()/EnterLong() is called.
Out of these three possibilities, is any one of them preferred? Or, is it pretty much three different ways of accomplishing the same task?
Thanks,
Comment