MattDeLong

RSI Oversold/Undersold

The study script will place GREEN BUY arrows BELOW oversold conditions and RED SHORT arrows ABOVE overbought conditions. You can configure the period

Most RSI(14) indicators use a 14-period, I prefer a 5-period. The period, overbought and oversold periods are settings that can easily be changed by adding this study to your chart and clicking the "gear" icon next to the study inside your chart.

نص برمجي مفتوح المصدر

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

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

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

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
//@version=2
//author=https://www.tradingview.com/u/MattDeLong/
//optimized for NUGT / daily chart

study("RSI Oversold/Undersold", overlay=true)

backtime = input(title='Period', type=integer, defval=5)
overbought = input(title='RSI Overbought', type=integer, defval=74)
oversold = input(title='RSI Oversold', type=integer, defval=24)

calcSpread(k) =>
    ((high[k] - low[k]) / high[k])*100

isOversold(k) =>
    key = k <= 1 ? 0 : k - 1
    rsi(close[k], backtime) <= oversold and volume[k] >= volume[key]

isOverbought(k) =>
    key = k <= 1 ? 0 : k - 1
    rsi(close[k], backtime) >= overbought and volume[k] >= volume[key]

plotshape(isOverbought(1) and isOverbought(0), style=shape.labeldown, location=location.abovebar, color=#ff0000)
plotshape(isOversold(1) and isOversold(0), style=shape.labelup, location=location.belowbar, color=green)