Daily Moving Average Breakout with Cash-Based Position Entry
Summary
This simple daily trend-following method compares the latest daily close with a configurable moving average. When the close is at or above the average and the strategy is not holding the asset, it buys using 95% of the account balance. When the close falls below the average while a position is held, it sells the available asset holdings. The code checks for a new daily bar before recalculating, so its intended decision frequency is once per day.
The published settings describe a BTC/USDT spot backtest spanning several years, but give no performance results or evaluation metrics. The implementation tracks holdings with an internal Boolean rather than checking actual positions, and it does not show fees, slippage, stop-losses, or safeguards for order failures. Its single-average rule may lag in sharp reversals and can switch repeatedly around the average; the supplied material does not establish how it performed.
Key ideas
- The strategy enters when the daily close is at or above a configurable moving average.
- It exits when the daily close drops below the average while its internal state indicates an open position.
- The code allocates 95% of account balance to a new purchase and checks signals only when a new daily bar appears.
- The published BTC/USDT backtest settings include a date range but no performance metrics.
- The implementation does not show transaction costs, slippage, or order-failure handling.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.