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
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
//
// @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 )