# TriDivergenceEA Expert Advisor that trades on confluence of divergence signals from RSI, Stochastic and Klinger indicators. > **Proprietary software** — © Teenodi Ltd. All rights reserved. Private repository; not for distribution. See [LICENSE](LICENSE). ## TriDivergenceEA.mq5 _EA that trades based on divergence signals from RSI, Stochastic, and Klinger indicators_ ### Inputs *Magicnumber and Comment Setting* | Input | Type | Default | Description | |---|---|---|---| | `Magic` | int | `12345` | Magic number for trade identification (12345-123450) | | `comentar` | string | `"DivergenceEA"` | Trade comment field | *Risk- and Moneymanagement* | Input | Type | Default | Description | |---|---|---|---| | `volumetype` | VOLUME_TYPE | `VOLUME_FIXED` | Volume type: 1=FIXED, 2=PROCENT | | `Risk` | double | `0.1` | Risk percentage per trade (0.1-30%) | | `Lots` | double | `0.01` | Fixed lot size (0.01-100) | | `Sl_Point_pip` | int | `100` | Stop loss in pips (10-10000) | | `Tp_Point_pip` | int | `200` | Take profit in pips (10-10000) | *Pending Orders Strategy* | Input | Type | Default | Description | |---|---|---|---| | `PendingOrder` | bool | `false` | Enable pending orders | *Condition 1* *Position* | Input | Type | Default | Description | |---|---|---|---| | `Position` | POSITION_TYPE_FILTER | `POSITION_BOTH` | 1=BUY_ONLY, 2=SELL_ONLY, 3=BUY_or_SELL | | `CANDLESTICKS` | string | `"HIGHER_HIGH_OR_LOWER_LOW"` | Candlestick validation description | | `Numberofcandles_Back` | int | `20` | Lookback period for candlestick validation (1-100) | *Condition 2* *INDICATORS DIVERGENCE:* *Klinger Oscillator KO INDICATOR* | Input | Type | Default | Description | |---|---|---|---| | `KO` | bool | `true` | Enable Klinger Oscillator | | `KLINGER_LENGHT1` | int | `34` | First Klinger parameter (0-100) | | `KLINGER_LENGHT2` | int | `55` | Second Klinger parameter (0-100) | | `SIGNAL_LONG` | int | `13` | Klinger signal length (0-100) | | `Numberofcandles_Back_KO` | int | `20` | KO lookback period for analysis (1-100) | *Condition 3* *RSI INDICATOR* | Input | Type | Default | Description | |---|---|---|---| | `RSI` | bool | `true` | Enable RSI indicator | | `RSI_UPPER` | int | `70` | RSI upper threshold (0-100) | | `RSI_LOWER` | int | `30` | RSI lower threshold (0-100) | | `RSI_LONG` | int | `14` | RSI signal length (0-100) | | `Numberofcandles_Back_RSI` | int | `20` | RSI lookback period for analysis (1-100) | *Condition 4* *STOCH INDICATOR* | Input | Type | Default | Description | |---|---|---|---| | `STOCH` | bool | `true` | Enable Stochastic indicator | | `K` | int | `5` | Stochastic %K value (0-100) | | `D` | int | `3` | Stochastic %D value (0-100) | | `STOCHASTIC_LONG` | int | `5` | Stochastic signal length (0-100) | | `Numberofcandles_Back_STOCH` | int | `20` | STOCH lookback period for analysis (1-100) | *BreakEven Settings* | Input | Type | Default | Description | |---|---|---|---| | `BreakEven` | bool | `true` | Enable breakeven function | | `BreakEvenShift` | int | `10` | Distance to move stop above breakeven (in pips) (1-100) | | `StopNachzienWenn` | int | `50` | Profit level to trigger breakeven (in pips) (1-100) | *Trallingstop Settings* | Input | Type | Default | Description | |---|---|---|---| | `Trall` | bool | `false` | Enable trailing stop | | `traillingstop` | TRAILING_TYPE | `TRAIL_CONTINUOUS` | Trailing algorithm type: 1=continuous, 2=step | | `TralStop` | int | `30` | Trailing distance behind price (in pips) (1-2000) | | `TralStep` | int | `10` | Minimum move before trail adjusts (in pips) (1-2000) | *Visual Settings* | Input | Type | Default | Description | |---|---|---|---| | `RectangleColor` | color | `clrLimeGreen` | Rectangle color | ## Archive Earlier versions / forks are preserved under [`archive/`](archive/) for reference. ## Install 1. Copy the source file(s) into your MetaTrader 5 `MQL5/` tree (`Experts/`, `Indicators/`, or `Scripts/` as appropriate). 2. In MetaEditor, open the file and compile (**F7**). 3. Attach the compiled program to a chart from the terminal Navigator. ## License Proprietary and confidential. © Teenodi Ltd. All rights reserved. See [LICENSE](LICENSE).