TCEQuad - Trend Channel Edge / 4 symbols (GOLD - USDJPY - GBPJPY on M5, EURUSD on M15)
=======================================================================================
OVERVIEW
TCE trades the edges of a regression channel built on closed bars.
Drop it on a chart and both the settings and the entry timeframe are selected
automatically for GOLD / XAUUSD, USDJPY and GBPJPY (M5) and EURUSD (M15). QUAD = four symbols in one EA.
There is no martingale, no averaging down and no grid recovery.
Every position carries a stop loss on the broker side.
NOTE: this EA was previously sold as "TCE Trend Channel Edge GOLD USDJPY GBPJPY M5".
USDJPY, GBPJPY and EURUSD have been added, hence the new name.
The GOLD settings and behaviour are unchanged from v1.02.
HOW IT WORKS
1. Channel
A least-squares regression line is fitted to the closes of the last N closed bars.
The largest absolute residual becomes the half width, so the band is symmetrical around
the centre line. Only closed bars are used; no future data is referenced.
N is fixed per symbol: GOLD 300, USDJPY 600, GBPJPY 800, EURUSD 550.
2. Regime
The slope of an H4 EMA(50) is measured in percent and classified as up, down or neutral.
No entry is taken while the regime is neutral.
3. Entry
In an up regime, a touch of the lower band is a buy.
In a down regime, a touch of the upper band is a sell.
One entry per day, one position at a time. Adds are only allowed in profit.
4. Exit
Stop loss = channel width x 0.45
Take profit = channel width x a per-symbol factor
Positions older than a fixed number of bars are closed by time (USDJPY / GBPJPY).
While a position is in profit, up to two pyramid adds are placed in the trend direction.
SYMBOL PROFILES
The profile and the entry timeframe are chosen at start-up from the chart symbol:
GOLD / XAUUSD chart -> GOLD values (M5)
USDJPY chart -> USDJPY values (M5)
GBPJPY chart -> GBPJPY values (M5)
EURUSD chart -> EURUSD values (M15)
Broker suffixes (.m, #, _i) do not matter; the currency codes are used for detection.
EURUSD is the only M15 profile; attach that one to an M15 chart.
Four charts with the same EA file give you four symbols running side by side.
On any other symbol the EA runs with the individual input values (generic defaults)
and prints a warning in the journal. Set InpUnknownSymbol to 1 to refuse start-up instead.
Setting InpSymbolProfile explicitly overrides the automatic detection.
RISK
The default is SAFE mode (InpRiskMode = 1):
0.9% per trade
4.0% per account
3.6% per basket
STANDARD (2.5% / 11.0% / 10.0%) and AGGRESSIVE (4.5% / 20.0% / 18.0%) are available.
STANDARD is for experienced users only: some symbols exceed a 10% maximum drawdown.
AGGRESSIVE is not recommended. If in doubt, keep the SAFE default.
A deposit of 6,500 USD is the level where 0.01 lots still work against the M5 stop distance.
With a smaller deposit the lot size sticks to the minimum and the risk percentage no longer applies.
BACKTEST RESULTS
Own backtests, default settings only (SAFE, 6,500 USD deposit),
2022-01-03 to 2026-11-30, real-tick model (every tick based on real ticks).
GOLD net +3,266.45 (+50.3%) PF 2.09 max DD 5.55% 110 trades
USDJPY net +2,679.87 (+41.2%) PF 2.2360 max DD 2.51% 164 trades
GBPJPY net +1,324.14 (+20.4%) PF 1.6377 max DD 5.18% 113 trades
EURUSD net +876.29 (+13.5%) PF 2.0736 max DD 2.43% 89 trades
The same settings, restricted to 2025-01-01 through 2026-11-30 (the most recent 23 months).
These are M1 OHLC measurements.
GOLD net +1,182.29 PF 1.9568 max DD 7.09% 42 trades
USDJPY net +489.28 PF 1.6849 max DD 3.69% 46 trades
GBPJPY net +437.92 PF 1.7492 max DD 3.58% 28 trades
EURUSD net +576.09 PF 2.7072 max DD 2.43% 38 trades
Run on four separate accounts, the simple sum is +8,146.75 over 476 trades in five years
(about 95 trades a year).
Drawdown is measured on equity. Swaps, commissions and slippage are not included.
STANDARD MODE (FOR EXPERIENCED USERS)
Same five-year window, with only InpRiskMode changed to STANDARD (2.5% / 11.0% / 10.0%).
These are M1 OHLC measurements.
GOLD net +7,127.63 (+109.7%) PF 1.9965 max DD 10.21% 98 trades
USDJPY net +7,394.69 (+113.8%) PF 2.2014 max DD 6.26% 165 trades
GBPJPY net +3,889.95 ( +59.8%) PF 1.6872 max DD 11.56% 112 trades
EURUSD net +2,495.35 ( +38.4%) PF 2.1078 max DD 6.20% 89 trades
Total +20,907.62, roughly 2.7x the SAFE profit, but GOLD reaches 10.21% and GBPJPY 11.56%
maximum drawdown. The trade count is a few lower than in SAFE mode because the larger
positions hit the risk caps earlier and further pyramid adds are suppressed.
That is a sizing effect, not a performance difference.
RECOMMENDED SETUP
MetaTrader 5 build 6361 or newer
Hedging account recommended (on netting accounts the pyramid adds are disabled
and the EA runs a single position)
GOLD / USDJPY / GBPJPY on M5 charts, EURUSD on an M15 chart
VPS recommended (signals are evaluated on closed bars, so a stopped terminal misses bars)
Deposit of 6,500 USD or more
RUNNING SEVERAL SYMBOLS
One symbol per account is recommended.
If you run more than one symbol on the same account, halve the account risk cap:
stop losses can overlap and the combined risk would exceed the intended level.
EURUSD runs on M15, so its stop-loss timing rarely overlaps the three M5 symbols.
DISCLAIMER
This EA does not guarantee profit. Backtest results do not indicate future performance.
Spreads widen around news releases and a stop loss may fill at a worse price than planned.
Results change on wide-spread accounts; set InpEntMaxSpreadPoints to your measured spread.
Trade frequency is about 90-165 trades per symbol in five years. Some months have no trades at all.