FMZ Pine Script Structure, Time Series, and Trading Settings
Summary
This FMZ reference explains Pine script structure, including version directives, indicator or strategy declarations, statements, comments, indentation, and line wrapping. It introduces time series as values indexed across bars and shows how square-bracket history references access earlier observations. Examples demonstrate cumulative and moving calculations, and compare two equivalent ways to reference a prior rolling high. The guide also notes limits on historical references and FMZ’s configurable maximum variable period.
The document describes settings in FMZ’s Pine trading library, including execution at bar close versus reacting to real-time price changes, per-order quantity limits, and recovery of strategy state. It is primarily platform documentation, not a trading method or evidence of strategy performance. The text is lengthy and partially truncated, and some examples describe FMZ-specific behavior that may differ from other Pine environments or change across platform versions. Users should check the current platform configuration and language support before relying on the details.
Key ideas
- Pine scripts combine a version declaration, an optional indicator or strategy declaration, and executable statements.
- Time series values correspond to bars, and square brackets retrieve prior values.
- Rolling calculations can use built-in time-series functions without explicit loops.
- History-reference limits depend on the platform, and FMZ provides a maximum-period setting.
- FMZ trading settings distinguish bar-close execution from real-time price execution and include order-size controls.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.