The document defines a generic perpetual contract instrument for perpetual swaps that are not represented by a crypto-specific contract type. It describes the metadata needed to model one consistently across venues: instrument identity, underlying and asset…
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
20 documents
This quickstart walks through a bar-based exponential moving average crossover strategy in a backtesting engine. The strategy waits for its fast and slow averages to initialize, then buys when the fast average is at or above the slow one and sells when it is…
The script runs an EMA-crossover backtest on USD/JPY five-minute bid bars built from one-minute FXCM data. It configures a simulated margin venue, balances, fees, rollover interest, and probabilistic fills, then collects bars and fills from the engine. The…
This example configures a live-node application to run a Bollinger Band mean-reversion strategy against the Architect AX sandbox on a EUR/USD perpetual instrument, using one-minute midpoint bars. It sets a Bollinger period of 20 with a two-standard-deviation…
A stop-limit order waits for a specified trigger price, then submits a limit order at the chosen limit. This combines a conditional trigger with control over the worst acceptable execution price, making it useful for price-protected exits or breakout…
This example configures a backtest for a mean-reversion strategy on an AUDUSD perpetual contract. It feeds quote data into a backtest engine, forms one-minute midpoint bars, and instantiates a strategy configured with Bollinger Bands and RSI. The listed…
This tutorial demonstrates a config-driven foreign-exchange backtest using a Parquet data catalog and a simulated venue. It loads quote ticks from either local Histdata files or a sample dataset, sorts them by timestamp, stores the instrument and ticks in…
This example sets up a simulated GBP/USD market-making strategy using one-minute bid and ask bars. It configures a margin account, starting balance, maker and taker fees, and a probabilistic fill model with specified fill and slippage probabilities. The…
The tutorial explains how to backtest a mean-reversion strategy on EUR/USD perpetual futures using TrueFX spot ticks as proxy data. It builds one-minute mid-price bars, then combines a 20-period Bollinger Band with a 14-period RSI: a lower-band touch with…
A market order tells a venue to execute a specified quantity promptly at the best available price. The document outlines when traders might use one, such as urgent risk reduction or entering a liquid, fast-moving market, and shows how an order can include…
This strategy uses a fast and a slow exponential moving average calculated from bars for a configured instrument. After both indicators are initialized, it takes a long position when the fast average is at or above the slow average and a short position when…
A market-to-limit order begins by taking liquidity like a market order. After its first execution, any remaining quantity becomes a limit order at the price of that fill. This lets a trader pursue an immediate fill while preventing the remainder from…
A trailing stop-limit order moves its stop trigger with favorable price changes, maintaining a set offset from a chosen market reference. Once triggered, it releases a limit order; the limit price can also adjust with the market before activation. The…
This tutorial demonstrates a simulated USD/JPY strategy that compares 10-period and 20-period exponential moving averages on internally aggregated five-minute bid bars. A cross upward closes shorts and opens a long; a cross downward closes longs and opens a…
The document explains how a currency pair represents a spot or cash instrument quoted as base currency against quote currency. It distinguishes the asset being traded from the currency used to price it, and describes how the instrument type can represent…
This script runs a NautilusTrader backtest of a Bollinger Band and RSI mean-reversion strategy on EUR/USD perpetual contract quotes. It reads TrueFX bid and ask ticks, builds a margin venue with a starting balance and maker/taker fees, and aggregates data…
This example shows how to assemble and run a small backtest for an EUR/USD strategy. It creates artificial one-minute bars: an initial bar followed by a sequence of rising bars and then falling bars, with prices shifted by a fixed number of ticks and…
This workflow shows how to bring vendor tick data into a NautilusTrader backtest when a dedicated data adapter is unavailable. It reads a supported CSV format, converts rows into quote ticks, sorts them by initialization timestamp, and writes both the…
This example configures a simulated backtest for an AUD/USD moving-average crossover strategy using quote tick data. It creates a margin account, loads historical quotes, and builds internal bars from groups of ticks. The strategy uses a fast and a slow…
This example sets up a foreign-exchange backtest for an AUD/USD exponential moving average crossover strategy. It loads historical quote ticks, configures a simulated margin account with a USD balance and maker-taker fees, and supplies an FX rollover…