Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > NinjaTrader > NinjaTrader Programming


Notices
     

anaSuperTrend vs. anaSuperTrendM11
Started:November 5th, 2011 (08:00 PM) by marker Views / Replies:10,883 / 67
Last Reply:April 13th, 2014 (04:28 PM) Attachments:9

Welcome to Big Mike's Trading Forum.

Welcome, Guest!

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

BMT is 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
     

Reply
 9  
 
Thread Tools Search this Thread

anaSuperTrend vs. anaSuperTrendM11

Old November 5th, 2011, 08:00 PM   #1 (permalink)
Elite Member
Las Vegas, NV
 
Trading Experience: Intermediate
Platform: NinjaTrader, TOS
Broker/Data: Optimus/Rithmic, AMP/CQG, ThinkOrSwim
Favorite Instrument: TF
 
Posts: 99 since Jun 2010
Thanks: 109 given, 97 received

anaSuperTrend vs. anaSuperTrendM11

Playing around with anaSuperTrend and some SuperTrend strategies here in this forum, I have noticed that some of these anaSuperTrend versions are a bit different in the plotting and arrow trend signaling.

Would someone be able to tell me the differences between the anaSuperTrend and the anaSuperTrendM11 in reference to the calculations behind it?

I know that the M11 version allows user to change the stop-line and stop dots appearances, but when using the same parameter settings, as you can see from the attached pic, the stop-lines are plotted differently and thereby on a few instances, there can be a arrow trend change on one version, while the other version stays with the current trend.

Much appreciated for any insight on this...

Attached Thumbnails
anaSuperTrend vs. anaSuperTrendM11-anasupertrends_001.png  
Reply With Quote
     

Old November 5th, 2011, 08:00 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 November 5th, 2011, 09:56 PM   #3 (permalink)
Market Wizard
Honolulu, Hawaii
 
Trading Experience: Intermediate
Platform: NinjaTrader
Broker/Data: ATC/TT, AMP/Zen-Fire, AMP/CQG
Favorite Instrument: TF
 
bluemele's Avatar
 
Posts: 2,547 since Jun 2010
Thanks: 3,806 given, 2,748 received


I think only @Fat Tails can answer that one.

Reply With Quote
     
The following 2 users say Thank You to bluemele for this post:
     

Old November 6th, 2011, 05:35 AM   #4 (permalink)
Market Wizard
Berlin, Europe
 
Trading Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Instrument: Keyboard
 
Fat Tails's Avatar
 
Posts: 8,377 since Mar 2010
Thanks: 3,940 given, 19,577 received
Forum Reputation: Legendary


marker View Post
Playing around with anaSuperTrend and some SuperTrend strategies here in this forum, I have noticed that some of these anaSuperTrend versions are a bit different in the plotting and arrow trend signaling.

Would someone be able to tell me the differences between the anaSuperTrend and the anaSuperTrendM11 in reference to the calculations behind it?

I know that the M11 version allows user to change the stop-line and stop dots appearances, but when using the same parameter settings, as you can see from the attached pic, the stop-lines are plotted differently and thereby on a few instances, there can be a arrow trend change on one version, while the other version stays with the current trend.

Much appreciated for any insight on this...

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.

Attached Thumbnails
anaSuperTrend vs. anaSuperTrendM11-es-12-11-15-min-04_11_2011.jpg  
Reply With Quote
     

Old November 6th, 2011, 09:01 AM   #5 (permalink)
Elite Member
Las Vegas, NV
 
Trading Experience: Intermediate
Platform: NinjaTrader, TOS
Broker/Data: Optimus/Rithmic, AMP/CQG, ThinkOrSwim
Favorite Instrument: TF
 
Posts: 99 since Jun 2010
Thanks: 109 given, 97 received

Current BMT User Poll

Should sim traders that pretend to trade cash be allowed on BMT?

 
FatTails,

WOW, Outstanding answer.
Thank you kindly for your time in clarifying how these indicators are calculated and the HISTORY behind.

This is another example that once we are thoroughly educated in a particular "tool," we can make an educated and mathematical decision on whether it would beneficial to our "Lives.".

Again, BIG THANKS Fat Tails!



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
     
The following user says Thank You to marker for this post:
     

Old December 2nd, 2011, 03:00 PM   #6 (permalink)
Elite Member
Romania, Targu-Mures
 
Trading Experience: Beginner
Platform: Ninja Trader
Favorite Instrument: 6E, M6E
 
Colin F's Avatar
 
Posts: 68 since Dec 2010
Thanks: 54 given, 43 received

I have few questions for you guys, especially for @Fat Tails, because he is the creator of the indicator.

I currently use (actually just discovered it this morning) anaSuperTrendMod, where could i find anaSuperTrendM11 ?
What is the meaning of the gray and red line from anaSuperTrendMod, and how should they be used?
Is there a possibility to disable the plot for them?

Thank you...

Colin

Last edited by Colin F; December 2nd, 2011 at 03:26 PM.
Reply With Quote
     

Old December 2nd, 2011, 04:20 PM   #7 (permalink)
o8o|o0o|o8o
Haleakala, HI
 
Trading Experience: Advanced
Platform: Ninja
Broker/Data: Amp/CQG
Favorite Instrument: 6e
 
dakine's Avatar
 
Posts: 158 since Dec 2009
Thanks: 309 given, 87 received

@Fat Tails,

I found the answers.

Thanks.


Last edited by dakine; December 2nd, 2011 at 04:34 PM.
Reply With Quote
     

Old December 2nd, 2011, 04:22 PM   #8 (permalink)
Elite Member
Las Vegas, NV
 
Trading Experience: Intermediate
Platform: NinjaTrader, TOS
Broker/Data: Optimus/Rithmic, AMP/CQG, ThinkOrSwim
Favorite Instrument: TF
 
Posts: 99 since Jun 2010
Thanks: 109 given, 97 received

Fat Tails already answered in the previous few posts


dakine View Post
@Fat Tails,

I am a little confused. I am using anaSuperTrendM1 from the downloads section. Does anaSuperTrendM11 differ from this version? If they differ which is the latest and greatest?

Thanks


Reply With Quote
     
The following user says Thank You to marker for this post:
     

Old December 2nd, 2011, 04:26 PM   #9 (permalink)
o8o|o0o|o8o
Haleakala, HI
 
Trading Experience: Advanced
Platform: Ninja
Broker/Data: Amp/CQG
Favorite Instrument: 6e
 
dakine's Avatar
 
Posts: 158 since Dec 2009
Thanks: 309 given, 87 received

lol been a long day thanks.

Thanks

Reply With Quote
     

Old December 2nd, 2011, 04:30 PM   #10 (permalink)
Elite Member
Las Vegas, NV
 
Trading Experience: Intermediate
Platform: NinjaTrader, TOS
Broker/Data: Optimus/Rithmic, AMP/CQG, ThinkOrSwim
Favorite Instrument: TF
 
Posts: 99 since Jun 2010
Thanks: 109 given, 97 received


Here ya go:

https://www.bigmiketrading.com/elite-circle/8168-volatility-based-trading-7.html#post143876



dakine View Post
lol been a long day thanks. now i just need to find out where to get m11.

Thanks


Reply With Quote
     
The following 4 users say Thank You to marker for this post:
     


All times are GMT -4. The time now is 01:30 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 by Big Mike Trading. 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 2014-04-18 in 0.27 seconds with 18 queries on phoenix via your IP 67.202.56.112