PDA

View Full Version : Strategy: Monitoring for and trading a breakout


NinjaTrader_Josh
09-06-2007, 01:49 PM
A common concept many traders use is the idea of a breakout. Points of interest are when the price breaks out from a consolidation range or from previous highs and lows.

The attached reference sample demonstrates the following key concepts:

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 methods and properties used include:

FirstBarOfSession (http://www.ninjatrader.com/support/helpGuides/nt7/firstbarofsession.htm)
BarsSinceSession (http://www.ninjatrader.com/support/helpGuides/nt7/barssincesession.htm)
BarsSinceEntry() (http://www.ninjatrader.com/support/helpGuides/nt7/barssinceentry.htm)

Other methods and properties of interest include:

BarsSinceExit() (http://www.ninjatrader.com/support/helpGuides/nt7/barssinceexit.htm)

Import instructions:

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