OPEN-SOURCE SCRIPT
Updated YD_Divergence_RSI+CMF

The โYD_Divergence_RSI+CMFโ indicator can find divergence using RSI (Relative Strength Index) and CMF (Chaikin Money Flow) indicators.
๐ Key functions
1. Search pivot high and pivot low points in a certain length of price.

2. Connect pivot high to pivot high, pivot low to pivot low, forming two standards for divergence in result.
The marker then plots only the higher high, lower low lines.
(higher low and lower high in prices are referred to hidden divergence, which are not considered in this indicator)

3. Compare the two standards with RSI and CMF indicators, send an alert if there is a divergence. As a result, the indicator will find four combination of divergence.
๐ Details
Developing the indicators, we put a lot of effort in making a customizable and user-friendly interface.
#1. Pivot Setting
#2 RSI & CMF Settings
#3 Label Setting
๐ Alert
Alert are provided as a combination of the chart's symbol and the set label text. For example,
โBINANCE:BTCUSDT.P, Bullish RSI Divergenceโ
====================================================
"YD_Divergence_RSI+CMF" ์งํ๋ RSI์ CMF ์งํ๋ฅผ ์ด์ฉํด์ Divergence๋ฅผ ์ฐพ์๋ผ ์ ์์ต๋๋ค.
๐ ์ฃผ์ ๊ธฐ๋ฅ
1. ์ ํด์ง ๊ฐ๊ฒฉ ์์ง์ ์์์ pivot high์ pivot low ํฌ์ธํธ๋ฅผ ์ฐพ์๋ ๋๋ค.

2. Pivot high๋ก๋ง ์ด์ด์ง ๋ผ์ธ๊ณผ, Pivot low๋ก๋ง ์ด์ด์ง ๋ ๋ผ์ธ์ ์๋ํ ๋ค divergence์ ๊ธฐ์ค์ผ๋ก ์ผ์ต๋๋ค.
์ด ์งํ์์๋ normal divergence๋ง ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ฐจํธ์ higher high์ lower low๋ง ํ๊ธฐํฉ๋๋ค.
(higher low์ lower high๋ hidden divergence๋ก ์ ์๋๋ฉฐ, ์ด ์งํ์์๋ ๋ค๋ฃจ์ง ์์ต๋๋ค.

3. ๋ ๊ธฐ์ค์ ๊ณผ RSI, CMF ์งํ๋ฅผ ๊ฐ๊ฐ ๋น๊ตํ๊ณ , ๊ฒฐ๊ณผ์ ์ผ๋ก 4๊ฐ์ ์กฐํฉ์ ๊ตฌํ ์ ์์ต๋๋ค.
๐ ์ธ๋ถ ์ฌํญ
์งํ๋ฅผ ๊ฐ๋ฐํ๋ฉฐ ์ฌ์ฉ์๋ค์ด ์ํ๋ ๋ฐฉํฅ์ผ๋ก ์งํ๋ฅผ ์ค์ ํ ์ ์๊ฒ ์์ ์ ๋ง์ ๊ณต์ ๋ค์์ต๋๋ค. ๊ต์ฅํ ๋ค์ํ ์ต์ ์ ์ ํํ ์ ์์ผ๋ฉฐ, ์ํ๋ ๋ฐฉ์์ผ๋ก ์งํ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
#1 Pivot Setting
#2 RSI์ CMF Setting
#3 Label Setting
๐ ์ผ๋ฌํธ
์ผ๋ฌํธ๋ ์์ ์ด ์ค์ ํ ์ฐจํธ์ ์ฌ๋ณผ๊ณผ Label์ ๋ฌธ๊ตฌ์ ์กฐํฉ์ผ๋ก ์ ๊ณต๋๋ฉฐ ์๋ฅผ ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
"BINANCE:BTCUSDT.P, Bullish RSI Divergence"
๐ Key functions
1. Search pivot high and pivot low points in a certain length of price.
2. Connect pivot high to pivot high, pivot low to pivot low, forming two standards for divergence in result.
The marker then plots only the higher high, lower low lines.
(higher low and lower high in prices are referred to hidden divergence, which are not considered in this indicator)
3. Compare the two standards with RSI and CMF indicators, send an alert if there is a divergence. As a result, the indicator will find four combination of divergence.
*A. Higher high price / Lower RSI (Bearish RSI Divergence)
*B. Lower low price / Higher RSI (Bullish RSI Divergence)
*C. Higher high price / Lower CMF (Bearish CMF Divergence)
*D. Lower low price / Higher CMF (Bullish CMF Divergence)
๐ Details
Developing the indicators, we put a lot of effort in making a customizable and user-friendly interface.
#1. Pivot Setting
- Users can set the length to find the pivot high / pivot low in โPivot Settings โ Pivot Length.โ
- Increased pivot Length takes more candles to interpret the chart but reduce false signals since the it uses only the most certain pivot high / pivot low values. Obviously, decreased pivot length will act the opposite.
- Users can choose whether to use โHigh/Lowโ or โCloseโ in โPivot Referenceโ to set the swing point of prices.
- Users can also choose whether to display the pivot high / pivot low marker on the chart.
#2 RSI & CMF Settings
- Users can adjust the length of RSI & CMF separately. (The default values are set to 14 and 20 each.)
#3 Label Setting
- Users can adjust the text displayed on the chart label. (The default values is set to โBullish / Bearishโ, โRSI/CMFโ, โDivergenceโ.)
- Users can reduce the length of text label or simply turn the label off. Just click the โBull/Bearโ or โNoneโ button. โDivergenceโ works the same.
- Users can decide whether to display the โDivergence Line and Labelโ, set custom settings for the label and line. (color, thickness, style, etc)
๐ Alert
Alert are provided as a combination of the chart's symbol and the set label text. For example,
โBINANCE:BTCUSDT.P, Bullish RSI Divergenceโ
====================================================
"YD_Divergence_RSI+CMF" ์งํ๋ RSI์ CMF ์งํ๋ฅผ ์ด์ฉํด์ Divergence๋ฅผ ์ฐพ์๋ผ ์ ์์ต๋๋ค.
๐ ์ฃผ์ ๊ธฐ๋ฅ
1. ์ ํด์ง ๊ฐ๊ฒฉ ์์ง์ ์์์ pivot high์ pivot low ํฌ์ธํธ๋ฅผ ์ฐพ์๋ ๋๋ค.
2. Pivot high๋ก๋ง ์ด์ด์ง ๋ผ์ธ๊ณผ, Pivot low๋ก๋ง ์ด์ด์ง ๋ ๋ผ์ธ์ ์๋ํ ๋ค divergence์ ๊ธฐ์ค์ผ๋ก ์ผ์ต๋๋ค.
์ด ์งํ์์๋ normal divergence๋ง ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ฐจํธ์ higher high์ lower low๋ง ํ๊ธฐํฉ๋๋ค.
(higher low์ lower high๋ hidden divergence๋ก ์ ์๋๋ฉฐ, ์ด ์งํ์์๋ ๋ค๋ฃจ์ง ์์ต๋๋ค.
3. ๋ ๊ธฐ์ค์ ๊ณผ RSI, CMF ์งํ๋ฅผ ๊ฐ๊ฐ ๋น๊ตํ๊ณ , ๊ฒฐ๊ณผ์ ์ผ๋ก 4๊ฐ์ ์กฐํฉ์ ๊ตฌํ ์ ์์ต๋๋ค.
*A. Higher high price / Lower RSI (Bearish RSI Divergence)
*B. Lower low price / Higher RSI (Bullish RSI Divergence)
*C. Higher high price / Lower CMF (Bearish CMF Divergence)
*D. Lower low price / Higher CMF (Bullish CMF Divergence)
๐ ์ธ๋ถ ์ฌํญ
์งํ๋ฅผ ๊ฐ๋ฐํ๋ฉฐ ์ฌ์ฉ์๋ค์ด ์ํ๋ ๋ฐฉํฅ์ผ๋ก ์งํ๋ฅผ ์ค์ ํ ์ ์๊ฒ ์์ ์ ๋ง์ ๊ณต์ ๋ค์์ต๋๋ค. ๊ต์ฅํ ๋ค์ํ ์ต์ ์ ์ ํํ ์ ์์ผ๋ฉฐ, ์ํ๋ ๋ฐฉ์์ผ๋ก ์งํ๋ฅผ ์ฌ์ฉํ ์ ์์ต๋๋ค.
#1 Pivot Setting
- Pivot setting์์๋ Pivot Length๋ฅผ ๋ณ๊ฒฝํ ์ ์์ต๋๋ค.
- Pivot Length๋ฅผ ๋๋ฆด ๊ฒฝ์ฐ, ๋ณด๋ค ํ์คํ Swing High์ Swing Low๋ง์ ์ฌ์ฉํ๊ฒ ๋๋ฏ๋ก, False signal์ด ์ค์ด๋ค ์ ์์ต๋๋ค. ํ์ง๋ง Swing High/ Low๋ฅผ ํ์ ํ๋ ๋ฐ์ ๋ ๊ธด ์๊ฐ์ด ๊ฑธ๋ฆฌ๊ฒ ๋๋ฏ๋ก, Signal์ด ๋ค์ ๋ฆ๊ฒ ๋ฐ์ํ๋ ๋จ์ ์ด ์๊ธฐ๊ฒ ๋ฉ๋๋ค.
- Pivot Length๋ฅผ ์ค์ผ ๊ฒฝ์ฐ, ๋ฐ๋๋ก Swing High/Low์ ํ์ ์ด ๋ ๋นจ๋ฆฌ ์ผ์ด๋๊ธฐ ๋๋ฌธ์, Signal์ ๊ฑฐ๋์ ์ด์ฉํ๊ธฐ๋ ์ข์ ์ ์์ต๋๋ค. ๋ค๋ง, Swing High์ Low๊ฐ ํจ์ฌ ๋ ์ฆ์ ๋น๋๋ก ๋ฐ์ํ๊ธฐ ๋๋ฌธ์ False Signal์ ์ค ๊ฐ๋ฅ์ฑ์ด ๋์์ง๋๋ค.
- Pivot Reference์์๋ ๊ฐ๊ฒฉ์ Swing Point๋ฅผ ์ค์ ํจ์ ์์ด, High/Low(๊ณ ๊ฐ/์ ๊ฐ)๋ฅผ ์ด์ฉํ ์ง Close (์ข
๊ฐ)๋ฅผ ์ด์ฉํ ์ง ์ ํํ ์ ์์ต๋๋ค.
- Pivot High/Low Marker๋ฅผ ์ ํํ ๊ฒฝ์ฐ Pivot High/ Low์ Marker๊ฐ ์ฐํ๊ฒ ๋ฉ๋๋ค.
#2 RSI์ CMF Setting
- RSI์ CMF Setting์์๋ RSI์ CMF์ ๊ธธ์ด๋ฅผ ๊ฐ๊ฐ ์ค์ ํ ์ ์์ต๋๋ค. ๊ธฐ๋ณธ๊ฐ์ 14์ 20์ผ๋ก ์ค์ ๋์ด ์์ต๋๋ค.
#3 Label Setting
- Label Setting์์๋ Label์ ํ์๋๋ ๊ธ์๋ฅผ ์ ํํ ์ ์์ต๋๋ค.
- ๊ธฐ๋ณธ๊ฐ์ "Bullish / Bearish", "RSI/CMF", "Divergence"๋ก ์ ํ๋์ด ์์ผ๋ฉฐ, ๋๋ฌด ๊ธธ๋ค๊ณ ๋๊ปด์ง ๊ฒฝ์ฐ "Bull/Bear" ํน์ "None"์ ํด๋ฆญํ์ฌ ๊ธธ์ด๋ฅผ ์ค์ผ ์ ์์ต๋๋ค. ๋ง์ฐฌ๊ฐ์ง๋ก Divergence์ ๊ฒฝ์ฐ๋ ์๋ต์ด ๊ฐ๋ฅํฉ๋๋ค.
- ํ๋จ์์๋ Divergence Line๊ณผ Label์ ์ผ๊ณ ๋ ์ ์์ผ๋ฉฐ, ์ ์ ์๊น, ๊ตต๊ธฐ, ์ข
๋ฅ, ๊ทธ๋ฆฌ๊ณ Label์ ์๊น, ํฌ๊ธฐ, ์ข
๋ฅ๋ฅผ ์ ํํ ์ ์์ต๋๋ค. Label์ Text ์ ์ญ์ ๋ณ๊ฒฝ์ด ๊ฐ๋ฅํฉ๋๋ค.
๐ ์ผ๋ฌํธ
์ผ๋ฌํธ๋ ์์ ์ด ์ค์ ํ ์ฐจํธ์ ์ฌ๋ณผ๊ณผ Label์ ๋ฌธ๊ตฌ์ ์กฐํฉ์ผ๋ก ์ ๊ณต๋๋ฉฐ ์๋ฅผ ๋ค๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
"BINANCE:BTCUSDT.P, Bullish RSI Divergence"
Release Notes
I have added a feature that "Display only the last label."๋ง์ง๋ง Divergence ๋ง์ ํ์ํ๋ ๊ธฐ๋ฅ์ ์ถ๊ฐํ์์ต๋๋ค.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites โ learn more here.
Yonsei_dent โ
TRADING ACADEMY
contents.premium.naver.com/yonseident/ysdent
Yonsei_dent์ ๊ฒฝ์ ๋ถ์ Telegram
t.me/TeamYonseiDent
Yonsei_dent ์นด์นด์คํก (2580)
open.kakao.com/o/gXJjXvxe
contents.premium.naver.com/yonseident/ysdent
Yonsei_dent์ ๊ฒฝ์ ๋ถ์ Telegram
t.me/TeamYonseiDent
Yonsei_dent ์นด์นด์คํก (2580)
open.kakao.com/o/gXJjXvxe
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites โ learn more here.
Yonsei_dent โ
TRADING ACADEMY
contents.premium.naver.com/yonseident/ysdent
Yonsei_dent์ ๊ฒฝ์ ๋ถ์ Telegram
t.me/TeamYonseiDent
Yonsei_dent ์นด์นด์คํก (2580)
open.kakao.com/o/gXJjXvxe
contents.premium.naver.com/yonseident/ysdent
Yonsei_dent์ ๊ฒฝ์ ๋ถ์ Telegram
t.me/TeamYonseiDent
Yonsei_dent ์นด์นด์คํก (2580)
open.kakao.com/o/gXJjXvxe
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.