skip navigation

AB-RaffChannel

Raff Regression Channels in NinjaTrader

This drawing tool is very straight-forward and works like virtually all other NinjaTrader drawing tools. Once installed, simply select 'AB-RaffChannel (version)' from the drawing tools drop-down menu to use it. Click once to set the channel starting point and click again to set the channel ending point. Click and drag on an anchor to change the channel start or end points and click and drag the channel lines to move the entire channel. If you right-click on any channel line you can access the channel's properties and alerts. I tried to give all the options names that make sense and, if you hover over them with your mouse, I've included more detailed descriptions as appropriate. Overall, I don't think there's too much that's a mystery. However, this page will provide an overview just in case something doesn't make sense to you.

keep me updated!

Download Instructions

You can download the latest version of AB-RaffChannel here . Make sure you save the file somewhere you can find it easily -- your Downloads folder or your Desktop are usually the easiest places. If you wish to verify your download, the SHA-256 checksum is displayed below the download button for each release on the Downloads page.

Installation, Upgrades & Removal

installation

  1. Open NinjaTrader and go to the main control window (the one with the main program menu) and select Tools | Import | NinjaScript Add-On... [Installation screenshot 1]

  2. Navigate and find the ZIP file you downloaded. Select it and click "Open". NinjaTrader will install the file for you.

  3. Assuming there are no errors, you should see a dialog box saying "NinjaTrader successfully imported all scripts contained in the NinjaScriptArchive File." [Installation screenshot 2]

  4. That's it, you're done!

upgrading

Upgrading involves removing the previous version and then installing the new version just as you did in the initial installation.

You MUST remove the previous version or NinjaTrader will fail to perform the upgrade. If you don't remove the previous version, you will see a dialog box saying "Import failed..." [Screenshot showing upgrade error]

  1. Follow the steps in the "Uninstallation" section below to remove the current (old) version.

  2. Now, follow the steps in the "Installation" section above to install the newest version. Just make sure you choose the newest ZIP (it will have the highest version number) and that will do the "upgrade" for you. Upgrading really is just installing the latest version. Your existing templates will be unaffected and will be automatically reapplied after the upgrade.

removal

It is recommended you remove any custom indicators from within NinjaTrader instead of deleting the file manually (though I've never experienced any problems manually deleting files). We will go through the recommended procedure here.

  1. On the main NinjaTrader Control Center window (the one with the main program menu), select Tools | Remove NinjaScript Assembly [DLL uninstallation screenshot 1]

  2. A new window will appear asking you to select which assembly you want to remove. Select ABRaffChannel_version (where '_version' is the currently installed version number) and click "Remove". [DLL uninstallation screenshot 2]

  3. NinjaTrader will display a confirmation dialog box asking if you're sure. You are. Say Yes.

  4. Assuming no errors, you will get a success message. Click OK to close the dialog box. [DLL uninstallation screenshot 3]

  5. Click CLOSE on the "Remove NinjaScript Assembly" dialog box to close it. [DLL uninstallation screenshot 4]

  6. AB-RaffChannel is now uninstalled. If you removed the indicator as part of the upgrade process, please follow the "Installation" section above to complete the upgrade.

Using In NinjaTrader

This drawing tool appears along with all other NinjaTrader drawing tools in the same 'pencil' drop-down menu. It follows the standard drawing tools usage rules, but, here's a more detailed breakdown:

adding to your chart

Open the drawing tools drop-down menu or open the context-menu and find AB-RaffChannel (version). [Screenshot of drawing tools menu]

Click to select the tool and change your cursor to a pencil. Click on your chart where you would like the channel to start then move your mouse to where you would like the channel to end and click the mouse again. The regression line will be calculated between these two points and your channel lines will be updated and drawn.

interaction

Clicking on any channel line will select the channel. Clicking on any channel line (including the regression line) and dragging the mouse will move the entire channel. Clicking and dragging on an anchor will change the start or end point for the channel and regression calculation. Double-clicking on any channel line will open the properties grid. Right-clicking on any channel line will open the context menu and allow you to open the properties grid, set alerts or remove the channel. You can also remove the channel by selecting it and pressing the delete key on your keyboard.

assigning a hot-key

If you want quick access to the drawing tool, you can assign it a hot-key:

  1. In the NinjaTrader Control Center (main window), click on Tools | Hot Keys. [NinjaTrader Tools menu].

  2. In the new window that opens, select Chart on the left side.

  3. On the right side, scroll all the way down until you see AB-RaffChannel (version). [Hot Keys dialog box].

  4. Click on the empty box to the right and enter the hot-key combination you'd like to use for this drawing tool.

  5. Click OK to close the dialog box and save your changes.

alerts

Alerts are handled using the built-in NinjaTrader alerts system. Right-click on your channel and select Alerts. This will bring up the NinjaTrader alerts dialog. More information about the alerts system can be found in the NinjaTrader official documentation . The alerts dialog is pretty complicated so you might find this YouTube video about NinjaTrader alerts or this YouTube video with some alert examples helpful.

Parameters

Click on any of the options below to expand it and read a more detailed explanation of what the particular parameter does. This section will be updated with each new release version.

calculation options

Price type

This is the 'base price' used in the regression calculation. You can choose between the following options:

  • Close (closing prices for each bar in the channel)
  • Median (midpoint of each bar in the channel)
  • Typical (average of the high, low and close for each bar in the channel)
  • Weighted (same as typical except that the closing price is counted twice, hence the close is 'weighted')

Default: Median

display options

Show regression

Whether to plot the regression (middle) line when drawing the channel. Unchecking this will hide the regression line.

Default: Enabled (checked)

Extend right

If enabled (checked), the channel will be extended to the hard-right-edge of the chart.

Default: Enabled (checked)

Auto-colour

Auto-colouring applies the relevant automatic colour choice to the channel based on its slope. This helps keep your channels consistent with each other and is a quick way to apply standardized settings without having to open the properties grid all the time. If you set the relevant auto colour choices and save them as default, you can easily affect all future channels and save yourself some time.

  • up-sloping channels are coloured using the Auto-Up colour
  • down-sloping channels are coloured using the Auto-Down colour
  • flat channels (quite rare) are coloured using the Auto-Neutral colour

This setting applies only to colours. As such, you can still change any other aspect of any lines such as the line style or thickness. If this is enabled (checked), however, your colour choices will be overridden as outlined above. Thus, if you want to set custom colours for your lines you must disable (uncheck) this option.

Default: Enabled (checked)

Line Styles

Regression line

Attributes to apply when drawing the regression (middle) channel line. You may customize the colour, line style, opacity and thickness. N.B. If Auto-colour is enabled, any colour choice made here will be ignored but all other attributes will still be applied.

Default: None (Auto-Colour is enabled by default)

Upper line

Attributes to apply when drawing the upper channel line. You may customize the colour, line style, opacity and thickness. N.B. If Auto-colour is enabled, any colour choice made here will be ignored but all other attributes will still be applied.

Default: None (Auto-Colour is enabled by default)

Lower line

Attributes to apply when drawing the lower channel line. You may customize the colour, line style, opacity and thickness. N.B. If Auto-colour is enabled, any colour choice made here will be ignored but all other attributes will still be applied.

Default: None (Auto-Colour is enabled by default)

Auto-Neutral colour

Colour to apply to all channel lines when Auto-Colour is enabled and the channel slope is FLAT. This parameter is ignored if Auto-Colour is disabled.

Default: DodgerBlue

Auto-Up colour

Colour to apply to all channel lines when Auto-Colour is enabled and the channel slope is UP. This parameter is ignored if Auto-Colour is disabled.

Default: LawnGreen

Auto-Down colour

Colour to apply to all channel lines when Auto-Colour is enabled and the channel slope is DOWN. This parameter is ignored if Auto-Colour is disabled.

Default: Tomato

General

Cursor sensitivity

This controls how sensitive the channel is to your mouse clicks. Basically, this is the maximum number of pixels away from a line/anchor you can click and still select that line/anchor. The default is likely fine but, if you have a very small chart or a low resolution screen you may want to lower this number. If you have very large charts or a super-large/high-resolution screen, you may want to increase this number.

contact me

Want to stay updated on new releases? Have questions or found a bug? Want to submit a feature request? Feel free to email me by clicking the button below. I'll be happy to answer any questions you have, help you get the indicator set-up, or let you know about incorporating your suggestion(s) into future versions. If you know how to program for NinjaTrader or in C#/.NET in general and want to contribute, email me using the button below or file an issue or pull request in the git repo (preferred).

email me