|
|||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||
| Special offer: buy AmiBroker and EOD+Real-Time Data |
|
Editor, I know there's such a thing as adaptive moving averages. I was wondering if anyone has come up with other adaptive indicators, such as an adaptive RSI or adaptive stochastics. Is there a way to turn indicators such as these into adaptive ones, or is it possible to use an adaptive moving average on them? If so, could you give me an example of how to do so? Richard Knapik, via E-mail Tushar Chande replies: I was the first to propose adaptive indicators, and my article "Stochastic RSI And Dynamic Momentum Index" (STOCKS & COMMODITIES , December 1992) explains how to do it. My book The New Technical Trader (John Wiley & Sons) also contains a good explanation of it. The strategy is to change the lookback length of the indicator by connecting it to market volatility. We would like the indicator to have a long lookback period when prices are in a trading range (volatility is low). Conversely, we want a short lookback length when prices are moving rapidly. I feel that changing the lookback length for calculating indicators is more responsive than smoothing them with adaptive moving averages. The actual definition of long and short lookback lengths depends on your trading horizon. Here is some simple TradeStation code to create an adaptive stochastic oscillator that uses the 20-day standard deviation of closing prices to vary the length between seven and 28 days. First, determine if the 20-day standard deviation is at its highest level. To do so, compute a stochastic oscillator using the 20-day standard deviation (variables v1 through v4). If the 20-day standard deviation is at its highest level (v1=v2), then v4=1 and the oscillator length is set at its shortest value, that is, set to the variable lenmin (=7 days). If the 20-day standard deviation is at its lowest value (v1=v3), then v4=0 and the current length is set to the maximum length, that is, the variable lenmax (= 28 days). All that remains is to calculate the stochastic oscillator, Stoch, for the close and smooth it using a three-day exponential moving average. The same approach can be used to develop other adaptive indicators or averages. Tushar Chande, Ph.D., of Tuscarora Capital Management, is a Contributing Editor to STOCKS & COMMODITIES.Code:{-- C 2K Tushar Chande; Adaptive Stochastic Oscillator --} vars: v1(0), v2(0), v3(0), v4(0) ; {-- Calculate 20-day std. Dev. And its 20-day range --} v1 = stddev(c,20) ; {-- Create v4: stochastic oscillator for 20-day std. dev. --} if (v2-v3) > 0 then v4 = ((v1 - v3)/(v2-v3)) Else v4 = 0 ; {-- Calculate current effective length; if v4 = 1, then length = mininum --} currlen = IntPortion(lenmin + (lenmax-lenmin)*(1-v4)) ; {-- Calculate stochastic oscillator and its 3-day exponential average --} hh = highest(h, currlen) ; {-- Plot data --} plot1(stoch, "adapt_stoch") ; { -- End of code --}
all formulas for TradeStation all formulas
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators and systems are submitted by anonymous users. Therefore S4T™ does not take any responsibility for it's quality. If you use any of this information, use it at your own risk. You are responsible for your own trading decisions. Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade. In no case will S4T™ be responsible for your trading gains or losses. |
||
|
||
|