Building a Dual Moving Average Trend Strategy on FMZ
Summary
The document walks through turning a trading idea into an FMZ strategy: gather closing prices, calculate short and long moving averages, define entry and exit conditions, and send orders. Its example uses a 10-period average for shorter-term direction and a 50-period average to filter trades by the broader trend. Long entries require price and the short average above the long average, with the long average rising; the short setup reverses those relationships. Positions close when price or the short average crosses against the long average.
The evidence is an illustrative rule set and M-language snippets showing moving-average comparisons and logical conditions. The article also outlines the general workflow from expressing a hypothesis in words to implementing it in code. It does not report backtest or live-trading results, and it leaves stop-loss and take-profit design as an exercise. There is an inconsistency in the example: its short-entry code checks for a rising long average, while the prose specifies a falling average. The code's exit rules also omit some conditions described in the prose.
Key ideas
- Translate a strategy idea into explicit entry and exit conditions before implementing it.
- Use short- and long-period moving averages to combine price direction with a broader trend filter.
- The example identifies a rising or falling average by comparing its values across recent bars.
- The code example has a short-entry condition that conflicts with the stated strategy logic.
- The article does not provide performance testing and leaves protective exits for further development.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.