Adds a Stop Limit, Profit Target and Trailing Stop that advances on close of bar or every tick according to CalculateOnCloseOfBar true or false within your auto trade strategy.
It is a simple implementation that tries to emulate the ATM trailing stop 1st level.
I am currently working on a 3 level trailing stop to emulate the full ATM trailing stop tool.
Thanks to the example provided on this forum I was able to rewrite as a switch statement and implement a stoplimit as well as a trailing stop.
Uses:
SetStopLoss() function as the vehicle for both the stop limit and the trailing stop.
SetProfitTarget() function for profit target.
Cheers
Chris Long
7-8-2020 Changed from CalculateOnBarClose = true to CalculateOnBarClose = false and set Trace Orders to false
Created By | alcamie |
NinjaTrader Version | 7 |
File Size | 2.5 KB |
Create Date | 07/13/2010 |
# of Downloads | 1618 |
Importing to NinjaTrader 7 is Easy!
To import your 3rd party app or add-on to NinjaTrader, simply follow these 3 steps:
- Download the app or add-on file to your desktop
- From the NinjaTrader Control Center window, select the menu File > Utilities > Import NinjaScript
- 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.