JustUncleL

Price Divergence Detector V3 revised by JustUncleL

This is a revised version of the original "Price Divergence Detector by RicardoSantos".
Description:
Price Divergence detection for various methods : RSI , MACD , STOCH , VOLUME , ACC-DIST, FISHER, CCI , BB %B and Ehlers IdealRSI. Both Hidden and Regular Divergences are detected.

Mofidifications:
Revision 3.0 by JustUncleL
  • Added option to disable/enable Hidden and Regular Divergence
  • Added new divergence method BB %B (close only)
  • Added new divergence mothos Ehlers IdealRSI (close only)

Revision 2.0 - by RicardoSantos

References:
Information on Divergence Trading:
  • http://www.babypips.com/school/high-school/trading-divergences
  • http://www.incrediblecharts.com/indicators/bollinger_percentage_b_band_width.php (BB %B)

Aug 02
ملاحظات الأخبار: Updated to Revision 3 of Pinescript
Updated with some RicardoSantos version 2.022 revisions.
Aug 03
ملاحظات الأخبار: ..
Added Elders Force Index method.
Other small changes.
Aug 19
ملاحظات الأخبار: 3.2 Update
  • Added Trend Volume Accumulation, this option really works only well with Renko and HA candles. You have the option to use EMA for trend direction change instead of candle bull/bear direction.
  • NOTE: Trader discretion is required to manually filter out invalid Divergence, there is no account made for the length of each trend when comparisons are made.
إزالة من البرامج النصية المفضلة أضف إلى البرامج النصية المفضلة
JustUncleL
If you want to plot the divergences on the oscillators change lines 4 and from line 217 to the end with this code:
Very important, on the code below in oscilator_high and oscilator_low the brackets must be square brackets, NOT round brackets.

study(title='Price Divergence Detector V3.2 revised by JustUncleL', shorttitle='PDDR',overlay=false) //line 4

// Plotting from line 217 to the end
plot(title='oscH', series=oscilator_high, color=blue, style=line)
plot(title='oscL', series=oscilator_low, color=red, style=line)

//------------------------------------------------------------------------------
plot(title='H F', series=fractal_top ? oscilator_high : na, color=(regular_bearish_div and uReg) or (hidden_bearish_div and uHid)? maroon : not SHOW_CHANNEL ? na : silver, offset=-2)
plot(title='L F', series=fractal_bot ? oscilator_low : na, color=(regular_bullish_div and uReg) or (hidden_bullish_div and uHid) ? green : not SHOW_CHANNEL ? na : silver, offset=-2)
plot(title='H D', series=fractal_top ? oscilator_high : na, style=circles, color=(regular_bearish_div and uReg) or (hidden_bearish_div and uHid)? maroon : not SHOW_CHANNEL ? na : silver, linewidth=3, offset=-2)
plot(title='L D', series=fractal_bot ? oscilator_low : na, style=circles, color=(regular_bullish_div and uReg) or (hidden_bullish_div and uHid) ? green : not SHOW_CHANNEL ? na : silver, linewidth=3, offset=-2)

plotshape(title='+RBD', series=not SHOW_LABEL or not uReg ? na : regular_bearish_div ? oscilator_high : na, text='R', style=shape.labeldown, location=location.absolute, color=maroon, textcolor=white, offset=-2)
plotshape(title='+HBD', series=not SHOW_LABEL or not uHid ? na : hidden_bearish_div ? oscilator_high : na, text='H', style=shape.labeldown, location=location.absolute, color=maroon, textcolor=white, offset=-2)
plotshape(title='-RBD', series=not SHOW_LABEL or not uReg ? na : regular_bullish_div ? oscilator_low : na, text='R', style=shape.labelup, location=location.absolute, color=green, textcolor=white, offset=-2)
plotshape(title='-HBD', series=not SHOW_LABEL or not uHid ? na : hidden_bullish_div ? oscilator_low : na, text='H', style=shape.labelup, location=location.absolute, color=green, textcolor=white, offset=-2)
رد
sal157011 sal157011
@sal157011, Something went wrong.
After //------------------------------------------------------------------------------ add 2 in square brackets to oscilator_high and oscilator_low
رد
JustUncleL sal157011
@sal157011, Best to place coding suggestions in an external holder like "pastebin" and the leave links to the code pieces in your comments. Square brackets and other symbols get filtered out.
رد
sal157011 JustUncleL
@JustUncleL, I apologize, I'm working on catching not only the two consecutive fractals divergences but the first and third , second and fourth, and so on, and I'll do as you suggest.
رد
sal157011 JustUncleL
@JustUncleL, Here are the modified scripts with Regular and Hiden divergences using 2 consecutive fractals, 1 fractal in between and 2 fractals in between.
Overlay https://pastebin.com/raw/6Hvqd6vb
Not overlay https://pastebin.com/raw/y9MuzzZt
One way to reduce de two bar lag would be to use fractals with just one bar to the right and one bar to the left, with smooth indicators would give better results.
رد
Hi JustUncLel. I have a question your price divergence detector V3.
I made screenshot from $MATIC 1D graph:

https://imgur.com/IUAQELJ

I was wondering why it didn't give a regular bearish divergence signal on the green lines that i have drawn. Is this an example of repainting or are there certain threshold values in place that determine the signal?

Thanks again for this amazing script and i hope for an answer.
رد
@Dilivio, The script is not perfect, it utilizing Fractals points for it's highs and lows, so not all perceived high and lows will be detected.
رد
Master, please accept me as your disciple. Great script
رد
Thank you for your work
رد
Hi,
I'm a bit unclear on what the 'R' and the 'H' stand for. Could anybody explain what those imply? I'm trying to use this for RSI divergence.
+4 رد
الصفحة الرئيسية منصة الأسهم منصًة العملات منصّة العملات الرقمية جدول الأعمال الاقتصادي برامج تعليمية كيف نعمل مميزات الرسم البياني أسعار العضوية إحالة صديق قوانين الموقع مركز المساعدة حلول المواقع الإلكترونية والوسطاء الأدوات حلول الرسوم البيانية مكتبة الرسوم البيانية صغيرة الحجم المدوّنة والأخبار تويتر
ملف التعريف إعدادات الصفحة الشخصية الحساب وإعداد الفواتير إحالة صديق تذاكر الدعم الخاصة بي مركز المساعدة التحاليل المنشورة المتابعين تتابع رسالة خاصة المحادثة تسجيل الخروج