OPEN-SOURCE SCRIPT

Potential Divergence Checker

shanenin의
#### Key Features

1. Potential Divergence Signals:
Potential divergences can signal a change in price movement before it occurs. This indicator identifies potential divergences instead of waiting for full confirmation, allowing it to detect signs of divergence earlier than traditional methods. This provides more flexible entry points and can act as a broader filter for potential setups.

2. Exposing Signals for External Use:
One of its advanced features is the ability to expose signals for use in other scripts. This allows users to integrate divergence signals and related entry/exit points into custom strategies or automated systems.

3. Custom Entry/Exit Timing Based on Years and Days:
The indicator provides entry and exit signals based on years and days, which could be useful for time-specific market behavior, long-term trades, and back testing.

#### Basic Usage

This indicator can check for all types of potential divergences: bullish, hidden bullish, bearish, hidden bearish. All you need to do is choose the type you want to check for under “DIVERGENCE TYPE” in the settings. On the chart, potential bullish divergences will show up as triangles below the price candles. one the chart potential bearish divergences will show up as upside down triangles above the price candles

#### Signals for Advanced Usage

You can use this indicator as a source in other indicators or strategies using the following information:

PD: Bull divergence signal” will return “1” when a divergence is present and “0” when not present

PD: HBull divergence(hidden bull) signal” will return “1” when a divergence is present and “0” when not present

PD: Bear divergence signal” will return “1” when a divergence is present and “0” when not present

PD: HBear divergence(hidden bear) signal” will return “1” when a divergence is present and “0” when not present

PD: enter” signal will return a “1” when both the days and years criteria in the “entry filter settings” are met and “0” when not met.

PD: exit” signal will return a “1” when the days criteria in the “exit filter settings” are met and “0” when not met.

#### Examples of Using Signals

1. If you are testing a long strategy for Bitcoin and do not want it to run during bear market years(e.g., the second year after a US presidential election), you can enable the “year and day filter for entry,” uncheck the following years in the settings: 2010, 2014, 2018, 2022, 2026, and reference the signal below in our strategy
signal: “PD: enter

2. Let’s say you have a good long strategy, but want to make it a bit more profitable, you can tell the strategy not to run on days where there is potential bearish divergence and have it only run on more profitable days using these signals and the appropriate settings in the indicator
signal: “PD: Bear divergence signal” will return a ‘0’ with no bearish divergence present
signal: “PD: enter” will return a “1” if the entry falls on a specific, more profitable day chosen in the settings


#### Disclaimer
The "Potential Divergence Checker" indicator is a tool designed to identify potential market signals. It may have bugs and not do what it should do. It is not a guarantee of future trading performance, and users should exercise caution when making trading decisions based on its outputs. Always perform your own research and consider consulting with a financial advisor before making any investment decisions. Trading involves significant risk, and past performance is not indicative of future results.
Relative Strength Index (RSI)Trend Analysis

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?

면책사항