Momentum BF: Directional Momentum Signals with Stop Options
Summary
Momentum BF calculates momentum as the difference between the current close and its value 18 bars earlier, then measures the one-bar change in that momentum. A positive reading for both measures defines a long state; negative readings define a short state. The script tracks which state most recently took precedence and includes controls for enabling long and short trading within a selected backtest period.
The visible code also sets up fixed-percentage and ATR-derived stop options for both sides, with a 20-period ATR and 1.5 multiplier as defaults. The excerpt ends during the execution logic, so the complete stop behavior and any additional exits cannot be verified. It supplies configurable test dates and capital and commission assumptions, but no market, timeframe, or strategy report results. Consequently, the code describes an implementable momentum framework rather than evidence that it performs well; stop settings and momentum signals would need evaluation across instruments and market conditions.
Key ideas
- The strategy defines momentum as the close minus its value 18 bars earlier.
- A one-bar change in momentum confirms the direction used to define long and short states.
- The script tracks the latest long or short signal and allows either side to be enabled.
- Stop options include fixed-percentage and ATR-derived settings, using a 20-period ATR and 1.5 multiplier by default.
- The provided excerpt is incomplete and contains no reported trading results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.