← All indicator tools

Indicator Lab · 01 · EMA

Exponential
Moving Average.

Analyse EMA rules on BTCUSDC over the last 30 days and understand every step at the same candle: from the weighted average and BUY/SELL to execution, costs and results.

No account requiredSMA initialization · closing pricesMethodology & sources ↓
EMA / Interactive laboratoryNo sign-up · Calculated in your browser

Evaluate and understand EMA rules on BTCUSDC.

Examine a clearly defined crossover rule over the latest 30 days. Chart, BUY/SELL action, costs and journal belong to the same analysis. Explanations accompany the application; below, inspect the calculation for the same candle.

One tool · one dataset · the same assumptions

BTCUSDC · 1-hour candles · 30 days

Shared market snapshot: 11 Oct 2026, 15:52 UTC · Bootstrap snapshot · refresh scheduled · Age when opened: 3,136.0 min

Evaluation window: 11 Sept 2026, 15:00 — 11 Oct 2026, 15:00 UTC (end exclusive) · 720 confirmed hourly candles

3000 earlier candles supply EMA warm-up only; they do not count toward the 30-day performance. A page visit can refresh a stale server cache in the background for later visitors. Your opened snapshot stays fixed until you fetch fresh data yourself.

Fetching fresh updates the snapshot. Analysis still uses completed hourly candles; there is no tick stream.

Number of candles. Longer smooths more and reacts more slowly.

α = 2 / (10 + 1) = 0.1818

The chart and trading rule use the same two EMA series. The fast period must be shorter than the slow period. A longer EMA smooths more and reacts more slowly. The optional SMA weights the latest N closes equally and does not alter the EMA rule.

Trading rule, capital and execution costs

Spot, long or cash. EMA 10 crosses strictly above EMA 30 at a confirmed candle close: buy. A cross strictly below: sell the entire position. Fill after 1 candle(s) at the open plus adverse slippage. No leverage, additions or price stop. A delayed order remains scheduled until execution.

Start in cash; an existing above-state does not open a position. At each new entry, the chosen fraction of available cash includes the buy fee. Fractional quantities are allowed; exchange filters, financing and market impact are not modeled.

One adverse markup/markdown; do not add spread twice.

1 = next open; never backdated to the signal close.

Descriptive analysis of this 30-day snapshot. Parameter comparisons on the same history are not an independent out-of-sample test.

Public market snapshot

BTCUSDC · BTCUSDC · 1h · last 30 days

The chart window limits the display only. The rule analysis uses all disclosed candles in the 30-day evaluation window.

Practise the rule: choose BUY, SELL, HOLD or WAIT, check the explanation, then reveal the next candle.

Price candles and moving averagesSelect a candle using the slider below the chart or by tapping. All values are also available in the inspector.73,397.177,300.681,204.185,107.689,011EMA crossover at close; not a filled trade: SELL · 2026-09-11T20:59:59.999Z · 77,321.1SELLEMA crossover at close; not a filled trade: BUY · 2026-09-13T19:59:59.999Z · 77,268BUYOpen fill: BUY · 2026-09-13T20:00:00.000Z · 77,306.7Buy fillEMA crossover at close; not a filled trade: SELL · 2026-09-13T22:59:59.999Z · 76,700.6SELLOpen fill: SELL · 2026-09-13T23:00:00.000Z · 76,662.3Sell fillEMA crossover at close; not a filled trade: BUY · 2026-09-14T03:59:59.999Z · 77,571.4BUYOpen fill: BUY · 2026-09-14T04:00:00.000Z · 77,610.2Buy fillEMA crossover at close; not a filled trade: SELL · 2026-09-15T05:59:59.999Z · 77,614.4SELLOpen fill: SELL · 2026-09-15T06:00:00.000Z · 77,575.6Sell fillEMA crossover at close; not a filled trade: BUY · 2026-09-17T03:59:59.999Z · 76,382.1BUYOpen fill: BUY · 2026-09-17T04:00:00.000Z · 76,420.3Buy fillEMA crossover at close; not a filled trade: SELL · 2026-09-20T06:59:59.999Z · 80,295.8SELLOpen fill: SELL · 2026-09-20T07:00:00.000Z · 80,255.7Sell fillEMA crossover at close; not a filled trade: BUY · 2026-09-20T16:59:59.999Z · 81,316.1BUYOpen fill: BUY · 2026-09-20T17:00:00.000Z · 81,357.5Buy fillEMA crossover at close; not a filled trade: SELL · 2026-09-23T13:59:59.999Z · 85,788.8SELLOpen fill: SELL · 2026-09-23T14:00:00.000Z · 85,745.9Sell fillEMA crossover at close; not a filled trade: BUY · 2026-09-25T10:59:59.999Z · 84,714.7BUYOpen fill: BUY · 2026-09-25T11:00:00.000Z · 84,757Buy fillEMA crossover at close; not a filled trade: SELL · 2026-09-25T13:59:59.999Z · 83,909.6SELLOpen fill: SELL · 2026-09-25T14:00:00.000Z · 83,867.6Sell fillEMA crossover at close; not a filled trade: BUY · 2026-09-26T22:59:59.999Z · 84,272BUYOpen fill: BUY · 2026-09-26T23:00:00.000Z · 84,314.2Buy fillEMA crossover at close; not a filled trade: SELL · 2026-09-28T00:59:59.999Z · 84,129.6SELLOpen fill: SELL · 2026-09-28T01:00:00.000Z · 84,080.5Sell fillEMA crossover at close; not a filled trade: BUY · 2026-09-29T08:59:59.999Z · 83,849.8BUYOpen fill: BUY · 2026-09-29T09:00:00.000Z · 83,891.7Buy fillEMA crossover at close; not a filled trade: SELL · 2026-09-29T16:59:59.999Z · 83,036.5SELLOpen fill: SELL · 2026-09-29T17:00:00.000Z · 82,994.9Sell fillEMA crossover at close; not a filled trade: BUY · 2026-09-30T11:59:59.999Z · 83,885.7BUYOpen fill: BUY · 2026-09-30T12:00:00.000Z · 83,927.7Buy fillEMA crossover at close; not a filled trade: SELL · 2026-10-01T00:59:59.999Z · 83,448.5SELLOpen fill: SELL · 2026-10-01T01:00:00.000Z · 83,406.8Sell fillEMA crossover at close; not a filled trade: BUY · 2026-10-01T04:59:59.999Z · 84,057.5BUYOpen fill: BUY · 2026-10-01T05:00:00.000Z · 84,099.5Buy fillEMA crossover at close; not a filled trade: SELL · 2026-10-02T20:59:59.999Z · 84,439.2SELLOpen fill: SELL · 2026-10-02T21:00:00.000Z · 84,396.6Sell fillEMA crossover at close; not a filled trade: BUY · 2026-10-03T18:59:59.999Z · 84,934BUYOpen fill: BUY · 2026-10-03T19:00:00.000Z · 84,976.5Buy fillEMA crossover at close; not a filled trade: SELL · 2026-10-03T20:59:59.999Z · 84,744.8SELLOpen fill: SELL · 2026-10-03T21:00:00.000Z · 84,702.4Sell fillEMA crossover at close; not a filled trade: BUY · 2026-10-04T05:59:59.999Z · 84,905BUYOpen fill: BUY · 2026-10-04T06:00:00.000Z · 84,947.5Buy fillEMA crossover at close; not a filled trade: SELL · 2026-10-05T17:59:59.999Z · 85,430.2SELLOpen fill: SELL · 2026-10-05T18:00:00.000Z · 85,387.5Sell fillEMA crossover at close; not a filled trade: BUY · 2026-10-05T21:59:59.999Z · 85,944.8BUYOpen fill: BUY · 2026-10-05T22:00:00.000Z · 85,987.8Buy fillEMA crossover at close; not a filled trade: SELL · 2026-10-06T02:59:59.999Z · 85,534.2SELLOpen fill: SELL · 2026-10-06T03:00:00.000Z · 85,491.4Sell fillEMA crossover at close; not a filled trade: BUY · 2026-10-06T09:59:59.999Z · 85,984.5BUYOpen fill: BUY · 2026-10-06T10:00:00.000Z · 86,027.5Buy fillEMA crossover at close; not a filled trade: SELL · 2026-10-06T19:59:59.999Z · 85,616.3SELLOpen fill: SELL · 2026-10-06T20:00:00.000Z · 85,573.5Sell fillEMA crossover at close; not a filled trade: BUY · 2026-10-09T11:59:59.999Z · 83,186.1BUYOpen fill: BUY · 2026-10-09T12:00:00.000Z · 83,222.7Buy fill11 Sept 2626 Sept 2611 Oct 26
Candles: open · high · low · closeFast EMA 10Slow EMA 30◇ BUY / SELL = EMA crossover at close · not a trade yet● Buy / sell fill = actually executed at openUTC

A SELL crossover can result in WAIT when there is no long position to sell. The action accounts for the position and queued executions; only dots mark actual trades.

Chart signals and fills as a list (55)
  1. 2026-09-11T20:59:59.999Z · SELL · signal · 77,321.1
  2. 2026-09-13T19:59:59.999Z · BUY · signal · 77,268
  3. 2026-09-13T20:00:00.000Z · BUY · fill · 77,306.7
  4. 2026-09-13T22:59:59.999Z · SELL · signal · 76,700.6
  5. 2026-09-13T23:00:00.000Z · SELL · fill · 76,662.3
  6. 2026-09-14T03:59:59.999Z · BUY · signal · 77,571.4
  7. 2026-09-14T04:00:00.000Z · BUY · fill · 77,610.2
  8. 2026-09-15T05:59:59.999Z · SELL · signal · 77,614.4
  9. 2026-09-15T06:00:00.000Z · SELL · fill · 77,575.6
  10. 2026-09-17T03:59:59.999Z · BUY · signal · 76,382.1
  11. 2026-09-17T04:00:00.000Z · BUY · fill · 76,420.3
  12. 2026-09-20T06:59:59.999Z · SELL · signal · 80,295.8
  13. 2026-09-20T07:00:00.000Z · SELL · fill · 80,255.7
  14. 2026-09-20T16:59:59.999Z · BUY · signal · 81,316.1
  15. 2026-09-20T17:00:00.000Z · BUY · fill · 81,357.5
  16. 2026-09-23T13:59:59.999Z · SELL · signal · 85,788.8
  17. 2026-09-23T14:00:00.000Z · SELL · fill · 85,745.9
  18. 2026-09-25T10:59:59.999Z · BUY · signal · 84,714.7
  19. 2026-09-25T11:00:00.000Z · BUY · fill · 84,757
  20. 2026-09-25T13:59:59.999Z · SELL · signal · 83,909.6
  21. 2026-09-25T14:00:00.000Z · SELL · fill · 83,867.6
  22. 2026-09-26T22:59:59.999Z · BUY · signal · 84,272
  23. 2026-09-26T23:00:00.000Z · BUY · fill · 84,314.2
  24. 2026-09-28T00:59:59.999Z · SELL · signal · 84,129.6
  25. 2026-09-28T01:00:00.000Z · SELL · fill · 84,080.5
  26. 2026-09-29T08:59:59.999Z · BUY · signal · 83,849.8
  27. 2026-09-29T09:00:00.000Z · BUY · fill · 83,891.7
  28. 2026-09-29T16:59:59.999Z · SELL · signal · 83,036.5
  29. 2026-09-29T17:00:00.000Z · SELL · fill · 82,994.9
  30. 2026-09-30T11:59:59.999Z · BUY · signal · 83,885.7
  31. 2026-09-30T12:00:00.000Z · BUY · fill · 83,927.7
  32. 2026-10-01T00:59:59.999Z · SELL · signal · 83,448.5
  33. 2026-10-01T01:00:00.000Z · SELL · fill · 83,406.8
  34. 2026-10-01T04:59:59.999Z · BUY · signal · 84,057.5
  35. 2026-10-01T05:00:00.000Z · BUY · fill · 84,099.5
  36. 2026-10-02T20:59:59.999Z · SELL · signal · 84,439.2
  37. 2026-10-02T21:00:00.000Z · SELL · fill · 84,396.6
  38. 2026-10-03T18:59:59.999Z · BUY · signal · 84,934
  39. 2026-10-03T19:00:00.000Z · BUY · fill · 84,976.5
  40. 2026-10-03T20:59:59.999Z · SELL · signal · 84,744.8
  41. 2026-10-03T21:00:00.000Z · SELL · fill · 84,702.4
  42. 2026-10-04T05:59:59.999Z · BUY · signal · 84,905
  43. 2026-10-04T06:00:00.000Z · BUY · fill · 84,947.5
  44. 2026-10-05T17:59:59.999Z · SELL · signal · 85,430.2
  45. 2026-10-05T18:00:00.000Z · SELL · fill · 85,387.5
  46. 2026-10-05T21:59:59.999Z · BUY · signal · 85,944.8
  47. 2026-10-05T22:00:00.000Z · BUY · fill · 85,987.8
  48. 2026-10-06T02:59:59.999Z · SELL · signal · 85,534.2
  49. 2026-10-06T03:00:00.000Z · SELL · fill · 85,491.4
  50. 2026-10-06T09:59:59.999Z · BUY · signal · 85,984.5
  51. 2026-10-06T10:00:00.000Z · BUY · fill · 86,027.5
  52. 2026-10-06T19:59:59.999Z · SELL · signal · 85,616.3
  53. 2026-10-06T20:00:00.000Z · SELL · fill · 85,573.5
  54. 2026-10-09T11:59:59.999Z · BUY · signal · 83,186.1
  55. 2026-10-09T12:00:00.000Z · BUY · fill · 83,222.7

This rule’s action at this candle

HOLD · Hold position

11 Oct 2026, 14:59 UTC · confirmed close

No new confirmed crossover at this close. The existing position stays open. Remaining above does not constitute a new buy.

EMA 10 · previous → now
82,992.4141 → 83,003.7133
EMA 30 · previous → now
82,909.6399 → 82,918.9896
Position after this open
0.12379081 BTC
Available cash
0 USDC

Signal at this close

No new signal

Actually filled at this open

No fill at this candle.

Historical simulation of this EMA rule with your parameters. BUY/SELL describes its action, not personal trading advice or a profit forecast.

11 Oct 2026, 14:59 UTC

Result under your assumptions

Final value, marked at close
10,281.39
Net change
2.81 %
Maximum close drawdown
8.02 %
Historical decline from the running peak.
Completed trades
13
Fees
281.15
Slippage costs
140.57
Market exposure
50.97 %
Fraction of evaluation candles with a held position.
Buy-and-hold net
5.26 %

Gross P&L 703.11 − fees 281.15 − Slippage 140.57 = net P&L 281.39

Gross uses actual traded quantity and the reference prices of filled orders. It is not a separate zero-cost backtest. A position still open at the end is marked at the close; no sale or exit cost is invented.

Account value: crossover rule and buy and hold

Value range: 9,556 — 11,073

Crossover ruleBuy-and-hold

Cash baseline: 10,000.00 · Buy and hold starts at the first evaluation open with the same capital, allocation and cost model.

Open position: 0.123791 · unrealized net P&L including paid entry fee -31.11.

Change exactly one assumption

Comparison with identical data and unchanged non-varied assumptions
ExperimentNetDrawdownTrades
A · EMA 10/302.81 %8.02 %13
B · EMA 15/300.84 %9.96 %10
Only fee +0.10 percentage points0.08 %9.84 %13
Only execution +1 candle later-1.47 %11.51 %13

Data, period and all unnamed assumptions remain identical. Quantity and cash are recalculated when costs change. No automatic parameter selection; repeated experimentation is not independent evidence.

Completed trades: distribution beyond a hit rate

Mean net P&L per trade
24.04
Median net P&L per trade
-54.73
Mean duration (candles)
24.3
Longest loss streak
4

Wins / losses / breakeven: 4 / 9 / 0. Completed-trade win rate: 30.77 %. Not an estimate of the next trade’s win probability.

Trade journal · from the number to the candle

A journal click opens the history available through that point. Later trades disappear in replay.

Actual simulated buy and sell fills
CandleSideQuantityOpen → fillFeeCash afterReplay
3054Buy0.12922677,268.02 → 77,306.659.990.00
3057Sell0.12922676,700.62 → 76,662.279.919,896.83
3062Buy0.12739277,571.37 → 77,610.169.890.00
3088Sell0.12739277,614.44 → 77,575.639.889,872.66
3134Buy0.12906076,382.09 → 76,420.289.860.00
3209Sell0.12906080,295.80 → 80,255.6510.3610,347.44
3219Buy0.12705881,316.89 → 81,357.5510.340.00
3288Sell0.12705885,788.80 → 85,745.9110.8910,883.78
3333Buy0.12828384,714.68 → 84,757.0410.870.00
3336Sell0.12828383,909.60 → 83,867.6510.7610,748.05
3369Buy0.12734984,272.02 → 84,314.1610.740.00
3395Sell0.12734984,122.52 → 84,080.4610.7110,696.85
3427Buy0.12738083,849.81 → 83,891.7310.690.00
3435Sell0.12738083,036.46 → 82,994.9410.5710,561.36
3454Buy0.12571383,885.71 → 83,927.6510.550.00
3467Sell0.12571383,448.53 → 83,406.8110.4910,474.84
3471Buy0.12442984,057.47 → 84,099.5010.460.00
3511Sell0.12442984,438.78 → 84,396.5610.5010,490.84
3533Buy0.12333284,934.01 → 84,976.4810.480.00
3535Sell0.12333284,744.79 → 84,702.4210.4510,436.11
3544Buy0.12273184,905.04 → 84,947.4910.430.00
3580Sell0.12273185,430.19 → 85,387.4710.4810,469.21
3584Buy0.12163185,944.84 → 85,987.8110.460.00
3589Sell0.12163185,534.17 → 85,491.4010.4010,387.97
3596Buy0.12063185,984.50 → 86,027.4910.380.00
3606Sell0.12063185,616.28 → 85,573.4710.3210,312.50
3670Buy0.12379183,181.06 → 83,222.6510.300.00
Net P&L and duration of each completed trade
#Entry → exitGrossFeesSlippageNetCandles
13054 → 3057-73.3219.909.95-103.173
23062 → 30885.4919.779.88-24.1726
33134 → 3209505.1020.2210.11474.7775
43219 → 3288568.1921.2310.62536.3469
53333 → 3336-103.2821.6310.82-135.733
63369 → 3395-19.0421.4410.72-51.2126
73427 → 3435-103.6021.2610.63-135.498
83454 → 3467-54.9621.0410.52-86.5113
93471 → 351147.4520.9710.4816.0040
103533 → 3535-23.3420.9310.46-54.732
113544 → 358064.4520.9110.4533.0936
123584 → 3589-49.9520.8610.43-81.245
133596 → 3606-44.4220.7010.35-75.4710

Candle inspector and calculation

Your selected value

Close
83,054.56
EMA 10
83,003.71
USDC
Price distance from EMA
0.06 %
EMA change per candle
11.30

Candle: closed / confirmed

Calculation: SMA seed available; recursive EMA can be calculated.

Data: Snapshot fetched 11 Oct 2026, 15:52 UTC · older than one candle period

Last closed candle in the disclosed data: 11 Oct 2026, 14:59 UTC

This is a measurement computed from prices. It does not imply a probability of success.

Calculation for this candle

EMAₜ = α × Closeₜ + (1 − α) × EMAₜ₋₁

0.181818 × 83,054.560000
+ 0.818182 × 82,992.414072
= 83,003.713332

Display is rounded; calculations use unrounded numbers.

How much influence do earlier prices retain?
This close18.18 %
1 candle(s) ago14.88 %
2 candle(s) ago12.17 %
3 candle(s) ago9.96 %
4 candle(s) ago8.15 %
5 candle(s) ago6.67 %

Coefficient of the complete SMA seed: 0.00 %. This is a weight, not an error bound. Earlier history still contributes after N candles.

What would the next close have to change?

EMA 10: 83,012.9582 · EMA 30: 82,927.7360

first EMA above · No new crossover

Equality at 82,328.041304. The threshold itself is not a strict crossover.

Calculation for exactly one new candle, fixed periods and these EMA starting values. Not a predicted price target; the starting candle must be closed.

Position scenario with these assumptions

A hypothetical spot buy and sell using the same starting capital, cash allocation and cost model as the EMA rule. The separate entry/exit prices and optional loss budget do not change the historical rule. Fractional quantities; no exchange minimum size.

Shared assumptions: 10000 USDC · 100 % cash allocation · 0.10 % fee · 0.05 % Slippage

Only together with the assumed stop price.

Quantity
0.1202
Committed capital incl. fee
10,000
Costs: fees + slippage
29.9551
Net P&L
-29.9551

0 − 19.97 − 9.985 = -29.9551

Data provenance and reproducibility
Dataset
btc-usdc-1h-30d-w3000-v1
Source
https://data-api.binance.vision/api/v3/klines?symbol=BTCUSDC&interval=1h&startTime=1778338800000&endTime=1791730799999
Data version / hash
42ac75e03e017bcac023d319dabb0928e0562fda0e51f4bfa5549ac50e3e8be4
Fetched / created
2026-10-11T15:52:48.657Z
Disclosed data
09 May 2026, 15:00 — 11 Oct 2026, 14:59 UTC · 3720 candles
Evaluation begins
3001. candle; earlier data supplies warm-up history.
Engine / rule
ema-lab-1.0.0 / ema-cross-long-cash-v1

Standard EMA with SMA initialization. Parity with a deployed unCoded engine is not established here. CSV contains only the disclosed data. For market data, downloading or sharing a link cannot guarantee later availability of the same snapshot.

Traceable to the formula

Exactly what is calculated here

01 · The definition

N is an integer count of candles, not calendar duration. Alpha = 2/(N+1). The first EMA value is the mean of the first N closes; earlier values are unavailable. Then:

EMAₜ = EMAₜ₋₁ + α × (Closeₜ − EMAₜ₋₁)

For N=1 the EMA equals the close. The seed contributes a coefficient (1−α)ᵏ after k updates. This is a weight, not forecast uncertainty. Zooming does not change the calculation history.

02 · The trading rule

Spot long/cash: a confirmed crossing from below to above creates a buy intent; the reverse creates a sell intent. Execution is no earlier than the next open, including the selected costs. An already-above state does not trigger a catch-up entry.

The evaluation window starts in cash. No leverage, shorts, hidden stop or pyramiding. Each entry allocates a fraction of available cash including its entry fee. Quantities are theoretical; exchange lot sizes are not modeled.

03 · The accounting

Fees apply per executed side. Slippage worsens each reference open; it includes spread, which is not added twice. Gross P&L uses the same actual quantities and reference opens before slippage. Gross minus fees minus slippage equals net.

A final open position is marked at the last confirmed close. No fictitious sale or exit fee is added. Drawdown is measured at candle closes and misses intrabar troughs.

04 · The interpretation

EMA smooths past prices. A higher value or crossover is not a calibrated probability. The last 30 days end at the snapshot’s last complete UTC hour. 3000 warmup candles only initialize the averages. Variants and benchmarks use the same evaluation window. Repeatedly tuning to the same data can overfit.

The mathematical convention is checked against documented references. Parity with a currently deployed unCoded engine is not claimed. The separate position calculation is hypothetical and does not alter the crossover rule.

Verified primary sources

Existence and relevant content checked on 11 October 2026. Research, technical references and data documentation serve different purposes; none is used as proof of profitability.

  1. Forecasting: Principles and Practice, 3rd ed., §8.1 ↗

    Rob J. Hyndman & George Athanasopoulos · 2021

    Recursive exponential smoothing, decaying weights and dependence on the initial level. Does not establish a trading advantage.

  2. TA-Lib EMA implementation · v0.6.4 ↗

    TA-Lib contributors; Mario Fortier · 2025

    Default compatibility: alpha = 2/(N+1), SMA initialization and recursive update for N ≥ 2. The N=1 identity here is tested separately.

  3. pandas.DataFrame.ewm ↗

    pandas development team

    Span-to-alpha conversion and recursive adjust=False convention. The tool declares its SMA seed explicitly.

  4. The Probability of Backtest Overfitting ↗

    David H. Bailey, Jonathan M. Borwein, Marcos López de Prado & Qiji Jim Zhu · 2015 · revised manuscript, 27 February

    Why selection across many historical trials can produce misleading results. This tool does not estimate PBO or claim out-of-sample profitability.

  5. Binance Spot API · Market Data / Klines ↗

    Binance

    Timestamped OHLCV candle schema and intervals. Data origin does not validate a trading rule.

  6. Binance · Market Data Only URLs ↗

    Binance

    Public data-api.binance.vision endpoint without account credentials.

    Analyse and Understand EMA | unCoded