Introduction, Setup, & More
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.
Running BlackBird: BlackBird is a strategy, and NinjaTrader gives you the option to run strategies on a chart (which is what we show in our videos) or they 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
Tip: find more documentation for BlackBird in the links to the left. Under the heading "BlackBird".
Using BlackBird
--- Table of Contents ---
Adding BlackBird to a Chart
- Begin by opening a chart in NinjaTrader. Do Not add BlackBird to a chart with tabs. Currently, BlackBird is not enabled to work with tabs.
- To add BlackBird, right-click on the chart and select “Strategies…”, followed by opening the SharkIndicators folder and selecting BlackBird. On the right hand side you will see the Properties list for BlackBird. If Strategies… is grey & disabled see NinjaTrader’s documentation here to enable it.
- Scroll to the top of the Properties list and adjust any options as needed. See below for a description of each properties. Lastly, check the Enabled box before clicking the OK button.
- Once BlackBird is loaded on the chart, click the Order Setting button (bottom right) to start setting up BlackBird.
NOTE: An Order Set must be defined before the Trade Control buttons can be used, and before BlackBird can do anything.
Using BloodHound Signals Tip:
If you are using BloodHound signals in BlackBird it is not necessary to have BloodHound on the chart, because BlackBird will add the BloodHound running within BlackBird to the chart by default. It is suggested that only one BloodHound be running on the chart to save CPU resources.
Starting & Ending BlackBird
There are several NinjaTrader setting that affect order handling when a strategy (BlackBird) is enabled or disabled by any means. The NinjaTrader 8 settings are found in Control Center » Tools » Options » Strategies » 'Ninja Script' and 'On connection loss' sections, and in the Strategies window » Properties section. It is very critical that you fully understand these NinjaTrader settings.
When enabling BlackBird, and having Strategies window » Properties » Setup » Start behavior set to ‘Immediately submit...‘ and BlackBird » Backtest Mode is enabled, 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.
Tip:
NT 8: If you do not fully understand the settings in Control Center » Tools » Options » Strategies (under Categories) » Ninja Script section, then we suggest the following selecting;
⇒ ‘Cancel entry orders when a strategy is disabled’ = Checked/enabled.
⇒ ‘Cancel exit orders when a strategy is disabled’ = Unchecked/disabled.
If you do not fully understand the setting in Strategies window » Properties » Setup » Start behavior, then we suggest selecting ‘Wait until flat’.
NT 7: 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’.
Learning Resources
Getting Started Video
Training Videos Page
Click the link to visit the Training Videos page.
Training 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 Training Workshops page.
BlackBird Settings Window
For more information on using the BlackBird interface click the image below.
Chart Panels
For more information on using the Chart Panels click the image below.
Strategy window » Properties
These are the settings listed in the right side of the NinjaTrader Strategies window. The top two section are BlackBird properties. All the rest of the properties and settings are added by the NinjaTrader platform. Scroll down to see the NinjaTrader properties.
BlackBird Properties
Strategy Template
Options
NinjaTrader Added Properties
NinjaTrader has several properties that adjusts the behavior of strategies. These properties are listed below the BlackBird properties, in the Chart » Strategies window. And, within the Control Center » Tools menu » Options window. SharkIndicators does not lock or hard-code any of these properties so the trader can adjust them to suite their own needs.
NinjaTrader Tip: Calculate Property Inheritance
When using an indicator that requires the Setup » Calculate property to be set to 'On each tick' to run correctly (such as a volume profile or order-flow type of indicator), then NinjaTrader requires the hosting NinjaScript (i.e. BloodHound / BlackBird) Calculate property to also be set to 'On each tick' in order for that guest indicator to run correctly.
In other words, NinjaTrader takes the Calculate setting of the hosting NinjaScript and applies it to all the guest indicators used by the host. This is called property inheritance. NinjaTradere does not permit "mixing & matching" the Calculate property of host and guest indicators.
In this case BlackBird is the hosting NinjaScript, and the order flow indicator is the guest NinjaScript.
Please note, if you are using BloodHound within BlackBird, and BloodHound is using an indicator that requires Calculate be set to 'On each tick', then BlackBird must be set to 'On each tick'.
Control Center » Options
These properties are in the Control Center » Tools » Options window » Strategies category » Properties list.
NinjaScript properties
The properties listed below can only be set in the code. They can not be changed via the Strategies or Options window. SharkIndicators does not set any of these properties. Thus, NinjaTrader applies the default setting to BlackBird and Raven.
- IncludeTradeHistoryInBacktest
- IsAdoptAccountPositionAware
BlackBird is not capable of this feature yet.
NinjaTrader 7
Strategies window
Discretionary Trade Management
BlackBird provides complete discretionary control over the Profit Target and Stop Loss placement.
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 order at the price you desire, click again to complete the move. This is a click once and click again method. Do NOT click and drag.
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 Control Center » Tools » Historical Data) 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 dynamic nature and changeable list of indicators being used within BlackBird (and BloodHound). Therefore, it has limited practical value. See the next section for an explanation of the NinjaTrader limitation.
Can Indicator Properties be Exposed to a NinjaTrader Window?
(for Optimization or simple changes to indicator settings)
Currently, NinjaTrader uses a static property grid (seen on the right) for their Indicators window, and all other windows such as the Strategy Analyzer/Optimizer window. This means new indicator setting can not be added on-the-fly which is needed for the dynamic nature of SharkIndicators software that allows indicators to be added and removed on-the-fly. A new indicator version must be created in order for NinjaTrader to add or change the list of Properties. Therefore, the way NinjaTrader is currently designed, BloodHound is not able to expose indicator properties.
e.g. If your system uses the MACD, the Fast , Slow , and Smooth properties need to be listed in the property grid. But, later if you decide to remove the MACD and use the Momentum instead then the Period property needs to be added, while the Fast , Slow , and Smooth properties for the MACD need to be removed from the property grid. Unfortunately, NinjaTrader does not allow that. We hope a solution can be found in the future.
Backtesting Tips & Help
Simulated Orders
Click image to enlarge.What are those Simulated order flags?. You have probably never seen those simulated flags before when backtesting other strategies. That is because they are only available with SharkIndicators' strategies. They provide a visual reference for what NinjaTrader is doing. When backtesting a strategy, quite often a historical entry is executed, but the exit orders did not get hit before the chart reaches real-time data. That last backtest trade is converted into a simulated real-time trade so that NinjaTrader can finalize the backtest results, using real-time data.
NinjaTrader does not provide visual ques on the chart indicating a backtest trade needs to be finalized, except by carefully reading the last 'Plot executions » Text and markers' on the chart. These simulated order flags do just that.
Calculating Backtest Results
Click image to enlarge.
Videos on Backtesting
An Overview of Backtesting on a Chart & Miscellaneous Q & A Afterwards
The Mechanics of Backtesting
Playback Connection Best Practices
This video was created during NinjaTrader 7. However, the lessons taught are still good practice for NT 8.
Performance Tip
It is important from time to time to head NinjaTrader's Performance Tip #11. #11 is about reducing the size of the NinjaTrader database, which helps greatly with performance.
Signs that the database is to large:
- The NinjaTrader platform or the chart starts pausing when any order on any account is submitted.
- A longer than normal delay in the time it takes for an order to execute.
- BlackBird/Raven, or any other strategy, takes a longer time to start up,
Any of those behaviors is a sign that NinjaTrader’s database is to large, and resetting it or clearing the Sim account history helps.
Clearing the history of the simulation account(s):
- Follow these steps from NinjaTrader.
Resetting the database:
- Go to the Control Center.
- Select the Tools menu, and then select Database Management.
- Next go to Reset DB, and reset the database.
NinjaTrader Strategy Help
Data Feed Disconnect/Reconnect links
Option » Connection Loss Handling Parameters
How to keep strategies running...
Reconnection logic
(Note worthy posts; #2 & #6)
Lost Connection and not Reestablished
When Strategy Loses Connection
NinjaTrader 8 links
Running a NinjaScript Strategy from a Chart
Discrepancies: Real-Time vs Backtest
Market Replay vs Back Test results
(this explanation still applies to NT 8)
Strategy Position vs. Account Position
Setting Real-Time Strategy Options
Forex: Realtime Order Fills vs. Backtesting
(inside the 'How Bars Are Built and Orders Filled' section)
NinjaTrader 7 links
Discrepancies: Real-Time vs Backtest
Market Replay vs Back Test results
Using ATM Strategies
Special Circumstance with Forex backtests
Strategy Position vs. Account Position
Setting Real-Time Strategy Options
Understanding Historical and Real-time Data
⚠ Know the Risks of Computerized Trading
We want you to be aware there are numerous components, both hardware and software, involved with computerized and automated trading. The process starts with your computer, running Windows, running NinjaTrader (NT), and running an NT strategy (i.e. Raven or BlackBird). When the strategy receives a “signal” from the BloodHound logic, it sends an order request to NinjaTrader’s order submission framework. At which point NinjaTrader transmits 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 finally NinjaTrader updates/notifies the strategy. 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, internet lag time, or server overloading among these components, the strategy may get out of sync with your position(s) 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. See the "Risks of Electronic Trading with NinjaTrader" section for more information.