Hourly EMA Crossover Strategy with Position Reversals
Summary
This example describes a directional strategy that uses two exponential moving averages on hourly bars. It compares a 15-period average with a 50-period average and treats a crossover between the latest and prior readings as a change in direction. When flat, it opens a long position after an upward crossover or a short position after a downward one. When already positioned, an opposite crossover closes the existing exposure and opens a position the other way.
The example also outlines a historical simulation setup for a Bitcoin-dollar contract, specifying a 2018 test window, commission, slippage, contract size, minimum price increment, and starting capital, then calculating performance statistics and displaying results. It does not report the resulting returns, risk measures, or trade count, so it provides no evidence that the rules are profitable. It gives no explicit stop, target, or risk-based sizing rule, and the fixed crossover approach may behave differently across markets and parameter choices.
Key ideas
- The strategy evaluates a fast and a slow exponential moving average using hourly bars.
- A cross above the slower average triggers a long entry, while a cross below it triggers a short entry.
- An opposite signal closes the current position and establishes exposure in the other direction.
- The example specifies trading costs and contract settings for a historical simulation but supplies no performance findings.
- No protective exit or volatility-adjusted position sizing method is described.
Tags
From a private course collection; the original is not published.