In simple terms
We buy Ethereum after DEMA20 crosses above DEMA50 on a completed H4 candle with its close above EMA200. Entry is at the next scheduled opening. A fixed ATR14 stop, a completed bearish pair condition or a 30-candle deadline closes the position. This is a hypothetical cash-funded spot account.
On this page
Two separate questions, fixed before calculation
Does a DEMA crossover work after modeled costs, and what changes when EMA200 is required? We fixed the rules before the first account calculation. One control removes only the trend gate; another replaces the DEMA pair with EMA20/50 at both entry and pair exit. We did not search parameters. Familiar historical data make this retrospective research.
Original observations and incomplete intervals
We verify 79 official Binance ETHUSDT H4 archives with 14,434 observations, including June 2019 warm-up. Missing scheduled candles: 2; rows with nonstandard source-close timestamps: 11. We retain and disclose these rows. A missing or noncanonical interval resets indicator history; it never becomes an invented candle.
DEMA combines two EMA stages
For N=20 or 50, EMA1 smooths closing prices and EMA2 smooths EMA1 with the same weight 2/(N+1). DEMA=2×EMA1−EMA2. Each EMA starts with the mean of its first N valid inputs. DEMA20 first exists at zero-based index 38 and DEMA50 at index 98. DEMA is neither twice EMA alone nor EMA2 alone; reduced lag does not guarantee fewer false signals.
α_N = 2/(N+1); EMA1_t = EMA1_prev + α_N × (C_t − EMA1_prev)
EMA2_t = EMA2_prev + α_N × (EMA1_t − EMA2_prev)
DEMA_N = 2 × EMA1_N − EMA2_N
Symbols: C/H/L are close/high/low; TR is true range; N is the EMA period; prev is the previous canonical bar. O is the next raw opening, E/X modeled fills and X_ref the raw exit reference. B is pre-entry cash, B_free free cash, q ETH quantity, f/s per-side fee/slippage, L_unit planned unit loss, P_net net profit, R_net net R and V liquidation equity.
EMA200, ATR14 and a shared data gate
EMA200 starts with the first 200 consecutive canonical closes, then uses weight 2/201. Wilder ATR14 starts with 14 true ranges, then uses weight 1/14; the first range after a reset is high minus low. All variants require 200 current-segment observations, positive ATR14 and defined current and previous pair readings. The prior pair need not itself pass the 200-observation entry gate.
EMA200_t = EMA200_prev + 2/201 × (C_t − EMA200_prev)
ATR14_t = (13 × ATR14_prev + TR_t) / 14
A completed cross, followed by the next opening
When flat, require previous DEMA20≤DEMA50, current DEMA20>DEMA50 and current close>EMA200. Each comparison uses its own completed candle's values. Current equality fails; previous equality is included. Buy only at the immediately next scheduled H4 opening plus adverse slippage. Cancel a missing opening or an entry outside the account period; later close metadata cannot censor an already observed opening.
DEMA20_prev ≤ DEMA50_prev; DEMA20_t > DEMA50_t; C_t > EMA200_t
Fixed protection and opening priorities
Fix SL at the modeled entry fill minus 2×signal ATR14. Reject unless 0<SL<the raw entry opening. There is no target, trailing, leverage or adding. At an observed opening, a gap through SL has priority over a queued pair exit, followed by an overdue time exit. Only then may the candle's later low trigger an intrabar stop.
E = O × (1+s); SL = E − 2 × ATR14_signal
A pair level exit and the 30-H4 deadline
A canonical completed DEMA20≤DEMA50 queues the next opening exit; a fresh bearish crossing is unnecessary. The EMA-pair control uses EMA20≤EMA50. These exits need defined pair values, not the entry gate, ATR or EMA200. Queued exits survive missing observations and resets. Otherwise close at the 30th scheduled H4 close or period end; stop checks come first. A missed deadline uses the first later observed opening. Noncanonical liquidation closes are flagged proxies.
DEMA20_t ≤ DEMA50_t → X_ref = O_next_observed
Cash-funded size and the meaning of net R
Each account starts with 10,000 USDT and no leverage. Planned loss at the nominal stop, including modeled fees and slippage, is limited to 1% of pre-entry cash. Available cash can reduce quantity further. Net R divides realized net P&L by that entry's planned monetary loss. Fractional quantities are allowed; historical lot and minimum-notional rules are not reconstructed. An opening gap can exceed the planned loss.
L_unit = E(1+f) − SL(1−s)(1−f)
q = min[0.01 × B / L_unit, B / (E(1+f))]
R_net = P_net / (q × L_unit)
Rebuild the account for every cost scenario
Baseline costs are 0.10% fee plus 0.05% adverse slippage per side; higher costs use 0.20% and 0.10%. The full primary results are +36.96% without costs, +25.60% at baseline and +16.39% at higher costs. All three contain 91 trades here, but fills, stops, quantities and subsequent cash are recalculated. These are fixed assumptions, not current exchange quotes.
X = X_ref × (1−s)
P_net = q × [X(1−f) − E(1+f)]
The predefined cost scenarios
| Account or scenario | Net return % | Fees · USDT | Entry slippage · USDT | Exit slippage · USDT | Traded notional / initial cash |
|---|---|---|---|---|---|
| DEMA + EMA200 · zero costs | +36.96 | 0.00 | 0.00 | 0.00 | 59.82 |
| DEMA20/50 + EMA200 | +25.60 | 533.44 | 132.52 | 134.20 | 53.34 |
| DEMA + EMA200 · higher costs | +16.39 | 961.73 | 238.89 | 241.98 | 48.09 |
A positive total with more losing trades
The primary account returns +25.60% over 91 trades: 28 positive and 63 negative. Profit factor is 1.50, sampled drawdown 15.07% and observed-interval occupancy 11.51%. Separately restarted early and later accounts return +14.05% and +10.13%. Fully invested buy-and-hold returns +2,193.85% with 81.12% sampled drawdown and substantially different exposure. Returns are cumulative, not annual rates.
The continuous accounts after costs
The controls reveal a trade-off
Removing only EMA200 produces +49.28% with 17.07% sampled drawdown versus the primary +25.60% and 15.07%. Replacing the pair with ordinary EMA20/50 while keeping EMA200 produces +12.25% with 13.91% drawdown; its later account returns +4.88%. DEMA earns more than that EMA control, with higher full-period sampled drawdown. These paths are not equal-risk investments and do not establish universal indicator superiority.
| Account or scenario | Net return % | H4-close drawdown % | Trades | Profit factor | Observed-interval occupancy % |
|---|---|---|---|---|---|
| DEMA20/50 + EMA200 · Continuous 2020–2025 | +25.60 | 15.07 | 91 | 1.50 | 11.51 |
| DEMA20/50 without EMA200 · Continuous 2020–2025 | +49.28 | 17.07 | 190 | 1.41 | 26.93 |
| EMA20/50 + EMA200 · Continuous 2020–2025 | +12.25 | 13.91 | 56 | 1.35 | 8.14 |
| DEMA20/50 + EMA200 · Independent 2020–2022 | +14.05 | 12.07 | 42 | 1.68 | 10.90 |
| DEMA20/50 without EMA200 · Independent 2020–2022 | +26.31 | 17.07 | 87 | 1.51 | 23.62 |
| EMA20/50 + EMA200 · Independent 2020–2022 | +7.03 | 8.41 | 25 | 1.46 | 7.68 |
| DEMA20/50 + EMA200 · Independent 2023–2025 | +10.13 | 7.81 | 49 | 1.38 | 12.12 |
| DEMA20/50 without EMA200 · Independent 2023–2025 | +15.20 | 9.85 | 103 | 1.29 | 29.79 |
| EMA20/50 + EMA200 · Independent 2023–2025 | +4.88 | 8.56 | 31 | 1.27 | 8.61 |
| Buy and hold · base costs · Continuous 2020–2025 | +2,193.85 | 81.12 | — | — | 100.00 |
Keep source-quality limitations visible
Primary trades crossing missing H4 intervals: 0; touching noncanonical rows: 2; delayed pair exits: 0; partial-close liquidation proxies: 0. Two noncanonical exposures remain relevant even without a missing-interval trade. Original-quantity exclusions are retrospective ledger diagnostics, not executable filters or rebuilt account returns.
| Account or scenario | Trades |
|---|---|
| Trades crossing missing H4 intervals | 0 |
| Trades exposed to noncanonical rows | 2 |
| Delayed pair exits | 0 |
| Partial-close liquidation proxies | 0 |
Chronological examples, including losses
The first completed early trade enters at 2020-01-11 08:00 UTC and records −0.097 net R; the first later trade enters at 2023-01-21 16:00 UTC and records −0.417 net R. Both lose after costs. The charts show real OHLC, DEMA20, DEMA50, EMA200 and the fixed stop on actual elapsed UTC time. S marks the signal candle; E and X mark raw price references. Modeled fills include slippage separately.
First completed early trade
Select a candle with the chart, slider or arrow keys. Values are historical observations; opening time and signal availability are separate.
- Opening · UTC
- 2020-01-08 12:00 UTC
- Available · UTC
- 2020-01-08 16:00 UTC
- Open
- 143.52
- High
- 143.69
- Low
- 140.39
- Close
- 141.42
- DEMA20 · USDT per ETH
- 143.96
- DEMA50 · USDT per ETH
- 141.15
- EMA200 · USDT per ETH
- 138.28
- ATR14 · USDT per ETH
- 2.83
- SL · fixed stop
- 137.16
| Opening · UTC | Entry fill after slippage | Exit fill after slippage | Net R |
|---|---|---|---|
| 2020-01-11 08:00 UTC | 143.00 | 142.69 | −0.097 |
First completed later trade
Select a candle with the chart, slider or arrow keys. Values are historical observations; opening time and signal availability are separate.
- Opening · UTC
- 2023-01-18 20:00 UTC
- Available · UTC
- 2023-01-19 00:00 UTC
- Open
- 1,541.96
- High
- 1,544.78
- Low
- 1,507.90
- Close
- 1,511.43
- DEMA20 · USDT per ETH
- 1,575.26
- DEMA50 · USDT per ETH
- 1,589.02
- EMA200 · USDT per ETH
- 1,344.40
- ATR14 · USDT per ETH
- 34.68
- SL · fixed stop
- 1,585.85
| Opening · UTC | Entry fill after slippage | Exit fill after slippage | Net R |
|---|---|---|---|
| 2023-01-21 16:00 UTC | 1,648.09 | 1,623.76 | −0.417 |
An example selected by its opposite net result
The third example is the first later trade with a strictly opposite net-P&L sign to the first later trade. It opens on 2023-02-15 04:00 UTC and records +2.321 net R. Zero is not treated as an opposite sign. This outcome-conditioned selection is educational, not representative evidence. All examples already belong to the account totals. An H4 stop marker identifies an interval, not an exact tick time or an actual fill.
First later trade with the opposite net result
Select a candle with the chart, slider or arrow keys. Values are historical observations; opening time and signal availability are separate.
- Opening · UTC
- 2023-02-12 08:00 UTC
- Available · UTC
- 2023-02-12 12:00 UTC
- Open
- 1,530.84
- High
- 1,540.06
- Low
- 1,530.83
- Close
- 1,533.48
- DEMA20 · USDT per ETH
- 1,515.72
- DEMA50 · USDT per ETH
- 1,557.38
- EMA200 · USDT per ETH
- 1,545.41
- ATR14 · USDT per ETH
- 21.62
- SL · fixed stop
- 1,497.65
| Opening · UTC | Entry fill after slippage | Exit fill after slippage | Net R |
|---|---|---|---|
| 2023-02-15 04:00 UTC | 1,549.99 | 1,683.54 | +2.321 |
Restarted accounts, yearly returns and sampled exposure
Each account window includes its start and excludes its end. Cash and positions restart, while the same valid pre-period indicator history is retained. A signal completed exactly at the start boundary may enter the newly flat account at that opening; no order is carried from another account. Annual returns compare consecutive year-end liquidation equities and compound rather than add. H4-close equity values deduct modeled exit fee and slippage for open holdings. Position share counts observed intervals with holding duration after opening decisions, so a position closed exactly at a new opening does not occupy that interval; it is not exact wall-clock exposure or continuous maximum risk.
V = B_free + q × C_t × (1−s)(1−f)
Year-by-year results of the continuous accounts
| Year | DEMA20/50 + EMA200 | DEMA20/50 without EMA200 | EMA20/50 + EMA200 |
|---|---|---|---|
| 2020 | +26.46 | +33.67 | +10.72 |
| 2021 | −5.58 | −3.10 | −0.58 |
| 2022 | −4.48 | −2.49 | −2.77 |
| 2023 | +0.49 | +7.27 | −5.21 |
| 2024 | −2.56 | +0.33 | +8.80 |
| 2025 | +12.47 | +9.82 | +1.70 |
Reproduce the fixed study
Downloads contain the pinned protocol, complete observations and indicators, all eleven account ledgers, three buy-and-hold paths, and standalone replay and checker files. The replay uses Decimal40; the separate reconstruction uses Decimal50 and a scheduled H4 clock. Obtain all 79 original ZIPs with matching checksums. No rule was changed after viewing results. Hypothetical costs, fractional quantities and familiar history limit inference.
Run the replay with the protocol and original monthly ZIPs with their checksum files. The independent checker can also compare the retained observations with those original ZIPs.
python3 eth-dema-replay.py --protocol eth-dema-protocol.json --raw-dir raw4h --output replay.json python3 eth-dema-independent-check.py --protocol eth-dema-protocol.json --evidence eth-dema-evidence.json --raw-dir raw4h
Frequently asked questions
Was this DEMA variant profitable in the historical model?
Yes: +25.60% over the full six years after baseline costs and +16.39% under higher costs. The separately restarted later account returns +10.13%. These cumulative hypothetical results do not establish future profitability or actual execution.
Is DEMA simply an EMA calculated twice?
No. EMA2 is the EMA of EMA1, but DEMA is 2×EMA1−EMA2. Both stages use the same period. We explicitly state the mean seeds because platform initialization choices can differ.
What exactly changes in the controls?
The no-EMA200 control removes only close>EMA200 at entry. The ordinary-EMA control replaces DEMA20/50 with EMA20/50 in both the entry cross and pair exit, retaining EMA200. All use the same 200-observation gate, costs, sizing, stop and deadline.
Is 2023–2025 an unseen test?
No. The history was already available and used in prior research. Restarting cash checks retrospective consistency; indicators retain earlier valid history. This does not turn familiar past data into prospective validation.
How should I read the chart times and trade markers?
All candle times are H4 openings in UTC; close-based signals become available four hours later. S shows the signal candle, E the raw entry reference and X the exit reference interval. The account separately models adverse slippage. A stop touch is located within an H4 interval, not at an exact tick timestamp.
Does a 1% risk size guarantee the maximum loss?
No. The budget uses the nominal stop and the scenario's assumed entry and exit costs. Gaps, missing prices, liquidity and actual execution can produce a different loss. Reported drawdown is sampled at H4 closes; it is not a continuous worst-case risk limit.
Primary sources
Copying or republication without attribution and an active link to the original material is prohibited. Usage policy.
Scope and research limitations
One historical venue, a stablecoin quote, assumed costs and fractional quantities do not establish actual fills or future returns. Missing intervals and noncanonical source rows remain limitations. There is no prospective unseen-test claim.