BlackBird Templates

Loading & Enabling BlackBird

⚠ Know the Risks of Automated Trading

Computerized, automated trading relies on several hardware and software components to operate, beginning with your computer build (and all the hardware therein), your installation of Windows (which can get sluggish and finicky over time), your installation of NinjaTrader 8 (including any 3rd Party Addons), and any NinjaTrader strategies you may be running (i.e., SharkIndicators Raven or BlackBird). When the strategy receives a ‘signal’ from the BloodHound logic, the strategy then sends an order request to NinjaTrader’s order submission framework, after which NinjaTrader transmits the order info to your brokerage, who must then approve or deny the order. If approved, the brokerage then sends your order to the Exchange. If your order is filled, the exchange notifies your broker, who then notifies NinjaTrader, and then, finally, NinjaTrader updates/notifies the strategy. As this simplified example illustrates, there are several components and entities involved, all of which rely on several different pieces of hardware and software that can randomly fail at any time. The strategy may get out of sync with your position(s) at the Exchange if there is any miscommunication, internet lag time, or server overloading between these components and agents. If you ever suspect that there is an issue with your live orders, use the ‘Flatten Everything’ option in the NinjaTrader Control Center, and then call your broker immediately to verify.

The BloodHound & BlackBird templates discussed herein should not be traded in a live, real-money account. They are for learning purposes, only, and should be traded in a Simulated Account. Please, seek the advice of a financial advisor before risking real money trading (Risk Disclaimer).

Steps to Load & Enable BlackBird

  1. Open the desired workspace: ‘TTP DivAnalyst …’
  2. Connect to your data feed(s)
  3. Add BlackBird to the TICK (BB) chart
    • To Enable BlackBird, or any other strategy, NinjaTrader must be connected to a data feed. If it is disconnected, the strategy dialog window cannot be opened.
    • To open the strategy dialog window, right-click on the ROE (1) chart and select ‘Strategies…
Graphical user interface, text, application, table

Description automatically generated

4. Double-click on the ‘SharkIndicators’ folder to open it, and then double-click on ‘BlackBird’ to add it to the ‘Configured’ list below.

Graphical user interface, application

Description automatically generated

5. Open the BlackBird templates file directory (folder) selection window by clicking in the ‘(BlackBird Settings)’ field (image above).

6. Double-click on the ‘TRADE THE PLAN’ folder to open it.

A screenshot of a computer

Description automatically generated

8. Select the file named ‘DA BlackBird’ and click ‘Open’ to load (or double-click the file to load).

A screenshot of a computer

Description automatically generated

9. Check ‘Enabled’ to enable BlackBird (last property under the ‘Setup’ heading highlighted in lime green in the image below).

10. Double-check that the BlackBird properties are set up as desired:

Check out SharkIndicators documentation for BlackBird on THIS PAGE.

Backtest Mode – Set to False (unchecked)

Start Auto Trading On – Set to False (unchecked)

Show Chart Trader – Set to True (checked)

Disable Debug Message – Set to True (checked)

Account – Set to ‘SIM101’ or some other SIMULATED ACCOUNT when testing in real-time (Read DISCLAIMER). Make sure you set it to ‘Playback101’ when testing in Market Replay.

Calculate – When using the BlackBird template for manual entries, this setting is irrelevant, so leaving it to ‘On bar close’ is fine. When loading the BloodHound signals template into BlackBird as the Entry signal, set it to either ‘On price change’ or ‘On each tick’ when using the ‘Signals’ Logic Board and entering intra-bar the second a signal is found. The way BlackBird operates as a Trade Manager to handle the stops and targets is all ‘On each tick’ regardless of the user-defined Calculate mode, so setting it to ‘On price change’ does not exactly save on performance overhead. However, the signal logic that governs the Entry order can be set to ‘On bar close’ when desiring to enter after the close of the bar. Please refer to THIS VIDEO for more information.

Enabled – Set to True (checked) to enable (turn on) BlackBird.

Exit on Close – Set to True (checked) to force BlackBird to close a trade N seconds before the close of the session (30 seconds by default). Since I will occasionally hold overnight, I set mine to False (unchecked).

Time in force Set to ‘GTC’ (good till canceled) or ‘Day’ (orders cancel at the close of session). I set mine to GTC, as I often hold positions overnight.

Graphical user interface, application

Description automatically generated

11. Once enabled, click on ‘Order Settings’ from the BlackBird Chart Trader panel (near the bottom) to open the BlackBird ‘Order Settings UI’

Graphical user interface

Description automatically generated
Graphical user interface, application

Description automatically generated

You can watch the video below to get familiar with running the template.

Operating the BlackBird Template
Adding BloodHound Template to BlackBird

BlackBird Template Settings

Order Set A Rules & Conditions

Order Set A Entry

Order Label = BuyAsk+1/SellBid-1

Order Set A’s Entry, for a Long Trade, goes in as a Limit Order at the Ask price plus one tick (at the Bid minus one tick for a Short). I use Limit Orders for both Order Set A and Order Set B so that the Dynamic Planner can be used in BlackBird. The Dynamic Planner allows you to use BlackBird for fine-tuning your discretionary trades, while still utilizing all the amazing trade management features within BlackBird. If you were to use Market Orders, then obviously once you made your ‘dynamically planned’ orders live, they would immediately be filled, as they would go in at the market price, regardless of where you set them.

I set Order Set A to go in for a Long Trade at the Ask price plus one tick so that it effectively acts as a Market Order, simultaneously limiting your slippage on the trade. Occasionally, though, if the market is moving very quickly in one direction, the entry could be missed. While missing entries due to offset Limit Orders is common, missing an entry when using a Limit Order that is set one tick above the Ask price is rare, but does happen.

If the order is not filled within a period of 20 bars or 300 seconds, BlackBird will cancel it.

Graphical user interface, application

Description automatically generated

Order Set A Profit Target

Order Label = 6AR | HL><BB

Order Set A’s Target, for a Long Trade, goes in as a Sell Limit Order at plus 6 times the value of the AR(100). The AR indicator is a very simple average range indicator that we include with almost all our tools. The AR takes a simple moving average of the ranges of the past 100 bars, rather than using the elaborate calculation that the ATR (average true range) use, which takes into account the distance from the previous bar’s close to the next bar’s open in the range calculation. Also, the AR indicator sets the range to the (High – Low) + 1 tick, rather than simply (and incorrectly) using only the High – Low. Using only the High – Low would set a bar that has the same price for its high as it does for its low equal to 0, which is wrong… and zeroes pose problems in calculations…

Graphical user interface, text, application

Description automatically generated

Trailing Actions: 1

Trailing Action A Name Label = A. HL><BB After4.5ATR-Profit

This rule will tighten Order Set A’s Profit Target to the market price if Entry A is in the profit by at least 4.5 ATRs and the high of a bar touches or breaks above the upper Bollinger line, ensuring that some profit is taken within a potentially extreme ‘overbought’ scenario.

Trigger On: High/Low vs. Bollinger and At least 4.5 ATR(s) in Profit (all simultaneously)

Triggered when both of the following two rules are met, simultaneously:

  1. Price vs Indicator: For a Long, when the High (Input A) is above or equal to the BollingerBands(25,2) Upper line
  2. Profit or Loss: After a 4.5ATR Profit

Action: Move to Last Price (tightens Profit Target A to the market price to be filled)

Repeat: Indefinitely, once per bar, if re-triggered

Order Set A Stop Loss

Order Label = 2AR | 8BarSwing Trail

Order Set A’s Stop, for a Long Trade, goes in as a Sell Market Order at 2 times the value of the AR(100).

Trailing Actions: 1

Trailing Action A Name Label = A. 0.5AR-8BarSwingTrail After2ATR-Profit

Graphical user interface, application

Description automatically generated

Trigger on: Low/High vs. Swing Patterns 2xAR and At least 2 ATR(s) in Profit (all simultaneously)

Triggered when both of the following 2 rules are met, simultaneously:

  1. Price vs Indicator: For a Long, when the bar Low (Input A) is at least 2AR above the Swing Highs & Lows (2, Standard, 8, 20) Widest Bottom (swing low).
  2. Profit or Loss: After a 2ATR Profit

Action: Move to Swing Patterns -0.5xAR (tightens the stop, for a Long, to 0.5AR below the current 8BarSwing Low)

Repeat: Repeat Indefinitely, once per bar, if re-triggered

Order Set B Rules & Conditions

Order Set B Entry

Order Label = BuyAsk/SellBid

Order Set B’s Entry, for a Long Trade, goes in as a Buy Limit Order at the Ask price (at the Bid for a Short). I set the B Entry to the asking price so that Entry A and Entry B have one tick difference between them so they can be manually adjusted independently from one another. When Entry A and Entry B go in at the same price, you cannot separate them (as of writing this article, at least).

If the order is not filled within a period of 20 bars or 600 seconds, BlackBird will cancel it.

Graphical user interface, application

Description automatically generated

Order Set B Profit Target

Order Label = 9AR | VWAP-SD2 Trail

Order Set B’s Target, for a Long Trade, goes in as a Sell Limit Order at 9 times the value of the AR(100).

Graphical user interface, application

Description automatically generated

Trailing Actions: 1

Trailing Action A Name Label = A. 0.25AR+VWAP-SD2Trail After3ATR-Profit

This rule will tighten Order Set B’s Profit Target to the VWAP Upper SD2 line (for a Long) when the VWAP Upper SD2 line is within a range of at least 6AR above the Entry price but less than 9AR above the Entry price, so that this rule could never tighten the Target to a value closer than the initial placement of Target A, and never further away than Target B’s initial placement.

Trigger On: amaCurrentDayVWAP vs. OCO Entry Price 9xAR and amaCurrentDayVWAP vs. OCO Entry Price 6xAR and 3 Bars (all simultaneously)

Triggered when all of the following three rules are met, simultaneously:

  1. Delay: A three-bar delay
  2. Price vs Indicator: For a Long, when the VWAP Upper SD2 line is less than or equal to the Entry B price plus 9AR. In other words, the VWAP Upper SD2 line must be less than 9AR above the Entry price, as the initial placement of the profit target is at 9AR above the Entry price and this rule tightens the target and doesn’t initially allow it to get further away from the Entry.
  3. Price vs Indicator: For a Long, when the VWAP Upper SD2 line is greater than or equal to the Entry B price plus 6AR. In other words, the VWAP Upper SD2 line must be greater than 6AR above the Entry price, so that this rule could never tighten Profit Target B closer than the initial placement of Profit Target A. price and this rule tightens the target and doesn’t initially allow it to get further away from the Entry.

Action: Move to amaCurrentDayVWAP 0.25xAR (tightens Profit Target A to the market price to be filled)

Repeat: Repeat indefinitely, once per bar, if re-triggered

Order Set B Stop Loss

Order Label = 3AR | 25BarSwing Trail

Order Set A’s Stop, for a Long Trade, goes in as a Sell Market Order at 2 times the value of the AR(100).

Trailing Actions: 1

Trailing Action A Name Label = A. 0.75AR-25BarSvvingTrail After3ATR-Profit

Graphical user interface, application

Description automatically generated

Trigger on: Low/High vs. Swing Patterns 3xAR and At least 3 ATR(s) in Profit (all simultaneously)

Triggered when both of the following 2 rules are met, simultaneously:

  1. Price vs Indicator: For a Long, when the bar Low (Input A) is at least 2AR above the Swing Highs & Lows (2, Standard, 8, 20) Widest Bottom (swing low).
  2. Profit or Loss: After a 2ATR Profit

Action: Move to Swing Patterns -0.75xAR (tightens the stop, for a Long, to 0.75AR below the current 25BarSwing Low)

Repeat: Repeat Indefinitely, once per bar, if re-triggered

Like this article?