NexusFi: Find Your Edge


Home Menu

 





anaSuperTrend vs. anaSuperTrendM11


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 28 posts (129 thanks)
    2. looks_two birdoggg with 10 posts (1 thanks)
    3. looks_3 Big Mike with 6 posts (8 thanks)
    4. looks_4 marker with 5 posts (10 thanks)
      Best Posters
    1. looks_one Fat Tails with 4.6 thanks per post
    2. looks_two marker with 2 thanks per post
    3. looks_3 bullsandthebears with 1.5 thanks per post
    4. looks_4 Big Mike with 1.3 thanks per post
    1. trending_up 33,293 views
    2. thumb_up 156 thanks given
    3. group 27 followers
    1. forum 73 posts
    2. attach_file 9 attachments




 
Search this Thread

anaSuperTrend vs. anaSuperTrendM11

  #51 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


birdoggg View Post
Hey Fat Tails...could you give some best practices when updating your indicators. I went to update and received a lot of errors and had to re-install NT (probably my fault and not your indicators though)...smile...

The initial installation went perfectly...it was when I went to install the updated version were there was issues...

Thanks FT...

Greg

I had changed the implementation of the ADXVMA about a year ago. This had an impact on various indicators.

In the download section there was an instruction in red letters:

"For the last three updates you also need to update Bollinger Universal & Keltner Universal, if you have them installed. Please remove old versions of those indicators first."

Did you read and follow this instruction?

In case that you receive errors, you only need to delete the indicator files that cause the errors. There is no need to reinstall NinjaTrader.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
What broker to use for trading palladium futures
Commodities
Trade idea based off three indicators.
Traders Hideout
Quantum physics & Trading dynamics
The Elite Circle
 
  #52 (permalink)
 birdoggg 
Charlotte, NC/USA
 
Experience: Advanced
Platform: NT, TOS
Broker: Mirus/ZF, AMP/CQG, TOS, MBT
Trading: Futures, Stocks, Bonds, Forex
Posts: 37 since May 2011
Thanks Given: 56
Thanks Received: 9

Hey Fatails...

I did, but I did not see "Bollinger Universal" or "Keltner Universal" in my list so I disregarded. However, my errors came up (just so you know what happened) for more than 2 dozen indicators and strategies associated with them too. So, after several hours of trying to debug I just reinstalled. I now have them all on 1 machine good to go, but I have to put them on the other as well. Am I missing something or is there another name for the other indicators in red possibly? I only see the regular "Bollinger" and "Keltner Channel" that comes stock in NT....don't see the others at all in the list...ideas before I try it on the other machine? I am probably mis-interpreting what you are referring too (probably a obvious thing if I am and you reform my thinking on it...hehehehe)?




Fat Tails View Post
I had changed the implementation of the ADXVMA about a year ago. This had an impact on various indicators.

In the download section there was an instruction in red letters:

"For the last three updates you also need to update Bollinger Universal & Keltner Universal, if you have them installed. Please remove old versions of those indicators first."

Did you read and follow this instruction?

In case that you receive errors, you only need to delete the indicator files that cause the errors. There is no need to reinstall NinjaTrader.


Reply With Quote
  #53 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



birdoggg View Post
Hey Fatails...

I did, but I did not see "Bollinger Universal" or "Keltner Universal" in my list so I disregarded. However, my errors came up (just so you know what happened) for more than 2 dozen indicators and strategies associated with them too. So, after several hours of trying to debug I just reinstalled. I now have them all on 1 machine good to go, but I have to put them on the other as well. Am I missing something or is there another name for the other indicators in red possibly? I only see the regular "Bollinger" and "Keltner Channel" that comes stock in NT....don't see the others at all in the list...ideas before I try it on the other machine? I am probably mis-interpreting what you are referring too (probably a obvious thing if I am and you reform my thinking on it...hehehehe)?


@birdoggg: All my indicators have the prefix "ana", this includes Bollinger and Keltner Channels. If you need some help cleaning your machine, you can contact me via private message, and we can make a Skype appointment.

Reply With Quote
  #54 (permalink)
 birdoggg 
Charlotte, NC/USA
 
Experience: Advanced
Platform: NT, TOS
Broker: Mirus/ZF, AMP/CQG, TOS, MBT
Trading: Futures, Stocks, Bonds, Forex
Posts: 37 since May 2011
Thanks Given: 56
Thanks Received: 9

Update...Fat Tails...I appreciate the offer and will keep it in mind...

I did get it reinstalled on the 2nd machine with no problem...

Also, I was able to fix the serialization issue too.

So, it looks like clear skies at the present time...smile.

Will be in touch...

Greg


Fat Tails View Post
@birdoggg: All my indicators have the prefix "ana", this includes Bollinger and Keltner Channels. If you need some help cleaning your machine, you can contact me via private message, and we can make a Skype appointment.


Reply With Quote
Thanked by:
  #55 (permalink)
 birdoggg 
Charlotte, NC/USA
 
Experience: Advanced
Platform: NT, TOS
Broker: Mirus/ZF, AMP/CQG, TOS, MBT
Trading: Futures, Stocks, Bonds, Forex
Posts: 37 since May 2011
Thanks Given: 56
Thanks Received: 9

Hi Fat Tails:

Regarding COBC False or True for the general strategy (near the end of the quote below). Since COBC False can not be backtested going back many months or potentially years (but only can be tested via Market Replay), do you know of a good way to backtest using some kind of workaround if we choose COBC False for a strategy using Supertrend U11 (or M11)?

Of course, I would like to have it execute signals real time (or very very close to it). What I was thinking about your quote below was that if one is using longer time frames like a 3 min, 5 min, 15 min, hourly, daily, etc then it would lag quite a bit on COBC True. However, if one was using COBC
True on a 1 min, 10 range, or shorter (or similar) it would be pretty close to real time right (cause of the shorter time frame bars)? Therefore, if one found a good strategy on a shorter time frame which could also quickly be back tested on those shorter time frames then it would be pretty close to real time and a strategy could be confirmed viable both with back testing and Market Replay together (instead of just only COBC False using Market Replay). I find using Market Replay pretty slow and can only do a few weeks or so at best)?

Just some thoughts...

Please let me know yours when you get a moment if you would (really would like a way to backtest a long way back using COBC False if you know a method of how as well)?

Greg



Fat Tails View Post
Your observations are exact. Let me try to explain the differences.


Technical Analysis was originally performed by chartists on daily charts


Most of the indicators were not designed for day trading, but were originally applied to a printed chart, once the market had closed. So the chartist would perform the calculation of the formula once and write down the result. The best book that I have seen to show how this was done is Welles Wilder's "New Concepts in Technical Trading Systems".

Why it is ridiculous to use these indicators on tick-by-tick real-time data

Let us take the example of a Bollinger Band. It uses the standard deviation over a lookback period, which is a relatively complex calculation. For these calculations it includes the current value of price. So with every incoming tick you need to recalculate the standard deviation. What you get in return is a band that moves away from price, when price approaches it. So if you check price against that Bollinger Band, you essentially get a feedback loop with negative feedback.

Conclusion: Recalculating Bollinger Bands tick by tick causes a high CPU load which creates negative feedback. In short this is mathematical nonsense.

How to implement indicators correctly?

For use with real-time, you want a low impact indicator, which serves the purpose. For the Bollinger Bands it would be good enough to replace the standard deviation StdDev(20)[0] with the StdDev(19)[1] and calculate this only once when the first tick of the new bar is detected. The chart below shows the original Bollinger Band (orange) and the modified Bollinger Band (red). Teh difference is that during a news release the red bands will not trigger a few thousand calculations of the standard deviation and freeze your trading software.

The worst coding example that I have seen is the VWAP, as is calculates the standard deviation back to the beginning of the session with each incoming tick. Freeze guranteed, if you use it CalculateOnBarClose = false.

Now what about the SuperTrend M11?

The SuperTrend uses the median and the average true range to calculate the stop bands. As seen for the Bollinger Bands it is neither necessary nor helpful to include the current value of price to calculate the bands. Therefore the stop value is calculated from the median of the last period anaMedian(MedianPeriod)[1] and the true range of the last period ATR(ATRPeriod)[1]. This makes it robust and possible to use it in CalculateOnBarClose = false mode,which is necessary if you want to get the alerts in real-time. The SuperTrend M1 only had the ATR calculated one bar back, but still calculated the median with each incoming tick.

So it is just a starting point to replace all the nonsense indicators with indicators that are adapted for use with real-time data. The difference between the two indicators is negligible. What you have to do though, if you compare the SuperTrend M11 to the SuperTrend M1: You need to reduce the Median period of the Supertrend M11 by 1 to come as close as possible.


Reply With Quote
  #56 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


birdoggg View Post
Hi Fat Tails:

Regarding COBC False or True for the general strategy (near the end of the quote below). Since COBC False can not be backtested going back many months or potentially years (but only can be tested via Market Replay), do you know of a good way to backtest using some kind of workaround if we choose COBC False for a strategy using Supertrend U11 (or M11)?

Of course, I would like to have it execute signals real time (or very very close to it). What I was thinking about your quote below was that if one is using longer time frames like a 3 min, 5 min, 15 min, hourly, daily, etc then it would lag quite a bit on COBC True. However, if one was using COBC
True on a 1 min, 10 range, or shorter (or similar) it would be pretty close to real time right (cause of the shorter time frame bars)? Therefore, if one found a good strategy on a shorter time frame which could also quickly be back tested on those shorter time frames then it would be pretty close to real time and a strategy could be confirmed viable both with back testing and Market Replay together (instead of just only COBC False using Market Replay). I find using Market Replay pretty slow and can only do a few weeks or so at best)?

Just some thoughts...

Please let me know yours when you get a moment if you would (really would like a way to backtest a long way back using COBC False if you know a method of how as well)?

Greg

Hi Greg,

you cannot backtest any strategies with COBC = false. The reason is pretty simple. The chart used for the backtest has no intra-bar information, there is just an open, high, low and close available to be exploited.

The only workaround for doing backtest with COBC = false, would be to add a secondary bar series of 1-tick bars to your strategy and run that bar series at COBC = true.

Also the SuperTrend is not meant to be used with COBC = false. In its orthodox definition the SuperTrend - this includes all SuperTrend indicators available on the forum - will only trigger a trend change, when bar closes beyond the stop line. This can be perfectly simulated in COBC = true mode.

I have added an option for the indicator to allow for an intra-bar change of the trend. This can also be simulated with COBC = true. The stop line of the SuperTrendU11 and the SuperTrendM11 does not - this time unlike other SuperTrend indicators - change intra-bar, but is known when the prior bar has closed. This allows you to set a stop order at a fixed price at the exchange, which takes you out of the position and reenters an opposite position intra-bar, provided that your filter criteria are met.

To summarize: You cannot backtest any strategy with COBC = false. I cannot a find a single reason why I would let the strategy run in COBC = false. Why not set it to COBC = true?

Reply With Quote
Thanked by:
  #57 (permalink)
 birdoggg 
Charlotte, NC/USA
 
Experience: Advanced
Platform: NT, TOS
Broker: Mirus/ZF, AMP/CQG, TOS, MBT
Trading: Futures, Stocks, Bonds, Forex
Posts: 37 since May 2011
Thanks Given: 56
Thanks Received: 9

Fat Tails:

That is good to hear from you on the backtesting with COBC False and your opinion on it. Thanks! Yea, I have been testing the intrabar feature on the U11.

Thanks FT!

Greg


Fat Tails View Post
Hi Greg,

you cannot backtest any strategies with COBC = false. The reason is pretty simple. The chart used for the backtest has no intra-bar information, there is just an open, high, low and close available to be exploited.

The only workaround for doing backtest with COBC = false, would be to add a secondary bar series of 1-tick bars to your strategy and run that bar series at COBC = true.

Also the SuperTrend is not meant to be used with COBC = false. In its orthodox definition the SuperTrend - this includes all SuperTrend indicators available on the forum - will only trigger a trend change, when bar closes beyond the stop line. This can be perfectly simulated in COBC = true mode.

I have added an option for the indicator to allow for an intra-bar change of the trend. This can also be simulated with COBC = true. The stop line of the SuperTrendU11 and the SuperTrendM11 does not - this time unlike other SuperTrend indicators - change intra-bar, but is known when the prior bar has closed. This allows you to set a stop order at a fixed price at the exchange, which takes you out of the position and reenters an opposite position intra-bar, provided that your filter criteria are met.

To summarize: You cannot backtest any strategy with COBC = false. I cannot a find a single reason why I would let the strategy run in COBC = false. Why not set it to COBC = true?


Reply With Quote
  #58 (permalink)
 birdoggg 
Charlotte, NC/USA
 
Experience: Advanced
Platform: NT, TOS
Broker: Mirus/ZF, AMP/CQG, TOS, MBT
Trading: Futures, Stocks, Bonds, Forex
Posts: 37 since May 2011
Thanks Given: 56
Thanks Received: 9

Fat Tails:

Which & What Time Filter and Volitility Filter do you like to use with SuperTrend U11?

Reply With Quote
  #59 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


birdoggg View Post
Fat Tails:

Which & What Time Filter and Volitility Filter do you like to use with SuperTrend U11?

The Supertrend is a volatility filter itself, so it does not require a second volatility filter. The time filter can be used not to enter trades during specific times of the day, such as the Asian box or the noon session.

Reply With Quote
  #60 (permalink)
 tst1 
Magadan Russia
 
Posts: 79 since Nov 2010



birdoggg View Post
Fat Tails:

Which & What Time Filter and Volitility Filter do you like to use with SuperTrend U11?




The intra-bar feature,you`ve been testing!

Damn...The unconsciousness is a powerful thing!!!

Reply With Quote




Last Updated on December 8, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts