The SuperTrend indicator is an application of the concept of MAE (maximum adverse excursion), which was introduced by John Sweeney in the mid-nineties. It is a Stop-And-Reverse (SAR) indicator based on breakouts from a modified Keltner channel.
The SuperTrendU11 is an enhanced version of the original SuperTrend indicator that comes with the following modifications:
- You may select between 36 different moving averages for the baseline.
- The baseline is calculated one bar ago to avoid recalculating with each incoming tick.
- You may select from 4 different volatility measures - average true range, average range, residual mean absolute deviation and residual root mean square deviation
- Average true range and average range can be calculated from 30 different moving averages.
- All volatility measures are also calculated one bar ago.
In fact there is no point in moving a trailing stop towards the current price intra-bar. Therefore a trailing stop should always be calculated from the prior bar and not the last price.
When you import the install file to NinjaTrader, it will also install the following moving averages:
- Moving Median
- Moving Median TPO
- Moving Median VWTPO
- Moving Mean TPO
- Moving Mean VWTPO
- Adaptive Laguerre Filter
- ADXVMA
- Butterworth Filter
- Distant Coefficient Filter
- Double Weighted Moving Average (DWMA)
- Exponential Hull Moving Average (EHMA)
- Gaussian Filter
- Holt EMA
- Laguerre Filter
- Range Weighted Moving Average
- SuperSmoother
- Sine Weighted Moving Average
- Tillson T3
- Triple Weighted Moving Average (TWMA)
- ZerolagHATEMA
- ZerolagTEMA
It will also install debugged versions of MAX and MIN, as the in-built versions supplied with NT8 do not work correctly with Renko bars (RemoveLastBarSupported).
The SuperTrend U11 can be set to revert intra-bar or at the bar close. With default settings the stop line is only broken, when there is a bar close beyond the stop. The indicator further comes with paint bars and sound alerts.
The SuperTrend is a trend indicator, which can be used in various ways. It is best used as a trailing stop or as a trend filter. It can also be used as a stop-and-reverse indicator, but will only work as such in trending markets. Typically it will allow for profitable results while the market is trending and then give the money back in sideways markets.
Note: The SuperTrend U11 has the trend exposed as a public property. This property can be accessed programmatically. However, it cannot be currently accessed via the market analyzer. In order to access the Trend series via the market analyzer, a specific MarketAnalyzerColumn is required. The MarketAnalyzerColumn is not yet included with the install file, as it has led to freezes with NT 8.0.8.0. The bug has been confirmed by NinjaTrader developers and only fixed with the latest release NT 8.0.9.0. (issue #12054). The market analyzer column and sound files for the SuperTrend U11 will be available with a future update.
*) Unfortunately, the forum software always renames zip files to match the original file name. Therefore the zip file refers to a prior version of the amaSuperTrendU11. Be assured that the zip file contains the indicator version referenced in the headline.
The Sine Weighted Moving Average (SWMA) is a FIR filter that applies weights to each bar of the lookback period in the shape of the bulge in a sine curve from 0 to pi. As a consequence the middle prices of the lookback period have the greatest weight.
The sine weighted moving average is quite similar to a triangular moving average.
I have coded it because it comes as a default moving average with other software packages and has been requested by users.
The Range Weighted Moving Average (RWMA) is weighted moving average which uses the square of the range of the bar as weighting factor. The exact formula for the weighting factor has the bar range replaced with the number of tick levels covered by the bar.
Volatility is driven by volume and is approximately proportional to the square root of volume. Therefore it is possible to use the squared range as a proxy for volume. This is interesting when genuine volume figures are not available. This would be the case
- for FOREX data that comes without historical backfill for volume
- for instruments that are driven by other markets outside of the regular session
In these cases the VWMA may be distorted, whereas the RWMA will still return proper results.
Inspired by the "MovAvgExpRibbon" this is a similar study but with half the lines and clouds between the three zones. Each line is the double of the previous line. The colors are for a white background and would have to be changed in the code for a dark background.
I know I have seen an indicator like this before on BMT, but I was asked to create this by someone recently so I figured I would post it for the rest of BMT. This indicator is meant for not time based bar types such as Renko or Range. It will report the average time of the bars over the last period in Sec. It will also present the time of the current bar for comparison. If the Sec are less than the alarm limit, it will paint that bar Green and a gray strip into the primary chart.
Summary:
Red Trace: Average time in Bars/Sec over period
Light Blue: Time of current bar in seconds
Green/Gray Strip: Alarm limit reached
All previous versions of the ADXVMA are based on a dirty transcript from MetaTrader which has a number of bugs, inconsistencies or variables that are not being used. This is just an attempt to clean up the mess and come up with a proper version. These are the changes:
Initialization: Most versions are initialized with a value of 0 instead of Input[0], this usually creates false values for the first 100 or 200 bars.
Redundant variables: The transscripts from MetaTrader use 4 different variables for the period, although it is always the same period. A variable used for the shift in MetaTrader is carried around, although it always has the value 0.
Inefficient algorithms: The indicator mostly uses Wilder's smoothing for calculating exponential averages from the positive and negative Momentum. The smoothing constant k is calculated once and applied to the various steps required for smoothing. Searching the highest and lowest value for the last n+1 period was hidden in a complex algorithm.
Input Series: The prior versions can only be applied to the close, this version also accepts other input series, such as the high, low or the typical price of the selected instrument.
Trendfilter: The indicator can best be used as a trendfilter. The trend state, which can be positive, negative and neutral, is exposed via an IntSeries, which can then be accessed by other indicators and strategies. The trend can also be shown via a paintbar option.
Update June 11, 2012: Trendfilter and colors modified to avoid frequent trend changes.
Update July 3, 2012: Serialization of display options changed. This will make it simpler to call the indicator from other indicators or strategies.