This introductory guide explains APIs through everyday analogies and shows how trading code uses them to request market data, calculate indicators, place orders, and inspect account state. Its M-language examples cover open, high, low, close, volume,…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
9,797 documents
This tutorial describes a simple KDJ strategy and how to structure its implementation in C++ on the FMZ platform. It introduces the indicator’s RSV, K, D, and J components, then uses the relationship between K and D to generate long or short entry signals.…
This programming guide presents two market-monitoring examples. The first collects spot prices across Binance trading pairs, stores observations in a rolling window, computes percentage changes, sorts the pairs, and displays the strongest movers. It notes…
This note explains the Dual Thrust system, a breakout approach associated with futures, foreign exchange, and equity markets. It derives a range from recent highs, lows, and closes, then scales that range by a parameter to set thresholds around the next…
This document describes a waterfall-style trend strategy built from three lines, each formed by averaging three exponential moving averages at progressively longer lengths. It proposes going long when price is above all three lines and they are ordered…
This document presents a trend-following strategy based on Ease of Movement (EMV), an indicator combining changes in price range and trading volume. It describes EMV as a measure of price movement relative to volume: readings above zero indicate a stronger…
The document walks through a Python implementation of a Donchian channel strategy for a futures market. It defines the channel from the highest high and lowest low over a lookback period, with the midpoint between them. A close above the upper boundary opens…
This tutorial outlines a simple martingale-style strategy for cryptocurrency perpetual futures. It places long and short entry orders around the current price, cancels the remaining order after one fills, then sets a closing order relative to the open…
The document introduces a backtesting system for European-style Bitcoin options and explains how option contracts are identified, priced, traded, and monitored alongside spot or futures positions. Its examples sell a call while buying spot or futures, then…
This educational example designs a deliberately random futures strategy for dYdX. A random draw selects long or short exposure, and a fixed stop profit or stop loss defines when to close the position. After a losing trade, the strategy increases its position…
This tutorial introduces cross-period hedging by pairing a long position in one futures contract with a short position in another. It derives how the combined result depends on the spread changing between entry and exit, then notes that fees and slippage…
This research note develops a three-leg hedge across perpetual, near-dated, and deferred delivery futures. It defines a butterfly spread as the deferred contract price plus the perpetual price minus twice the near-dated contract price. A long spread position…
This tutorial introduces a visual, block-based way to assemble trading strategies. It explains how blocks connect, accept adjustable inputs and default values, and can be moved, copied, resized, and configured. The examples use a trading platform’s modules…
This article introduces wavelet transforms as localized, multi-scale filters for financial price series. It explains how wavelet basis functions and their coefficients can separate low-frequency movement from faster fluctuations, then describes a simplified…
The document explains a historical currency-margined futures strategy built around repeated position entry, a profit-taking order, and a reverse trade when a stop-loss condition is reached. After a loss, the system cancels outstanding orders, closes or…
The document describes a Python framework for a futures trend strategy, organized as a class with separate modules for market decisions, order handling, account calculations, risk controls, and persistent data. Its trend signal uses price relative to an EMA…
This article compares bar-based and tick-based backtests, focusing on how coarse bars can hide the path prices took within a period. That ambiguity can produce unrealistic fills or conceal whether a stop would have triggered before a favorable exit. It also…
The article explains a passive market-making approach that tries to move ahead of a large visible order by placing a limit order one tick better. A trader watches the order book for a sizable participant whose order may act as support or resistance, then…
The document introduces FMZ’s data exploration module, which combines market datasets with SQL queries and charting. Users can inspect available OHLC and tick tables, preview fields, upload limited CSV datasets, and query with editable parameters. Saved…
This tutorial describes a server that receives trading signals and places corresponding spot or futures orders through reusable trading functions. It adds a logic-level pause and restart control protected by a password, allowing order following to be…
The document explains Parabolic SAR as a trend-following indicator whose stop level advances toward an extreme price using an acceleration factor. It outlines rising and falling calculations, including the initial factor, its increments when new extremes…
The article examines a futures execution hazard: an exchange may report an outdated position after a limit order has already filled. A strategy that interprets the stale response as an unfilled order can submit another opening order and accumulate unintended…
The article defines PBX as a set of averaged exponential moving averages and uses their relative order to identify directional conditions. Its example builds three PBX lines, each averaging EMAs at progressively longer periods. It opens a long when price is…
This installment reviews a multi-currency Binance futures strategy and updates its analysis with minute-level price data. One method compares each asset's price relative to Bitcoin after exponential moving-average normalization, then adjusts signed target…