FMZ M Language Basics and a Moving-Average Trend Strategy
Summary
This tutorial introduces FMZ Quant’s M language through a moving-average trend strategy. The example opens long positions when price and a short moving average are above a longer average that is rising, and opens short positions under corresponding bearish conditions. It also describes closing positions when price, average alignment, or the long average’s direction turns against the position. The article walks through historical data references, variables, assignment and display forms, data types, comparison and logical operators, arithmetic precedence, and execution modes.
It further distinguishes filtering from non-filtering signal behavior and explains how a time condition can close intraday positions near the session end. The examples make the syntax and strategy structure concrete, but the tutorial provides no backtest or evidence of profitability. The sample code also has apparent inconsistencies: its short-entry condition checks the long average as rising, while the prose specifies falling, and some stated exit conditions are not fully represented in the code. Readers should verify behavior against the platform documentation before deployment.
Key ideas
- The tutorial uses short- and long-term moving averages to illustrate trend-based entries and exits.
- M language variables, historical references, operators, assignment display forms, and execution modes are introduced.
- Filtering models suppress repeated entry signals until an exit signal occurs, while non-filtering models allow repeated signals.
- The sample strategy code contains inconsistencies with the accompanying written rules and should be checked.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.