skip navigation

AB-HRay

Horizontal Price Ray-Line

This drawing tool is very straight-forward and works like virtually all other NinjaTrader drawing tools. Once installed, simply select 'AB-HRay (version)' from the drawing tools drop-down menu to use it. Click once wherever you want your price ray to start. Click and drag the anchor or the ray/zone itself to move it and double-click on it to access the properties. 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-HRay 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 ABHRay_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-HRay 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-HRay (version). [Screenshot of drawing tools menu]

Click to select the tool and change your cursor to a pencil. Click wherever you want your horizontal ray to start and it will be drawn from that point to the right-edge of the chart.

interaction

Clicking once on or near the ray or zone will select it. While selected, clicking and dragging will move the ray/zone to a new location. Double-clicking on the ray/zone will open the properties grid. Right-clicking on the ray/zone will open the context menu which will allow you to open the properties grid, set alerts, or remove the drawing tool.

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-HRay (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 ray/zone 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.

line options

Line style

Standard NinjaTrader 'stroke' drop-down menu that lets you define the colour, style, opacity and width of the horizontal ray. These settings (except width) also apply to a zone if you choose to create one. By default, this is set to Cornflower Blue, 1px solid line at 100% opacity.

zone options

Draw as zone

If this is checked, a zone will be drawn instead of a horizontal ray line. If this is not checked, all other options in this section will be ignored. By default, this is unchecked.

Zone size

Number of ticks above and below your selected price that should be used to create a zone. For example, if you select 3 then a zone will be created 3 ticks above your selected price and 3 ticks below your selected price for a total range of 6 ticks centered around your selected price. This option has no effect if "Draw as zone" is unchecked.

price display

Display price

If checked, price label(s) will be drawn. In the case of a ray, the exact price-level value of the ray will be displayed. For a zone, the price of the zone high and the zone low will be displayed. If this is not checked, all other options in this section will be ignored. By default, this is unchecked.

Price label position

Determines where price labels will be positioned relative to the ray or zone. For a ray, choices are read as Below line or Above line, while for zones they are read as Outside zone or Inside zone. By default, this is set to Below line/Outside zone.

Price label alignment

This determines if the labels are aligned to the right or left side of the ray/zone. By default, this is set to Right.

Price label font

Standard NinjaTrader 'font' drop-down that lets you choose the font, size (in pixels) and decoration (bold or italic) used for labels. By default, this is set to Lucida Console, 12px.

Price label brush

Standard NinjaTrader 'stroke' drop-down menu that lets you choose the colour and opacity of the labels. Although dash-style and width are also presented as options, they do not apply to text objects. By default, this matches the default ray line colour and is set to 100% opacity.

general

Cursor sensitivity

This controls how sensitive the zones are to your mouse clicks. The default is likely fine but, if you have a very small chart or very high resolution screen you may want to lower this number. If you have very large charts or a super-large 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