PROTECTED SOURCE SCRIPT
Updated Donchian Ichimoku Confluence

### Overview
Donchian Ichimoku Confluence combines a Donchian price channel with an Ichimoku-style cloud and optional RSI, volume, and EMA filters.
The script identifies confirmed bullish and bearish conditions when price crosses the Donchian midpoint while the cloud and all enabled filters satisfy the corresponding directional rules.
It also includes configurable presets, visual signal markers, alerts, active percentage target and stop reference lines, and simplified historical target/stop outcome tables.
The indicator is intended for use on standard OHLC candlestick or bar charts. Its markers identify when the configured conditions align. They do not predict future price movement and are not automatic instructions to enter or exit a position.
### How the components interact
The indicator uses the following sequence:
1. The Donchian channel defines the recent price range and midpoint.
2. Price must cross the Donchian midpoint.
3. The Ichimoku-style cloud supplies bullish or bearish structural context.
4. Any enabled RSI, volume, and EMA filters must also pass.
5. A signal is confirmed at the close of the chart bar.
6. The alert and simplified historical outcome measurement use that confirmed condition.
The signal is therefore based on the interaction of the enabled modules rather than on any one component alone.
### Donchian channel
The Donchian upper line is the highest high over the selected channel length.
The Donchian lower line is the lowest low over the selected channel length.
The Donchian midpoint is the average of the upper and lower boundaries.
The midpoint acts as the crossing level used by the signal logic.
A longer Donchian length produces a broader and slower-moving channel.
A shorter length responds more quickly to recent price changes but can produce more frequent crossings.
The line colours, thicknesses, and visual styles can be adjusted.
The dashed and dotted options are visual approximations created with circle and cross plot styles rather than true dashed or dotted line objects.
### Ichimoku-style cloud
The cloud uses three configurable lookbacks:
* Tenkan Length;
* Kijun Length;
* Senkou B Length.
The Tenkan value is the midpoint of the highest high and lowest low over the Tenkan lookback.
The Kijun value uses the same calculation over the Kijun lookback.
Senkou A is the average of the Tenkan and Kijun values.
Senkou B is the midpoint of the highest high and lowest low over the Senkou B lookback.
The two spans are plotted forward by the selected displacement.
This indicator uses the cloud component of Ichimoku. It does not display or use a complete traditional Ichimoku system with all standard lines and interpretations.
### Cloud direction
The cloud aligned with the current chart bar is classified as bullish when Senkou A is above Senkou B.
It is classified as bearish when Senkou A is at or below Senkou B.
The cloud provides structural context for the Donchian midpoint cross:
* bullish signals require bullish cloud context;
* bearish signals require bearish cloud context.
Cloud direction does not independently establish that price will continue in that direction.
### Cloud display
The cloud can be shown with:
* a gradient fill;
* a single-colour fill;
* no fill.
The cloud is projected forward visually according to the displacement setting.
The fill style changes only the presentation. It does not change signal calculations.
### Bullish signal
A bullish upward triangle is confirmed when:
* price crosses above the Donchian midpoint;
* the cloud aligned with the current chart bar is bullish;
* RSI is below the configured overbought threshold when the RSI filter is enabled;
* volume is above its moving average when the volume filter is enabled;
* price satisfies the selected EMA relationship when the EMA filter is enabled;
* the chart bar has closed.
The condition shows that the configured Donchian, cloud, and filter requirements aligned on the same bar.
It does not guarantee that price will continue higher.
### Bearish signal
A bearish downward triangle is confirmed when:
* price crosses below the Donchian midpoint;
* the cloud aligned with the current chart bar is bearish;
* RSI is above the configured oversold threshold when the RSI filter is enabled;
* volume is above its moving average when the volume filter is enabled;
* price satisfies the selected EMA relationship when the EMA filter is enabled;
* the chart bar has closed.
The condition shows that the configured Donchian, cloud, and filter requirements aligned on the same bar.
It does not guarantee that price will continue lower.
### RSI filter
The optional RSI filter is designed to avoid:
* bullish signals when RSI is already at or above the selected overbought level;
* bearish signals when RSI is already at or below the selected oversold level.
The filter does not require RSI to be bullish or bearish. It only excludes conditions occurring beyond the configured extreme threshold.
An overbought or oversold reading does not prove that price must reverse.
### Volume filter
The optional volume filter requires current reported volume to be above its simple moving average.
The moving-average length is configurable.
This filter is intended to exclude midpoint crossings occurring on comparatively low reported volume.
Volume quality and interpretation vary between symbols, exchanges, brokers, and markets. Some instruments provide tick volume rather than centralized transaction volume.
### EMA filter
The optional EMA filter compares price with a configurable chart-timeframe EMA.
In trend-following mode:
* bullish signals require price above the EMA;
* bearish signals require price below the EMA.
In mean-reversion mode:
* bullish signals require price below the EMA;
* bearish signals require price above the EMA.
The EMA is calculated on the active chart timeframe. It is not automatically a higher-timeframe calculation.
The two modes represent different analytical assumptions. Neither mode guarantees improved results.
### Presets
The script includes four presets.
#### Scalp
The Scalp preset uses:
* Donchian Length: 10;
* RSI filter: disabled;
* volume filter: disabled;
* EMA filter: disabled.
This is the most responsive starting configuration and can produce more frequent conditions.
#### Intraday
The Intraday preset uses:
* Donchian Length: 20;
* volume filter: enabled;
* RSI filter: disabled;
* EMA filter: disabled.
This configuration requires midpoint-cross signals to occur with volume above its selected moving average.
#### Swing
The Swing preset uses:
* Donchian Length: 55;
* EMA filter: enabled;
* RSI filter: disabled;
* volume filter: disabled.
With the default trend-following EMA mode, bullish conditions require price above the EMA and bearish conditions require price below it.
#### Custom
The Custom preset uses:
* the manually selected Donchian length;
* manually enabled RSI filter;
* manually enabled volume filter;
* manually enabled EMA filter.
The presets are starting configurations. They are not automatically optimized for the active symbol, market, or timeframe.
### How to use the indicator
A practical workflow is:
1. Apply the indicator to a standard candlestick or bar chart.
2. Select the preset closest to the intended analytical style.
3. Review the Donchian channel width and midpoint.
4. Observe whether the cloud aligned with the current bar is bullish or bearish.
5. Check which optional filters are active.
6. Wait for a confirmed triangle after the chart bar closes.
7. Review nearby support, resistance, volatility, and broader market structure.
8. Inspect whether the signal occurred after a clean midpoint cross or during repeated sideways crossings.
9. Use the active target and stop lines only as configurable research references.
10. Treat the tables as simplified historical measurements rather than proof of future performance.
No individual triangle, cloud colour, filter, target line, table ratio, or alert should be used as the sole basis for a trading decision.
### Using the signal in directional conditions
In a sustained directional market, users may examine whether:
* the cloud has maintained one direction;
* price has remained predominantly on one side of the Donchian midpoint;
* the channel is expanding rather than contracting;
* volume confirms the midpoint cross;
* price satisfies the trend-following EMA relationship.
Repeated crosses of the midpoint inside a narrow channel may indicate sideways conditions and can produce frequent alternating signals.
### Using the signal in ranging conditions
In ranging conditions, users may consider:
* using the Custom preset;
* enabling the RSI filter;
* increasing the Donchian length;
* reviewing whether price repeatedly crosses the midpoint;
* using the mean-reversion EMA relationship only after understanding its different purpose.
The RSI filter does not identify a range by itself. It only prevents selected signals in configured RSI extreme areas.
### Signal size and colours
Bullish and bearish triangle colours can be adjusted independently.
Signal size options are:
* Tiny;
* Small;
* Normal.
Changing the colour or size does not change the underlying condition.
### Historical target and stop references
When no historical outcome is active, a confirmed bullish or bearish signal starts a new measurement from the signal bar’s closing price.
For a bullish condition:
* the percentage target is placed above the recorded close;
* the percentage stop is placed below the recorded close.
For a bearish condition:
* the percentage target is placed below the recorded close;
* the percentage stop is placed above the recorded close.
The active levels are shown on the chart until one is reached.
The script begins evaluating those levels on the bar after the confirmed signal.
### One active measurement
Only one unresolved historical outcome is tracked across both bullish and bearish signals.
While a measurement is active, later signals do not begin additional measurements.
As a result, not every displayed signal will necessarily be represented in the outcome tables.
### Same-bar target and stop behaviour
When both the target and stop are reached during the same evaluation bar, the script records the outcome as a loss.
This conservative rule is used because the script does not reconstruct the lower-timeframe path inside the bar and cannot determine which level was reached first.
### Bullish and bearish tables
The bullish table shows:
* bullish target outcomes;
* bullish stop outcomes;
* the bullish target-outcome ratio.
The bearish table shows:
* bearish target outcomes;
* bearish stop outcomes;
* the bearish target-outcome ratio.
The table positions and text colour can be adjusted.
Users should place the bullish and bearish tables in different chart positions to avoid visual overlap.
### Meaning of the table ratios
Each ratio is calculated from the number of recorded target outcomes divided by the total recorded target and stop outcomes for that direction.
These are simplified historical chart measurements.
They are not equivalent to TradingView Strategy Tester results and do not model:
* commissions;
* slippage;
* spread;
* realistic order execution;
* position sizing;
* portfolio equity;
* liquidity;
* overlapping positions;
* all intrabar sequencing possibilities.
Results depend on:
* the selected symbol;
* timeframe;
* available chart history;
* Donchian length;
* Ichimoku settings;
* enabled filters;
* EMA mode;
* percentage target;
* percentage stop.
Historical table values do not imply future performance.
### Alerts
Alerts are available for:
* confirmed bullish signals;
* confirmed bearish signals;
* visible-cloud span crosses.
Bullish and bearish signal alerts occur after the chart bar closes when all configured conditions are satisfied.
The cloud-flip alert occurs when the Senkou spans aligned with the current chart bar cross.
Users should test alerts on the intended symbol and timeframe before relying on them operationally.
### Suggested starting process
1. Begin with the Intraday preset on a liquid symbol.
2. Review how the Donchian midpoint behaves on the chosen timeframe.
3. Confirm that the cloud direction is visually understandable.
4. Observe several signals before changing filter settings.
5. Use the Custom preset when testing different filter combinations.
6. Keep trend-following EMA logic enabled initially when using the Swing preset.
7. Review repeated midpoint crosses in sideways markets.
8. Treat active target and stop lines as research references.
9. Treat the table ratios as simplified outcome measurements.
10. Test alerts with bar-close confirmation.
### How the implementation differs from its individual components
Donchian channels, Ichimoku calculations, RSI, volume averages, and EMAs are established analytical tools.
This implementation combines them through a specific sequence:
* a Donchian midpoint cross provides the event;
* the cloud supplies directional context;
* enabled filters restrict which crosses are accepted;
* presets configure different combinations within one script;
* the accepted condition drives markers, alerts, active reference levels, and historical outcome measurements.
The purpose of the combination is to organize several forms of context around one defined midpoint-cross event rather than displaying unrelated indicators independently.
### Limitations
* The indicator is intended for standard OHLC candlestick or bar charts.
* Signals generated on non-standard synthetic chart types can be misleading and should not be used.
* Donchian and moving-average calculations are based on historical data and introduce delay.
* The cloud is projected visually into the future, but it is calculated only from historical price data.
* Cloud direction does not guarantee trend continuation.
* Midpoint crosses can occur repeatedly in sideways markets.
* RSI can remain overbought or oversold during persistent trends.
* Volume data differs between markets and data providers.
* The EMA is calculated on the chart timeframe, not automatically on a higher timeframe.
* Presets are starting configurations and are not symbol-specific optimizations.
* A confirmed signal can fail to reach its configured target.
* Only one unresolved historical outcome is tracked at a time.
* Not every displayed signal is included in the tables.
* Same-bar target and stop order cannot be reconstructed.
* Same-bar target and stop cases are recorded as losses.
* The tables are simplified measurements and not complete strategy backtests.
* The script does not model commissions, slippage, spread, liquidity, position sizing, or realistic execution.
* The indicator should not be used as the sole basis for a trading decision.
Donchian Ichimoku Confluence is an analytical tool and does not provide financial advice or guaranteed trading outcomes.
-----------
## How to Use
Donchian Ichimoku Confluence is designed to be used on standard candlestick or bar charts.
### 1. Choose a preset
Select the preset that best matches the type of analysis you want to perform.
* Scalp uses a Donchian length of 10 with the optional RSI, volume, and EMA filters disabled. It reacts more quickly but can produce more frequent signals.
* Intraday uses a Donchian length of 20 and enables the volume filter. Signals require reported volume to be above its moving average.
* Swing uses a Donchian length of 55 and enables the EMA filter. With trend-following EMA logic enabled, bullish signals require price above the EMA and bearish signals require price below it.
* Custom allows you to select the Donchian length and enable each filter manually.
The presets are starting configurations. They are not automatically optimized for every symbol or timeframe.
### 2. Read the Donchian channel
The upper Donchian line shows the highest high over the selected lookback.
The lower Donchian line shows the lowest low over the selected lookback.
The middle line is the average of the upper and lower boundaries.
The signal logic uses a confirmed crossing of this midpoint.
* A bullish setup begins when price crosses above the Donchian midpoint.
* A bearish setup begins when price crosses below the Donchian midpoint.
A midpoint cross alone is not enough to create a signal. The cloud and all enabled filters must also agree.
### 3. Read the cloud
The cloud provides directional context.
* A bullish cloud means the cloud’s faster span is above its slower span.
* A bearish cloud means the faster span is below or equal to the slower span.
Bullish signals require bullish cloud context.
Bearish signals require bearish cloud context.
The cloud is displayed forward according to the selected displacement, but the signal logic uses the cloud values aligned with the current chart bar.
The cloud does not predict future prices. It is calculated from historical price data.
### 4. Understand the bullish signal
A bullish triangle appears after the chart bar closes when:
* price crosses above the Donchian midpoint;
* the cloud aligned with the current bar is bullish;
* the RSI condition passes when the RSI filter is enabled;
* reported volume is above its moving average when the volume filter is enabled;
* the selected EMA condition passes when the EMA filter is enabled.
The triangle shows that all enabled conditions aligned on the same confirmed bar.
It does not guarantee that price will continue higher.
### 5. Understand the bearish signal
A bearish triangle appears after the chart bar closes when:
* price crosses below the Donchian midpoint;
* the cloud aligned with the current bar is bearish;
* the RSI condition passes when the RSI filter is enabled;
* reported volume is above its moving average when the volume filter is enabled;
* the selected EMA condition passes when the EMA filter is enabled.
The triangle shows that all enabled conditions aligned on the same confirmed bar.
It does not guarantee that price will continue lower.
### 6. Use the RSI filter
The RSI filter is optional.
For bullish signals, RSI must remain below the selected overbought level.
For bearish signals, RSI must remain above the selected oversold level.
The filter is designed to exclude selected signals occurring in configured RSI extreme areas.
It does not require RSI to cross a level and does not independently confirm a reversal.
### 7. Use the volume filter
The volume filter requires current reported volume to be above its moving average.
This can help exclude midpoint crossings that occur during comparatively low-volume conditions.
Volume information differs between markets and data providers. Some symbols use centralized transaction volume, while others may provide tick volume.
### 8. Use the EMA filter
The EMA filter can operate in two modes.
Trend-following mode:
* bullish signals require price above the EMA;
* bearish signals require price below the EMA.
Mean-reversion mode:
* bullish signals require price below the EMA;
* bearish signals require price above the EMA.
Trend-following mode is the default.
The EMA is calculated on the active chart timeframe. It is not automatically calculated from a higher timeframe.
### 9. Confirm the wider market context
Before interpreting a signal, review:
* the broader price trend;
* nearby support and resistance;
* Donchian channel expansion or contraction;
* cloud direction;
* volatility;
* repeated midpoint crossings;
* the position of price relative to the EMA;
* the quality of available volume data.
Repeated bullish and bearish signals inside a narrow Donchian channel may indicate sideways market conditions.
### 10. Use the active target and stop lines
When a confirmed signal occurs and no other historical measurement is active, the script records the signal bar’s closing price.
For a bullish condition:
* the target is placed above the recorded close;
* the stop is placed below the recorded close.
For a bearish condition:
* the target is placed below the recorded close;
* the stop is placed above the recorded close.
The percentage distances can be changed in the Historical Outcome Settings.
The target and stop are evaluated beginning with the following chart bar.
These levels are research references. They are not automatic orders and are not recommendations for position sizing or risk management.
### 11. Read the historical outcome tables
The bullish table displays:
* T: bullish target outcomes;
* S: bullish stop outcomes;
* the percentage of completed bullish measurements that reached the target.
The bearish table displays the equivalent results for bearish measurements.
Only one unresolved measurement can be active at a time.
Signals that occur while another measurement remains active are not added to the tables.
If the target and stop are both touched during the same chart bar, the script records a stop outcome because the intrabar price sequence cannot be determined.
The tables are simplified historical measurements. They are not equivalent to TradingView Strategy Tester results.
They do not account for:
* commissions;
* slippage;
* spread;
* liquidity;
* position sizing;
* portfolio equity;
* realistic order execution;
* overlapping positions;
* complete intrabar sequencing.
Historical table results do not guarantee future performance.
### 12. Create alerts
Alerts are available for:
* confirmed bullish confluence signals;
* confirmed bearish confluence signals;
* visible cloud flips.
Bullish and bearish alerts occur after the chart bar closes.
Test each alert on the intended symbol and timeframe before using it operationally.
### Suggested starting setup
A practical starting process is:
* apply the indicator to a standard candlestick chart;
* begin with the Intraday preset;
* use a liquid symbol with reliable volume data;
* observe the Donchian midpoint and cloud relationship;
* wait for confirmed bar-close signals;
* review nearby market structure before interpreting a triangle;
* test the Custom preset after understanding the default behaviour;
* keep trend-following EMA logic enabled initially;
* treat target and stop lines as research references;
* treat the tables as simplified measurements rather than verified performance statistics.
The indicator should be used as one analytical tool within a broader process. It does not provide financial advice, guaranteed signals, or guaranteed trading results.
Donchian Ichimoku Confluence combines a Donchian price channel with an Ichimoku-style cloud and optional RSI, volume, and EMA filters.
The script identifies confirmed bullish and bearish conditions when price crosses the Donchian midpoint while the cloud and all enabled filters satisfy the corresponding directional rules.
It also includes configurable presets, visual signal markers, alerts, active percentage target and stop reference lines, and simplified historical target/stop outcome tables.
The indicator is intended for use on standard OHLC candlestick or bar charts. Its markers identify when the configured conditions align. They do not predict future price movement and are not automatic instructions to enter or exit a position.
### How the components interact
The indicator uses the following sequence:
1. The Donchian channel defines the recent price range and midpoint.
2. Price must cross the Donchian midpoint.
3. The Ichimoku-style cloud supplies bullish or bearish structural context.
4. Any enabled RSI, volume, and EMA filters must also pass.
5. A signal is confirmed at the close of the chart bar.
6. The alert and simplified historical outcome measurement use that confirmed condition.
The signal is therefore based on the interaction of the enabled modules rather than on any one component alone.
### Donchian channel
The Donchian upper line is the highest high over the selected channel length.
The Donchian lower line is the lowest low over the selected channel length.
The Donchian midpoint is the average of the upper and lower boundaries.
The midpoint acts as the crossing level used by the signal logic.
A longer Donchian length produces a broader and slower-moving channel.
A shorter length responds more quickly to recent price changes but can produce more frequent crossings.
The line colours, thicknesses, and visual styles can be adjusted.
The dashed and dotted options are visual approximations created with circle and cross plot styles rather than true dashed or dotted line objects.
### Ichimoku-style cloud
The cloud uses three configurable lookbacks:
* Tenkan Length;
* Kijun Length;
* Senkou B Length.
The Tenkan value is the midpoint of the highest high and lowest low over the Tenkan lookback.
The Kijun value uses the same calculation over the Kijun lookback.
Senkou A is the average of the Tenkan and Kijun values.
Senkou B is the midpoint of the highest high and lowest low over the Senkou B lookback.
The two spans are plotted forward by the selected displacement.
This indicator uses the cloud component of Ichimoku. It does not display or use a complete traditional Ichimoku system with all standard lines and interpretations.
### Cloud direction
The cloud aligned with the current chart bar is classified as bullish when Senkou A is above Senkou B.
It is classified as bearish when Senkou A is at or below Senkou B.
The cloud provides structural context for the Donchian midpoint cross:
* bullish signals require bullish cloud context;
* bearish signals require bearish cloud context.
Cloud direction does not independently establish that price will continue in that direction.
### Cloud display
The cloud can be shown with:
* a gradient fill;
* a single-colour fill;
* no fill.
The cloud is projected forward visually according to the displacement setting.
The fill style changes only the presentation. It does not change signal calculations.
### Bullish signal
A bullish upward triangle is confirmed when:
* price crosses above the Donchian midpoint;
* the cloud aligned with the current chart bar is bullish;
* RSI is below the configured overbought threshold when the RSI filter is enabled;
* volume is above its moving average when the volume filter is enabled;
* price satisfies the selected EMA relationship when the EMA filter is enabled;
* the chart bar has closed.
The condition shows that the configured Donchian, cloud, and filter requirements aligned on the same bar.
It does not guarantee that price will continue higher.
### Bearish signal
A bearish downward triangle is confirmed when:
* price crosses below the Donchian midpoint;
* the cloud aligned with the current chart bar is bearish;
* RSI is above the configured oversold threshold when the RSI filter is enabled;
* volume is above its moving average when the volume filter is enabled;
* price satisfies the selected EMA relationship when the EMA filter is enabled;
* the chart bar has closed.
The condition shows that the configured Donchian, cloud, and filter requirements aligned on the same bar.
It does not guarantee that price will continue lower.
### RSI filter
The optional RSI filter is designed to avoid:
* bullish signals when RSI is already at or above the selected overbought level;
* bearish signals when RSI is already at or below the selected oversold level.
The filter does not require RSI to be bullish or bearish. It only excludes conditions occurring beyond the configured extreme threshold.
An overbought or oversold reading does not prove that price must reverse.
### Volume filter
The optional volume filter requires current reported volume to be above its simple moving average.
The moving-average length is configurable.
This filter is intended to exclude midpoint crossings occurring on comparatively low reported volume.
Volume quality and interpretation vary between symbols, exchanges, brokers, and markets. Some instruments provide tick volume rather than centralized transaction volume.
### EMA filter
The optional EMA filter compares price with a configurable chart-timeframe EMA.
In trend-following mode:
* bullish signals require price above the EMA;
* bearish signals require price below the EMA.
In mean-reversion mode:
* bullish signals require price below the EMA;
* bearish signals require price above the EMA.
The EMA is calculated on the active chart timeframe. It is not automatically a higher-timeframe calculation.
The two modes represent different analytical assumptions. Neither mode guarantees improved results.
### Presets
The script includes four presets.
#### Scalp
The Scalp preset uses:
* Donchian Length: 10;
* RSI filter: disabled;
* volume filter: disabled;
* EMA filter: disabled.
This is the most responsive starting configuration and can produce more frequent conditions.
#### Intraday
The Intraday preset uses:
* Donchian Length: 20;
* volume filter: enabled;
* RSI filter: disabled;
* EMA filter: disabled.
This configuration requires midpoint-cross signals to occur with volume above its selected moving average.
#### Swing
The Swing preset uses:
* Donchian Length: 55;
* EMA filter: enabled;
* RSI filter: disabled;
* volume filter: disabled.
With the default trend-following EMA mode, bullish conditions require price above the EMA and bearish conditions require price below it.
#### Custom
The Custom preset uses:
* the manually selected Donchian length;
* manually enabled RSI filter;
* manually enabled volume filter;
* manually enabled EMA filter.
The presets are starting configurations. They are not automatically optimized for the active symbol, market, or timeframe.
### How to use the indicator
A practical workflow is:
1. Apply the indicator to a standard candlestick or bar chart.
2. Select the preset closest to the intended analytical style.
3. Review the Donchian channel width and midpoint.
4. Observe whether the cloud aligned with the current bar is bullish or bearish.
5. Check which optional filters are active.
6. Wait for a confirmed triangle after the chart bar closes.
7. Review nearby support, resistance, volatility, and broader market structure.
8. Inspect whether the signal occurred after a clean midpoint cross or during repeated sideways crossings.
9. Use the active target and stop lines only as configurable research references.
10. Treat the tables as simplified historical measurements rather than proof of future performance.
No individual triangle, cloud colour, filter, target line, table ratio, or alert should be used as the sole basis for a trading decision.
### Using the signal in directional conditions
In a sustained directional market, users may examine whether:
* the cloud has maintained one direction;
* price has remained predominantly on one side of the Donchian midpoint;
* the channel is expanding rather than contracting;
* volume confirms the midpoint cross;
* price satisfies the trend-following EMA relationship.
Repeated crosses of the midpoint inside a narrow channel may indicate sideways conditions and can produce frequent alternating signals.
### Using the signal in ranging conditions
In ranging conditions, users may consider:
* using the Custom preset;
* enabling the RSI filter;
* increasing the Donchian length;
* reviewing whether price repeatedly crosses the midpoint;
* using the mean-reversion EMA relationship only after understanding its different purpose.
The RSI filter does not identify a range by itself. It only prevents selected signals in configured RSI extreme areas.
### Signal size and colours
Bullish and bearish triangle colours can be adjusted independently.
Signal size options are:
* Tiny;
* Small;
* Normal.
Changing the colour or size does not change the underlying condition.
### Historical target and stop references
When no historical outcome is active, a confirmed bullish or bearish signal starts a new measurement from the signal bar’s closing price.
For a bullish condition:
* the percentage target is placed above the recorded close;
* the percentage stop is placed below the recorded close.
For a bearish condition:
* the percentage target is placed below the recorded close;
* the percentage stop is placed above the recorded close.
The active levels are shown on the chart until one is reached.
The script begins evaluating those levels on the bar after the confirmed signal.
### One active measurement
Only one unresolved historical outcome is tracked across both bullish and bearish signals.
While a measurement is active, later signals do not begin additional measurements.
As a result, not every displayed signal will necessarily be represented in the outcome tables.
### Same-bar target and stop behaviour
When both the target and stop are reached during the same evaluation bar, the script records the outcome as a loss.
This conservative rule is used because the script does not reconstruct the lower-timeframe path inside the bar and cannot determine which level was reached first.
### Bullish and bearish tables
The bullish table shows:
* bullish target outcomes;
* bullish stop outcomes;
* the bullish target-outcome ratio.
The bearish table shows:
* bearish target outcomes;
* bearish stop outcomes;
* the bearish target-outcome ratio.
The table positions and text colour can be adjusted.
Users should place the bullish and bearish tables in different chart positions to avoid visual overlap.
### Meaning of the table ratios
Each ratio is calculated from the number of recorded target outcomes divided by the total recorded target and stop outcomes for that direction.
These are simplified historical chart measurements.
They are not equivalent to TradingView Strategy Tester results and do not model:
* commissions;
* slippage;
* spread;
* realistic order execution;
* position sizing;
* portfolio equity;
* liquidity;
* overlapping positions;
* all intrabar sequencing possibilities.
Results depend on:
* the selected symbol;
* timeframe;
* available chart history;
* Donchian length;
* Ichimoku settings;
* enabled filters;
* EMA mode;
* percentage target;
* percentage stop.
Historical table values do not imply future performance.
### Alerts
Alerts are available for:
* confirmed bullish signals;
* confirmed bearish signals;
* visible-cloud span crosses.
Bullish and bearish signal alerts occur after the chart bar closes when all configured conditions are satisfied.
The cloud-flip alert occurs when the Senkou spans aligned with the current chart bar cross.
Users should test alerts on the intended symbol and timeframe before relying on them operationally.
### Suggested starting process
1. Begin with the Intraday preset on a liquid symbol.
2. Review how the Donchian midpoint behaves on the chosen timeframe.
3. Confirm that the cloud direction is visually understandable.
4. Observe several signals before changing filter settings.
5. Use the Custom preset when testing different filter combinations.
6. Keep trend-following EMA logic enabled initially when using the Swing preset.
7. Review repeated midpoint crosses in sideways markets.
8. Treat active target and stop lines as research references.
9. Treat the table ratios as simplified outcome measurements.
10. Test alerts with bar-close confirmation.
### How the implementation differs from its individual components
Donchian channels, Ichimoku calculations, RSI, volume averages, and EMAs are established analytical tools.
This implementation combines them through a specific sequence:
* a Donchian midpoint cross provides the event;
* the cloud supplies directional context;
* enabled filters restrict which crosses are accepted;
* presets configure different combinations within one script;
* the accepted condition drives markers, alerts, active reference levels, and historical outcome measurements.
The purpose of the combination is to organize several forms of context around one defined midpoint-cross event rather than displaying unrelated indicators independently.
### Limitations
* The indicator is intended for standard OHLC candlestick or bar charts.
* Signals generated on non-standard synthetic chart types can be misleading and should not be used.
* Donchian and moving-average calculations are based on historical data and introduce delay.
* The cloud is projected visually into the future, but it is calculated only from historical price data.
* Cloud direction does not guarantee trend continuation.
* Midpoint crosses can occur repeatedly in sideways markets.
* RSI can remain overbought or oversold during persistent trends.
* Volume data differs between markets and data providers.
* The EMA is calculated on the chart timeframe, not automatically on a higher timeframe.
* Presets are starting configurations and are not symbol-specific optimizations.
* A confirmed signal can fail to reach its configured target.
* Only one unresolved historical outcome is tracked at a time.
* Not every displayed signal is included in the tables.
* Same-bar target and stop order cannot be reconstructed.
* Same-bar target and stop cases are recorded as losses.
* The tables are simplified measurements and not complete strategy backtests.
* The script does not model commissions, slippage, spread, liquidity, position sizing, or realistic execution.
* The indicator should not be used as the sole basis for a trading decision.
Donchian Ichimoku Confluence is an analytical tool and does not provide financial advice or guaranteed trading outcomes.
-----------
## How to Use
Donchian Ichimoku Confluence is designed to be used on standard candlestick or bar charts.
### 1. Choose a preset
Select the preset that best matches the type of analysis you want to perform.
* Scalp uses a Donchian length of 10 with the optional RSI, volume, and EMA filters disabled. It reacts more quickly but can produce more frequent signals.
* Intraday uses a Donchian length of 20 and enables the volume filter. Signals require reported volume to be above its moving average.
* Swing uses a Donchian length of 55 and enables the EMA filter. With trend-following EMA logic enabled, bullish signals require price above the EMA and bearish signals require price below it.
* Custom allows you to select the Donchian length and enable each filter manually.
The presets are starting configurations. They are not automatically optimized for every symbol or timeframe.
### 2. Read the Donchian channel
The upper Donchian line shows the highest high over the selected lookback.
The lower Donchian line shows the lowest low over the selected lookback.
The middle line is the average of the upper and lower boundaries.
The signal logic uses a confirmed crossing of this midpoint.
* A bullish setup begins when price crosses above the Donchian midpoint.
* A bearish setup begins when price crosses below the Donchian midpoint.
A midpoint cross alone is not enough to create a signal. The cloud and all enabled filters must also agree.
### 3. Read the cloud
The cloud provides directional context.
* A bullish cloud means the cloud’s faster span is above its slower span.
* A bearish cloud means the faster span is below or equal to the slower span.
Bullish signals require bullish cloud context.
Bearish signals require bearish cloud context.
The cloud is displayed forward according to the selected displacement, but the signal logic uses the cloud values aligned with the current chart bar.
The cloud does not predict future prices. It is calculated from historical price data.
### 4. Understand the bullish signal
A bullish triangle appears after the chart bar closes when:
* price crosses above the Donchian midpoint;
* the cloud aligned with the current bar is bullish;
* the RSI condition passes when the RSI filter is enabled;
* reported volume is above its moving average when the volume filter is enabled;
* the selected EMA condition passes when the EMA filter is enabled.
The triangle shows that all enabled conditions aligned on the same confirmed bar.
It does not guarantee that price will continue higher.
### 5. Understand the bearish signal
A bearish triangle appears after the chart bar closes when:
* price crosses below the Donchian midpoint;
* the cloud aligned with the current bar is bearish;
* the RSI condition passes when the RSI filter is enabled;
* reported volume is above its moving average when the volume filter is enabled;
* the selected EMA condition passes when the EMA filter is enabled.
The triangle shows that all enabled conditions aligned on the same confirmed bar.
It does not guarantee that price will continue lower.
### 6. Use the RSI filter
The RSI filter is optional.
For bullish signals, RSI must remain below the selected overbought level.
For bearish signals, RSI must remain above the selected oversold level.
The filter is designed to exclude selected signals occurring in configured RSI extreme areas.
It does not require RSI to cross a level and does not independently confirm a reversal.
### 7. Use the volume filter
The volume filter requires current reported volume to be above its moving average.
This can help exclude midpoint crossings that occur during comparatively low-volume conditions.
Volume information differs between markets and data providers. Some symbols use centralized transaction volume, while others may provide tick volume.
### 8. Use the EMA filter
The EMA filter can operate in two modes.
Trend-following mode:
* bullish signals require price above the EMA;
* bearish signals require price below the EMA.
Mean-reversion mode:
* bullish signals require price below the EMA;
* bearish signals require price above the EMA.
Trend-following mode is the default.
The EMA is calculated on the active chart timeframe. It is not automatically calculated from a higher timeframe.
### 9. Confirm the wider market context
Before interpreting a signal, review:
* the broader price trend;
* nearby support and resistance;
* Donchian channel expansion or contraction;
* cloud direction;
* volatility;
* repeated midpoint crossings;
* the position of price relative to the EMA;
* the quality of available volume data.
Repeated bullish and bearish signals inside a narrow Donchian channel may indicate sideways market conditions.
### 10. Use the active target and stop lines
When a confirmed signal occurs and no other historical measurement is active, the script records the signal bar’s closing price.
For a bullish condition:
* the target is placed above the recorded close;
* the stop is placed below the recorded close.
For a bearish condition:
* the target is placed below the recorded close;
* the stop is placed above the recorded close.
The percentage distances can be changed in the Historical Outcome Settings.
The target and stop are evaluated beginning with the following chart bar.
These levels are research references. They are not automatic orders and are not recommendations for position sizing or risk management.
### 11. Read the historical outcome tables
The bullish table displays:
* T: bullish target outcomes;
* S: bullish stop outcomes;
* the percentage of completed bullish measurements that reached the target.
The bearish table displays the equivalent results for bearish measurements.
Only one unresolved measurement can be active at a time.
Signals that occur while another measurement remains active are not added to the tables.
If the target and stop are both touched during the same chart bar, the script records a stop outcome because the intrabar price sequence cannot be determined.
The tables are simplified historical measurements. They are not equivalent to TradingView Strategy Tester results.
They do not account for:
* commissions;
* slippage;
* spread;
* liquidity;
* position sizing;
* portfolio equity;
* realistic order execution;
* overlapping positions;
* complete intrabar sequencing.
Historical table results do not guarantee future performance.
### 12. Create alerts
Alerts are available for:
* confirmed bullish confluence signals;
* confirmed bearish confluence signals;
* visible cloud flips.
Bullish and bearish alerts occur after the chart bar closes.
Test each alert on the intended symbol and timeframe before using it operationally.
### Suggested starting setup
A practical starting process is:
* apply the indicator to a standard candlestick chart;
* begin with the Intraday preset;
* use a liquid symbol with reliable volume data;
* observe the Donchian midpoint and cloud relationship;
* wait for confirmed bar-close signals;
* review nearby market structure before interpreting a triangle;
* test the Custom preset after understanding the default behaviour;
* keep trend-following EMA logic enabled initially;
* treat target and stop lines as research references;
* treat the tables as simplified measurements rather than verified performance statistics.
The indicator should be used as one analytical tool within a broader process. It does not provide financial advice, guaranteed signals, or guaranteed trading results.
Release Notes
updated chart imageRelease Notes
updated chart imageProtected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
See What Others Miss. beatingsmartmoney.com
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
See What Others Miss. beatingsmartmoney.com
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.