Here is my new year gift for the community, Digergence for Many Indicators v4. I tried to make it modular and readable as much as I can. Thanks to Pine Team for improving Pine Platform all the time!
How it works?
- On each candle it checks divergences between current and any of last 16 for the indicators.
- it search divergence on choisen indicators => RSI , , Histogram, , , Momentum, OBV, VWMACD, CMF and any External Indicator!
- it checks following divergences for 16 that is in last 100 bars for each Indicator.
--> Regular Positive Digergences
--> Regular Negative Digergences
--> Hidden Positive Digergences
--> Hidden Negative Digergences
- for positive divergences first it checks if closing price is higher than last closing price and indicator value is higher than perious value, then start searching divergence
- for negative divergences first it checks if closing price is lower than last closing price and indicator value is lower than perious value, then start searching divergence
Period: you set Period as you wish. you can see using "Show Points" option
Source for Points: you can use Close or High/Low as source
Divergence Type: you can choose Divergence type to be shown => "Regular", "Hidden", "Regular/Hidden"
Show Indicator Names: you have different options to show indicator names => "Full", "First Letter", "Don't Show"
Show Divergence Number: option to see number of indicators which has Divergence
Show Only Last Divergence: if you enable this option then it shows only last Positive and Negative Divergences
you can include any External Indicator to see if there is divergence
- enable "Check External Indicator"
- and then choose External indicator name in the list, "External Indicator"
- External indicator name is shown as Extrn
- related external indicator must be added before enabling this option
Coloring, line width and line style options for different type of divergences.
Following Alerts added:
- Positive Regular Divergence Detected
- Negative Regular Divergence Detected
- Positive Hidden Divergence Detected
- Negative Hidden Divergence Detected
Now lets see some examples:
Regular and Hidden Divergences together:
Showing first letters of indicators:
You can see only the number of indicators which has divergence:
You can see only divergence lines without indicators names and numbers:
option to used different label/line/text colors:
You have option to see only last divergences:
You can change Period, in following example Period = 15:
You can use Close or High/Low as Source for Divergence
You can include external indicators and get divergences on it:
Wish you all a happy new year!
-"Don't Wait for Confirmation" option added. if you enable this option it doesn't wait for candle or indicator confirmation and it gives the divergence signal immediately. some users like this more.
- "Maximum Pivot Points to Check" option added, its the number of Pivot Highs/Lows to search for divergence. you can set it as you wish.
- "Maximum Bars to Check" option added, its the number of bars/candles to search for divergence. you can set it as you wish.
- Last divergence lines removed until meeting new Pivot High/Low. So now there is no unnecessary lines/labels.
- Positive Divergence Detected (Regular or Hidden Divergence)
- Negative Divergence Detected (Regular or Hidden Divergence)
이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.