The built-in functions of SetStopLoss(), SetTrailStop(), SetProfitTarget() are common exit strategies that alleviate the need for the strategy developer to focus on tick-by-tick position management processing and instead focus on on-bar-close trading signals. Other advantages of these functions include:
- No need to wait until the entry bar is complete before placing a stop, the stop order is set on the next tick after an entry order is filled
- Entry, stop and target orders are tethered together via OCO so no open orders are left behind when a position is closed.
- Stop and target levels can be changed dynamically during the life of the open position.
A common use case for this type of functionality is to set both a Stop Loss and a Trailing Stop. From my testing, each on its own works fine, however, when I try to use these function concurrently, only the SetStopLoss() will work, regardless of the sequence it is declared, and will render the processing of the SetTrailStop() inoperable. As a workaround, I attempted to use just the SetTrailStop() function and then use ExitLongStop and ExitShortStop orders as a Stop Loss, but was not satisfied that I had to wait until the end of the entry bar to place a stop. I know I can make it an update-by-tick vs an on-bar-close strategy but that defeats the purpose of these value-add functions. I have used similar functions concurrently in other platforms, although NinjaTrader may be the first I am aware of to allow the values to be changed dynamically without the need to manage the position details in your strategy code.
Can you confirm that the current implementation of these functions work as I have described and whether any enhancements are planned to enable concurrent operations. I would also ask that the help facility be updated accordingly to reflect this naunce. Many thanks!
Whitmark

I've been spoiled by the use of ATM strateges both manually and through the ATI that enable:
Comment