Risk Disclosure

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View full risk disclosure.

SiRaven



SiRaven is a NinjaTrader Strategy, which extends the functionality of BloodHound to automatically place trade entries and exits.  It is free and complementary with BloodHound.

With SiRaven (Raven), you can take your BloodHound template and use it to place trade entries for a fully automated trading system within NinjaTrader.  You can specify a Profit target and Stop Loss, and Raven can even use BloodHound signals to flatten the position.

Using Raven

In NinjaTrader, you can choose to run a strategy by attaching it to a chart (similar to how you would start BloodHound) or by adding it directly to the Strategies tab in the NinjaTrader Control Center.  For more information on how to instantiate a NinjaTrader strategy see NinjaTrader’s documentation here.

Both methods are identical in terms of setting up Raven.  Below we will cover the more common way of running a Strategy by adding Raven to a chart.
Special Notes from NinjaTrader when running a strategy:
Strategy Position vs. Account Position

Setup

Begin by opening up a chart in NinjaTrader with your desired timeframe and indicators.  It is suggested to leave BloodHound off the chart, because Raven will add BloodHound to the chart.

Having BloodHound already on your chart before adding Raven will not affect Raven in any way, since the instance of BloodHound on the chart will be separate from Raven’s copy of BloodHound.

To add Raven start by right clicking on the chart and selecting “Strategies…”, followed by selecting SiRaven.  On the right hand side you will see the parameters for SiRaven. If Strategies… is grey & disabled see NinjaTrader’s documentation here to enable it.

Scroll to the top of the parameters list.  Begin with the Template parameter by clicking the “…” button, and opening the desired BloodHound template that you wish to auto-trade or back=test.

Specifying Entries

If your BloodHound template has Logic templates defined, and you would like to use one as your entry signals, select it from the Entry Logic parameter.  If you do not have a Logic template defined, Raven will default to BloodHound’s Solver tab signals, which incorporates all the checked solvers on the Solver tab (the Standard version only has the Solver Tab).

Once a position has been opened Raven will not open or add any more contracts to the current position, in the same direction. For example, if your BloodHound system gives a Long signal and Raven opens a Long position, then a few bars later BloodHound gives another Long signal, Raven will not open anymore Long positions until the current Long positions is closed or reversed.

Advanced feature: If your BloodHound file contains multiple Logic templates for different entry signals, Raven can switch between them on-the-fly. For example, say your BloodHound file has two Logic templates, one of the Logic templates works best in a trending market condition. The other Logic template works best in a consolidating market. In order to switch Raven from one Logic template to the other on-the-fly, leave the Entry Logic parameter on None. Then, after Raven is loaded on the chart, use the pull-down menu as seen above, next to the Orange labeled button, to select which Logic template you want Raven to use to execute trade signals.

Specifying Exits

Just as you can specify the entry conditions to open a trade, you can also use BloodHound’s logic to create exit signals which will close/flatten a position.

To do this, create a new Logic template that gives signals when you want to exit a trade.  Keep in mind that exit signals are opposite of entry signals.  A Short signal will close a Long position, and a Long signal to close a Short position.  Select the exit template from the drop down menu in the Exit Logic parameter.  If a Exit signal occurs on the same bar of an Entry signal, the Entry signal is ignored.

A Short signal will close a Long position, and a Long signal to close a Short position. Exit signals can Not open a position or reverse a position.

Starting & Ending Raven

There are a couple of NinjaTrader settings that affect order handling when enabling or disabling Raven.  The NinjaTrader settings mentioned are found in Options > Strategies tab > NinjaScript tab.
When enabling Raven, having NinjaTrader’s ‘Immediately submit live working historical orders‘ selected, Raven > Backtest Mode = True, and Raven > Manage Trades Using = Default, NinjaTrader will immediately submit an entry order in the direction of Raven’s last historical entry order.  Setting Raven > Backtest Mode = False will prevent immediate order submission.  If Raven > Manage Trades Using = ATM, ATM orders can not be immediately submitted, because NinjaTrader can not track/backtest historical ATM orders. To see the Backtest Mode option, ‘Start Auto Enabled On’ must be True or ‘Show Chart Trader’ must be False.

In Options > Strategies tab > NinjaScript 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 Options > Strategies tab > NinjaScript tab, then we suggest selecting ‘Wait until flat before executing live’

Properties


System Template

General Options

Entry Order Options

Trade Management

The Trade Management section allows you to choose options for managing the Profit target and Stop Loss. You can have Raven manage the orders or use your saved NinjaTrader ATM strategy. Raven will manage a single Profit target and Stop Loss. These are submitted as OCO orders.

Managing Trades Using

Select Default to have Raven manage the Target and Stop Loss.  Or, select ATM to have Raven submit your predefined ATM of choice. Click the tab below for each mode.

Signal Alerts


Common NinjaTrader Properties


General

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.

Historical Fill Process

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.

Order Handling

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.

Order Properties

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.


Video Tutorial


This video is from a weekly Workshop. The whole video is dedicated to the topic of Raven.


What’s the difference between Raven and BlackBird?



Raven’s Chart Trader


Raven’s Chart Trader provides manual control over Raven’s operations.  The exhibit below will explain the various interface components.

Discretionary Trade Management


Raven’s Chart Trader provides manual control over the Profit Target and Stop Loss price placement.

Raven Chart Trader Order Flags
Number 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, below the bid the label will display a negative value. At the ask the label will display @Ask and at the bid the label will display @Bid.
Once you have the ghost order at the price you desire, left click with your mouse to complete the modification. This is a click once and click again method, you do NOT click and drag.
Note:  When Trail The Stop Loss is True, the Stop Loss will always move back to the calculated trailing stop price.

Number_2 Cancelling an Order  To cancel an order, left mouse click on the red X on the order marker.

Strategy Analyzer


Using Raven in the Strategy Analyzer allows you to run historical analysis on a basket of instruments.  Click here for the 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 indicator parameters inside BloodHound solvers, and therefore has limited practical value.  The Profit Target and Stop Loss parameters of Raven can be optimized in NinjaTrader 7 only.  We will be looking into a solution for the NinjaTrader 8 optimizer.

Tips & Misc. Backtesting 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, or it takes a longer time for Raven to start up, 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 Raven.  When Raven receives a “signal” from your BloodHound logic, 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 Raven.  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, Raven 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.