The Average High-Low Volatility measure performs better than the ATR
Forums › ProRealTime English forum › ProBuilder support › The Average High-Low Volatility measure performs better than the ATR
- This topic has 12 replies, 3 voices, and was last updated 6 years ago by
Bard.
-
-
04/09/2019 at 10:52 PM #95888
A Better method for Stops?
Thomas Bulkowski writes: “In Kaufman’s technique, compute the average daily high-low price range for the prior month, multiply by 2, and then subtract the result from the current low price. The difference column is the intraday high minus the low. See: http://thepatternsite.com/stops.html The average of the differences for the month is $ 1.15 (each days high – low was calculated and added up and then divided by 20). Multiply this by 2 to get the volatility, or $2.30. Based on the volatility of the stock, you should place your stop no closer than 56.45. That’s $2.30 subtracted from the current low of 58.75 on July 29. If price makes a new high, then recalculate the volatility based on the latest month, multiply it by 2 and subtract it from the current low. This method helps you from being stopped out by normal price volatility.
Recent testing has shown that a multiplier of 2 is best (it used to be 1.5). Also, the look back should be 22 price bars. That is about a month’s worth of price data that you average.
The average high-low volatility measure (HL) performs better than the average true range (ATR, which includes gaps, whereas the HL method does not) and better than standard deviation. Standard deviation performed the worst of the three methods in nearly all of the tests.
For the test, I used about 100 actual trades I made from 1/1/2003 to end of 2005 and compared the performance of the three methods using various parameters to my actual results. I found that when using the HL method (with 2x multiplier and 22 bar look back), the average give back before being stopped out after price peaked is 6.88%, which is less than the 10% maximum I consider acceptable. The HL system made the most money and improved on the profitability of the trades 48% of the time.
Unfortunately, all of the stop methods tended to take you out of the best performing trades prematurely, so you can’t use the method as the ONLY way to exit a trade. Discretionary timing the exit improved performance substantially. That means correctly choosing when to use a volatility stop and when not to is vital.”
=========================================================================================================
I think my code needs amending on the first line to respect Kaufman’s Volatility Stop rules “compute the average daily high-low price range for the prior month” if anybody can show me how to write that?
I also can’t get it to overlay onto a Price chart by adding it to “Price” although it will add to the bottom a price chart?
Kaufman's Volatility Stop12345AveVol = Summation[22](high-low)/22KaufmansVolStop = (AveVol * 2) - Low[0]Return KaufmansVolStop as "Kaufman's Volatility Stop"Cheers,
1 user thanked author for this post.
04/10/2019 at 6:54 AM #95900Not tested, but try this code added on price:
12345AveVol = average[22](range)KaufmansVolStop = Low[0]-avevolReturn KaufmansVolStop as "Kaufman's Volatility Stop"I supposed that this is the stop for long only positions, for short ones, it avevol should placed above the high[0].
04/11/2019 at 6:13 PM #96155Hi Nicolas,
Thanks for coding this indicator. I’m not sure it’s going to act as a Stop though because price rarely appears to be hitting the two lines?
Please see image: US 500 — 4 Hrs.
Crosshair is on the 4th Dec 2018, 16.00pmKaufman's Volatility Stop12345678//Period = 22AveVol = average[Period](range)KaufmansVolLongStop = Low[0]-avevolKaufmansVolShortStop = avevol+High[0]Return KaufmansVolLongStop as "Kaufman's Long Volatility Stop", KaufmansVolShortStop as "Kaufman's Short Volatility Stop"I looked into this some more. On Trading View: https://www.tradingview.com/script/oRK5JwIm-Volatility-Stop/
it’s also coded as one line that intersects price and is coloured red and green: Pls see the code and image on Trading View.
Be interesting to test this and compare to the Kase Dev Stop.
Cheers!
04/11/2019 at 6:28 PM #96160I’m not sure it’s going to act as a Stop though because price rarely appears to be hitting the two lines?
Surely you need to use the previous bars calculated levels? So shift the whole thing one bar to the right to see whether it hits them more often by changing the last line to:
1Return KaufmansVolLongStop[1] as "Kaufman's Long Volatility Stop", KaufmansVolShortStop[1] as "Kaufman's Short Volatility Stop"Obviously in a strategy you would use them calculated at the close of the bar for a trade opened on the next bar but as an indicator you need to shift it right to see the last calculated levels over the latest candle.
04/11/2019 at 7:10 PM #9616204/11/2019 at 7:15 PM #96164I don’t do Pinescript so could not tell you. In a strategy I would use the code as Nicolas provided it that way when a trade opens on the next bar it uses the SL and TP levels calculated at the last close. If I was manual trading or just staring at a chart to see if the levels got hot then I would shift it right one.
04/11/2019 at 10:16 PM #96182I’m not sure if the PRT code is respecting Kaufman’s rules:
Compute the average daily high-low price range for the prior month, multiply by 2, and then subtract the result from the current low price.
Each day’s high minus it’s low is calculated.
The average of these differences for the month is $ 1.15. That is:
Each days high minus low is calculated and added up. It is then divided by 20.The this average is then multiplied by 2 to get the volatility.
In the example it equaled $2.30. Based on the volatility of the stock, you should place your stop no closer than $2.30 subtracted from the current low of 58.75.
Is:
1AveVol = average[Period](range)following the above rule?
Also it’s not been multiplied by 2.04/11/2019 at 10:35 PM #96185Yes it is.
1AveVol = average[Period](range)If the period is 22 then this is the average of the last 22 days (high – low) as (range is (high – low).
If you are planning on using it in strategy then you need to take note of the bit that says ‘If price makes a new high, then recalculate the volatility based on the latest month, multiply it by 2 and subtract it from the current low.’ This means that if you are on market then you adjust the stop loss if a new high is made but don’t touch it if a new high is not made.
1 user thanked author for this post.
04/11/2019 at 10:38 PM #9618604/11/2019 at 10:39 PM #96188So the correct code should be:
12345678//Period = 22AveVol = average[Period](range) * 2KaufmansVolLongStop = Low[0]-avevolKaufmansVolShortStop = avevol+High[0]Return KaufmansVolLongStop as "Kaufman's Long Volatility Stop", KaufmansVolShortStop as "Kaufman's Short Volatility Stop"Which means that your stoploss is even less likely to get hit than you were first thinking!
04/11/2019 at 10:45 PM #96189I’m kind of guessing this is what Kaufman was suggesting. Not tested and written after a glass or two of wine!
1234567891011121314151617//Period = 22once AveVol = average[Period](range) * 2once KaufmansVolLongStop = Low[0]-avevolonce KaufmansVolShortStop = avevol+High[0]if high > high[1] thenAveVol = average[Period](range) * 2KaufmansVolLongStop = Low[0]-avevolendifif low < low[1] thenAveVol = average[Period](range) * 2KaufmansVolShortStop = avevol+High[0]endifReturn KaufmansVolLongStop as "Kaufman's Long Volatility Stop", KaufmansVolShortStop as "Kaufman's Short Volatility Stop"04/13/2019 at 3:49 PM #9635804/15/2019 at 5:51 PM #96529The stop works well compared to the Kase Dev Stop which is surprising (considering all the research and backtesting that went into the Dev Stop’s creation). I used a 10 period Kaufman Vol Stop in my backtests and it produced better profits and lower drawdowns. Cheers again Vonasi.
-
AuthorPosts
Find exclusive trading pro-tools on