top of page

NinjaTrader Freebies

I've been doing some trading with NinjaTrader recently, and I've written a number of add-ons to better suit the way I trade.  I'm making these available to the community for free, because they're just little doodles while I learn more about programming for this platform.  Please enjoy, but also, you know, use at your own risk etc.

​

To install these in NinjaTrader:

  • Download the ZIP file for the indicator; don't unzip it

  • In your Control Center, go to Tools > Import > NinjaScript Add-On...

  • Select the ZIP file and select "Open"

​

NOTE: These have nothing to do with MT4 or ChartLogic.

Price Weighting

This is a NinjaTrader strategy that encapsulates and automates much of the way I trade, with features for order management, risk management, position sizing (using the Position Tool), automating the trailing stop logic and tracking your targets.

NT_PW_1.png

InfoPanel

This places a text box in the upper-corner of the chart displaying the chart symbol and timeframe.  Super helpful for those of us with, *ahem*, less young eyes.

InfoPanel Indicator

Sessions

Shows session ranges and high/low lines.

​

  • Asia: 6pm-midnight EST

  • London: Midnight-6am EST

  • NY AM: 6am-noon EST

  • NY PM: Noon-6pm EST

​

Optionally show/hide the session ranges if you just want to see the lines.

​

So here's what this is doing.  It will show yesterday's session as long as today's session has not started yet.  Once today's session starts, the previous day session is no longer displayed.  

​

The high/low lines will start to be drawn after the session ends.  They will extend from the close of the session, either until they get breached; or to just a bit past the current candle.  So if the previous session hasn't been breached yet, you'll see its line as a potential target. Once the line has been breached it stops at the breach candle, so you won't be bothered by it anymore, as any liquidity associated with that level has already been taken.  Once today's session ends, yesterday's session lines are no longer drawn.

NT_Sessions_1.jpg
NT_Sessions_2.jpg

Version 1.0.0.3, updated Dec 9, 2024

True Open

Places some lines that may be of interest to those trading indices, like NQ or ES, during London or NY sessions.

​

  • TDO (True Day Open) - Midnight EST​

  • TSO (True Session Open) - 7:30am EST

  • PDH/PDL (Previous Day High/Low)

  • PWH/PWL (Previous Week High/Low)

  • London session start (vertical line)

  • NY session start (vertical line)

TrueOpen Indicator

Position Tool

Similar to the position tool in TradingView.

​

  • Choose to display distances in points, ticks or not at all

  • Display value as amount or percent

  • Either set an account size and risk% to calculate the number of contracts for this distance; or set a fixed number of contracts

  • Set the initial SL distance (negative value for a buy, positive value for a sell) and Initial RR for the TP size; but then adjust on the chart

  • The calculated RR value is displayed as you resize things. If you're not using fixed contracts then the number of contracts adjusts to match your target risk% as you resize the SL box.

​

You can move the SL and TP boxes where you want, and adjust their size by dragging their anchors, and everything will update to follow.  To change between a buy or sell, just drag the SL or TP edge to the other side of current price and the box will flip.  (You could also set the initial SL distance to a positive or negative value to get the trade direction you want from the start.)  If you change the chart timeframe it remembers its position.
 

This indicator will not automatically update anything in relation to a live trade or where price is, and it will not resize itself if it hasn't hit the SL or TP by the time the right edge is reached.  They're just these boxes, you know?

​

Advanced Behaviors (1.0.0.3)

​

Toggle Risk - Click the SL Text

  • If you have a fixed number of contracts configured, this will toggle between the Initial SL distance (in ticks) and the Target Risk% by moving the SL price.  So you can move the SL around, and then quickly snap it back to either your default distance or risk%.

  • If you have 0 fixed contracts set then the tool is calculating the number of contracts based on your SL distance and risk%.  If you click the SL text it will first move to your Initial SL distance.  If you then click the SL text again it will lock in this number of contracts (temporarily) and move the SL to where this number of contracts would have exactly your Target risk%.  When it's locked in on a number of contracts the risk% value is not displayed in the Entry text box.  Click again to unset the number of contracts.

Toggle RR - Click the TP Text

  • If the current TP distance doesn't match your Target RR then it will adjust your TP location to give you exactly your target RR.

Move Entry to Current Price - Click the Entry Text

  • Moves your entry price to match current price.

  • If your TP price is exactly at your Target RR, then the TP area will stay the same size; i.e., clicking the entry text moves your TP.  If, on the other hand, you have customized your TP so it is NOT exactly your Target RR, then it will NOT move your TP.  

  • If your SL text is exactly your Initial SL distance, then the SL area will stay the same size; i.e., clicking the entry text moves your SL to follow.  If, on the other hand, you have customized your SL location so it is NOT exactly your Initial SL distance, then it will NOT move your SL.

​

It is hard to convey in words how useful the above behaviors are.  Try it out!  Basically, if you've gone through the trouble to set where you want your SL and/or TP to be and you click the entry text to move the entry to current price, it will not adjust your SL and TP.  Instead it will update the gain/loss percents and the RR values displayed based on the new entry price.  And if you're using a risk% to calculate the number of contracts, this lets you quickly see how many contracts you should use as price is moving around.

NT_PositionTool_2.jpg

Version 2.0.0.2, updated Jan 30 2025

RR Plus - Risk-Reward made useful

NinjaTrader comes with a handy tool to display RR lines, RiskReward.  This indicator uses the RiskReward tool to let you set SL and TP points, but in addition, you tell it how much you will risk per trade and it tells you how many contracts you need.  As you drag the RiskReward tool's anchors it adjusts the calculations automatically.

​

  • Account Balance - Set the balance to use for risk calculations

  • Ratio - Set the RR ratio used to calculate TP from your SL

  • Risk Percentage - How much of the account balance to risk

  • Contracts - If not zero, will use this fixed number of contracts rather than risk% to calculate gain/loss values for your SL/TP

  • Initial SL Distance - Your SL distance, in ticks

  • Show Values as Percents - When false will show currency amounts; when true will convert to a percent

  • Display Points - When true will show you the distance to SL/TP lines in points

  • Display Ticks - When true will show the distance to SL/TP lines in ticks (useful for the Chart Trader panel)

​

You can now set the font name and size, tool width and text offset as parameters.  But there's no way for me to set the colors of the RiskReward tool programmatically, unfortunately.

​

There are some advanced behaviors to be aware of:

​

Actual SL for Risk

Because you're setting a fixed SL distance (say, 150 ticks) and its using this to calculate a number of contracts, the actual gain/loss amounts at this distance won't be exactly your RR ratio of your risk amount.  Why?  Because we can't trade partial contracts.  So initially, the SL line will probably say something less than your expected risk amount.  If you click the red SL text it will lock the number of contracts to the current number and move your SL/TP lines to their exact prices where the loss/gain would match your risk%.  

 

Return to Default

You can change the SL distance by either dragging the anchors of the RR Tool, or by clicking the SL text as described above.  To quickly return to your default SL distance, click the red SL text again and it will snap back.  The SL text acts like a toggle, going between an exact risk% SL distance and the default SL distance.

​

Flip Direction

You can change between BUY and SELL by clicking the green TP text.  It will simply flip the positions of the SL and TP relative to the entry point, while preserving the distances.

​

Follow Mode

Click the yellow entry text (where it's telling you the number of contracts) to toggle "Follow" mode.  When enabled the entry line will follow current price, and all the other objects will follow along.  NOTE: When follow mode is enabled the features for clicking on the SL or TP text described above are disabled; you can't adjust SL distance in follow mode that way.  Just turn off Follow, adjust the SL and then turn it back on.

Also, it's tricky to try to adjust the SL distance by dragging the RR tool's anchors while Follow mode is turned on.  It's better to turn Follow off first, get your anchors where you want them, then turn Follow back on.

​

Risk-Reward tool placement

With the normal RR Tool you can place it wherever you want, drag it around on the chart etc.  The one used within RRPlus, however, has its position controlled by the indicator.  It will keep the tool aligned just to the right of the current bar, with the text offset a bit further to the right.  You can still drag the tool around, and if you're not in Follow mode this will cause everything else to move to your new location.  On the next new bar the tool will also update its horizontal position, as it keeps itself at a constant distance to the right on each new bar. 

​

RRPlus will now remember where you put it on the chart and your customized SL distance between chart updates.  If you drag RRPlus to a different entry price and then adjust the SL, and then change the chart timeframe, it will remember where you put it when it starts up (when you change a chart's timeframe that causes all indicators to be removed and re-added, re-initializing to default values).

RRPlus Indicator

Version 1.0.0.4, updated Dec 9, 2024

RRLines

This is an alternative way to try to keep tabs on distance to specific prices, as well as the number of contracts you'll want to trade to ensure a target amount of risk. This is much more bare-bones.  This will add two horizontal lines one above and one below current price.  The line will tell you how far away current price is, in both points and ticks.  If you set a target risk amount then it will calculate how many contracts you can trade at this distance to keep within that risk.  The lines can be dragged where you want them; they'll remember their position during chart refreshes (like if you change the timeframe).

​

How do I use this?  While I'm watching price and preparing for an entry I usually have a level in mind where I expect to put my SL, and very quickly I'll want to be able to enter in a trade with the right number of contracts for the risk I want to use.  This keeps that calculation always up-to-date considering where price is.  I still have to update Chart Trader, but at least I don't have to measure the distance and do the calculations in my head in the heat of the moment where seconds matter.

NT_RRLines_1.jpg
  • MultiMAX Telegram Group
  • YouTube

Trading CFDs and FX is high risk and not suitable for all investors. Losses can exceed your initial investment. Any Information or advice contained on this website is general in nature and has been prepared without taking into account your objectives, financial situation, or needs. You should never trade any capital that you cannot afford to lose.  The author of this website is not responsible for any losses you incur, even if you're using tools obtained from this author, or trading based on information provided from this website, related websites and accounts (e.g. YouTube) or from the author directly.

​

The information on this website is not intended to be an inducement, offer, or solicitation to any person in any country or jurisdiction where such distribution or use would be contrary to local law or regulation.

 

Copyright © 2024 by ChartLogic EA.

bottom of page