Collection · MT5

Smart SL

by tthanhvu002sgu

Smart SL is a MetaTrader 5 risk management tool that calculates optimal exit levels using a multi-factor scoring system.

GitHub stars1
Forks0
Last update2 months ago14 Jul 2026
LicenceNone stated

Overview

Smart SL evaluates market structure via swing detection, ATR-based volatility, and multi-timeframe confluence. The tool offers three modes: real, virtual, and a hybrid setup with safety offsets. It includes automated trailing stops, round-number avoidance, and risk limits defined in currency units. While this specific tool focuses on protection, the repository contains a broader collection of breakout, trend-following, and mean-reversion expert advisors.

Details

Author

tthanhvu002sgu on GitHub

Type

Collection

Platform

MetaTrader 5 (MQL5)

Strategy

Trend following, Breakout, Mean reversion

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input parameters

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

NameTypeDefaultDescription
sep0string═══ Mode ═══─── Mode ───
InpModeENUM_SL_MODEMODE_HYBRIDSL Mode
InpAutoApplybooltrueAuto-apply SL on new positions
InpAutoTrailbooltrueAuto-trail SL when in profit
sep1string═══ Scoring Parameters ═══─── Scoring ───
InpATRPeriodint14ATR Period
InpATRMultiplierdouble1.5ATR Multiplier (min distance)
InpSwingLookbackint100Swing Lookback (bars)
InpSwingStrengthint5Swing Strength (bars each side)
InpRoundNumBufferint30Round Number Buffer (points)
InpMTFPeriodENUM_TIMEFRAMESPERIOD_H1MTF Confluence Timeframe
InpMTFSwingStrint10MTF Swing Strength
Show all 26 inputs
NameTypeDefaultDescription
sep2string═══ Virtual SL ═══─── Virtual SL ───
InpSafetyOffsetint200Safety SL Offset (points beyond Virtual)
InpAntiSpikeSecint2Anti-Spike Wait (seconds)
sep3string═══ Risk Limits ═══─── Risk ───
InpMaxSLUSDdouble5.0Max SL Loss (USD, 0=disabled)
InpMinSLPointsdouble50Min SL Distance (points)
sep4string═══ Trailing ═══─── Trail ───
InpTrailATRMultdouble1.0Trail ATR Multiplier
InpTrailStepint10Trail Step (points, avoid micro-moves)
sep5string═══ Visual ═══─── Visual ───
InpPanelXint20Panel X
InpPanelYint50Panel Y
InpBullColorcolorclrDodgerBlueBuy SL Color
InpBearColorcolorclrOrangeRedSell SL Color

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone tthanhvu002sgu/ea 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.
  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

4 stars

This repository is a collection of MetaTrader 5 expert advisors developed as early coding projects between 2021 and 2024. It includes multiple robots implementing varied strategies such as range breakouts, Donchian channels, Fibonacci retracements, and Bollinger Bands. The expert advisors are largely technical indicato

MT5 Collection Trend followingBreakoutMean reversion High risk
4 stars

This repository provides a collection of MetaTrader 5 expert advisors developed for learning algorithmic trading. The primary featured tool, TimeRangeEA, identifies price high and low points within a specific time window to execute breakout trades. It incorporates risk management through stop loss and take profit level

MT5 Collection BreakoutIndicator crossoverMean reversion
3 stars

A collection of systematic Expert Advisors for MetaTrader 5 designed for session-specific execution. The repository includes multiple specialized engines for strategies such as range reversion, breakouts, and trend following. It features a centralized risk management layer with spread caps, daily loss limits, and conse

MT5 Collection Mean reversionBreakoutTrend following

Forex Robot Collection

by ruanolivier93-netizen
1 stars

This collection for MetaTrader 5 provides multiple trading strategies, including an Asian session breakout system, a trend-aligned mean reversion strategy, and a moving average crossover expert. The breakout logic identifies price ranges during the Asian session and initiates trades during London or New York hours if c

MT5 Collection BreakoutMean reversionIndicator crossover
Updated 5 months ago None stated GitHub repository of Forex Robot Collection
1 stars

This repository features a collection of MetaTrader 5 Expert Advisors developed for strategy and risk-management research. It includes a multi-pair mean reversion grid system, a gold breakout robot using previous day levels, and trend-following strategies based on moving averages. The EAs incorporate extensive risk con

MT5 Collection Trend followingBreakoutMean reversion High risk
1 stars

This repository contains a collection of MetaTrader 5 expert advisors created to test various trading concepts. The included bots trade diverse markets, utilizing indicators like moving averages, Bollinger Bands, Stochastic, and VWAP. The primary highlighted expert advisor executes trend-following trades on gold using

MT5 Collection Trend followingBreakoutScalping
Updated 2 years ago None stated GitHub repository of MQL5 Bots Collection

More collections

Need a broker for MT5?

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

Compare brokers