SomaForex
- Experts
-
Andrii Soma
If you bought my EA, contact me to join the Telegram group.
Also, there is a group on this website if you don't have Telegram: - Version: 1.0
- Activations: 10
SomaForex is a multi-strategy breakout Expert Advisor for MetaTrader 5, built for EURUSD, GBPUSD, and USDJPY. One chart, one EA, 34 independent strategies running together as a single diversified portfolio.
To make it accessible at launch, I am using a transparent ramping-price model:
- Launch price: 100 USD
- The price increases by 100 USD for every 10 copies sold, at most once per day
Early buyers lock in the lowest price for the lifetime of the product.
Concept
Instead of running a single setup that tends to overfit a narrow market regime, SomaForex ships with a curated set of 34 pre-tuned strategies. Eight trade EURUSD, eleven trade GBPUSD, and fifteen trade USDJPY. They all run in parallel under a single EA on a single chart.
Each strategy has its own magic number, comment, timeframe, swing-detection parameters, exits, news distances and lot-step. They share the same execution engine but trade independently, so you get genuine diversification across pairs, timeframes and breakout breadth without managing dozens of charts.
Portfolio creation
I ran optimizations across two complementary in-sample ranges, each with the same parameter grid:
- 5 groups of timeframes: D1, H12, H8, H4, H1
- Three breakout breadth variants:
- V1 Broad: wider swings, fewer but stronger setups;
- V2 Medium: balanced setup frequency;
- V3 Narrow: tighter swings, more frequent setups.
- All of them were optimized by return / drawdown:
- First by Return / Balance DD
- Then by Return / Equity DD
The two optimization ranges and their out-of-sample windows were:
- Res1 - In Sample: 2016-2026 | OOS: 2007-2015
- Res2 - In Sample: 2007-2015 | OOS: 2016-2026
Res1 and Res2 are complementary halves of the same history, so each range validates the other out of sample.
This combination of pair x timeframe x breadth x optimization range is what produces the diversification. Different strategies trigger in different volatility regimes, so the equity curve does not depend on a single market behaviour.
Strategies that did not earn a place were left out. All optimizations were made with Friday trading closure enabled, which eliminated optimization based on risky weekend gaps. That Friday close stays on by default.
So, after that, only 34 strategies survived: 20 from Res1 and 14 from Res2.
Final portfolio by pair and swing timeframe:
- EURUSD (8), GBPUSD (11), USDJPY (15)
- Timeframes: 14 D1, 9 H12, 7 H8, 2 H4, 2 H1
Risk and lot sizing
Two sizing modes are available:
- Manual lot size - fixed lots per trade. Each strategy uses its built-in start lot of 0.01. There is no separate StartLots input.
- Lot per balance step (default) - automatic sizing based on account capital, scaled by that strategy's lot step
Additional controls let you fine-tune the risk profile:
- Global risk multiplier on top of the calculated lot
- Optional EA lot cap via MaxLots ( 0 default = unlimited by EA; broker spec only); set > 0 for a hard maximum
- Choose balance or equity as the sizing base
- OnlyUp mode - lots ratchet up with peak capital but never down during trading drawdowns. Withdrawals reduce the sizing peak and deposits raise it (both trigger immediate peak sync and pending lot rebalance). On startup the EA seeds the historical peak from recent closed-trade history (configurable lookback), so the OnlyUp baseline is meaningful from the first tick instead of being reset on every restart
- Base-currency selector (USD, EUR, GBP, JPY, AUD, CHF, CAD, NZD, HKD, SGD, CNH, or a custom pair) for correct sizing on non-USD accounts
- Margin call protection (default on) - before placing orders the EA checks free margin, including same-side pendings already working, and can scale the portfolio down by one shared factor so relative lot steps stay intact. The dashboard shows when that scale is below 1. Turn off only if you fully control leverage and headroom.
- MCP Risk Multiplier - scales the margin call protection budget (1.0 = MCP default). Below 1.0 is more conservative. Above 1.0 relaxes the cap up to the uncapped lot and cannot invent extra free margin.
News filter
SomaForex includes a built-in US news calendar covering three high-impact event types. The filters are on by default:
- NFP - Non-Farm Payrolls
- CPI - Consumer Price Index
- IR / FOMC - central-bank rate decisions
Around each event the EA can independently block new entries, cancel existing pending orders, and close open positions. Each strategy has its own minutes-before and minutes-after windows, so news protection is tuned per strategy rather than applied globally.
Broker GMT can be set manually or detected automatically, so news windows always align with broker time, including across daylight-saving changes. The classifier is tightened to exclude common false positives such as ADP Nonfarm Employment and FOMC speeches/minutes.
Trading window
A Monday-open / Friday-close window is on by default. Trading starts Monday 01:10 and stops Friday 22:50 in broker time. Pending orders and open positions are removed outside that window. You can turn the window off, or choose whether to kill pending orders or open positions outside it.
Defaults assume GMT+2 winter / GMT+3 summer. If the broker clock is different, shift FridayCloseHour and MondayOpenHour so the same UTC moment is kept, and set the GMT offsets (or leave AutoGMT on) so the news windows stay aligned.
Optimization was performed with Friday-close on, which is a default setting, so there is no overoptimization on risky weekend-gap conditions.
Spread filter
SomaForex can remove a pending order when the spread on that pair stays too wide. The filter applies to pending orders only. Once a trade is open, normal exit logic (SL, TP, trailing, break-even) runs unchanged.
- MaxSpreadPips_EURUSD (default 2.0), MaxSpreadPips_GBPUSD (default 2.8), MaxSpreadPips_USDJPY (default 1.7) - maximum spread in pips. Set a cap to 0 to turn that pair off.
- RemovePendingSpreadSeconds (default 60) - seconds a wide spread must persist before the pending is removed. Set 0 to turn that timer off.
Magic numbers
Each strategy uses a unique 9-digit magic number so MetaTrader can tell its trades apart from other EAs or manual orders. You will see the magic on every order and position, and in the strategy comment (for example SomaForex #8 621082108).
The digits are not random. They encode what the strategy is:
- 1st digit - EA family (6 = SomaForex)
- 2nd digit - pair (1 = EURUSD, 2 = GBPUSD, 3 = USDJPY)
- 3rd digit - optimization range (1 = Res1, 2 = Res2)
- 4th-5th digits - swing timeframe in hours (01 H1, 04 H4, 08 H8, 12 H12, 24 D1)
- 6th digit - breakout breadth (1 Broad, 2 Medium, 3 Narrow)
- 7th digit - optimization target (1 Balance DD, 2 Equity DD)
- 8th-9th digits - strategy number in this portfolio
Example: magic 621082108 reads as SomaForex, GBPUSD, Res1, H8, Medium, Balance DD, strategy #8.
This makes it easy to identify which strategy opened a trade in the terminal or in your account history, without opening the EA settings.
Prop Firm Compliance
An optional per-trade random pip offset can be applied to entries and exits, separately for each pair, via MaxRandomizationPips_EURUSD, MaxRandomizationPips_GBPUSD, and MaxRandomizationPips_USDJPY. This gives your account slightly different levels than other traders running the same EA. Set a value to zero to disable that pair. Randomization does not depend on the compliance master switch.
SomaForex also includes an optional compliance layer (off by default): max daily DD lockout, no-hedge rule, and pending-order cap. See EnablePropFirmCompliance and related inputs below. It does not change backtests or live trading until it is enabled.
On-chart dashboard
SomaForex renders a live dashboard on the chart showing:
- License status and auto-trading status
- Lot sizing base, effective capital, and risk multiplier
- Margin protection scale when the lot cap is below 1
- Pending orders and open positions, including per-symbol rows
- Floating P/L, today's closed P/L, and all-time closed P/L
- Balance and equity drawdown, absolute and percentage
- Trading Cost table: slippage, swap and commission for 1d / 7d / 30d / 90d / all
- Current spread per pair against that pair's cap
- Next and last NFP, CPI and IR/FOMC events
The dashboard can be disabled in the Strategy Tester (DisableDashboardInTesting, default on) or on live / demo charts (DisableDashboardInLive, default off).
Parameters
Portfolio Settings
- StrategyRunMode -> run every enabled strategy, or only SingleStrategyNumber
- SingleStrategyNumber -> strategy index used when StrategyRunMode is RUN_ONE_STRATEGY
- StrategiesToRun -> comma-separated 1-based strategy numbers to enable (default 1-34). Numbers match the #N in each trade comment (for example SomaForex #8 621082108 is strategy 8). Disabled strategies stop placing and managing trades; close any open positions for them before changing this input.
Symbol tickers
- TickerEURUSD -> broker name for EURUSD (default EURUSD). A blank value disables every EURUSD strategy.
- TickerGBPUSD -> broker name for GBPUSD (default GBPUSD)
- TickerUSDJPY -> broker name for USDJPY (default USDJPY)
Attach the EA to one chart, usually EURUSD. If the broker uses a suffix, set the live names (for example EURUSD+ or EURUSD.s).
Overrides
- EnableMagicOverride -> when on, magic numbers are OverrideMagicBase + strategy index; when off (default) each strategy uses its built-in magic
- OverrideMagicBase -> base magic when magic override is enabled
- EnableCommentOverride -> when on, all trades share one comment; when off (default) each strategy keeps its own
- OverrideComment -> comment text used when comment override is enabled
Trade direction
- AllowBuyTrades -> allow long trades and buy-side pendings
- AllowSellTrades -> allow short trades and sell-side pendings
GMT
- Broker_GMT_OFFSET_Summer -> manual broker GMT offset in summer (hours)
- Broker_GMT_OFFSET_Winter -> manual broker GMT offset in winter (hours)
- AutoGMT -> auto-detect broker GMT (ignores manual offsets)
Trades execution
- UseInternalTrailingExitLevels -> when on, break-even, trailing stop, and trailing take-profit stay inside the EA and close at market. The original hard stop and take-profit stay on the broker. Default off, so those exits still modify the broker stop.
Recommended setup
- Symbol: attach to EURUSD, or to any chart, and set TickerEURUSD, TickerGBPUSD, and TickerUSDJPY to the broker names. Suffixes such as EURUSD+ or EURUSD.s are fine. A blank ticker disables that pair.
- Timeframe: any (the EA reads its own timeframes internally)
- Account type: ECN / RAW-spread account is recommended for tight spreads
- Reference balance: the fixed-deposit tests cover 1,000 to 10,000 USD. Smaller accounts should reduce the risk multiplier.
- VPS: recommended for stable 24/5 execution
- For AutoGMT to work, add "https : // www . worldtimeserver.com/" to the allowed URLs in MT5 (Tools - Options - Expert Advisors)
Summary
- 34 pre-tuned breakout strategies on EURUSD, GBPUSD, and USDJPY, from one chart
- Two optimization ranges with cross-validated out-of-sample windows, 2007-2015 and 2016-2026
- Timeframes: D1, H12, H8, H4 and H1
- Layered exits with stop-loss, take-profit, break-even and trailing
- Integrated US news protection with false-positive filtering
- Per-pair spread caps for pending orders
- Friday close on by default
- Optional entry/exit randomisation per pair (MaxRandomizationPips)
- Optional prop firm compliance mode (max daily DD, no-hedge, pending cap), off by default
- Full live on-chart dashboard
- Transparent ramping-price launch: 100 USD start, +100 USD per 10 copies, max once per day
