LonesomeTheBlue

Divergences for many indicators v2.0

A gift from me to all.

This script is developed to find Divergences for many indicators. it analyses divergences and then draws line on the graph. red for negatif, lime for positive divergences.

Currently script checks divergence for RSI , MACD , MACD Histogram, Stochastic , CCI , Momentum, OBV, Diosc, VWMACD and CMF indicators. You can use some or all of these indicators to check divergences as you wish by choosing them on the menu. Also you can add/remove many other indicators to the script to check if there is divergence.

The script first calculates tops/bottoms by using higher time frame zig zag and then finds divergences.

Higher Time Frames are
if currend period 1 min => HTF = 5 mins
if currend period 3 mins => HTF = 15 mins
if currend period 5 mins => HTF = 15 mins
if currend period 15 mins => HTF = 1 hour
if currend period 30 mins => HTF = 1 hour
if currend period 45 mins => HTF = 1 hour
if currend period 1 hour => HTF = 4 hours
if currend period 2 hours => HTF = 4 hours
if currend period 3 hours => HTF = 4 hours
if currend period 4 hours => HTF = 1 day
if currend period 1 day => HTF = 1 week
if currend period 1 week => HTF = 1 week

future plan : script finds regular divergences, soon I will add hidden divergences and also I plan to add alert ;)


Sürüm Notları: Fixed some options
Sürüm Notları: Added Alert !
Sürüm Notları: in order to find tops and buttoms script waits for higher time frame completion and this may cause a few bars latency. To solve it, I changed script & added early alarm system. Before completion of HTM if there is divergences you can see red label above bar and lime label below bar. Red label above bar means alert for negative divergence and lime label below bar means positive divergence.
Sürüm Notları: Fixed the redundant white line.
Sürüm Notları: Added hidden and exaggerated divergences. showing hidden divergences is optional. P.S. I don't recommend using hidden divergences because it's not trustable as regular ones.
Favori Komutlardan Çıkart Favori Komutlara Ekle
Excellent work dude. Do the divergence labels repaint per chance? Not asking as a criticism, just curious. Either way, I think TV is in need of a divergence detector that can paint the divergences as zones rather than single instances, so thank you for your work.
Cevap Gönder
LonesomeTheBlue chrysopoetics
@chrysopoetics, Thank you. There is no chance and no repaint. i am not sure i understood zone idea. Would you please explain it in details? Thanks
+1 Cevap Gönder
LonesomeTheBlue LonesomeTheBlue
@LonesomeTheBlue, I think there is a typo. there is no repaint. Would you please explain zone idea? then lets see if it's applicable or not.
+1 Cevap Gönder
chrysopoetics LonesomeTheBlue
@LonesomeTheBlue, sorry about the delay in getting back to you.

Okay, that’s excellent that there’s no repaint. Great work.

What I meant by zones is that, usually for divergence indicators the divergence is rendered as an instance. In other words, when there’s a divergence you get an indication ona specific bar instead of across a series of bars.

Your indicator on the other hand labels the divergences across a series of bars, and I think that’s better. Divergences should be marked like that in my opinion, as “zones” so to speak.
Cevap Gönder
chrysopoetics LonesomeTheBlue
@LonesomeTheBlue, by the way, if you manage to get hidden and exaggerated divergences in there too, that would be very impressive.
Cevap Gönder
LonesomeTheBlue chrysopoetics
@chrysopoetics, well, I added hidden and exaggerated divergences, hidden divergences are optional but I do not recommend using hidden divergences, because it's usually give false signal. regular divergence is best.
+1 Cevap Gönder
Good job.
Have you seen your script on a black background?
Fix the redundant white line like below. Do it for the "divb" too.

plot(tops, color = divt != white ? divt : na, linewidth = 3, offset = -3)
Cevap Gönder
@tesla80, Done. I thought that ppl might want to see white lines too (by changing color) but it looks better now. Thanks.
Cevap Gönder
what is maxb?
Cevap Gönder
LonesomeTheBlue syracusepro
@syracusepro, maxb is the number of bars for higher time frame. for example if current period is 1hour then higher time period is 4h, so maxb is 4, if current 4hour then higher time period 1Day (24h), so maxb is 6, etc. so it's dynamic.
Cevap Gönder
TR Türkçe
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
HE עברית
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Nasıl Çalışır Grafik Özellikleri Kurallarımız Moderatörler Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Hisse Senetleri Grafik Çizim Kitaplığı Yeni Özellik Talebi Blog ve Haberler SSS Yardım ve Viki Twitter
Profil Profil Ayarları Hesap ve Ödemeler Destek Kayıtlarım Destek Ekibi Yayınlanmış Fikirler Takip Edenler Takip Ediliyor Özel Mesajlar Sohbet Çıkış