Set methods do not specify a BarsInProgress index, but they would use the data series they are called on and the data series the entry order is called on. In a multi time frame script, mixing these between data series can be messy, and if we want to have consistency with order fills, we should then be sure to direct all of our orders using Exit methods to the same data series. (In my example we submit to BarsInProgress == 1, which is a single tick data series for most granularity.)
In summary, you can use Set methods in a multi time frame script, but it gets messy if you are mixing enter/exit logic between different data series. For consistency with backtesting, using the Enter/Exit methods that specify the BarsInProgress index can help organize the order submissions so they are handled by the same data series.
As for creating Auto Trail and Auto Breakeven functionality, this involves updating the stop loss order (from an Exit method) in OnBarUpdate. (Breakeven moves in association to Position.AveragePrice, while AutoTrail would move to the current/last price (Close[0] or Closes[X][0].) I removed the Auto Breakeven code from this example, but you can reference the original SampleOnOrderUpdate to see how a Breakeven is implemented there, and you would just have to mind using the Exit order method which specifies the BarsInProgress index of the data series you want to have fill the order.
Original SampleOnOrderUpdate - https://ninjatrader.com/support/help...and_onexec.htm

Comment