LazyBear

Kaufman Stress Indicator

Stress Indicator, first proposed by Mr. Perry Kaufman, provides an easy way for trading pairs / arbs.

Kaufman's trading rules for Stress Indicator:
- Decide on a pair to trade: For ex., AAPL v QQQ
- Calculate the Stress Indicator (SI) for that pair
- Buy the stock when SI 50
- Calculate the 60-day moving average of QQQ
- If the trend of QQQ is down, hedge the stock position with QQQ equal to the risk of the stock using the 20-day ATR of each
- Exit the hedge when the stock position exits, or exit the hedge when the trend of QQQ turns up
- Do not trade stocks under $3

Explanation of all potential SI applications is beyond this post. For more info:
- ptasite.s3.amazonaws...gUsingPairsLogic.pdf
- www.futuresmag.com/2...lative-value-trading
- kaufmansignals.com/timing/
- TASC 2014 March issue.

Though Kaufman's Stress stategy is built on top of this Stress Indicator, I suggest reading up his full strategy guidelines before applying this.

Kaufman suggests using 60SMA on the index to track the slope. I have included a custom SMA (find it in the middle pane) that can show SMA for any selected symbol. Use the guide below to import that in to your charts: drive.google.co...mNrZUY1dTA/edit?usp=sharin...

List of my free indicators: bit.ly/1LQaPK8
List of my indicators at Appstore: blog.tradingview.com/?p=970
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
//
// @author LazyBear
// If you use this code in its orignal/modified form, do drop me a note. 
//
study("Kaufman Stress Indicator [LazyBear]", shorttitle="KSI_LB")
length=input(60)
oblvl=input(90,title="Overbought Level")
oslvl=input(10,title="Oversold Level")
normlvl=input(50,title="Normal Level")
d2sym=input("SPY", type=symbol)	

calc_range(hi, lo, len) => 
    highest( hi, len ) - lowest( lo, len ) 

    
d2low=security(d2sym, period, low)
d2high=security(d2sym, period, high)
d2close=security(d2sym, period, close)
r1 = calc_range(high, low, length) 
r2 = calc_range(d2high, d2low, length) 
s1 = (r1 != 0 and r2 != 0) ? ( close - lowest( low, length ) ) / r1 : 50
s2 = (r1 != 0 and r2 != 0) ? ( d2close - lowest( d2low, length ) ) / r2 : 50
d = s1 - s2
r11 = calc_range(d, d, length) 
sv = r11 != 0 ? 100 * ( d - lowest( d, length ) ) / r11 : 50

plot( sv, title="Stress", color=red, linewidth=2 ) 
plot( s1 * 100, title="D1 Stoch", color=green ) 
plot( s2 * 100, title="D2 Stoch", color=blue ) 
plot( oblvl, title="OverBought", style=3, color=red ) 
plot( oslvl, title="OverSold", color=green, style=3 ) 
plot( normlvl, title="Normal", color=gray, style=3 )