LonesomeTheBlue

Divergence for Many Indicators v4

Hello Traders,


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 Pivot Points for the indicators.
- it search divergence on choisen indicators => RSI , MACD , MACD Histogram, Stochastic , CCI , Momentum, OBV, VWMACD, CMF and any External Indicator!
- it checks following divergences for 16 pivot points 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


Some Options:

Pivot Period: you set Pivot Period as you wish. you can see Pivot Points using "Show Pivot Points" option
Source for Pivot 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:

Hidden Divergences:

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 Pivot Period, in following example Pivot 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!

Enjoy!
Phát hành các Ghi chú: New Updates:
-"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.

Enjoy!
Phát hành các Ghi chú: "Minimum Number of Divergence" option added. for example if you set it "2" then the scripts shows the divergence if there is 2 or greater number of divergence.
Phát hành các Ghi chú: "Show Divergence Lines" added. if you disable it then the script won't show the Divergence Lines.
Example:
Phát hành các Ghi chú: Hidden Divergence fixed.
Phát hành các Ghi chú: Fixed.
Phát hành các Ghi chú: bug fixed in "Minimum Number of Divergence" option. Thanks to @gold4boomersdoge4mooners for the bug report.
Phát hành các Ghi chú: Two New Alerts Added:
- Positive Divergence Detected (Regular or Hidden Divergence)
- Negative Divergence Detected (Regular or Hidden Divergence)
Mã nguồn mở

Với tinh thần của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?
If you find my works useful, please consider a donation
BTC: 19qDW9AShZhBZsGuXcgRzam5Fbpc3EU8EV
ETH: 0x39c8552371b9b7f4e324197af460ba8bc8e18ef9

Bình luận

This publication is now featured in our Editors' Picks: https://www.tradingview.com/scripts/editors-picks/ .
In the name of all TradingVie
500 xu
+45 Phản hồi
@PineCoders, Thanks a lot. This really motivates me!
+17 Phản hồi
satishchndra PineCoders
@PineCoders, Hi dear! You are a great coder. Keep on doing good stuff. One humble request, can you make a multi time frame divergence in same script? It
+3 Phản hồi
Thank you for this script. You've put a lot of efforts into this, my appreciations for such nice coding. Wishing you a happy and blessed 2021 Lonesome The Blue...!!!
500 xu
+10 Phản hồi
@creativH, thank you!
Phản hồi
Great Job LonesomeTheBlue!!!

I have not seen any Positive Hidden Divergence (color red) nor Negative Hidden Divergence (color green) show up on EURUSD yet. Do I need to change the settings?
500 xu
+7 Phản hồi
@JDNelson, Thank you. if you still have issue send me a message pls
Phản hồi
JDNelson LonesomeTheBlue
@LonesomeTheBlue,

You are welcome!

I did change the settings to show both. I have a question. If Hidden and Regular have competing signal and/or overlap, which ranks higher?
Phản hồi
@JDNelson, now I checked the code, if both enabled then the last divergence found ranks higher (if last divergence on all indicators is "regular" then "regular" ranks higher, if the last one is "hidden" then higged ranks higher)
Phản hồi
JDNelson LonesomeTheBlue
@LonesomeTheBlue,

Thank you and have a great weekend!
Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Giới thiệu Tính năng Biểu đồ Trả phí Giới thiệu bạn Quy tắc Áp dụng Trung tâm Trợ giúp Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Blog & Tin tức Twitter