Percentage Trailing Stop Within Onbarupdate

One of the surprising results of backtesting was how well a simple percentage trailing stop can keep me in large moves. But, if there was some way to have that percentage trailing stop exit trigger some "exit routine" that would be better than simpling exiting the trade.

So with help from Josh and Ben I have now a percentage trailing stop script that is within OnBarUpdate so that when the trailing stop is hit, I can do something like THEN look for a certain type of exit. The next post will have a demonstration of what I mean.

This script uses the output window to track how the trailing stop is working and shows it's values.

Created By sauer11155
NinjaTrader Version 7
File Size 1.4 KB
Create Date 07/14/2010
# of Downloads 1265

Importing to NinjaTrader 7 is Easy!

To import your 3rd party app or add-on to NinjaTrader, simply follow these 3 steps:

  1. Download the app or add-on file to your desktop
  2. From the NinjaTrader Control Center window, select the menu File > Utilities > Import NinjaScript
  3. Select the downloaded file from your desktop

Questions?

Visit the NinjaScript File Sharing discussion in the NinjaTrader user forum to interact with fellow traders and the NinjaTrader support team.