Order  Sets


The Order Set area is where the entry, profit target, and stop-loss orders are defined.  An order set that has both a profit target and stop-loss are always connected as an OCO set.  OCO is short for One-Cancels-Other.  When one of those orders is filled the other order is canceled.  Cancelation of the other order is managed by your broker, Not by BlackBird or NinjaTrader.  Multiple order sets can be created, and are automatically named A, B, C, D, etc.  Unlike NinjaTrader's ATM, each order set can have a different entry order type and price, when using a Limit or Stop order, which provides a way to cost average into a position or create a break-out entry.  Each order set can mix and match any entry order types you wish.  The first step is to select the entry order type.
A common reason for creating multiple order sets is for scaling-out of a position.  e.g.  If the position size is 5 contracts and you want to lock in 2 contracts at 1 point of profit and let the other 3 contracts run farther, the first order set(order set "A") would set the profit target at 1 point and the second order set(order set "B") may not have a profit target or the profit target may be set to 10 points.  This is the same as setting up a NinjaTrader ATM.
Note, scaling-out of an OCO order set is not permitted by brokers who facilitate the OCO ability, or by NinjaTrader.  When submitting an OCO order set, the number of contracts is hard coded and therefore the number of contracts can not be modified/reduced.  You must predefine the number of order set and their number of contracts in each.


Order Set Components

Number 1 Name, Order management options, Quantityu of contracts / lots / shares.
Number 2 The Entry order.
Number 3 The Profit target order.
Number 4 The Stop-loss order.

Order Management Options

These options setup various management controls for the number of contracts, and auto-trading safeguards and constraints.
The number of contracts, for each order set, is selected in the blue area.  The name of the order set can be changed by clicking on the name.  Then, change it in the Name field.

Quantity   Scaling

Placement   Safeguards

These options ensure the profit target or stop-loss orders are kept within a minimum distance or maximum distance from the entry price.
The safeguards are primarily necessary when using indicators to dynamically calculate a order's distance from the entry price.  It is possible the indicator could place the order to far or to near to the entry price.
The safeguards can also be helpful for discretionary traders who will use the Dynamic Planner and manually move the stop-loss or profit target to support/resistance areas, before executing the trade.



Entry Order

Start creating your Order Set by first selecting the type of entry order you desire to use.  NinjaTrader supports Market, Limit, and Stop order types.  The MIT order type will be added in the future.  See the Order Options tab section below for an explanation of the Automatic Order Type.

Profit Target Order

Next, setup the profit target. If you want to create a "runner" contract (no profit target, just a trailing stop-loss), then leave this setting blank.  Profit targets and stop-losses are always connected with an OCO flag (One-Cancels-Other).  NinjaTrader only supports the Limit order type.

Stop-Loss Order

Lastly, setup the stop-loss.  Stop-losses and profit targets are always connected with an OCO flag (One-Cancels-Other).  NinjaTrader supports Limit and Market order type.

Important Stop-loss Info

Some instruments Do Not support stop-loss Limit order types.  This is controlled by the exchange.   If you setup your stop-loss as a Limit and try to use it on an instrument that does not support the Limit order type it will be rejected by the exchange, and your position will not be protected by a stop-loss.  NinjaTrader and BlackBird will not rectify or correct this issueIt is your responsibility to know and use order types permitted by the exchange and/or your broker.  Please check with your broker and/or NinjaTrader to verify which instruments support stop-loss Limit orders.


Where do the Orders Reside?

All orders reside at your broker and/or the exchange depending on the order type.  e.g.  Limit entry orders, profit targets, stop-losses, etc.  If there is a crash, those orders still remain at the broker/exchange.  However, trailing functionality will cease and can not be restored when NinjaTrader loses connection with the orders.  NinjaTrader does not have the ability to re-connect BlackBird to the orders once the connection is broken.



Order Options tab

Clicking on any order will open the Options window. This is where you setup the initial information about the order.

NinjaTrader 8 version

NinjaTrader 7 version



Trailing Actions tab

This component is another major feature that sets BlackBird apart from all other strategies in its class.  Trailing Actions allow you to create rules that automatically move orders in any direction.  Trailing rules consist of three events that occur in the following order: First, the rule waits for the Trigger On condition/event to occur.  Then the Action will move the order, and Repeat defines how long a trailing rule will run and how often.

Trailing Rule Components


Trailing an order is a sequence of steps that determines when and the new price an order is moved to.  BlackBird breaks this sequence into 3 steps.
  Step #1(Trigger On).  Are there any conditions that must occur before moving the order.  i.e. 10 ticks of profit must be made before moving the order to breakeven.  This is the Trigger On column.
  Step #2(Action).  Calculate the new price the order is to moved to.  This is the Action column.
  Step #3(Repeat).  Should this process repeat again to keep moving the order.  This is the Repeat column.
The button, on the far right edge, will delete a trailing rule.

Name

This field is where a custom name is typed for the trailing rule, as a reminder of what the rule does.  The rules are automatically named Rule A, Rule B, Rule C, etc.

Initial Delay   (NT 7)

In NinjaTrader 8, Delays have been merged into the Trigger On option.  This documentation remains for NinjaTrader 7 users of BlackBird.  
This option provides various ways to add a delay before a trailing rule can execute.  Or, a waiting period before canceling an entry order if not filled.

Trigger On   (#1)

This option provides various triggering conditions, which act as a prerequisite prior to moving an order.  Once the Trigger On condition(s) has occurred the trialing rule is activated, and remains active for the remainder of the trade, in accordance with the Repeat settings.  If this option is set to None, the trailing rule is immediately activated and the Action will begin moving the order.
See the Trigger conditions (#1) section below for more detailed information on each type of trigger.

Action   (#2)

This section is typically used to move an order to a new price, such as trailing a stop-loss behind price.  Or, move an entry order closer to price making it easier to fill.  Actions can do more then move orders.  There are various alert options that can be performed as well, such as placing a chart marker on the chart.
If you wish to perform two actions, such as move a stop-loss and send an alert when the stop-loss moves, then two identical trailing rules must be created with different actions.

Repeat   (#3)

This section sets the number of times a trailing rule is repeated (executed).  Thus, placing a limit on how many times the Action can move an order or send an email, etc.  Some rules you may only want to execute once, or only when the Trigger On condition(s) occurs.



Trigger conditions   (#1)

There are various triggers available for building conditions that activates a trailing rule.  Once the Trigger condition(s) has triggered it stays activated, and the Action (#2) will continue to execute for the remainder of the trade.
E.G.  If using the Indicator Value trigger, and the condition is setup to identify when the MACD is above the zero line (and then a stop-loss can start trailing).  The first time that condition occurs the Action (#2) will keep executing(moving the order) for as long and as often as the Repeat (#3) settings will allow.

†    BloodHound Signal, Indicator Value, Trade Signal Trigger, & Price vs Indicator options use indicators and therefore the timing of when they are evaluated/triggered is determined by the Calculate setting (found in the Chart » Strategy window).
I.E.  If Calculate = 'On bar close' (NinjaTrader's default setting) those Trigger On conditions are evaluated when the bar closes, not intrabar or real-time.  If Calculate = 'On price change' or 'On each tick' then those Trigger On conditions are evaluated in real-time in accordance with the Incoming Market Data Throttle setting.

BloodHound Signal

This option uses a BloodHound signal to trigger the trailing rule.  This option is very powerful, because you can use advanced BloodHound logic to trigger an order movement.  See † statement above.
You must own BloodHound for this option to work correctly.

Calculation Frequency:

This trigger always operates in accordance with BlackBird's Calculate setting, because BloodHound is a guest indicator.  For more detailed info please see NinjaTrader Tip:  Calculate Property Inheritance.
e.g.  If BlackBird's Calculate is set to 'On price change'  this trigger will update and monitor BloodHound signals as the market price changes in accordance with the 'On price change' mode.

Interval (Delay)

This option provides various ways to add a delay/waiting period.  The waiting period can be measured in number of bars, time, and price movement.

Time Based Operations Consideration

NinjaScript Add-Ons (indicators and strategies) are not capable of executing/calculating using time based operations.  NinjaScript perform an operation/calculation only when NinjaTrader (NT) receives market data.  NT (and other platforms) operations and calculations are market data driven.  Therefore, on thinly traded markets or during extended trading hours (ETH session), NinjaScript Add-Ons update far less often.  What this means is that time based operations can not guarantee they will execute exactly at a specific time.

The time and tick movement triggers are designed to operate in real-time in accordance with the above NT design, regardless of BlackBird's Calculate setting.
e.g.  If BlackBird's Calculate is set to 'On bar close' and is running on a 2 Minute chart.  With this trigger set up for a 30 second delay, it will trigger while the 2 minute bar is forming provided there is frequent incoming tick data.

When to Use the Interval Trigger vs. Using the Profit or Loss Trigger


Indicator Value

This option looks for an indicator threshold value to activate the trailing rule.  See † statement above.
E.G.  Wait until the CCI is greater than 200 or less than -200, and then begin executing the rule.

Calculation Frequency:

This trigger always operates in accordance with BlackBird's Calculate setting., because an indicator is being it monitored.  For more detailed info please see NinjaTrader Tip:  Calculate Property Inheritance.
e.g.  If BlackBird's Calculate is set to 'On price change'  this trigger will update and monitor the indicator as the market price changes in accordance with the 'On price change' mode.

Order Status Changed

This option simply detects when another order has been filled or canceled.
E.G. When the first profit target is filled, then trigger the remaining stop-losses to move (to breakeven for example).

Calculation Frequency:

This trigger always monitors orders in real-time, and therefore triggers/operates in real-time, regardless of BlackBird's Calculate setting. 
i.e.  This trigger operates as soon as NinjaTrader notifies BlackBird that an order's state has changed.  NinjaTrader updates an order's status  real-time, and not tied to NinjaTrader's Calculate setting.
e.g.  If BlackBird's Calculate is set to 'On bar close' and this trigger is set up to identify if Profit Target A is filled, it will do so while a bar is forming as soon as NinjaTrader notifies BlackBird of the fill.

Price vs Indicator

This option checks if price or indicator is above or below an indicator, and then activates the trailing rule.  See † statement above.
E.G.  For a long trade, if price drops below a moving average then trigger a rule to tighten the profit target or stop-loss.
Or, if a fast moving average drops below a slower moving average then trigger a rule to tighten the profit target or stop-loss.

Calculation Frequency:

This trigger always operates in accordance with BlackBird's Calculate setting., because price and/or an indicator is being monitored.  For more detailed info please see NinjaTrader Tip:  Calculate Property Inheritance.
e.g.  If BlackBird's Calculate is set to 'On price change'  this trigger will update and monitor price and/or indicators as the market price changes in accordance with the 'On price change' mode.

Profit or Loss

This option identifies when a certain unrealized profit or loss amount occurs in real-time.  The entire trade position P/L is used, not individual order set P/L.
This Profit or Loss trigger measures the P/L of the entire position.
E.G.  If additional contracts are scaled-in to the position they are included in the P/L amount.

Calculation Frequency:

This trigger always monitors the P/L in real-time, and therefore triggers/operates in real-time, regardless of BlackBird's Calculate setting. 
e.g.  If BlackBird's Calculate is set to 'On bar close' and this trigger is set up to identify 10 ticks of profit, it will do so while a bar is forming.  This allows for trailing rules to react in real-time instead of waiting for the bar to close.

Trade Signal Trigger

This option monitors the trade signals, from the Trade Signal section, as the triggering event that executes the trailing rule.
E.G.  If your BloodHound system sometimes gives 2 or more long signals during an uptrend, those additional signals can be used to add more positions on (scale-in).  Therefore, if you want to scale-in with a second entry order when BloodHound gives a second long signal, set Mode to In Same Direction, and Signals After 1st Entry to 2.

Calculation Frequency:

  This trigger always operates in accordance with BlackBird's Calculate setting, because it monitors an indicator.  Trade signals are always produced by indicators.  For more detailed info please see NinjaTrader Tip:  Calculate Property Inheritance.
e.g.  If BlackBird's Calculate is set to 'On price change'  this trigger will update and monitor the trade signal indicator as the market price changes in accordance with the 'On price change' mode.



Action  (#2)

After the Trigger On condition(s) has occurred, then it is time to perform some action on the order.  Typically, move the order to a new price.
The Action always operates in real-time, regardless of BlackBird's Calculate setting.  It executes immediately after the Trigger On condition(s) have occurred.  Keep in mind, some Trigger On conditions do comply with BlackBird's Calculate setting.  See the blue sections above.

Move Order To

 The main purpose of a trailing rule is to automatically move an order to another price.  This provides various options for calculating that new price.

Cancel Order

This option cancels the order.  This can only cancel accepted and working orders.  If an entry order is in a pending state, this will Not cancel it.  The Cancel After option on the Options tab must be used to cancel pending entry orders.

Freeze Order

This option locks an order in place at its current price.  The order can not longer be moved.  Once an order is locked, it can not be unlocked.



Select Input window

This window is used in several areas of BlackBird.  It has four types of inputs, as listed below.

Select Mode options

Price

This option moves the order relative to any bar price.
E.G. A common stop-loss trailing technique is to move the stop-loss to the previous bar low, or the low of 2 bars back. This option can reference those bar prices, and more.

Indicator Value

This option moves the order to the price of an indicator. There are many 3rd party indicator that calculate profit and stop-loss targets, which this option can take advantage of.

Swing Point Prices

This option moves the order to a swing point price, as calculated by SiSwingsHighsLows indicator.

Linear Regression Channel

This option moves the order to one of the Linear Regression channel lines.


Offset section

Several menus have an Offset section at the bottom of the window.  The Offset feature is used to add or subtract an offset amount from the price calculated in the main section of the menu.