Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To backtest a Bitcoin moving-average crossover strategy, define the exact market, candle data, crossover rules, execution timing, and trading costs before calculating results. Then compare its net performance with buy-and-hold over the same dates and test it on data that was not used to choose the parameters. A backtest is a historical simulation—not a forecast or proof of future profit.

1. Write down the strategy rules before testing

“Buy when the fast average crosses the slow average” is not specific enough to reproduce. Record the choices below before examining results; changing them after seeing performance is a new trial.

  • Market: exchange or data provider, BTC trading pair, and quote currency.
  • Data: candle interval, date range, price field (such as close), timezone, and daily candle boundary.
  • Indicators: fast and slow moving-average windows and the averaging method.
  • Position rules: whether the strategy is long-only, exits to cash, or can short; how it behaves when the averages are equal; and how an open position at the end of the test is valued.
  • Portfolio assumptions: starting capital, position sizing, and whether uninvested cash earns a return.
  • Execution and costs: when orders are filled, applicable fees, spread, and slippage assumptions.

There is no single crossover window established here as optimal. Treat each choice of windows and rules as a hypothesis to test, not as a known best setting.

2. Select and inspect a consistent Bitcoin data series

Use one exchange-and-pair series for the entire test. Different venues, quote currencies, candle intervals, and candle boundaries can produce different prices and therefore different crossover dates. Before calculating indicators, check for missing or duplicated candles, confirm timestamps and daily cutoffs, and understand whether the requested date range includes its start and end candles.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

For example, CoinMarketCap’s historical OHLCV V2 documentation describes daily and hourly candles; hourly volume is unavailable before 2020-09-22. Its API reference specifies that time_start is exclusive and time_end is inclusive, so account for that when requesting a date range. CryptoQuant’s BTC market-data guide lists coverage by venue and pair. It also notes that its daily bars begin at UTC 00:00, whereas official HTX and OKX daily bars use UTC 16:00. Those series are constructed with different day boundaries and need not match.

Keep a record of the provider, venue, pair, interval, date range, and boundary convention alongside the results. If you switch data sources or candle conventions, treat the output as a separate test rather than joining the series without documenting the change.

3. Calculate signals without look-ahead bias

At each candle, calculate both moving averages using only price observations available through that candle. A signal based on a candle’s closing price is not known until that candle closes. Filling a trade at that same close can improperly use information that was unavailable at the time of execution.

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
  1. Compute the fast and slow averages from the chosen price field and their specified windows.
  2. Mark a bullish crossover when the fast average moves from at or below the slow average to above it; mark a bearish crossover when it moves from at or above to below. Specify how equality is handled so the rule is unambiguous.
  3. Apply the signal at the next candle under a simple conservative convention, or document a different execution model that demonstrates the order could have been placed and filled after the signal became available.
  4. Apply the position rule consistently, including at the end of the sample. State whether a remaining position is valued at the last available price or closed under a modeled execution rule.

CoinMarketCap’s tutorial recommends shifting the signal by one period to avoid acting on the candle that generated it. See CoinMarketCap’s backtesting tutorial, published 4 August 2026.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Deduct fees, spread, and slippage

Historical OHLCV candles do not contain the bid-ask spread and do not show the market impact of your orders. A close-to-close calculation alone is therefore not net trading performance. Deduct the applicable venue fee on every entry and exit, and estimate spread and slippage separately. State whether fees are modeled as a percentage, a fixed amount, or another rule, and apply the assumptions to both sides of each trade.

Report the cost assumptions and test sensitivity to higher costs. A strategy that appears viable only under unusually low costs is less robust than one whose results hold up under more demanding assumptions. Do not label a gross-return curve as net performance.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

5. Measure risk and compare with buy-and-hold

Report enough information to show both what the strategy returned and how it behaved. For the strategy and its benchmark, use the same market data, dates, starting capital, and end-of-test valuation assumptions.

  • Cumulative return: total change over the stated period, after modeled costs.
  • Annualized return: include the date range and the calculation convention, since annualization depends on those choices.
  • Maximum drawdown: the largest peak-to-trough decline in the portfolio value during the test.
  • Exposure: the share of the test period invested in Bitcoin.
  • Trading activity: number of trades or turnover, with a clear definition of what counts as a trade.
  • Net performance: results after fees, spread, and slippage assumptions.
  • Benchmark: buy-and-hold BTC over the identical period, using the same starting capital and valuation assumptions.

Break the results into chronological periods or market regimes as well as showing the aggregate. A single full-period return can hide long stretches of underperformance or risk.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

6. Test whether the result generalizes

Trying many window combinations and reporting only the winner can make an in-sample result look stronger than it is. Bailey, Borwein, López de Prado, and Zhu describe this risk of backtest overfitting in “The Probability of Backtest Overfitting.”

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Use a holdout period

Choose an untouched later date range for evaluation. Set the parameters using earlier data, freeze the rules, and then run the strategy on the holdout without retuning. Repeatedly checking that holdout and changing the strategy in response makes it part of the selection process, weakening its value as an independent check.

Or use chronological walk-forward windows

Choose parameters using only the past, evaluate them on the next period, then move forward and repeat according to a fixed schedule. Keep the sequence chronological; do not let future observations influence earlier choices.

Log every configuration tried, including the data series, dates, indicator windows, execution assumptions, and cost model. When comparing crossover variants, hold the market, sample dates, execution convention, and costs constant, then compare net return, drawdown, exposure, turnover, and out-of-sample consistency.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

7. State what the backtest cannot establish

A historical simulation depends on the selected exchange, pair, sample, candle definition, costs, execution assumptions, and parameter-selection process. OHLCV is not order-book or trade-level execution data, so modeled fills cannot fully reproduce real trading conditions. Historical results do not establish future profitability.

CoinMarketCap summarizes the purpose of testing history before risking capital in its tutorial: “Before risking capital on a trading strategy, you test it against history.” That is a reason to test carefully, not evidence that a strategy will work in live markets.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.