NexusFi: Find Your Edge


Home Menu

 





DevStop indicator need to be fixed


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 17 posts (40 thanks)
    2. looks_two Pazan with 8 posts (2 thanks)
    3. looks_3 Zondor with 4 posts (8 thanks)
    4. looks_4 Big Mike with 3 posts (0 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.4 thanks per post
    2. looks_two Zondor with 2 thanks per post
    3. looks_3 Tarkus11 with 1 thanks per post
    4. looks_4 Pazan with 0.3 thanks per post
    1. trending_up 21,148 views
    2. thumb_up 51 thanks given
    3. group 5 followers
    1. forum 35 posts
    2. attach_file 13 attachments




 
Search this Thread

DevStop indicator need to be fixed

  #11 (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,102


Pazan View Post
I got the same thing.
I use a minute bars and not loaded for this over than 2 days, then it works.

Let me first read, what Cynthia Kase has written on the subject. I will come back later.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #12 (permalink)
 
Pazan's Avatar
 Pazan 
Asia
 
Experience: Intermediate
Platform: NinjaTrader, MarketDelta
Broker: Mirus Futures/Zen-Fire, TransAct/Infinity
Trading: 6E
Posts: 31 since Nov 2009
Thanks Given: 14
Thanks Received: 10


Fat Tails View Post
Just installed DevStop and tried to apply it to a chart. It crashed my whole machine by causing an out-of-memory exception.

This indicator is unusable and has serious bugs. It builds up data of several GBytes in the RAM until it explodes. This even happens when not connected.

Also the formulas are overcomplicated and do probably not reflect the original concept of Cynthia Kase.

So let us build this thing from scratch, it should not be difficult to do it. we can then compare it to the SuperTrend. I am sure that the indicator is not useless.

This is definitely a great idea, but I'm not a programmer

Started this thread Reply With Quote
  #13 (permalink)
 
Pazan's Avatar
 Pazan 
Asia
 
Experience: Intermediate
Platform: NinjaTrader, MarketDelta
Broker: Mirus Futures/Zen-Fire, TransAct/Infinity
Trading: 6E
Posts: 31 since Nov 2009
Thanks Given: 14
Thanks Received: 10



Fat Tails View Post
Let me first read, what Cynthia Kase has written on the subject. I will come back later.

That is what is in the web:

https://www.powerswings.com/wp-content/uploads/2007/10/KASE_devstop.pdf

Kase Dev Stop Expert

Kase DevStop by Cynthia Kase

Kase Dev Stops

Kase Dev Stop Long & Short

Started this thread Reply With Quote
  #14 (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,102



Thanks for the source, I saw lots of interesting things.

The original article from Cynthia Kase shows that she departed from the concept of the average true range as introduced by Welles Wilder. She probably used the Chandelier Stop, but was not satisfied with the way, how it treated volatility. So instead of using the average, she wanted to use a confidence interval based on the real distribution of volatility, taking into account the skew of that distribution.

As she did not want to be stopped out by two bar reversals, she used the average true range of a double bars. I have used an approximation for the 2-bar average true range several times by multiplying the standard average true range with the square root of 2. Cynthia Kase probably would not have liked this, as it assumes that the average true range is normally distributed, and this clearly does not hold. So let us first to try to the real thing without proxies.

The lines of the DevStop are based on 1, 2 and 3 standard deviations of volatility as measured by the n-period average true range of double-bars. The values 2 and 3 were corrected for the skew, which she determined empirically, and thus became 2.2 and 3.6

Coding this should be straight forward. The only problem that I can imagine is the use of the NinjaScript MAX and MIN methods which are used to determine the Trade High or Trade Low as Cynthia calls it. Also it should be avoided to perform all calculations with every incoming tick, when connected. Otherwise the indicator cannot be used in real time.

I will code it because the concept makes sense. You convinced me.

Reply With Quote
Thanked by:
  #15 (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,102

Please read article page 42 by Cynthia Kase. It is well explained.

https://ifta.org/public/files/journal/7fa436f975650d3230b9621b50c76711.pdf

This also means that she has published the formula several times, so there should be no copyright issues, if we rebuild the indicator. It is actually a good publicity for her.

Reply With Quote
Thanked by:
  #16 (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,102

Made a quick test, whether the 2-bar Average True Range can be approximated by using the 1- bar average true range.

The first indicator panel shows the two bar average true range divided by SQRT(2) plotted against the classical average true range. As you can see the error does not look large. The blue line is the ATR, the green line is the ATBTR.

The second indicator panel shows the percentage error which is made when calculating the ATBTR from the ATR. The results shows that the error can be significant. For smaller timeframes I have found values up to 25%.

So I will abandon the idea of using the ATR multiplied with the factor SQRT(2) as a proxy.

Attached Thumbnails
Click image for larger version

Name:	Approximartion BC 07-11 (5 Min) 13_05_2011.jpg
Views:	362
Size:	96.5 KB
ID:	38577   Click image for larger version

Name:	Approximation CL 06-11 (5 Min) 13_05_2011.jpg
Views:	287
Size:	99.4 KB
ID:	38578   Click image for larger version

Name:	Approximation SI 07-11 (5 Min) 13_05_2011.jpg
Views:	309
Size:	105.0 KB
ID:	38579   Click image for larger version

Name:	Approximation YM 06-11 (5 Min) 13_05_2011.jpg
Views:	332
Size:	95.9 KB
ID:	38580  
Reply With Quote
  #17 (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,102

Have coded a first version of the indicator. Please do expect bugs and further changes.

If you compare it to the DevStop2 indicator, which I downloaded from the NinjaTrader forum, the two indicators do not have much in common.

I am still not happy with the result and will need to check some of the assumptions. In particular the trend filter needs to be reworked. Also I am not sure whether the calculation of volatility and standard deviation are correct.

Will further check into this. Please participate in testing, any comments appreciated.

Attached Thumbnails
Click image for larger version

Name:	DevStop2.jpg
Views:	769
Size:	91.2 KB
ID:	38600   Click image for larger version

Name:	anaDevStopX1.jpg
Views:	750
Size:	101.6 KB
ID:	38601  
Attached Files
Elite Membership required to download: DevStopX1.zip
Reply With Quote
  #18 (permalink)
 
Pazan's Avatar
 Pazan 
Asia
 
Experience: Intermediate
Platform: NinjaTrader, MarketDelta
Broker: Mirus Futures/Zen-Fire, TransAct/Infinity
Trading: 6E
Posts: 31 since Nov 2009
Thanks Given: 14
Thanks Received: 10

Good job !

You used to compare the second edition from ninja forum, although on the ninja forum there is the first edition, which visually appears to be correct. In the second edition throw most of the code and used to calculate the EMA. In general, at first glance it is clear that the standard deviations there are calculated not according to the concept, and lose their meaning.

Your version is very similar to the first edition, which can be seen on the screen shots.

I used standart setup - 10,21,30

Attached Thumbnails
Click image for larger version

Name:	6E 06-11 (5 Min)  13_05_2011-anadevstopX1.jpg
Views:	461
Size:	94.8 KB
ID:	38615   Click image for larger version

Name:	6E 06-11 (5 Min)  13_05_2011-devstop.jpg
Views:	380
Size:	107.2 KB
ID:	38616  
Started this thread Reply With Quote
  #19 (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,102


Pazan View Post
Good job !

You used to compare the second edition from ninja forum, although on the ninja forum there is the first edition, which visually appears to be correct. In the second edition throw most of the code and used to calculate the EMA. In general, at first glance it is clear that the standard deviations there are calculated not according to the concept, and lose their meaning.

Your version is very similar to the first edition, which can be seen on the screen shots.

I used standart setup - 10,21,30

The first version from the NinjaTrader forum crashed my PC, and it is really bad coding, so I do not want to use that anymore. The second version does not calculate the standard version correctly, as you noticed.


Indicator built by using the articles from Cynthia Kase

I have tried to build the indicator directly by using information from the articles of Cynthia Kase, and to understand how she came to develop the concept. These are basic ideas that led to the development of the indicator

-> she wanted to develop a volatility stop, starting point was the Chandelier stop, which is based on Wilder's ATR
-> from her trading experience she wanted to avoid to get stopped out by two bar reversals, hence the use of the two-bar average true range instead of the average true range
-> she wanted to take into account two statistical measures for determining confidence intervals: the mean and the standard deviation of the two bar volatility average over a period of n bars

I simply applied these ideas without looking at the corrupted code of the other indicator.


Weak Points

Now these are the weak points of my indicator, with which I still have to deal:

-> I used the exponential average of the two-bar average true range. Maybe I should have used a simple moving average, as this would reflect the confidence intervals that are obtained by adding the multiples of the standard deviation
-> I really do not like that trend filter based on moving averages, I would rather prefer a trendfilter based on volatility, as I have used with the SuperTrend indicator

Mathematically the ideas of Cynthia Kase are absolutely correct. However, this does not mean that the concept beats a triple SuperTrend indicator, which is simply based on the ATR and multiples of the ATR without using the standard deviation. I guess, we need to do some backtesting.

Reply With Quote
Thanked by:
  #20 (permalink)
 
Zondor's Avatar
 Zondor 
Portland Oregon, United States
 
Experience: Beginner
Platform: NinjatraderŽ
Broker: CQG, Kinetick
Trading: Gameplay KlownbineŽ Trading of Globex
Posts: 1,333 since Jul 2009
Thanks Given: 1,246
Thanks Received: 2,731


Consider the ADXVMA as a candidate for the trend filter. I think that the the stepping of the ADXVMA takes volatility into account, so might be synergistic with what we are trying to do here.

Attached screenshot shows ADXVMA superimposed on plot of current version of anaDevStop.

The ADXVMA usually flattens out and changes to ColorNeutral before a reversal.

Attached Thumbnails
Click image for larger version

Name:	CL 06-11 (200 Tick)  5_13_2011 with DevStop.jpg
Views:	650
Size:	111.0 KB
ID:	38646  
Attached Files
Elite Membership required to download: ADXVMA_sharky_paint11.cs
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on October 28, 2011


© 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