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.
Read from SmartSL.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
sep0
string
═══ Mode ═══
─── Mode ───
InpMode
ENUM_SL_MODE
MODE_HYBRID
SL Mode
InpAutoApply
bool
true
Auto-apply SL on new positions
InpAutoTrail
bool
true
Auto-trail SL when in profit
sep1
string
═══ Scoring Parameters ═══
─── Scoring ───
InpATRPeriod
int
14
ATR Period
InpATRMultiplier
double
1.5
ATR Multiplier (min distance)
InpSwingLookback
int
100
Swing Lookback (bars)
InpSwingStrength
int
5
Swing Strength (bars each side)
InpRoundNumBuffer
int
30
Round Number Buffer (points)
InpMTFPeriod
ENUM_TIMEFRAMES
PERIOD_H1
MTF Confluence Timeframe
InpMTFSwingStr
int
10
MTF Swing Strength
Show all 26 inputs
Name
Type
Default
Description
sep2
string
═══ Virtual SL ═══
─── Virtual SL ───
InpSafetyOffset
int
200
Safety SL Offset (points beyond Virtual)
InpAntiSpikeSec
int
2
Anti-Spike Wait (seconds)
sep3
string
═══ Risk Limits ═══
─── Risk ───
InpMaxSLUSD
double
5.0
Max SL Loss (USD, 0=disabled)
InpMinSLPoints
double
50
Min SL Distance (points)
sep4
string
═══ Trailing ═══
─── Trail ───
InpTrailATRMult
double
1.0
Trail ATR Multiplier
InpTrailStep
int
10
Trail Step (points, avoid micro-moves)
sep5
string
═══ Visual ═══
─── Visual ───
InpPanelX
int
20
Panel X
InpPanelY
int
50
Panel Y
InpBullColor
color
clrDodgerBlue
Buy SL Color
InpBearColor
color
clrOrangeRed
Sell SL Color
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone tthanhvu002sgu/ea from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
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
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
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
MT5CollectionMean reversionBreakoutTrend following
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
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
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