Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Let me first list the differences between the TSSuperTrend and the anaSuperTrendU11. I am referring to the indicator versions for NinjaTrader 7.
(1) The TSSuperTrend calculates the stop line by using data from the current bar. This means that the stop is being recalculated with every single tick, if you set the indicator to CalculateOnBarClose = false. As the SuperTrend is a trailing stop it can only move towards price, but not move away from price. In my understanding it does not make sense that a trailing stop moves towards price intra-bar, but it should be price that hits the stop and not otherwise. That said the SuperTrend will only move towards price intra-bar, when price moves away from the stop. This shows that all the calculations intra-bar are completely redundant. The anaSuperTrendU11 does not perform those redundant calculations but the stop is calculated from the moving average and the average true range one bar ago. This explains why it is named U11.
(2) The anaSuperTrendU11 has an option to trigger reversals intra-bar. This option is deactivated by default. Even when it is used with the setting CalculateOnBarClose = false, it will not trigger intra-bar, but at the bar close - unless the intra-bar option is selected.
(3) When the stop is hit - close beyond the line - the anaSuperTrendU11 still shows the stop line. NinjaTrader identifies the close beyond the line when it completes the bar, which is the case with the first tick of the consecutive bar. Therefore anaSuperTrendU11 shows the new stop for the next bar only. It is important here to understand the difference between the signal bar (breach of the stop) and the entry bar (bar after the signal bar). TSSuperTrend already draws a new stop on the other side of the price action for the signal bar. This is a fake stop, because it can only be calculated once the bar is complete. The stop even becomes obsolete, before it is possible to enter a new position with the first tick of the entry bar.
(4) The calculation of the initial stop done by the anaSuperTrendU11 is slightly different then the calculation of the initial stop performed by the TSSuperTrend.
Approximation of the TSSuperTrend with the anaSuperTrendU11 (NinjaTrader 7)
Please find below a chart that shows how you may obtain similar results with the anaSuperTrendU11 when compared to the TSSuperTrend. All that is needed is to adjust the settings.
Settings TSSupertrend
Supertrend mode : ATR
Period : 14
Multiplier : 3.2
Moving Average Type : HMA
Smooth : 14
The only difficulty here is that the original ATR uses Wilder's average for smoothing. Wilder's MA is an exponential moving average that uses a smoothing constant of k=1/N, while the EMA is an exponential moving average that uses a smoothing constant of k = 2/(n+1), where N is the lookback period of the moving average. The TSSuperTrend uses a Wilder(14) with a smoothing constant of k = 1/14. This is identical with an EMA(27) with a smoothing constant of k = 2/(27+1).
I have now added the two indicators to the same chart. As you will notice the anaSuperTrendU11 lags by one bar compared to the TSSuperTrend. This is because the TSSuperTrend is recalculated intra-bar, while the anaSuperTrendU11 uses the prior bar.
However, this lag only occurs when price (the bar close) moves away from the stop. In case that price approaches the stop there is no lag at all! Please scroll through a chart and you will notice that the stop is breached by exactly the same bar for both indicators.
The only difference here is that the TSSupertrend already draws a fake stop for the signal bar. This stop is used as a maximum (short stop) or minimum (long stop) for the stop calculation for the next bar, which explains that the anaSuperTrendU11 sometimes draws a wider initial stop than the TSSuperTrend.
Approximation of the TSSuperTrend with the amaSuperTrendU11 (NinjaTrader 8)
The amaSuperTrendU11 for NinjaTrader 8 also allows for selecting Wilder's Average, so it is not necessary to make the conversion of the indicator period from 14 to 27.
Please select the following settings for the amaSuperTrendU11:
Hi @FatTails, I'm a paid member of your site, great library you've got.
There is a similar indicator in Thinkorswim to SuperTrend, which Eric Purdy of Thinkscripter/Simplerindicators.com coded (but I can't find an official page for anymore on those sites) - it's called 'Multistops' and I'm trying to match the parameters in his script to yours - could you review these and comment on what looks to be the most likely for match for Baseline period, Offset period, and Offset multiplier in SuperTrend, to MS's 'VolatilityCoefficient', 'VolatilityStopLookBackLength', 'FibStopRatio', and 'FibStopLookBackLength'?
Sorry, I should have presented it better - the FibStops are *only* relevant when the stop calculation method is actually set to 'Fibonacci' - in the screenshot which I linked to earlier, the method is 'Wilders Average' like Supertrend.
The stops are not as visible in the chart example which I posted, but they are there. I just checked with the author, the stop calculations are a style of "basic ATR trailing stop", and that the FibStop is his "own idea and uses a fib ratio of the prior swing to set the stop."