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
Phát hành các Ghi chú: Updated to Revision 3 of Pinescript
Updated with some RicardoSantos version 2.022 revisions.
Aug 03
Phát hành các Ghi chú: ..
Added Elders Force Index method.
Other small changes.
Aug 19
Phát hành các Ghi chú: 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.
Gỡ bỏ khỏi Script Ưa thích Thêm vào Script Ưa thích
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)
Phản hồi
sal157011 sal157011
@sal157011, Something went wrong.
After //------------------------------------------------------------------------------ add 2 in square brackets to oscilator_high and oscilator_low
Phản hồi
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.
Phản hồi
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.
Phản hồi
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.
Phản hồi
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.
Phản hồi
@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.
Phản hồi
Master, please accept me as your disciple. Great script
Phản hồi
Thank you for your work
Phản hồi
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 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ế Shows Cách thức hoạt động Tính năng Biểu đồ Giá 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
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Các ý tưởng đã đăng Người theo dõi Đang theo dõi Tin nhắn riêng Trò chuyện Đăng xuất