I’m unaware of any reference samples which do exactly what you’re looking for however have provided some links which would help you create this as part of a custom strategy.
Method Position.AvgPrice would give you the breakeven for which you could base your trailing stop off.
You might find the following reference example helpful for setting your stop and or trailing stop.
You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
Click here to see our NinjaScript Tips:
These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.
There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37
Please let me know if you have any questions.
Comment