ForexBestRobots.comCompare EAs →
EN

Forex strategy · USD/JPY H4

USD/JPY H4 TRIX Strategy: Zero Cross and EMA(50) Filter on Real 2024 Data

Test fixed TRIX(15) zero-cross rules with an EMA(50) price filter on real USD/JPY H4 quotes. Inspect all trades, minute-based exits and illustrative costs.

Actual USD/JPY H4 quote candles with EMA(50), TRIX(15) in percent and reference entry, modeled exit, fixed stop and target.
Actual USD/JPY H4 quote candles with EMA(50), TRIX(15) in percent and reference entry, modeled exit, fixed stop and target.

This setup combines a fresh TRIX(15) zero crossing with price on the required side of EMA(50). The fixed 2024 replay produced 26 trades and 5.523 R after the base allowance. That is a positive result in this particular retrospective sample, with substantial validation limits. Every trade, the complete rules and the original quote provenance are available below.

1. A fixed momentum hypothesis and its result

The hypothesis is that a fresh turn in triple-smoothed momentum, supported by price relative to EMA(50), can identify continuation. A positive oscillator alone is not a new entry on every candle. This retrospective USD/JPY study fixes the cross, filter, stop and exits before calculation. No parameter search or changes after seeing the result were performed.

2. Use real prices and a declared candle clock

The source contains 405,411 USD/JPY minute records from December 2023 through December 2024. December 2023 supplies history before evaluation. Source CET/CEST is converted to UTC, including the summer offset. H4 groups contain record timestamps in (end − 4 hours, end], ending at 00:00, 04:00, 08:00, 12:00, 16:00 and 20:00 UTC. Missing prices are not filled; short opening or closing groups remain.

3. Calculate TRIX(15) with declared EMA seeds

Use three consecutive EMA(15) stages with α = 2/16. Each starts from the mean of its first 15 available inputs, at indices 14, 28 and 42. TRIX[t] = 100 × (EMA3[t]/EMA3[t−1] − 1), first available at index 43. Keep full precision and all preceding history. TRIX is a percentage change in EMA3, not pips or an account return; a value of 0.01 means 0.01%. The source prices have two decimals.

EMA1 = EMA15(Close)
EMA2 = EMA15(EMA1)
EMA3 = EMA15(EMA2)
TRIX[t] = 100 × (EMA3[t] / EMA3[t−1] − 1)
Long cross: TRIX[t−1] ≤ 0 and TRIX[t] > 0
Short cross: TRIX[t−1] ≥ 0 and TRIX[t] < 0

4. Require a fresh zero cross

Long requires previous TRIX ≤ 0 and current TRIX > 0; short requires previous TRIX ≥ 0 and current TRIX < 0. Both readings must exist and come from completed groups. An equal current value of zero does not cross. Compare unrounded numbers, even when the displayed value looks like zero. The EMA(9) signal line used in our indicator guide is not an entry filter here.

5. Check the EMA(50) price filter at the crossing close

Seed EMA(50) with the mean of the first 50 closes at index 49, then use α = 2/51. At the qualifying cross, long requires close > EMA(50), short close < EMA(50); equality rejects. If this filter fails, discard that cross. A later price move across the average does not revive it while TRIX retains its sign. There is no additional slope or Efficiency Ratio filter.

6. Freeze the stop from five completed groups

For long, record the lowest low of the cross group and its previous four observed groups as L. For short, record the highest high of the same inclusive window as H. Freeze these levels at the crossing close; later candles never move them. Only one pending entry or position is permitted. Ignore new crosses while a position remains open at a group close. The five groups are observed market data, not necessarily twenty uninterrupted hours.

7. Enter at the next minute open and define initial R

After confirmation, use the first available next-group minute record’s open as the reference entry E. This is a minute-data approximation, not an observed broker fill or first tick. Long stop S = L; short stop S = H. Cancel the single attempt if the stop is on the wrong side of entry or the distance is below 5 pips. Initial R is |E − S|; the target is E + 2R for long or E − 2R for short. Here one pip means 0.01 in USD/JPY.

Initial R = |Entry − Stop|
Long target = Entry + 2 × Initial R
Short target = Entry − 2 × Initial R
Net R = (gross pips − allowance pips) / initial stop pips

8. Keep exits fixed and handle uncertain price order

Check each minute, including the entry minute. A gap through the stop exits at that minute’s open. A favorable gap through the target receives the target price, with no assumed improvement. If both levels are touched within one minute, assign the stop first. Otherwise use the touched level. After 12 following observed H4 closes from confirmation, exit at the next minute open if still held; opening stop/target gap checks come first. Remaining positions are closed at the last used quote when data ends.

9. Apply transparent costs to the reference-price replay

The base allowance is 1.5 pips per round trip plus 0.2 pip per crossed UTC date boundary. Stress uses 3.0 plus 0.5; the zero-cost case deducts nothing. These are illustrative combined trading and holding allowances, not measured historical spreads or broker swaps. Cost scenarios revalue the same trades without changing selection. Net R = (gross pips − total allowance)/initial stop pips; a stopped trade can therefore lose more than 1R.

10. Read the full-year result after costs

Evaluation covers the available completed UTC groups in 2024 through 2024-12-31 20:00 UTC. There are 26 trades. With the base allowance, net result is 5.523 R, net price movement 438.8 pips and R-based profit factor 1.650. The maximum closed-trade drawdown is 2.096 R. That is a positive result in this particular retrospective sample, with substantial validation limits. These are reference-price simulation results, not a live account return.

ScenarioZero allowanceBase allowanceStress allowance
Trades262626
Net win rate (%)53.853.853.8
Net pips488.0438.8384.5
Net R6.3035.5234.691
Profit factor (R)1.7721.6501.529
Closed-trade drawdown (R)2.0002.0962.197

11. Compare chronological halves without retuning

The first half has 12 trades and 3.657 R after base costs; the later half has 14 trades and 1.866 R. Trades are assigned by entry date. Settings and exit rules are unchanged. These are descriptive chronological segments of a retrospective test, not genuinely unseen or prospective validation. No annualized return is inferred from them.

Entry periodJanuary–JuneJuly–December
Trades1214
Net win rate (%)58.350.0
Net pips145.2293.6
Net R3.6571.866
Profit factor (R)2.1241.356
Closed-trade drawdown (R)1.4912.096

12. Inspect the first trade in the first half

Trade 1: Long. The setup group closes at 2024-01-03 20:00 UTC; the confirmation group at 2024-01-03 20:00 UTC. Reference entry is 143.23 at 2024-01-03 20:01 UTC, stop 141.85, target 145.99, initial risk 138 pips. Exit is 144.64 at 2024-01-05 20:01 UTC; base net result 1.008 R. It is the first entered trade of this half, selected irrespective of its outcome. Times label minute records, not exact fill times.

Actual USD/JPY H4 quote candles with EMA(50), TRIX(15) in percent and reference entry, modeled exit, fixed stop and target.
First entered trade of the first half. E = reference entry, X = modeled exit, S = stop, T = target. Candles come from the original minute records. Chart spacing follows observed groups; closed-market gaps are compressed.

13. Inspect the first trade in the later half

Trade 13: Short. The setup group closes at 2024-07-08 00:00 UTC; the confirmation group at 2024-07-08 00:00 UTC. Reference entry is 160.63 at 2024-07-08 00:01 UTC, stop 161.31, target 159.27, initial risk 68 pips. Exit is 161.31 at 2024-07-09 14:52 UTC; base net result −1.025 R. The same rules apply. The full CSV includes every trade, including losses and timed exits.

Actual USD/JPY H4 quote candles with EMA(50), TRIX(15) in percent and reference entry, modeled exit, fixed stop and target.
First entered trade of the later half, shown under the same rules and plotting convention. A completed historical H4 candle may include observations after the modeled exit within that candle.

14. Explore one trade at a time

Start with a recorded trade, then compare the cost assumptions. The chart and the short result below refer to your selected trade.

15. Separate normalized R from account risk

R normalizes each outcome by its initial gross price stop distance. Profit factor and drawdown here use those R outcomes, not raw pips. Closed-trade drawdown omits unrealized swings and margin pressure. Position sizing would also need contract size, currency conversion, costs and execution limits. A 1R reference stop does not cap a gap loss or guarantee a particular account percentage.

16. Check the limitations and reproduce before adapting

The records do not provide a verified Bid/Ask pair, tick sequence, depth or broker fills. Stop-first resolves same-minute ambiguity conservatively under this model, but does not reconstruct the true path. The calendar holding allowance is not a broker’s financing schedule. One year and one pair are insufficient to establish robustness. Reproduce the frozen rules, then test longer histories, other feeds, variable costs and a genuinely separate period before considering changes.

Frequently asked questions

Does a positive TRIX reading open a new long trade?

No. A fresh crossing from previous TRIX ≤ 0 to current TRIX > 0 is required, with the same group’s close strictly above EMA(50). Entry uses the next available minute-record open.

Can a rejected cross become valid when price later clears EMA(50)?

No. A failed price filter discards that crossing. A later group needs its own fresh eligible zero crossing; simply retaining a positive or negative TRIX is insufficient.

Are these actual historical broker executions?

No. The source is minute quote OHLC. Entries and exits are a declared reference-price replay, with explicit gap and same-minute assumptions and illustrative cost deductions.

Does a positive sample prove the strategy works?

No. Fixed retrospective results on one pair and one year need longer histories, other sources, realistic execution costs and genuinely separate validation.

Data, timing and reproducibility

Source: 397 daily Forexite MetaStock archives, 2023-12-01 through 2024-12-31. Original archive SHA-256 and CRC were checked before extraction. The used USD/JPY records preserve the source timestamp, CET/CEST offset and original two-decimal OHLC. H4 groups use the first open, maximum high, minimum low and last close.

The extraction contains 405,411 minute records and 1,747 H4 groups including warm-up; 1,618 groups fall in evaluation. The first source-boundary-cut group and groups beyond the declared endpoint are omitted. No missing minute or weekend prices are inserted. 0 exits required the same-minute stop-first rule.

The download includes all used minute records, aggregate candles, every trade and event, the frozen protocol with its hash, source URLs and archive hashes, replay code and a separate verification implementation. The January–June and July–December summaries classify trades by entry date. Reproducing a calculation is separate from validating a tradable edge.

Sources