Kase Dev Stop + Dev Stops 4.5/6.0 using SAR to Flip Devs
Forums › ProRealTime English forum › ProBuilder support › Kase Dev Stop + Dev Stops 4.5/6.0 using SAR to Flip Devs
- This topic has 4 replies, 3 voices, and was last updated 3 years ago by Bard.
-
-
07/07/2018 at 8:39 PM #75547
Hi @nicolas @juanj, Thanks very much for your help, it’s much appreciated.
I’ve moved the topic on Kase Dev Stops discussion here.
I was wondering if you could post your SAR code here Juanj?, (using the insert PRT code button above). I couldn’t get it to load.It’d be interesting to compare your SAR version with this one I modified: Screenshot shows the Dev Stops with Devs 4.5 and 6.0 added using a MVG on the left (21/34 period Kase also uses) and the SAR version on the right.
The Period should be set to 30 to make it statistically significant. Depending on which MVG’s you use it will hit Devs earlier or later. Setting period to 20 will mean price will hit the Devs earlier.
I’ve also built the Dev Stops to include Dev Stops 4.5, and 6.0 that Kase uses. Which method of flipping the Stops isn’t relevant, the Stops weren’t designed as a system: There is the KPO an KCD for that – which I have reposted for coding help.
Just to confirm this code is the double true range Kase used?:
12345678910111213141516171819202122mmax=max(max(high,high[1]),pricc[2])mmin=min(min(low,low[1]),pricc[2])rrange=mmax-mminavg=rrangefor n=1 to inpDesPeriod-1 doavg=(avg+rrange[n])nextavg=avg/n//Double True RangeDTR = max(max(High - Low[2], abs(High - Close[2])),max(abs(Low - Close[2]),(abs(Low - Close[2]))))(its the pricc = customclose, I’m not familiar with).Re: Long index prices hitting Dev 3 and a long trend not reversing — i.e. price continues to go up yet Dev 3 is an exit Stop to get out,… well, apart from putting the period to 30, I suspect it is the long bias of Indexes that will mean that when the price hits Dev Stop 3 it can reverse back up to new highs within a long trend.
This is particularly true during a strong trend (check the ADX indicator). The odds are against your position:
The Dev 3 is generally a 99.75% “point of no return” Stop as was tested and determined by Kase & Co (using Bell Curve distributions + Standard Deviation skew studies on masses of data).
I seem to recall that the probability “Dev Stop Follow Through” studies they did – that I’ve seen and posted in the Kase PO/ CD and Permissions forum post – were never just classified to particular assets, like non mean reverting indexes or mean reverting currencies etc, but to all asset classes. Some of their studies refer to 13 years of data tested per instrument but the results in their “Dev Stop Follow Through” tables always generalised results for all asset classes. I think they will work better on mean reverting assets like currencies or cyclical oil markets. (Kase was an energy trader and worked for Aramco consulting as a Director of Technical Analysis and Director of Risk Management).
Cynthia A. Kase, CMT: “It was found that of the 157,206 bars of data, the average stop was hit a total of 14,582 times, or about nine percent of the time, approximately once every 11 bars. Once the average stop was hit, the follow through to the remaining stops was evaluated.” Source: “How Well Do Traditional Momentum Indicators Work?”
This is a very interesting video of Kase talking about the Dev Stops and KRev risk amounts:
https://www.youtube.com/watch?time_continue=1&v=2h6zldXeTW0
I have no excuse now, nor does any other trader reading this, for not knowing what their true financial risk is when entering any market, lol. — particularly now as there are the Kase Reversal Amounts in the indicator library.
Cheers
BardKase Dev Stop + Dev Stops 4.5/6.0 using SAR to Flip Devs123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108//Settingsn=30p1=1.0p2=2.2p3=3.6p4=4.5p5=6.0difference=0Hg=highest[2](high)Lw=lowest[2](low)DTR=max(max(Hg-Lw,abs(Hg-close[2])),abs(Lw-close[2]))aDTR=average[n](DTR)for i=0 to n-1 dodifference=difference+square(DTR[i]-aDTR)nextdifference=difference/nsdev=sqrt(difference)dev0=close-aDTRdev1=close-aDTR-p1*sdevdev2=close-aDTR-p2*sdevdev3=close-aDTR-p3*sdevdev4=close-aDTR-p4*sdevdev5=close-aDTR-p5*sdevif dev0<dev0[1] and close>dev5[1] thendev0=dev0[1]endifif dev1<dev1[1] and close>dev5[1] thendev1=dev1[1]endifif dev2<dev2[1] and close>dev5[1] thendev2=dev2[1]endifif dev3<dev3[1] and close>dev5[1] thendev3=dev3[1]endifif dev4<dev4[1] and close>dev5[1] thendev4=dev4[1]endifif dev5<dev5[1] and close>dev5[1] thendev5=dev5[1]endifdev6=close+aDTRdev7=close+aDTR+p1*sdevdev8=close+aDTR+p2*sdevdev9=close+aDTR+p3*sdevdev10=close+aDTR+p4*sdevdev11=close+aDTR+p5*sdevif dev6>dev6[1] and close<dev11[1] thendev6=dev6[1]endifif dev7>dev7[1] and close<dev11[1] thendev7=dev7[1]endifif dev8>dev8[1] and close<dev11[1] thendev8=dev8[1]endifif dev9>dev9[1] and close<dev11[1] thendev9=dev9[1]endifif dev10>dev10[1] and close<dev11[1] thendev10=dev10[1]endifif dev11>dev11[1] and close<dev11[1] thendev11=dev11[1]endifif close>dev11[1] thenflag=-1elseif close<dev5[1] thenflag=1endifendifif flag=-1 thenind0=dev0ind1=dev1ind2=dev2ind3=dev3ind4=dev4ind5=dev5//k=1r=0g=191b=255elseind0=dev6ind1=dev7ind2=dev8ind3=dev9ind4=dev10ind5=dev11//k=-1r=255g=128b=0endif//ORANGE AND LIGHT BLUEreturn ind0 coloured(r,g,b) style(dottedline,2) as "Warning Line", ind1 coloured(r,g,b) style(dottedline,2) as "Dev Stop 1.0", ind2 coloured(r,g,b) style(dottedline,2) as "Dev Stop 2.2", ind3 coloured(r,g,b) style(line,3) as "Dev Stop 3.6", ind4 coloured(r,g,b) style(dottedline,2) as "Dev Stop 4.5", ind5 coloured(r,g,b) style(line,3) as "Dev Stop 6.0"//NO CHANGE OF COLUR FOR TREND CHANGE return ind0 coloured(2, 118, 253) style(dottedline,2) as "Warning Line" ,ind1 coloured(2, 118, 253) style(dottedline,2) as "Dev Stop 1.0", ind2 coloured(2, 118, 253) style(dottedline,2) as "Dev Stop 2.2", ind3 coloured(2, 118, 253) style(line,3) as "Dev Stop 3.6", ind4 coloured(2, 118, 253) style(dottedline,2) as "Dev Stop 4.5", ind5 coloured(2, 118, 253) style(line,3) as "Dev Stop 6.0"1 user thanked author for this post.
07/07/2018 at 8:57 PM #7555102/06/2021 at 2:50 AM #16050202/06/2021 at 7:58 AM #160505Click the PRICE tag on the upper left corner of your chart, then add an indicator from there.
03/01/2021 at 11:21 AM #162837Hi @Km20, there are two indicators. The one on the Price chart is this one, Kase Dev Stop v3: https://www.prorealcode.com/prorealtime-indicators/kase-dev-stop-v3/
The KREV sits in its own panel below the price chart. Hope that helps. -
AuthorPosts
Find exclusive trading pro-tools on