Eight-Hour EMA Crossover Strategy for Bitcoin
Summary
This document describes a Bitcoin strategy that evaluates completed eight-hour candles and uses a crossover between 12-period and 169-period exponential moving averages to trade. A positive crossover opens a long position using nearly all available account balance; a negative crossover closes the position. The script also calculates and plots a 676-period EMA, but that line does not appear in the entry or exit conditions. It removes the latest, still-forming candle before calculating the indicators and checks for a new bar before acting.
The published backtest settings cover BTC/USDT on Binance from November 2022 to May 2024, with a 15-minute base interval and four-hour stated period. No performance results are included, so the settings alone do not establish effectiveness. The implementation is long-only: it exits on a bearish cross and does not open a short position. Its use of nearly the full balance creates concentrated exposure, while the supplied logic shows no explicit stop loss, transaction cost treatment, or slippage model. The title’s eight-hour reference comes from the candle interval requested by the strategy code.
Key ideas
- The script requests eight-hour candles and excludes the still-forming bar from indicator calculations.
- A bullish crossover of the 12-period EMA over the 169-period EMA opens a long position.
- A bearish crossover closes the position, while the 676-period EMA is plotted but not used for signals.
- The strategy uses almost all available balance and has no explicit stop loss in the supplied logic.
- The backtest settings specify a BTC/USDT sample, but no performance outcomes are reported.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.