Trading robot · MT5

ICT SSL Premium Discount

by 26730023-PhamPhuNguyenHung

This MetaTrader 5 expert advisor implements Smart Money Concepts (SMC) by identifying liquidity sweeps and premium or discount zones.

High risk

GitHub stars2
Forks1
Last update6 months ago17 Mar 2026
LicenceNone stated

Overview

ICT SSL Premium Discount detects buy-side and sell-side liquidity levels, looking for price sweeps followed by retest entries. The robot manages trades using a fixed risk-to-reward ratio, trailing stops, and a break-even function. It includes a Dollar Cost Averaging (DCA) system with lot multiplication, effectively utilizing martingale scaling to manage losing positions. Risk controls include time-based exits and maximum open bar limits.

Details

Type

Trading robot

Platform

MetaTrader 5 (MQL5)

Strategy

SMC / ICT / price action, Martingale, Grid, Mean reversion

Markets

Any symbol

Timeframes

Any timeframe

Risk profile

  • Uses martingale lot scaling: losses can grow fast
  • Opens a grid of orders: exposure builds up in a trend

Topics

algorithmic-tradingpinescriptsmart-money-conceptstradingview

Input parameters

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

NameTypeDefaultDescription
InpLotSizedouble0.01Lot Size
InpMagicNumberint20250318Magic Number
InpSlippageint10Max Slippage (points)
InpCommentstringICT_SSLTrade Comment
InpLookbackBarsint2000Show Last N Bars
InpLeftBarsint1Fractal Bars (each side)
InpMaxSwingsint5Max Swings to Track
InpShowBSLbooltrueDetect BSL (Buy-Side Liquidity)
InpShowSSLbooltrueDetect SSL (Sell-Side Liquidity)
InpColBSLcolorclrMediumSeaGreenBSL Color
InpColSSLcolorclrCrimsonSSL Color
InpLineWidthint1Line Width
Show all 40 inputs
NameTypeDefaultDescription
InpShowSweepbooltrueShow Sweep Markers on Chart
InpShowPDbooltrueShow Premium / Discount Zones
InpPDLookbackint50Dealing Range Lookback
InpColPremcolorclrIndianRedPremium Zone Color
InpColDisccolorclrMediumSeaGreenDiscount Zone Color
InpShowOTEbooltrueShow OTE (62%-79%)
InpRequireOTEboolfalseRequire OTE for Entry
InpColOTEcolorclrOrangeOTE Zone Color
InpRRRatiodouble3.0Risk:Reward Ratio
InpCooldownBarsint5Cooldown (bars after trade)
InpOneAtATimebooltrueOne Trade at a Time
InpTimeExitbooltrueEnable Time-Based Exit
InpMaxBarsOpenint5Max Bars Before Force Close
InpOnlyIfLosingbooltrueOnly Close if NOT Profitable
InpTrailingbooltrueEnable Trailing Stop
InpTrailStartdouble3.0Trail Start (price profit)
InpTrailStepdouble1.5Trail Step (price)
InpBreakEvenbooltrueEnable Break-Even
InpBEStartdouble2.0Break-Even Start (price profit)
InpBEOffsetdouble0.5Break-Even Offset (lock profit)
InpSLLookbackint14SL Structure Lookback (bars)
InpMinSLDistdouble5.0Min SL Distance (price)
InpMaxSLDistdouble30.0Max SL Distance (price)
InpSLMethodENUM_SL_METHODSL_SWEEP_WICKSL Method
InpSLBufferdouble0.0SL Buffer (extra distance to avoid hunt)
InpPendExpiryint10Pending Order Expiry (bars)
InpDCAEnabledbooltrueEnable DCA
InpDCAMaxOrdersint3Max DCA Orders (1-5)

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone 26730023-PhamPhuNguyenHung/pinescript-ict 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

Fibonacci ICT EA

by Shifrozy
2 stars

Fibonacci ICT EA for MetaTrader 5 combines institutional price action concepts with Fibonacci retracement levels. It identifies higher timeframe trends and enters on pullbacks to specific golden zones using confirmations like Break of Structure and Fair Value Gaps. The system includes robust risk management such as per

MT5 Trading robot SMC / ICT / price actionIndicator crossoverMean reversion High risk
Updated 3 weeks ago None stated GitHub repository of Fibonacci ICT EA

RSI Martingale EA

by peefpee
10 stars

This Expert Advisor for MetaTrader 5 implements a martingale trading strategy triggered by the Relative Strength Index (RSI). It opens an initial position when RSI reaches overbought or oversold thresholds. If price continues to move against the initial trade, the EA layers additional orders at set point intervals, mul

MT5 Trading robot MartingaleMean reversionGrid High risk
7 stars

This MetaTrader 5 expert advisor executes a mean reversion strategy based on price deviation from a Simple Moving Average. It enters short positions when prices rise above the average and long positions when prices fall below. The algorithm utilizes an aggressive grid-based recovery system where both the entry distance

MT5 Trading robot Mean reversionMartingaleGrid High risk

Simba Sniper EA

by oriokie
6 stars

This MetaTrader 5 expert advisor focuses on XAUUSD using a multi-timeframe scalping approach based on Smart Money Concepts. It identifies institutional market structures by analyzing H4 trends, H1 supply and demand zones, and M5 entries. The logic incorporates order block detection, Fair Value Gaps (FVG), and liquidity

MT5 Trading robot SMC / ICT / price actionScalpingTrend following High risk
Updated 8 months ago Custom licence GitHub repository of Simba Sniper EA
4 stars

This MetaTrader 5 expert advisor utilizes a combination of Bollinger Bands, Relative Strength Index, and Average Directional Index to identify entries. It supports multi-timeframe analysis for trend confirmation and provides optional filters for Average True Range and price action patterns such as hammers. Risk managem

MT5 Trading robot Trend followingMean reversionSMC / ICT / price action High risk
Updated 1 year ago None stated GitHub repository of Alif BB RSI ADX MTFA
4 stars

This high-frequency scalping robot for MetaTrader 5 is specifically designed for the gold market. It determines entry points using a combination of EMA trend filters, ADX trend strength, and dynamic RSI levels. To recover from losing positions, the EA utilizes an aggressive martingale grid system with a customizable lo

MT5 Trading robot ScalpingMartingaleGrid High risk

More trading robots

Need a broker for MT5?

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

Compare brokers