SomaOil
- 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.1
- Updated: 18 July 2026
- Activations: 10
SomaOil is a multi-strategy breakout Expert Advisor for MetaTrader 5, built exclusively for WTI crude oil (XTIUSD). One chart, one EA, 20 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 (48 hours)
- Starting from Monday the price increases by 100 USD for every 10 copies sold
- Price increases happen at most once per day, even when more than 10 copies are sold the same 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, SomaOil ships with a curated set of 20 pre-tuned strategies that all run in parallel under a single EA on a single WTI 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 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 optimisation ranges and their out-of-sample windows were:
- Res1 — In Sample: 2018.10.10–2024.10.10 | OOS: 2024.10.10–2026.06.26
- Res2 — In Sample: 2020.06.26–2026.06.26 | OOS: 2018.10.10–2020.06.26
Res1 and Res2 are complementary halves of the same history, so each range validates the other out of sample. W2 OOS (2018–2020) sits inside W1 IS, and W1 OOS (2024–2026) sits inside W2 IS — the same cross-validated Res1/Res2 pattern used for SomaBTC, anchored to available XTIUSD history from 2018.10.10.
This combination of timeframe x breadth x optimisation 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.
Each candidate strategy was then filtered:
- If strategies correlated too strongly with another remaining strategy, they were removed.
- If a strategy did not match real ticks or failed its out-of-sample window, it was removed.
- All optimizations were made with Friday trading closure enabled, which eliminated optimization based on risky weekend gaps.
So, after that, only 20 strategies survived — 7 from Res1 and 13 from Res2.
Final portfolio by optimisation range and swing timeframe:
- Res1 (7): 1 D1, 1 H12, 2 H4, 3 H1
- Res2 (13): 2 D1, 4 H12, 2 H8, 4 H4, 1 H1
- Total (20): 3 D1, 5 H12, 2 H8, 6 H4, 4 H1
And as the last step, every strategy lot size was set by a proprietary Python script that found the best combination of return / balance DD. Strategies that correlate more in DD receive smaller allocations, and strategies that bring more value receive larger lot-size allocation.
Magic numbers
Each strategy uses a unique 8-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 SomaOil #1 81241201).
The digits are not random — they encode what the strategy is:
- 1st digit — EA family (8 = SomaOil)
- 2nd digit — optimisation range (1 = Res1, 2 = Res2)
- 3rd–4th digits — swing timeframe in hours (01 H1, 04 H4, 08 H8, 12 H12, 24 D1)
- 5th digit — breakout breadth (1 Broad, 2 Medium, 3 Narrow)
- 6th digit — optimisation target (1 Balance DD, 2 Equity DD)
- 7th–8th digits — original set-file ID from the research batch
Example: magic 81241201 reads as SomaOil · Res1 · D1 · Broad · Equity DD · set #01.
This makes it easy to identify which strategy opened a trade in the terminal or in your account history, without opening the EA settings.
Risk and lot sizing
Two sizing modes are available:
- Manual lot size — fixed lots per trade
- Lot per balance step — automatic sizing based on account capital, scaled per strategy
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, HKD, SGD or a custom pair) for correct sizing on non-USD accounts
- Broker-agnostic lot sizing — internal contract-size normalization (Vantage baseline 1000) for comparable exposure across brokers; dashboard shows Contract Norm
- Margin call protection (default on) — before placing orders the EA treats existing same-side pending stops/limits as if they already need their market-order margin, so free margin is not over-committed when the broker reserves little on pendings; it can also trim calculated lot size so worst-case concurrent same-side orders stay within a margin budget tied to your sizing base. Turn off only if you fully control leverage and headroom.
News filter
SomaOil includes a built-in US news calendar covering three high-impact event types:
- 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
An optional Monday-open / Friday-close window lets you avoid weekend gaps. You can choose whether to also kill pending orders or open positions outside the trading window.
Several strategies also use a built-in daily session window (per-strategy start/end hours) to avoid low-liquidity periods. These are part of the portfolio preset and are not separate user inputs.
Optimization was performed with Friday-close on, which is a default setting, so there is no overoptimization on risky weekend-gap conditions.
Spread filter
SomaOil can avoid placing breakout pending orders when the broker spread is too wide — important on crude oil where spreads widen around rollovers, news and low liquidity.
The filter applies to pending orders only. Once a trade is open, normal exit logic (SL, TP, trailing, break-even) runs unchanged.
Two global inputs control behaviour:
- MaxSpreadPips (default 80) — maximum spread in MT5 points as shown on a 3-digit WTI quote (e.g. 50 in Market Watch ≈ 0.050 price). Set 0 to disable the filter entirely.
- RemovePendingSpreadSeconds (default 60) — after spread stays above the limit for this many seconds without interruption, that strategy's pending orders are cancelled. Set 0 to keep the placement gate but never auto-remove pendings for spread.
Placement gate — on each strategy's entry timing bar, if spread is too high the EA does not place new pendings and does not refresh levels. Existing pendings are left in place during brief spikes.
Sustained-high removal — if spread remains above the limit for the full grace period (timer resets on any dip below the limit), pending orders for that strategy are removed. They can be placed again on a later entry bar when spread normalizes.
The same input value works on 2-digit and 3-digit oil symbols (cross-broker normalization). The effective point limit is also scaled per strategy by built-in DefaultValue and current oil reference price, like other portfolio distances.
Prop Firm Compliance
An optional per-trade random pip offset can be applied to entries and exits via MaxRandomizationPips. This gives your account slightly different levels than other traders running the same EA — useful on prop-firm and funded accounts where identical copy-trading patterns may be flagged. Set the value to zero to disable.
SomaOil 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.
On-chart dashboard
SomaOil renders a live dashboard on the chart showing:
- License status and active portfolio
- Lot sizing base, effective capital, and contract normalization factor
- Pending orders and open positions split by Buy/Sell
- Floating P/L and today's closed P/L
- Balance and equity drawdown, absolute and percentage
- Slippage statistics: all-time, 7 days, 24 hours
- Current spread and active strategy count
- Next and last NFP, CPI and IR/FOMC events
The dashboard can be disabled in the Strategy Tester for faster backtests.
Parameters
Overrides
- EnableMagicOverride -> when on, trade ID numbers are assigned as OverrideMagicBase + strategy index; when off (default) each strategy uses its built-in ID
- OverrideMagicBase -> starting trade ID number 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
Lot sizing
- LotsAdjustMinChangePercent -> minimum % change before the active lot size is updated
- Risk -> ManualLotSize (fixed StartLots) or LotSizeStep (auto from capital)
- AdjustLotsizeToVariableValues -> recalculate lots as balance or equity changes
- StartLots -> fixed lot in manual mode, or floor reference in step mode
- MaxLots -> optional EA lot cap; 0 = broker spec only
- UseEquity -> size from equity instead of balance
- OnlyUp -> lots ratchet up with peak capital and never down during trading drawdowns; withdrawals reduce peak and deposits raise it
- RestorePeakFromHistory -> seed OnlyUp peak from recent closed-trade history on start
- RestorePeakLookbackDays -> lookback days for peak restore (0 = all history)
- ManualBalanceForLotSizing -> fixed capital for sizing when > 0
- RiskMultiplier -> global multiplier on calculated lot
- MarginCallProtection -> reserve margin for same-side pendings and cap lot size to margin budget
- BaseCurrency -> USD, EUR, GBP, HKD, SGD, or custom for non-USD accounts
- CustomBaseCurrencyPair -> broker symbol for conversion when BaseCurrency is custom
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)
News filters
- EnableNFP_Filter -> enable NFP protection window
- NFP_CloseOpenTrades -> close open positions before NFP
- NFP_ClosePendingOrders -> cancel pending orders before NFP
- EnableIR_Filter -> enable IR / FOMC protection window
- IR_CloseOpenTrades -> close open positions before IR
- IR_ClosePendingOrders -> cancel pending orders before IR
- EnableCPI_Filter -> enable CPI protection window
- CPI_CloseOpenTrades -> close open positions before CPI
- CPI_ClosePendingOrders -> cancel pending orders before CPI
Per-strategy minutes before/after each event are built into the portfolio, not separate parameters.
Trading hours
- UseTradingTimeZones -> enforce the weekly Monday–Friday window
- KillPending -> cancel pending orders outside the window
- KillOpen -> close open positions outside the window
- MondayOpenHour / MondayOpenMinute -> window opens Monday at this broker time
- FridayCloseHour / FridayCloseMinute -> window closes Friday at this broker time
Several strategies also use a built-in daily session window (per-strategy start/end hours) as part of the portfolio preset. These are not separate user inputs.
Dashboard
- DisableDashboardInTesting -> hide the on-chart dashboard in Strategy Tester
- DashboardUpdateSeconds -> dashboard refresh interval in seconds
Spread Filter
- MaxSpreadPips -> max spread in MT5 points (3-digit convention); scaled per strategy DefaultValue; 0 = off
- RemovePendingSpreadSeconds -> remove pendings after spread stays above limit this long (seconds); 0 = never remove
Prop Firm Compliance
All inputs default to off / zero — zero performance impact when disabled.
- MaxRandomizationPips -> prop-firm entry/exit offset; unique vs other EA users (0 = off)
- EnablePropFirmCompliance -> master switch; must be true for any rule below to take effect
- PF_MaxDailyDrawdownPercent -> max daily equity loss as % of daily baseline (0 = off)
- PF_MaxDailyDrawdownMoney -> max daily equity loss in account currency (0 = off)
- PF_DailyResetHour -> broker/server hour (0–23) when the daily window resets
- PF_DailyLossBufferPercent -> safety cushion before the hard limit (default 10%)
- PF_DisallowHedging -> blocks opposite-direction entries; sweeps opposite pendings
- PF_MaxTotalPendingOrders -> cap on total EA pending orders (0 = off)
Recommended setup
- Symbol: WTI crude oil — attach the EA to your broker's US crude / WTI chart. The same instrument is often listed under different tickers; across our test terminals we have seen: XTIUSD, USOUSD, USOUSD.s, WTI, SpotCrude. SomaOil is designed for symbols starting with XTIUSD; if your broker uses another name, open Market Watch and search for WTI, crude, oil, or USO to find the matching chart.
- Timeframe: any (the EA reads its own timeframes internally)
- Account type: ECN / RAW-spread account is recommended for tight spreads
- Minimum recommended balance: 2000 USD for default risk. Calculated lot size cannot fall below 0.01 per trade, so accounts below this level cannot scale risk down further.
- VPS: recommended for stable 24/5 execution
- Add "https : // ea-license-server . somatrade . org" and "https : // www . worldtimeserver . com/" to allowed URLs in MT5 (Tools - Options - Expert Advisors)
Summary
- 20 pre-tuned breakout strategies on a single WTI (XTIUSD) chart
- Two optimisation ranges with cross-validated OOS, spanning 2018–2026
- Timeframes: D1, H12, H8, H4 and H1
- Layered exits with break-even and trailing stops
- Integrated US news protection with false-positive filtering
- Optional spread filter for pending orders (MaxSpreadPips + sustained-high removal)
- Optional entry/exit randomisation for prop-firm uniqueness (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
