present
Sign up and get $50 off your first purchase
Divergency 1.1_withSourceCode
Indicator
351 downloads
Version 1.0, Apr 2025
Windows, Mac
5.0
Reviews: 1
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 2
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 3
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 4
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 5
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 6
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 7
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 8
Trading product for Divergency 1.1_withSourceCode Indicator Signal Indices, image 9
Since 11/01/2025
375
Free installs

Description

📈 Divergency v1.1 Indicator for cTrader: A Comprehensive Guide 🚀

The Divergency v1.1 indicator is a powerful tool designed for the cTrader platform to identify divergences and correlations between price action and various oscillators. This guide provides a detailed description of the code, its functionality, and step-by-step instructions on how to use it effectively. Whether you're a beginner or an experienced trader, this indicator can enhance your technical analysis with customizable settings and visual cues. Let’s dive in! 🌟


🎯 Overview of the Divergency11 Indicator

The Divergency v1.1 indicator analyzes price movements and oscillator behavior to detect:

  • Regular Divergences: Signals potential reversals when price and indicator move in opposite directions.
  • Hidden Divergences: Indicates trend continuation when price and indicator align differently.
  • Correlations: Highlights when price and indicator move in sync, suggesting trend strength.

It supports 12 different oscillators (e.g., RSI, MACD, Stochastic) and allows customization of divergence detection parameters, making it versatile for various trading strategies. The indicator plots signals directly on the chart and indicator area, using colored lines, icons, and text for clear visualization. 📊


🔍 Code Breakdown

1. Indicator Setup 🛠️

  • Namespace and Class: Defined in the cAlgo namespace as Divergency v1.1, inheriting from Indicator.
  • Attributes:
    • IsOverlay = false: Displays in a separate indicator window.
    • TimeZone = TimeZones.UTC: Uses UTC for consistency.
    • AccessRights = AccessRights.None: No special permissions required.

2. Parameters ⚙️

The indicator offers extensive customization through parameters, grouped for clarity:

  • Oscillator Selection:
    • IndicatorSelection: Choose from 12 oscillators (e.g., RSI, MACD, Stochastic).(Normalised to 50 as middle, and result higher for optimisation process)
    • Value1, Value2, Value3: Adjust period, smoothing, and signal line settings.
    • MaType: Select moving average type (e.g., Simple, Exponential).
  • Divergence Settings:
    • Strat: Choose detection mode (Divergence, Hidden Divergence, Correlation, or combinations).
    • PeriodFractal: Set fractal period for identifying peaks/troughs (must be odd).
    • LookBack: Number of historical divergences to analyze.
    • MinCountDivergenceShow: Minimum divergences required to display signals.
  • Zone Analysis:
    • MinBarsValidation, MaxBarsValidation: Define valid bar range for divergence detection.
    • ExtraLevelMin, ExtraLevelMax: Set oscillator overbought/oversold thresholds.
  • Levels:
    • ExtraLevelLine: Adjusts oversold/overbought lines around the 50 level.

3. Outputs 📈

  • Result: Main oscillator value (green line).
  • Signal: Smoothed signal line (red line).
  • Divergence signals (plotted as points):
    • ResDivergenceUp (Lime), ResDivergenceDown (Red): Regular divergences.
    • ResDivergenceUpHidden (Green), ResDivergenceDownHidden (Orange): Hidden divergences.
    • ResCorrelationUp (Turquoise), ResCorrelationDown (Magenta): Correlations.

4. Key Functions 🧠

  • Initialize(): Sets up the indicator, validates parameters, and draws static lines (oversold, overbought, zero).
  • Calculate(): Computes oscillator values, normalizes them around 50, and detects fractals for divergence analysis.
  • GetFractal(): Identifies peaks (fractalUp) and troughs (fractalDown) in the oscillator.
  • GetDivergence(): Analyzes fractal points to detect divergences or correlations.
  • CreateLine(): Draws trend lines and icons for detected signals.
  • DawDivergence(): Visualizes divergences with lines and arrows on the chart and indicator area.

5. Helper Classes 📋

  • SRPrice: Stores fractal data (index, price, indicator value).
  • DivergenceFind: Tracks divergence details (title, time, prices, color).

6. Error Handling 🚨

The indicator checks for invalid parameters (e.g., MinBarsValidation > MaxBarsValidation, even PeriodFractal) and displays warnings in the indicator area using DrawStaticText.


🛠️ How to Use the Divergency11 Indicator

Step 1: Installation 📥

  1. Download the Code: Copy the provided C# code.
  2. Add to cTrader:
    • Open cTrader and navigate to cAlgo > Indicators.
    • Click New and paste the code into the editor.
    • Build the indicator (ensure no compilation errors).
  3. Apply to Chart:
    • Open a chart in cTrader.
    • Add the Divergency11 indicator from the indicators list.

Step 2: Configure Parameters ⚙️

Customize the settings to match your trading style:

  • Choose an Oscillator:
    • Select an oscillator (e.g., Relative_Strenght_Index for RSI) via IndicatorSelection.
    • Adjust Value1 (period), Value2 (smoothing), and Value3 (signal period) as needed.
  • Set Divergence Type:
    • Use Strat to focus on Divergence, Hiden_Divergence, Correlation, or All_Divergence.
  • Fractal and Lookback:
    • Set PeriodFractal to an odd number (e.g., 5) for symmetry.
    • Adjust LookBack to control how many historical divergences are analyzed.
  • Zone and Levels:
    • Configure ExtraLevelMin and ExtraLevelMax for overbought/oversold zones.
    • Set ExtraLevelLine to adjust visual thresholds.

Step 3: Interpret Signals 📊

  • Regular Divergence:
    • Up (Lime): Bearish signal (price makes higher highs, oscillator makes lower highs).
    • Down (Red): Bullish signal (price makes lower lows, oscillator makes higher lows).
  • Hidden Divergence:
    • Up (Green): Bullish continuation (price makes lower highs, oscillator makes higher highs).
    • Down (Orange): Bearish continuation (price makes higher lows, oscillator makes lower lows).
  • Correlation:
    • Up (Turquoise): Strong bullish trend (price and oscillator both rising).
    • Down (Magenta): Strong bearish trend (price and oscillator both falling).
  • Visual Cues:
    • Trend lines connect divergence points on the chart and indicator.
    • Arrows indicate signal direction (up/down).
    • Text displays the number of detected divergences (if LookBack > 1).

Step 4: Trading Strategies 💡

  • Reversal Trading:
    • Use regular divergences (Lime/Red) to spot potential reversals.
    • Confirm with other indicators (e.g., support/resistance, candlestick patterns).
  • Trend Continuation:
    • Hidden divergences (Green/Orange) signal trend continuation.
    • Enter trades in the direction of the trend after a pullback.
  • Trend Strength:
    • Correlations (Turquoise/Magenta) confirm strong trends.
    • Use as a filter to avoid counter-trend trades.
  • Timeframe:
    • Works on any timeframe, but higher timeframes (H1, H4) reduce noise.
  • Risk Management:
    • Set stop-losses below recent swing lows (for longs) or above swing highs (for shorts).
    • Use the ATR (included in the code) to size positions.

Step 5: Optimization 🔧

  • Backtest: Use cTrader’s backtesting feature to test the indicator on historical data.
  • Adjust Parameters: Experiment with PeriodFractal, LookBack, and MinCountDivergenceShow to reduce false signals.
  • Combine Indicators: Pair with trend indicators (e.g., Moving Averages) or volatility tools (e.g., Bollinger Bands).


🌟 Tips for Success

  • Start Simple: Begin with default settings and a familiar oscillator like RSI.
  • Practice on Demo: Test the indicator on a demo account to understand its signals.
  • Monitor Alerts: Watch for arrows and trend lines to act on signals promptly.
  • Avoid Overtrading: Use divergences as part of a broader strategy, not in isolation.
  • Stay Updated: Check for code updates or community feedback on cTrader forums.


⚠️ Common Issues and Solutions

  • No Signals Appear:
    • Check MinCountDivergenceShow vs. LookBack (former must be ≤ latter).
    • Ensure PeriodFractal is odd.
  • Too Many Signals:
    • Increase MinCountDivergenceShow or reduce LookBack.
    • Tighten MinBarsValidation and MaxBarsValidation.
  • Error Messages:
    • Review parameter warnings in the indicator area (e.g., MinBarsValidation > MaxBarsValidation).
    • Correct invalid settings and reapply the indicator.


🎉 Conclusion

The Divergency v1.1 indicator is a versatile and robust tool for cTrader users, offering deep insights into price-oscillator relationships. With its customizable settings and clear visual outputs, it empowers traders to spot reversals, continuations, and trend strength with confidence. Try it out, tweak the parameters, and integrate it into your trading plan to elevate your analysis! 🚀

Happy trading, and may your charts be ever green! 📈💚

Summary

AI summary
The Divergency v1.1 indicator for the cTrader platform detects and visualizes divergences and correlations between price action and various oscillators. It supports 12 oscillators including RSI, MACD, and Stochastic, allowing users to customize parameters such as oscillator selection, smoothing, fractal period, and divergence detection modes (regular, hidden, correlation, or combinations). The indicator identifies:

- Regular divergences signaling potential reversals when price and oscillator move oppositely.
- Hidden divergences indicating trend continuation with differing price and oscillator alignments.
- Correlations highlighting synchronized movements suggesting trend strength.

Signals are displayed on the chart and indicator window using colored lines, icons, and text for clarity. Visual cues include trend lines connecting divergence points and arrows indicating signal direction. Key functions handle initialization, calculation of normalized oscillator values, fractal detection, divergence analysis, and drawing of signals.

Users can configure overbought/oversold zones and adjust lookback periods to tailor signal sensitivity. The indicator works on any timeframe, with higher timeframes recommended to reduce noise. It includes error handling for invalid parameters and provides guidance for installation, parameter setup, signal interpretation, and trading strategies such as reversal and trend continuation. Backtesting and parameter optimization are supported within cTrader to refine performance.
Indicator profile

Discussion

Customer reviews

5.0
Reviews: 1
5
100 %
4
0 %
3
0 %
2
0 %
1
0 %
Customer reviews
August 18, 2025
Detects regular and hidden divergences, customizable, includes source code for modification. Cons: No built-in alerts or signal statistics, performance may drop on large history with low TFs.

FAQ

Signal
Indices
RSI
ATR
MACD
Bollinger
Products available through cTrader Store, including trading bots, indicators and plugins, are provided by third-party developers and made available for informational and technical access purposes only. cTrader Store is not a broker and does not provide investment advice, personal recommendations or any guarantee of future performance.

You may also like

Indicator
Prop
Forex
+12
Introducing High Accuracy multi timeframe Swing high and low detector.
Indicator
Doji
Engulfing
+1
Mide en puntos la distancia entre el Máximo y el Mínimo alcanzados por cada vela, incluida la vela actual.
Indicator
Forex
BTCUSD
+9
This indicator implements an Opening Range Breakout (ORB) trading strategy, designed to capture momentum during the most
Indicator
EMA
Forex
+5
ALMA Smoothed Gaussian Moving Average (ASGMA) – by LudwigICT
Indicator
Supply & Demand
Premium/Discount
Advanced Dual KAMA indicator with automated multi-asset presets & target levels.
Indicator
ATR
VWAP
+2
Swing anchor VWAP pullback signals, each with entry, stop and three targets drawn, seven filter profiles and auto pick
Indicator
Market Structure
Stop guessing which trading session you in, with Sessions indicator sessions are in your finger tips like a pro
Indicator
ATR
The Tenkan-ATR Indicator is a powerful and innovative indicator for Traders. SALE OFF!!!
Indicator
SMC
Prop
+16
Multi-Time Frame Candlesticks FVG with BSL/SSL Premium Suite
Indicator
SMC
Prop
+5
Order Block PRO — Smart Institutional Zone Detector
Indicator
Fair Value Gap
Liquidity Grab
+2
PRO Liquidity Sweep + FVG Combo detector with custom Gold/Blue signals & alerts
Indicator
Forex
BTCUSD
+3
Designed to identify and visualize price reversal patterns using Bézier curves.
Indicator
Volume
Liquidity Sweep
+1
Liquidity Profiler Tools
Indicator
Prop
Forex
+12
Half Trend Cloud
Indicator
ATR
EMA
+4
The FULL-MARKET-VIEW-DASHBOARD is a professional-grade trading suite for cTrader that eliminates market noise.
Indicator
Key Levels
Chart UI Tools
+2
Visualize five major market sessions in GMT with editable times, high-low boxes and directional range lines.
Indicator
AI
ATR
+27
Nadaraya-Watson Envelope Indicator
Indicator
VWAP
Support & Resistance
Trading.FC$_vwap Algo shows VWAP trends, dynamic support/resistance and deviation bands to spot potential trade entries.

Price

Since 11/01/2025
375
Free installs