fikira

Divergences (Pivots)

fikira Wizard Telah dikemas kini   
I created the divergence indicator using pivot points.

Leftbars and Rightbars of Pivots are the same here and taken together as "Div Period", default set as 2 (= "Short" period).
The second period ("Long") multiplies this by 2, if a period of 2 is set, the "Long" period will be 4.
The third period ("Long2") multiplies the "Long" by 2, in this case the "Long2" period would be 8.

In these periods the high and lows of "source" (default = "close", can be changed though) and "RSI" are captured and compared.
The default "RSI length" of "14" can be changed as well.

"Short", "Long" and "Long2" periods can be made visible together or separately (Settings > Inputs).

I recommend to use a "Period" of "1" when using "W" charts, "1 or 2" on "D" charts, and "2 or 3" (maybe higher) when using lower timeframes.

Bullish divergences are "Green", Bearish divergences are "Red", Hidden divergences (Bullish and Bearish) are "White".

"Short" > "▲▼" (Bullish = Up, Bearish = Down)
"Long" > "∆∇" (Bullish = Up, Bearish = Down)
"Long2" > "⇧⇩" (Bullish = Up, Bearish = Down)

The "Values" of "HH"(Higher High), "LL" (Lower Low"), "HL"(Higher Low) & "LH"(Lower High) can be made visible (Settings > Inputs).

Thank you!


Nota Keluaran:
This is an updated 'divergence indicator using pivot points'
(initially this version was called "'Divergences ( Pivots ) 2")

Instead of needing to change the 'periods' while changing the timeframe, here there are 4 'Periods' where the "high" and "lows" of
the "source" (default = "close", can be changed though) and "RSI" are captured and compared.


Each of the 4 'Periods' ('Very Short' - 'VS', 'Short' - 'S', 'Long' - 'L', 'Very Long' - 'VL') can be separately enabled/disabled/changed.

I like the settings:

"RSI"(20), "Periods": '2' - '4' - '8' - '16'

but it can be different of course, like:

"RSI"(9), "Periods": '1' - '2' - '3' - '4' (this setting was not possible with my first 'Divergences ( Pivots )' indicator)

or other settings for your liking!

The "Values" of "HH"(Higher High), "LL" (Lower Low"), "HL"(Higher Low) & "LH"(Lower High) can be made visible (Settings > Inputs).


Bullish divergences are "Green"
- 'Very Short' - 'VS', 'Short' - 'S' "period" > "▲"
- 'Long' - 'L', 'Very Long' - 'VL' "period" > "⇧"

Bearish divergences are "Red"
- 'Very Short' - 'VS', 'Short' - 'S' "period" > "▼"
- 'Long' - 'L', 'Very Long' - 'VL' "period" > "⇩"

Hidden divergences ( Bullish and Bearish ) are:
- 'Very Short' - 'VS', 'Short' - 'S' "period" > "▲▼" - "White"
- 'Long' - 'L', 'Very Long' - 'VL' "period" > "⬆︎⬇︎" - "Yellow"
Nota Keluaran:
Hi, made some changes for the better :-)

- RSI is now default 14

More setting options for Divergences:
- 'Long Period', default checks 25 bars to the Left (="History") and 1 bar to the Right (="Future")
- 'Medium Period', default checks 15 bars to the Left (="History") and 1 bar to the Right (="Future")
- 'Short Period', default checks 5 bars to the Left (="History") and 1 bar to the Right (="Future")

Each Bar checks an amount of Bars at the Left (="History") and Bars to the Right (="Future"), insuring this particular Bar is the Highest or Lowest of them all at "close",
this is compared to the or or and so we have our Divergences.
There is always a slight delay (number of Bar(s) at the Right side (="Future")

> You can now alter both sides in a way that suits you best

If you like a setting, where the amount of “RightBars” equals the ”LeftBars” you can enable the " > Only change 'LeftBars'" button.
Then you only have to adjust the amount of “LeftBars” and the amount of “RightBars” automatically will be the same.

- Sensitivity Divergences, default x = '5'
x ⩾ 2 compares the value with ⩾ 2 previous values instead of 1, making the sensitivity higher

Bullish divergences are "Green":
- "⇡︎" = 'Short' "period"
- "↑︎" = 'Medium' "period"
- "⇧" = 'Long' "period"

Bearish divergences are "Red"
- "⇣︎" = 'Short' "period"
- "↓︎" = 'Medium' "period"
- "⇩︎" = 'Long' "period"

Hidden Bullish divergences are "White":
- "⇡︎" = 'Short' "period"
- "↑︎" = 'Medium' "period"
- "⇧" = 'Long' "period"

Hidden Bearish divergences are "White"
- "⇣︎" = 'Short' "period"
- "↓︎" = 'Medium' "period"
- "⇩︎" = 'Long' "period"

While evaluating be sure to check other time frames as well!

Thank you very much!
Nota Keluaran:
Updated Alerts, also included a General Bull and Bear Alert
Nota Keluaran:
Added extra alerts

LuxAlgo Dev: www.luxalgo.com
PineCoder: www.pinecoders.com

- We cannot control our emotions,
but we can control our keyboard -
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?