Time ZeroShot EA

A real AI runs inside this EA. Time ZeroShot EA trades the USDJPY gotobi Tokyo fixing on about 6 mornings a month (up to 2 trades each) and holds a BTCUSD long for days to weeks when its multi-week momentum agrees. The panel always shows the date and time of the next trade.

The AI is Granite TTM-R2, a time-series model open-sourced by IBM Research (from a NeurIPS 2024 paper, pre-trained on about 700 million samples), built into the EA. At every gotobi trade it re-reads the last 512 hourly bars and forecasts how far price can move in the next 4 hours, and the stop-loss widens and narrows with that forecast. When it expects an unusually wild morning, the EA stays out. No API key, no server, no monthly fee — it runs in the Strategy Tester too, so you can watch it work.

Two rule sets decide WHEN and WHICH WAY

  • USDJPY — gotobi Tokyo fixing. On Japanese settlement days (the 5th, 10th, 15th, 20th, 25th and the month-end, moved to the previous business day) it buys at 07:30 JST, closes at the 9:55 JST Tokyo fixing, then sells until 10:30 JST. Japanese bank holidays and the broker's time zone are handled inside the EA.
  • BTCUSD — multi-week momentum, long only. Once a day it holds a long while BTCUSD is above its close of 2 weeks ago and of 8 weeks ago, and exits when they disagree. A trailing stop follows the best daily close.

The AI decides HOW FAR price may move

  • The model is IBM Granite TimeSeries TTM-R2 (Tiny Time Mixers), an open zero-shot time-series model under the Apache License 2.0, converted to ONNX and embedded in the EA. It reads the last 512 H1 bars and forecasts the high-low range of the next 1, 4 and 24 hours. It does not forecast the direction.
  • No API key, no WebRequest, no DLL, no external server, no monthly fee. It also runs in the Strategy Tester, so you can check everything yourself.
  • Gotobi: the stop-loss is 1.5 x the AI's 4-hour range forecast, and the morning is skipped when the AI expects an unusually wild morning (1.25 x the usual forecast for that hour or more).
  • In our tests the AI version of the gotobi rules had a lower drawdown than the same rules with ATR stops: profit factor 1.34 vs 1.22 and maximum drawdown 3.8% vs 6.5% in 2015–2021 (the period used to choose the settings), and 1.29 vs 1.28 and 4.9% vs 6.6% in 2022–2026 (after the settings were fixed).
  • BTCUSD stops use ATR(14, D1): in our tests the AI version was not better there, so we kept ATR. The panel still shows the AI forecast for BTCUSD.

Protection

  • Every trade has a stop-loss. No grid, no martingale, no averaging.
  • Risk per trade in % of equity (default 1% for each rule set) and a daily loss limit (default 4%).
  • Panel: pause new entries, close this EA's trades, next trade time, AI forecasts for both symbols.

Backtest (hypothetical)

IC Markets demo data, 2018-01 to 2026-10, 1-minute OHLC, commission included, both rule sets on one account, 1% risk per trade, start 10,000 USD:

  • 1,065 trades, profit factor 1.59, net profit +91%, maximum drawdown 6.1% (closed trades), 2 losing years out of 9 (2018 and 2025).
  • Gotobi part: 948 trades, profit factor 1.27. Momentum part: 117 trades, profit factor 3.35.
  • The rules were fixed on 2015–2021 (gotobi) and 2018–2022 (momentum) and then run once on the later years. The gotobi edge was first published as Nakane USDJPY Gotobi and the momentum rules as Ikioi Bitcoin Momentum; this EA adds the AI and runs both on one chart.

Trading frequency (please read)

  • Gotobi: about 6 mornings a month, up to 2 trades each (about 10 trades a month). No trades on other days.
  • Momentum: about 10 BTCUSD trades a year; a position is often held for days to weeks.
  • Quiet periods of several days are normal. The panel shows the next gotobi date and time.

Recommendations

  • Attach to one USDJPY chart (any timeframe). The EA finds BTCUSD by itself (names with suffixes such as .raw are fine) or you can type the symbol names in the inputs.
  • A broker with USDJPY and BTCUSD. Low spreads and commission matter for the gotobi trades.
  • BTCUSD trades need about 3,000 USD or more: with the minimum lot the stop-loss would otherwise risk more than 3% and the EA skips the trade. The gotobi part works from about 300 USD.
  • Keep the terminal running (a VPS is recommended). BTCUSD long positions pay the broker's swap.

Inputs

  • UseGotobi / UseMomentum (true / true): turn each rule set on or off.
  • SymbolUSDJPY / SymbolBTCUSD (empty): symbol names; empty = found automatically.
  • RiskGotobi / RiskMomentum (1.0 / 1.0): risk per trade in % of equity, measured to the stop-loss (0 = use FixedLot).
  • FixedLot (0.0), DailyLossLimit (4.0), TradeAfterFixing (true), MagicNumber (26101310; momentum uses +1), GMTOffsetHours (-99 = automatic).

Notes

  • This EA does not use Nixtla's TimeGPT or any online AI service, and it is not affiliated with or endorsed by Nixtla or IBM.
  • Third-party notice: this product includes the Granite-TimeSeries-TTM-R2 model by IBM, licensed under the Apache License, Version 2.0. The full text can be written to MQL5\Files from the Settings tab.
  • All numbers describe a backtest of the past and depend on the broker's data and costs. They are not a promise of future results.

Support

If anything is unclear, please send me a private message on MQL5.

Trading leveraged products carries a high risk of loss.

More from author
Smart Data Export Indicator writes clean market data from MetaTrader 5 to CSV or JSON Lines - with exactly the columns you choose, a data card that explains every column, and a paste-ready snapshot for ChatGPT, Claude or any other AI assistant. It replaces my free SmartDataExportEa and is rebuilt as an indicator: it runs on the same chart as your Expert Advisor, and it never trades. No DLL, no web requests. What it writes Data file (CSV with comma or semicolon, or JSON Lines): one row per closed
FREE
Smart Data Export Indicator MT4 writes clean market data from MetaTrader 4 to CSV or JSON Lines - with exactly the columns you choose and a data card that explains every column, ready for Python, Excel or an AI assistant such as ChatGPT or Claude. It replaces my free SmartDataExportEa for MetaTrader 4 and is rebuilt as an indicator: it runs on the same chart as your Expert Advisor, and it never trades. No DLL, no web requests. A MetaTrader 5 version is available separately. What it writes Data f
FREE
Nakane USDJPY Gotobi trades one well-known pattern of the Tokyo market. On gotobi days (Japanese settlement days: the 5th, 10th, 15th, 20th, 25th and the last business day of the month), USDJPY has tended to rise into the Tokyo fixing at 9:55 JST and to give part of it back afterwards. The EA buys at 07:30 JST, closes at the fixing, then sells until 10:30 JST. It trades only on those mornings. No grid, no martingale, no averaging. One position at a time, and every trade has a stop-loss. No exter
Ikioi Bitcoin Momentum follows multi-week momentum on BTCUSD. Once a day it checks two simple facts: is the price higher than two weeks ago, and higher than eight weeks ago? When both are true, it buys and holds. When they disagree, it closes and stays out. It uses no price levels, no indicators to optimise and no predictions, only the direction of the 2-week and 8-week moves. No grid, no martingale, no averaging. One position at a time, an initial stop-loss on every trade and a trailing stop. N
Expert Advisor Live Audit answers the question every EA user asks sooner or later: is my Expert Advisor broken, just unlucky, or eaten by costs? It reads the trade history of this account, groups it by magic number and shows, for each EA, its real edge, how it compares with its backtest, and what execution really cost. It is an indicator: it never opens, modifies or closes a trade. No DLL, no web requests, no external services. What you see Overview : every EA on the account with trades, win rat
Seasonality and Session Lab shows how this symbol behaves by hour, weekday, day of month, month and special days (gotobi, month end, first Friday) - and which of those patterns survive an honest statistical test. Most seasonal "edges" are noise: compare 168 weekday-hour cells and about eight of them will look significant by pure chance. This indicator corrects for that, checks both halves of the period and subtracts the cost. What it shows with confidence is the volatility and spread profile of
News Impact Statistics measures how much the market really moves on each economic release - on this symbol, with your broker's prices - and shows the usual move of the next releases before they happen. It uses the economic calendar built into MetaTrader 5 and the price history in your terminal. No web requests, no DLL, no external calendar feed. Indicator only: it never trades. What you see Ranking : every high-importance release for the symbol's currencies over the last years, sorted by the med
Filter:
No reviews
Reply to review