Introduction

BlackBird

BlackBird is a NinjaTrader Strategy, which significantly extends the functionality of NinjaTrader’s Chart Trader, ATM, and much more. It serves both discretionary traders and automation traders.
For the discretionary trader, risk and money management rules can be defined to assist the trader from violating their daily trading limits and risks, and that’s just the beginning. The trade designer aspect gives the trader unprecedented control of every order type. The ability to automatically manage the entry, profit target and stop-loss. And of course, manual movement of the orders can be made at any time.
For the automated trader, BlackBird can automatically enter a trade using your favorite signal generating indicator or BloodHound signal, and then manage all order types, as mentioned before, for a fully automated trading system.  BlackBird can even use BloodHound signals to manage your profit and stop-loss orders to build a truly advanced automated trading system.

Using BlackBird

BlackBird is strategy, and NinjaTrader give you the option to run a strategy on a chart (which is what we show in our videos) or it can be run on the Strategies tab in the NinjaTrader Control Center.  For more information on how to initiate a Strategy see NinjaTrader’s documentation here.
Both methods are identical in terms of setting up BlackBird.  Below we will cover the more common way of running a Strategy by adding BlackBird to a chart.
Special Notes from NinjaTrader when running a strategy: Strategy Position vs. Account Position

Adding BlackBird to a Chart

  1. Begin by opening a chart in NinjaTrader.
  2. To add BlackBird, right-click on the chart and select “Strategies…”, followed by selecting SiBlackBird.  On the right hand side you will see the parameters for BlackBird. If Strategies… is grey & disabled see NinjaTrader’s documentation here to enable it.
  3. Scroll to the top of the parameters list and adjust any options as needed.  See below for a description of each parameter.  Lastly, set Enabled to True before clicking the OK button.
  4. Once BlackBird is loaded on the chart, click the Order Setting button to start setting up BlackBird.
Using BloodHound?
If you are using BloodHound signals in BlackBird it is not necessary to have BloodHound on your chart, because BlackBird can add BloodHound to the chart. It is suggested to leave BloodHound off the chart, if this is the case, to save CPU resources.

Quick Start Video
Setting Up Your First OCO Order Set

Lets do a quick walk-though to create a simple Market entry order with a 10 tick profit target and 10 tick fixed stop-loss.



Workshop Videos

Each week we host a free live workshop where you can ask questions and see things demonstrated in BlackBird. Find the schedule and list of recordings on the workshops page.

Here’s the first BlackBird workshop:
(watch in full screen at 1080p for best results)


Starting & Ending BlackBird

There are a couple of NinjaTrader setting that affect order handling when enabling or disabling BlackBird.  The NinjaTrader settings mentioned are found in Control Center » Options » Strategies tab » NinjaScript tab.
When enabling BlackBird, having NinjaTrader’s ‘Immediately submit live working historical orders‘ selected and BlackBird » Backtest Mode = True, NinjaTrader will immediately submit an order in the direction of BlackBird’s last historical trade.  Setting BlackBird » Backtest Mode = False will prevent immediate order submission.

In Control Center » Options » Strategies tab » Order handling, you may want to select ‘Cancel entry orders when a strategy is disabled, and uncheck ‘Cancel exit orders when a strategy is disabled’.

If you do not fully understand the setting in Control Center » Options » Strategies tab » NinjaScript tab, then we suggest selecting ‘Wait until flat before executing live’


Parameters



1. Strategy Template

This parameter is used to pre-load a BlackBird settings file.  Clicking on this parameter will reveal an […] ellipsis button.   Click the button to open the BlackBird » Order Settings interface and open the file you want BlackBird to run.

Options

This setting only has an effect when BlackBird is setup to auto trade.
When this setting is False, BlackBird’s auto trading is disabled on start up.  This is a safety feature that turns the Chart Trader’s Auto Enabled button off, which prevents BlackBird from auto trading when it first starts up.  Click the Auto Disabled button when you want BlackBird to start auto trading.
When this setting is True, BlackBird will start auto trading immediately.  For back-testing set this to True and the Backtest Mode parameter will appear.
‘Start Auto Enabled On’ must be True or ‘Show Chart Trader’ must be False to use this option.
When False, back-testing is turned off.  Only trades on live data are executed.
When True, back-test results can be seen, and Strategy Performance reports generated.
Please note, BlackBird must have Trade Signals setup, so that it can auto trade, to generate back-test results.
When True, Raven’s Chart Trader panel is visible.  When False, the Chart Trader panel is turned off, and the ‘Start Auto Enabled On’ parameter is removed, since it becomes irrelevant.  Backtest Mode becomes visable, unless ‘Manage Trades Using’ is set to ATM.  In which case, Backtest Mode is set False and removed, because NinjaTrader can not back-test an ATM.

Common NinjaTrader Parameters

All the parameters in the General section are added by NinjaTrader and common to all strategies.  A description of each setting can be found in the Understanding strategy properties section of NinjaTrader’s Help guide.
All the parameters in this section are added by NinjaTrader and common to all strategies.  A description of each setting can be found in the Understanding strategy properties section of NinjaTrader’s Help guide.
All the parameters in this section are added by NinjaTrader and common to all strategies.  Please note, regarding TIF parameter some instruments can not be traded using Gtc and must be changed to Day.  Your broker can help with in this matter.  A description of each setting can be found in the Understanding strategy properties section of NinjaTrader’s Help guide.
All the parameters in this section are added by NinjaTrader and common to all strategies.  A description of each setting can be found in the Understanding strategy properties section of NinjaTrader’s Help guide.


Docking Panels


BlackBird Docking Panels provide various interface controls and information feedback.  The exhibits below explain the various docking panel interfaces.


BlackBird Layout Button

The BlackBird Layout button provide management tools for the docking panels. This is where panels are turned on or off, and a custom layout can be saved or loaded.

 The pull-down menu is a quick select option to quickly restore a saved layout.

 
  The Open button.  This will open a window that shows all saved layouts.

  The Save button.  This saves the current layout of BlackBird’s docking panels, so that can quickly be restored at a later time.

  This restores all docking panels to their default state and location.
  This area turns on or off the various BlackBird panels.  The checkmark means the panel is visible.

Trade Controls Panel

The Trade Controls panel is used to enable/disable automated trading, manually place trades, and close out trades. If this panel looks grayed-out that means no Order Set is defined in the Order Settings window.

Number 1 This button instantly disables or enables BlackBird’s auto trading. (Trade Signals must be setup for auto trading to occur.)
When Disabled, this simply prevents BlackBird from placing new entry orders.  Any open/working orders will continue to be managed by BlackBird. I.E. Trailing Actions will continue to function.
To cancel an open order use the Close button.
Number_2 These buttons provide a quick way to disable auto trading in a certain direction. (Trade Signals must be setup for auto trading to occur.)
E.G. If you do not want BlackBird to take any short trades then click the Short Enabled button to disable it and short trade signals will be ignored.
Number_3 This group of buttons allows the trader to manually place an entry order.  If a position is open and a button is pressed to submit an order in the opposite direction, the current open position will be closed and the order reversed.  These buttons will submit the order(s) that are defined in Order Settings.

  • Go Long & Go Short buttons place orders based on your OCO Entry settings.
  • Buy Ask & Sell Ask places a Limit order at the current Ask.
  • Buy Bid & Sell Bid places a Limit order at the current Bid.

Orders executed using these buttons will not affect other trades.  A strategy runs in its own memory space. Therefore, BlackBird is unaware of other BlackBird strategies that are running or any other trades that may be open. This means the Manual Entry Buttons can not affect or override any other trades. BlackBird can only affect its own instance of executed orders.

Number_4 The Close button will flatten all open positions and cancel all pending and working orders.  The button will only close positions placed by that instance of BlackBird.  It will not close positions placed by other instances of BlackBird.

NinjaTrader’s Chart Trader Close button: Please note, the Close button on NinjaTrader’s Chart Trader will flatten all open positions in that instrument, and thus disable any running strategy, such as BlackBird, on that instrument.  NinjaTrader’s explanation can be found here Action Buttons and support forum.

If an error occurs and NinjaTrader loses tracking of an executed order, BlackBird will not be able to Close/Cancel its orders or positions.  Should this occur use the NinjaTrader Control Center » Order tab to Cancel an order, or the Positions tab.  In an emergency use Control Center » File menu » Flatten Everyhing.

Market Info Panel

The Market Info panel provides current trade status and market Bid/Ask feedback. You may notice a tick difference in the PnL display between the DOM and the Market Info panel. Differences can also be seen between the DOM and NinjaTrader’s Chart Trader. These differences are due to NinjaTrader’s framework.

Number_1 The upper left displays the number of contracts for the current position, and turns green for a long position or red for a short position.  The upper right shows the average position price.  The lower area shows the PnL for the open position.  When BlackBird is flat the Net PnL of all real-time trades is shown, since BlackBird was first started.  Clicking the PnL display area will toggle the display unit between Ticks, Percent, or Currency.
Long/Short Pending:  When this is displayed it means the order has not been submitted to the market yet, because the entry order is waiting/pending other conditions to occur first.  This occurs when the entry order has Placement Delay and/or Placement Trigger options in use.  Order flags will not be seen for pending orders.  Order flags are only shown when the entry order is submitted and live at the exchange (or in sim).

Note:  NinjaTrader’s DOM shows the last trade PnL, while BlackBird shows the strategies running total PnL from the time it was first started.  Disabling and re-enabling BlackBird will reset the PnL.
Number_2 This displays the current Ask price, Last trade price, and Bid price on the left.  The right column is volume.  If parts of this display is blank, it is because the incoming live tick data has not updated yet.

Settings Panel

The Settings panel displays the settings file name in the top area, and provides access to the Order Settings interface.

The main button opens the Order Settings window.  The Order Settings is where all the BlackBird settings are located.  As the name implies, this is where you create and manage order settings, along with risk management, money management, and scheduling type rules.  Think of the Order Settings window as BlackBird’s command control.

This drop-down menu opens a quick list of recently saved setting files.  Click a file name to quickly load that settings file.

Dynamic Planning Panel

Please see the Dynamic Planning page.


Order Monitor Panel

The Order Monitor panel displays the current order status, and order control buttons.

These buttons draw a diamond and dots on the chart, for every bar, to preview where the entry, profit target, and stop-loss would be initially placed. This does not show trailing behavior.

  The diamond represents the entry order price.

  The dots represents the profit target and stop-loss.  Note, the dot color matches the order color (set in the OCO Order Options tab).

The Global Breakeven button moves all stop-losses in all OCO sets.
  The pull-down button on the right opens a menu to add a tick offset from breakeven.  The tick offset is applied to the individual Breakeven buttons as well.

The Global Auto Trail button enables or disables order trailing for all orders.
  The lock button on the right locks the trailing on or off for all orders.
E.G.  Normally moving a stop-loss will disable trailing rules tied to that  stop-loss, because the user decided to override the trailing.  Setting the Global Auto Trail to Enable and locking it will prevent order trailing rules from becoming disabled when the user moves an order.  But, keep in mind if a stop-loss is moved the trailing rule will probably move it right back to where it was(provided the trailing rule is setup to keep repeating).

Number_1 The top of this area displays the OCO set’s name.

Number_2 The middle area displays the status for each order.  On top in blue is the entry order.  In the middle in green is the profit target.  On the bottom in orange is the stop-loss.

This button enables or disables order trailing for this OCO set.  The lock button on the right locks the trailing on or off for this order set.
I.E.  Entry, profit, and stop-loss orders can all have trailing rules.  This button enables or disables trailing for all of those order types.
Note:  Moving any order on the chart, disables trailing for that OCO set, and the button will show Auto Trailing Off.
Every OCO set has its own Breakeven button which will only move the stop-loss in that particular OCO set. This provides finer control over stop-loss management.
To move all stop-losses to breakeven use the Global Breakeven button on top.

Performance Panel

The Performance panel displays common trade statistics for the current day.  More detailed statistics can be found in NinjaTrader’s Strategy Performance report.

This text is a reminder of the Calculation Mode you selected in the Money Management section.

This pull-down menu selects which trade statistics are displayed.  Choose from Individual mode trade data or Global mode trade data stats.  For more information please see Money Management » PnL Calculation Mode.

 
 
Clicking the ellipsis button opens the Override Account Performance window.

Total Net Profit:  This statistic returns the profitability after subtracting losses.  The formula is Gross Profit – Gross Loss.

Profit Factor:  This statistic returns a ratio that measures how much more money is earned then lost.  A ratio above 1.0 is characteristic of more profits and less losses.  The formula is Gross Profit / Gross Loss.

High Watermark:  A High Watermark is the highest Net Profit value that was reached for the day.

High Watermark Stop:  This shows the Watermark Stop-loss value.  If the Net Profit drops below the Watermark Stop-loss value BlackBird will stop trading for the remainder of the day.  For more information please see Money Management » Daily Watermark » Stop Trading After.

Wins:  This statistic shows the total number of winning trades.

Losers:  This statistic shows the total number of losing trades.

Total Trades:  This statistic shows the total number of executed trades.

Percent Profitable:  This statistic returns the percentage of how many winning trades there are within the Total Trades.  A percentage above 50% means there are more winning trades than losers. The formula is Total Trades / Winning Trades.

Average Trade:  This statistic returns a value representing the average return of all trades.  The formula is Net Profit / Total Trades.

Average Win:  This statistic returns a value representing the average profit of all winning trades. The formula is Gross Profitable Trades / Wins.

Average Loss:  This statistic returns a value representing the average loss of all losing trades. The formula is Gross Losing Trades / Losers.

Avg Win / Avg Loss:  This statistic returns a ratio representing  a performance measure of profitability.  A value greater than 1.0 signifies winning trade profits are more than losing trade losses.  The formula is Average Win / Average Loss.



Discretionary Trade Management


BlackBird provides complete discretionary control over the Profit Target and Stop Loss placement.

1 Modifying Order Price:  To modify the price of an order, left click with your mouse on the order line or the right section of the label. A ghost order line will appear and display the number of ticks you are away from the market.
When above the ask the label will display a positive value. When below the bid the label will display a negative value. At the Ask or the Bid the label will display @Ask or @Bid. Once you have the ghost order at the price you desire, left click to complete the order move. This is a click once and click again method. Do NOT click and drag.
Number_2 Cancelling an Order:  To cancel an order, left mouse click on the red X on the order marker.

Strategy Analyzer


Using BlackBird in the Strategy Analyzer allows you to run historical analysis on a basket of instruments.  Click here for NinjaTrader’s Strategy Analyzer Help guide.  Due to some unusual behavior of the Strategy Analyzer these simple steps should be followed before running the Strategy Analyzer.  Open the NinjaTrader Historical Data Manager (found in the Control Center under the Tools menu) and download all the historical data you want to backtest against, while the data feed is connected.  Then disconnect the data feed before clicking Run Backtest.

Optimization

The Optimization feature is not able to access the various parameters and settings inside of BlackBird, and therefore has limited practical value.  We hope a solution can be found in the future.

Tips & Misc. Backtest Help


Performance

It is a good idea from time to time to reset the NinjaTrader database to help with performance.  If you start to notice NinjaTrader pausing when an order is submitted or a delay in the time it takes for an order to execute then that might be a sign that NinjaTrader’s database is getting to big, and resetting it typically helps. To reset the database open the Options window, select the Data tab, then click Reset DB button.

Backtesting

Know the Risks of Computerized Trading

We want you to be aware there a numerious components, both hardware and software, involved with computerized and automated trading.  The process starts with your computer, running Windows, running NinjaTrader, and running BlackBird.  When BlackBird receives a “signal” it is sent to NinjaTrader’s order framework.  At which point NinjaTrader sends the order to your Broker, who must approve the order and then sends it to the Exchange.  If your order is filled the exchange notifies your broker, who then notifies NinjaTrader, and NinjaTrader updates BlackBird.  As this simplified example illustrates, there are several components & “players” involved and lots of software programs that make this all happen.  If there is any miscommunication among these components or internet issues, BlackBird may get out of sync with your positions at the Exchange.  If you suspect any issue with your live orders use the ‘Flatten Everything’ option in the NinjaTrader Control Center, and then call your broker immediately to verify.