Collection · MT5

Trendline Confluence EA

by i2leO

Trendline Confluence EA is a MetaTrader 5 Expert Advisor that detects trendlines from swing highs and lows.

High risk

GitHub stars1
Forks3
Last update10 months ago24 Nov 2025
LicenceNone stated

Overview

Trendline Confluence EA enters long or short trades on price bouncing from trendlines or breaking through them, with optional ABCD pattern confirmation and confluence of multiple lines. Exits use multiple take profit levels (fixed points or trendline distance), trailing stop loss, and hedge protection for opposite positions. Lot sizing follows platform rules; supports forex and gold on H1-H4 timeframes. Risk controls include trailing SL and partial TPs; no martingale or grid scaling.

Details

Author

i2leO on GitHub

Type

Collection

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout, Martingale, Hedging

Markets

Forex, Gold

Timeframes

M15-H1, H4 and above

Risk Profile

  • Uses martingale lot scaling: losses can grow fast
  • Holds opposite positions at once

Input Parameters

Read from TrendlineConfluence_EA.mq5. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
separator1string=== Symbol & Timeframe ===─────────────────────
InpSymbolstringSymbol (empty=current)
TF_ExecENUM_TIMEFRAMESPERIOD_H1Execution Timeframe
separator2string=== Trendline Detection ===─────────────────────
swingBarsint20Swing Detection Bars (Higher High/Lower Low)
minTouchesint2Min Touches for Valid Trendline (2=easier entry)
touchTolerancedouble0.005Touch Tolerance (0.5% = 50 pips on XAUUSD)
trendlineLengthint100Trendline Lookback Bars
maxTrendlinesint20Max Trendlines to Track
separator3string=== Entry Logic ===─────────────────────
requireBounceboolfalseRequire Bounce from Trendline
bounceConfirmBarsint2Bounce Confirmation Bars
Show all 40 inputs
NameTypeDefaultDescription
requireBreakoutboolfalseRequire Breakout Confirmation
breakoutConfirmBarsint2Breakout Confirmation Bars
minConfluenceStrengthdouble2.0Min Confluence (2+ lines within zone)
useSimpleEntrybooltrueUse Simple Entry (Price near trendline)
useABCDPatternbooltrueUse ABCD Pattern Entry
separator4string=== ABCD Pattern Settings ===─────────────────────
abcdLookbackint100ABCD Pattern Lookback Bars
bcRetrace_Mindouble0.382BC Retracement Min (38.2%)
bcRetrace_Maxdouble0.886BC Retracement Max (88.6%)
cdExtension_Mindouble1.13CD Extension Min (113%)
cdExtension_Maxdouble1.618CD Extension Max (161.8%)
abcdTolerancedouble0.05ABCD Validation Tolerance (5%)
requireABCDConfirmationbooltrueRequire D Point Close Confirmation
separator5string=== Hedge Protection ===─────────────────────
enableHedgeboolfalseEnable Hedge Protection (ปิดใช้งาน - ใช้ TP เท่านั้น)
hedgeTriggerFibodouble0.236Hedge Trigger (23.6%)
hedgeLotMultiplierdouble1.0Hedge Lot Multiplier (1.0 = 100% coverage)
enableSmartHoldboolfalseSmart Hold Orders Until Swing Reversal (DISABLED - ใช้ TP/SL เท่านั้น)
minProfitToClosedouble10.0Min Profit to Close Order (USD)
enableNetPositionClosebooltrueEnable Net Position Close (ปิดทั้งหมดเมื่อรวมเป็นบวก)
minNetProfitdouble30.0Min Net Profit to Close All (USD - ลดลงเพื่อปิดเร็วขึ้น)
separator6string=== Profit Management ===─────────────────────
useTrendlineTPbooltrueUse Trendline as TP (true) or Fixed TP (false)
fixedTP_Pointsdouble5000.0Fixed TP Points (if not using trendline)
tp1_Percentdouble5000.0TP1 Close % (at 50% to TP)
tp2_Percentdouble3000.0TP2 Close % (at 80% to TP)
tp3_Percentdouble2000.0TP3 Close % (at TP)
enableTrailingSLbooltrueEnable Trailing Stop

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone i2leO/Ai_indy from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
  3. 3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar Expert Advisors

5 stars

This repository contains an extensive library of MetaTrader 5 expert advisors covering various algorithmic trading methodologies. The collection includes strategies based on Bollinger Bands, Relative Strength Index, moving average ribbons, and swing failure patterns. A core focus is the Ighodalo series for gold and CFD

MT5 Collection Trend followingBreakoutMartingale High risk
Updated 2 months ago Custom licence GitHub repository of Ighodalo MT5 Strategy Collection
2 stars

This collection for MetaTrader 5 provides several automated Expert Advisors designed for various symbols including forex, gold, and indices. The repository features Mecha Godzilla, a grid trading system using ATR-based spacing and bidirectional orders, alongside specialized bots for Asian session breakouts and H4 trend

MT5 Collection GridBreakoutTrend following High risk

Git Gpa Collection

by shidatonglin
5 stars

GitGpa is an extensive repository of MetaTrader 4 expert advisors, primarily featuring implementations of the OzFX strategy alongside various technical indicator-based bots. The collection includes tools for trend chasing, breakout trading, and moving average crossovers. These experts incorporate multiple risk manageme

MT4 Collection Trend followingBreakoutIndicator crossover High risk
Updated 7 years ago None stated GitHub repository of Git Gpa Collection
67 stars

This repository contains a large collection of over 100 expert advisors for the MetaTrader 5 platform, many of which appear to be generated using the Mission Automate tool. The library covers a wide variety of trading methodologies including range breakouts, Ichimoku cloud strategies, Heiken Ashi engulfing patterns, an

MT5 Collection Trend followingBreakoutMartingale High risk
Updated 3 years ago None stated GitHub repository of Konz MQL5 EA Collection
49 stars

This repository contains a diverse collection of MetaTrader 5 expert advisors ranging from RSI-based scalping robots to multi-timeframe trend following systems. The EAs utilize various technical indicators including EMA crossovers, MACD momentum, and ATR for volatility-based exits. The core logic often incorporates mul

MT5 Collection ScalpingTrend followingBreakout High risk
Updated 3 months ago Custom licence GitHub repository of Frontline MT5 Strategy Collection

This MetaTrader 5 collection features two primary components: a manual risk management panel and an automated confluence robot. The TyAlgo advisor executes trades using the No Nonsense Forex method, aggregating signals from various technical indicators via global variables. Risk is managed through the TyphooN tool, whi

MT5 Collection Trend followingMulti-strategyMartingale High risk

More collections

Need a Broker for MT5?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers