Oil XTrender
Oil XTrender
Oil XTrender is a powerful Expert Advisor (EA) specifically developed for trading crude oil instruments, such as XTIUSD or WTICOUSD. It features strict signal confirmation using candlestick behavior, combined with an adaptive averaging and take profit system tailored for trending and volatile conditions.
Although optimized for crude oil with 2-digit pricing, Oil XTrender can be used on other instruments after proper backtesting and parameter tuning.
We have updated deafult setting for trading oil based on long history.
⚠ Important Notes
-
This EA requires complete 1-minute tick data during backtesting. Without it, the EA will not place any trades.
-
A parameter named **ForceTradeInTester** is included to ensure the EA opens trades during MQL5.com validation.
🔒 Set this to **false** when running on live or demo accounts.
✅ Recommended Settings
-
Attach the EA to an M30 chart.
-
Signal logic operates on M1, with M30 used for trend filtering and market condition validation.
-
Use default settings for crude oil pairs (e.g., XTIUSD at 70.25 format).
-
Run on low-spread ECN brokers, and deploy via VPS 24/7 for stable performance.
🔑 Key Features
-
Optimized for oil symbols with 2-digit decimal pricing
-
Strict candlestick confirmation logic before trade entry
-
Session-based trading and daily range filter
-
Dynamic lot sizing with structured multi-level averaging
-
Tiered take profit system based on order sequence
-
Drawdown protection in both percentage and dollar terms
-
Includes ForceTradeInTester for validation compatibility
⚙️ External Input Parameters & Descriptions
🕒 Trading Sessions
-
EnableSession1 / Session1StartTime , Session1EndTime
-
EnableSession2 / Session2StartTime , Session2EndTime
🔻 Drawdown & Spread
-
EnableCloseAllOnDrawdown , MaxDrawdownPercent
-
EnableCloseAllOnDrawdownDollar , MaxDrawdownDollar
-
MaxSpread (in points)
📈 Lot & Position Sizing
-
UseManualFirstLot , ManualFirstLot
-
UseAutomaticLot , EquityPerBaseLotSize , BaseLotSize
-
LotMultiplierAboveOrder3
💰 Take Profit Management
-
BaseTP_Lot001 , TP_ExtraOrder2 , TP_ExtraOrder3 , TP_ExtraOrder4 , TP_IncrementPerOrderAbove4
🔁 Averaging System
-
MaxAveragingPositions , InitialAveragingDistance , DistanceMultiplier
📊 Daily Volatility Filter
-
EnableDailyRangeFilter , DailyRangeToOpenPosition
⏱ Timeframe Settings
-
TimeframeSignal , TimeframeEMAFilter
🧪 Strategy Tester Compatibility
-
ForceTradeInTester
Set to true for Strategy Tester only to bypass strict signal filters and ensure test passes.
Set to false for live/demo trading.
⚙️ Miscellaneous
-
Slippage , MagicNumber
🔐 Strategy Protection
To preserve the originality of this EA, internal indicator names and logic are intentionally hidden. This is to prevent cloning and ensure exclusivity of the strategy.
⚠ Disclaimer
-
Always test in a demo account before going live
-
Backtest with complete M1 tick data for valid results
-
Live performance may vary depending on broker conditions, spread, latency, and liquidity

