FMZ Pine Script: Time Series, Order Handling, and Strategy Settings
Summary
This FMZ Pine Script reference describes script structure, declarations, indentation, comments, and time-series behavior. It explains how historical values are accessed, illustrates calculations over bars, and discusses limits on historical references. It also outlines template settings for execution timing, order size, slippage, contract details, live-trading recovery, retries, leverage, fees, and data precision.
Trading examples cover market, limit, stop, and stop-limit entries; closing positions; equity-percentage sizing; and the platform’s one-direction position handling, including how an opposing order can close an existing position before opening the reverse side. The guide also explains how to interpret order and system logs. These are platform mechanics and language conventions rather than a tested trading strategy. Execution timing, fill prices, and live behavior depend on settings and market conditions, and the reference notes that actual fills may differ from order prices and that some time references can cause indicator repainting.
Key ideas
- Pine time series store values by bar, and square-bracket history references retrieve prior bar values.
- FMZ settings control execution timing, order sizing, slippage, contract parameters, and live-trading behavior.
- Entries can use market orders or conditional limit, stop, and stop-limit orders.
- The platform’s position mechanism closes an existing position before executing an opposing order.
- Order logs distinguish submitted order prices from actual execution prices.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.