Key concepts in this example:
- Determining and storing the first 30 bar high
- Submitting a long stop order to be filled when price breaks out from the 30 bar high
- Closing positions after a certain amount of bars have passed
- Resetting the 30 bar high at the start of every new trading session
Important related documentation:
NinjaTrader 8
NinjaTrader 7
Import instructions:
NinjaTrader 8
- Download the file contained in this thread to your PC desktop
- From the Control Center window, select the menu Tools > Import > NinjaScript
- Select the downloaded file
NinjaTrader 7
- Download the file contained in this thread to your PC desktop
- From the Control Center window, select the menu File > Utilities > Import NinjaScript
- Select the downloaded file and click Import.