The Kaufman Eifficiency Ratio is also know as Fractal Efficiency. It can be used as a filter to differentiate between trending conditions and sideways markets.
The efficiency ratio compares the absolute amount of the n-period momentum to the sum of the absolute amounts of the last n close-to-close changes. If all close-to-close changes pointed in the same direction - meaning either n consecutive upcloses or n consecutive downcloses - the fractal efficiency will take the value 100. This is an indication for a strong trend. If the n-period momentum takes the value 0, the fractal efficiency becomes 0 as well, indicating chop.
The fractal efficiency is used by the Kaufman Adaptive Moving Average to identify chop periods.
This version of the Kaufman Efficiency Ratio has a few additional options:
Chopline: I have added a chopline, which depends on the period of the Kaufman Efficiency Ratio. The formula for the chopline is 100/Sqrt(period).
Signalline: I have added a signalline by using a Hull Moving Average(HMA). The market starts trending, when the Kaufman Efficiency Ratio has crossed both the signalline and the chopline from below.
Classic/Balanded: The indicator allows for two different ways of calculating the Kaufman Efficiency Ratio. The 'Classic' option uses the original formula of Perry Kaufman. The 'Balanced' option replaces the absolute amount of the n-period momentum with the absolute amount of the n-period balanced momentum, which is based on a triangular moving average.
Update June 22, 2013: Minor modification to make indicator compatible with indicators/strategies running in COBC = false.
...Created/Modified at the request of a BMT member...
Allows you to plot a Stochastic or a MACD from a different time frame on your chart. Typical use is to view a larger time frame Stochastic/MACD on a smaller (faster) chart....
(EX: Plot a 5min Stochastic on a 1min chart).
Also allows you to plot a Stochastic from a different BarType on your chart.
You can plot a RangeNoGap on a Tick Chart, or plot a Minute Stochastic on Tick Charts or Range charts....or vice versa. You can plot any accepted bartype Stochastic on any other accepted bartype chart.
Accepts standard Ninja Minute, Second, Tick, Range, and Volume bars.....and.....accepts BMT RangeNoGap Bars.
(NOTE: For those who do not have the RangeNoGap bars installed, you may get a warning message in the Ninja Log informing you that "Custom2 could not be found". In this case Ninja simply uses the default value of the indicator. Ninja will work quite fine....but if you have occasion to check your logs, it will let you know that you don't have that bartype installed.
CAUTION: if you plot a Stochastic from a very small/fast chart, on an extremely large/slow chart...the code will still work, but the "visual" effect will most likely not be helpful. The Stochastic from the fast time frame will go up and down so much that it will look like a fine tooth comb.....
CAUTION#2: "Stairsteps"..(visual flat spots on the plots lines)....can occur when plotting big time frames over smaller ones. This is not an error....simply a visual 'flat spot' where several smaller bars complete while the one larger time frame bar is still processing. There are ways to code around this, by holding values and plotting after the fact, but in the interest of code simplicity, I did not do that here. The 'flat spots" cause no errors or problems.
April 30th, 2013
Size: 9.17 KB
Downloaded: 263 times
1413
devdas
Exported using NT Version 7.0.1000.12
This is a new implementation of the chandelier stop developed by Charles LeBeau. For a long trade the chandelier stop is calculated by subtracting a multiple of the average true range over the last N bars from the highest high (chandelier) since the inception of the trade. For a short trade the chandelier stop is calculated by adding a multiple of the average true range over the last N bars to the lowest low since the inception of the trade.
Instead of calculating the stop from the highest high and the lowest low, it is also possible to calculate it from the highest close and the lowest close.
The indicator version presented here uses the average true range calculated one bar ago. This is to avoid that the stop moves away when approached by a bar, it further acts against the distortion of the average true range when the indicator is set to COBC = false and reduces CPU load. The concept of using the ATR one bar ago was already introduced with the SuperTrend M11.
UseHighLow: The chandelier stops can be calculated from highest high/lowest low or from highest close/lowest close:
Reverse Intra-bar = false: This is the default setting of the indicator. A logical signal will be generated when the close of the signal bar has taken out the stop line. The position may be reversed at the open of the next bar. The paint bars will only change colors for the bar after the signal bar. The arrow will be also plotted for the entry bar.
Reverse Intra-bar = true: This is an unusual setting for the Chandelier Stop The signal will be generated with the first tick that has plotted on the other side of the stop line. In this case the position may be reversed intra-bar for the signal bar. Paintbars and arrows will already plot for the signal bar.
Accessing the trend: The indicator comes with a BoolSeries that holds the trend. This BoolSeries can be accessed by other indicators or automated strategies.
Paintbars: The indicator has an option to display the current trend via paintbars. Downclose bars are filled, upclose bars are hollow. For the upclose bars an opacity can be selected for better visibility.
Arrows: The indicator has an option to display trend changes via an arrow.
Sound alerts: The indicator will alert to trend reversals and potential trend reversals. A potential trend reversal occurs when price touches the stop line intra-bar prior to the confirmation by a close on the other side of the stop line. The sound files are included with the indicator install file. Please unzip and copy them into the program files (x86)\ NinjaTrader 7\ sounds directory or whatever directory is used by NinjaTrader to store the sound files.
this indicator will output an integer based on the following patterns:
UNKNOWN = -1;
BLACK_CANDLE = 0;
DOJI = 1;
DOJI_DRAGONFLY = 2;
DOJI_GRAVESTONE = 3;
DOJI_LONGSHADOW = 4;
HAMMER = 5;
HAMMER_INVERTED = 6;
LONG_LOWER = 7;
LONG_UPPER = 8;
MARUBOZU_BLACK = 9;
MARUBOZU_WHITE = 10;
TOP_BLACK = 11;
TOP_WHITE = 12;
WHITE_CANDLE = 13;
I found the code in Jeff Heaton's Encog samples. I am planning to use this for a neural network input.
I have been looking everywhere for something like this. It is probably easy to add more patterns to the code.
Version 1.0.0.1
March 29th, 2013
Size: 8.83 KB
Downloaded: 425 times
1388
weasel
The zip file containing documentation has the complete story on Bill Dreiss and the "Fractal Dimension" of measuring market volatility. There is a spread sheet where the intermediate values have been calculated as a check on the NinjaTrader Indicator accuracy. The Choppiness Index has a reference to the Welles Wilder True Range Indicator, which, from a programming point of view, is an interesting demonstration of accessing one indicator from another. This is my second indicator and the first version of this type. The zip file contains the NinjaTrader zip file plus a zip file of documentation for the indicator. This indicator will become an input to an Encog Neural Net, when I finish reading the books.
March 19th, 2013
Size: 1.49 MB
Downloaded: 531 times
1382
weasel
I need True Range for another indicator that I am creating. Comments are welcome if anyone finds an error. Nothing came up in search so I wrote the code. Version 1.0.0.0 (My first Ninjatrader code, I am a SQL Server DBA/C#developer by day)
March 17th, 2013
Size: 2.18 KB
Downloaded: 135 times
1380
weasel
Exported using NT Version 7.0.1000.12
Following a request by a member of this forum I have quickly implemented a version of the McClellan Oscillator and the (calibrated) McClellan Summation Index. The indicators can only be used with daily data. It is required that your daily data feed includes data for the net advancing/declining issues. The NinjaTrader symbol is ^ADD. The data is also available through the free Kinetick EOD data feed.
McClellan Oscillator: The McClellan Oscillator is a MACD calculated from the NYSE net advancing/declining issues. The oscillator is calculated from the 10% trend and the 5% trend, or otherwise put from an EMA(19) and an EMA(39).
McClellan Summation Index: The McClellan Summation Index is obtained by adding up the values of the McClellan Oscillator. It is neutral at the +1000 level. Historically the neutral level was shifted to + 1000 to make negative levels rare and noteworthy. The indicator attached follows the formula published in the June 1994 issue of Technical Analysis of Stocks & Commodities.
The indicator values that will be displayed depend on the input data. I have noticed that the data for advancing/declining issues used by McClellan Financial Publications slightly differs from the data supplied by Kinetick EOD. The indicator values are therefore similar, but not identical. For practical purposes the accuracy should be sufficient.
June 23rd, 2016 08:48 PM tradethetick Thanks for the indicator. I am not sure how to change EMA to SMA or the MACD settings in the indicator. Is there guide o
n how to set this up?
January 3rd, 2016 12:34 PM dnkhoward2 Thanks Fat Tails
February 26th, 2017 11:05 AM petrukwannabe thank you
February 3rd, 2016 10:11 PM angela d I'm unable to compile this cs in the indicator editor.
June 13th, 2015 02:46 PM mrvtibbs Converted .CS file to zip file and got error message that likely file is corrupt and cant be imported...and cannot find
central directory..any suggestions on how to proceed from here?
Thanks
VSand
August 30th, 2014 10:28 PM landau Nice work. But I don't understand how to import this into Ninja Script since it is not a zip file.
Carl
June 30th, 2014 10:17 PM zohar Best indicator. Indicator has continued this version but this indicator to me most comfortable. What's great about where
that rectangle around which are traded on the bid or ask. It is much more comfortable the second version where there ar
e only traded on the line. It is good when trading fast and want to see side traded my hands.
October 31st, 2018 10:54 PM mhamrin This is one of the finest indicators that I have found here...tinkered with it for a while...very robust. I'll be using
to make more money...
September 4th, 2016 07:52 AM ShaunG Much appreciated! I am a fellow student of Macks so I am quiet exited to see how this will enhance my trading from a vis
ual point of view. Many thanks again!
December 7th, 2013 05:45 PM awvcs
November 27th, 2013 03:59 AM aleks25
October 24th, 2013 03:08 AM Richie Z just coming into bare back riding, thanks for this wee indicator.