NinjaTrader 7 Indicators - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

NinjaTrader 7 Indicators
Started:June 21st, 2012 (04:07 PM) by YoderIII Views / Replies:2,959 / 4
Last Reply:July 24th, 2013 (02:35 PM) Attachments:1

Welcome to

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Thread Tools Search this Thread

NinjaTrader 7 Indicators

Old June 21st, 2012, 04:07 PM   #1 (permalink)
Trading Apprentice
Futures Experience: Master
Platform: NinjaTrader and MetaStock
Favorite Futures: ES
Posts: 2 since Feb 2011
Thanks: 0 given, 0 received

NinjaTrader 7 Indicators

Hello All:

I have been a member for awhile. I have been a trader much, much, much longer. Each of these indicators are based on ^ADD.

I find NinjaTrader 7 lacking and does not have what I think are basic indicators.

Listed below are some of what I want:

These are for market analysis.

(1). Cumulative Advance/Decline Line
The advance/decline line is the most popular of all internal indicators by far. It is a very simple measure of how many stocks are taking part in a rally or sell-off. This is the very meaning of market breadth, which answers the question, "how broad is the rally?" The formula for the advance/decline line looks like this:

A/D Line = (# of Advancing Stocks - # of Declining Stocks) + Yesterday's A/D Line Value

The most popular data used for the A/D line is from the NYSE or Nasdaq markets. It is cumulative and normally plots a line similar to the price chart of the given index. The A/D line can be used alone or together with the price chart to look for divergences. A divergence suggests that a move in the price chart is unsupported by the broad market, and it should, therefore, be taken as a warning of an impending turning point in the index or market.

A traditional technical indicator, such as a moving average or a stochastic oscillator, can be applied to the chart or used to smooth the signals it gives.

(2). Advance/Decline Spread
A variation on the A/D line is the A/D spread. Just as its name implies, the A/D spread charts the difference between the number of advancing stocks and declining stocks in a given market on a given day. Unlike the A/D line, the spread is not a cumulative chart, so each day is calculated separately. The formula for the A/D spread looks like this:

A/D Spread = # of Advancing Stocks - # of Declining Stocks

The chart of the A/D spread is an oscillator that revolves around a zero line. The A/D spread is interpreted much like any oscillator with overbought and oversold levels near the extremes of the chart. When the A/D spread crosses above its zero line, this means more stocks are advancing than declining, and vice versa.

This oscillator is extremely fast, so a moving average is usually applied to slow the chart's movements and signals. The technician can fine tune the number of days set for the moving average to the market data.

(3). Advance/Decline Ratio
Another variation on the A/D line is the advance/decline ratio, which divides the advancers by the decliners. Here is the formula:

A/D Ratio = # of Advancing Stocks / # of Declining Stocks

This formula creates values that cannot be less than zero because it is a fraction (or ratio). A value of 3 means that three times as many stocks advanced as declined. Any value less than 1 means more stocks declined than advanced. Because of the nature of fractions, the chart is more legible using a logarithmic scale. Like the A/D spread, this chart moves quickly, so it's usually smoothed with a moving average.

(4). Absolute Breadth Index
The absolute breadth index is a measure of internal volatility. It calculates the absolute value of the difference between the number of advancing and declining stocks, making it a slight variation on the A/D spread. The formula for ABI looks like this:

ABI = | (# of Advancing Stocks - # of Declining Stocks) |

Because the ABI is an absolute, its value will always be positive. The chart is a representation of the volatility in the spread between advancers and decliners. The ABI can be smoothed using a moving average to facilitate drawing longer-term trend lines. A fast-paced, choppy chart of the ABI can indicate a choppy, range-bound market.

(5). Breadth Thrust
Breadth thrust is an internal indicator that is somewhat more complicated and harder to find. It is a ratio of moving averages that creates an excellent judge of market momentum. The formula looks like this:

Thrust = x-Day Moving Average of Advancing Stocks / x-Day Moving Average of (Advancing Stocks + Declining Stocks)

Since this formula creates a ratio whose denominator is a sum of both advancers and decliners, the value cannot be greater than 1 or less than zero. The breadth thrust indicator, therefore, creates a percentage value that moves just like a traditional oscillator from 1 to 100 (or .01 to 1.00).

Breadth thrust can be read just like a stochastic or RSI, where overbought and oversold levels are at the extremes. Divergence with the underlying price chart points to weakening momentum. The number of days to set for the moving averages should be determined by the time-period being evaluated.

(6). Arms Index (TRIN)
Developed by Richard Arms, TRIN is a double-ratio that divides the A/D ratio by the A/D volume ratio. The formula is somewhat long but, fortunately, the TRIN charts for the NYSE and Nasdaq are some of the easier internal indicators to find on the internet. For those who are curious, here's the formula:

TRIN = (# of Advancing Stocks / # of Declining Stocks) / (Volume of Advancing Stocks / Volume of Declining Stocks)

For reasons that should now be obvious, the value of TRIN cannot be less than zero. The Arms Index is read somewhat counter intuitively. A value of less than 1 means advancing stocks are getting more than their share of volume, which is bullish for the market. When the value of TRIN is more than 1, declining shares are taking an outsized amount of volume, which is bearish for the market.

TRIN is usually smoothed using a moving average, which should be tuned to the time-period being evaluated. Trend lines drawn from the moving average reveal the direction of market momentum. (Remember that the value for TRIN moves down as advancing volume goes up).

(7). McClellan Oscillator
Searching for an even more refined internal indicator, Sherman McClellan designed his own oscillator. Though the calculations for McClellan's Oscillator are far too complicated to compute by hand, they help demonstrate how the indicator works, so here they are:

McClellan Oscillator = [ 19-Day Exp. Moving Average of (# of Advancing Stocks - # of Declining Stocks) ] / [ 39-Day Exp. Moving Average of (# of Advancing Stocks - # of Declining Stocks)]

This formula creates a ratio comparing the 19-day and 39-day EMA of the A/D spread. The chart is an oscillator that ranges from +100 to –100 with overbought and oversold levels usually found at +70 and –70 respectively. The McClellan Oscillator can be read just like any other oscillator and is usually not smoothed, but it can be charted with a moving average as an indicator line.

I am not a programmer. I am a trader. Where can I find these? Or would some of you want to take on this project?


Reply With Quote

Old June 21st, 2012, 04:07 PM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old June 21st, 2012, 04:23 PM   #3 (permalink)
Elite Member
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
ThatManFromTexas's Avatar
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,281 received


McClellan Osc

Links and Downloads Manager - NinjaTrader Support Forum


Release of AD-Race for NinjaTrader 7.0 | RedlionTrader

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"

Last edited by ThatManFromTexas; June 21st, 2012 at 04:42 PM.
Reply With Quote
The following 2 users say Thank You to ThatManFromTexas for this post:

Old June 21st, 2012, 04:53 PM   #4 (permalink)
Trading Apprentice
Futures Experience: Master
Platform: NinjaTrader and MetaStock
Favorite Futures: ES
Posts: 2 since Feb 2011
Thanks: 0 given, 0 received

Thanks That Man From Texas!

Thanks That Man From Texas!

Reply With Quote

Old July 24th, 2013, 02:35 PM   #5 (permalink)
Elite Member
Futures Experience: Intermediate
Platform: Ninja Trader
Broker/Data: Mirus
Favorite Futures: FUTURES
Posts: 19 since Dec 2011
Thanks: 1 given, 2 received

help to get A / D Cumulative

Futures Edge on FIO

What happens to the S&P 500 when a new President takes office?

Good afternoon, and thank you for materials YoderIII someone help to get A / D Cumulative Please get A / D but does not build.

If I add Yesterday's A / D Line Value I get a result today + yesterday result example, A / D today = 2000 + A / D like yesterday = 500 Total = 2500 so does not accumulate

Add.Set (Inputs [1] [0] - Inputs [2] [0]);

As I can get is cumulative, and traze a line similar to the evolution of the price index Given?.

Deputy Code of the line A / D without accumulated.

Attached Files
Register to download File Type: cs AdvanceDecline.cs (5.7 KB, 67 views)
Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > NinjaTrader 7 Indicators

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Upcoming Webinars and Events (4:30PM ET unless noted)

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
importing downloaded indicators onto Ninjatrader oztrader25 NinjaTrader 4 August 25th, 2011 04:10 AM
Ninjatrader indicators without plots jstnbrg NinjaTrader 6 March 2nd, 2011 01:14 AM
How-to import indicators in NinjaTrader ZTR Help, Tutorials, and How-Tos 2 July 21st, 2010 01:06 PM
Fibonacci Indicators for NinjaTrader Fat Tails The Elite Circle 48 July 6th, 2010 10:58 AM
NinjaTrader 7 indicators Big Mike The Elite Circle 31 November 21st, 2009 02:00 PM

All times are GMT -4. The time now is 02:41 PM.

Copyright © 2016 by All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts

Page generated 2016-10-24 in 0.12 seconds with 20 queries on phoenix via your IP