This article introduces BIAS, the percentage distance between a closing price and its moving average, and interprets large positive or negative deviations as potential mean-reversion conditions. It then builds a directional strategy by comparing short- and…
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 article walks through connecting Claude Pro to an FMZ account through the Model Context Protocol (MCP), then using natural-language requests to inspect and operate trading tools. Demonstrations include checking running strategies, placing a series of…
This article describes a monitoring script that polls funding rates for perpetual futures across multiple exchanges. It uses a separate worker for each exchange, applies exchange-specific delays to reduce request pressure, and handles venues differently…
The document presents a historical overview of managed futures trading systems in three broad generations. Early systems are described as relatively simple trend followers, often using moving-average rules in a period characterized by persistent commodity…
The document describes adapting a fixed-weight, multi-indicator trading strategy by feeding its combined indicator score into a small neural network. Indicator weights vary by classified market state, but are initially hand-set. The proposed model uses the…
The document describes a same-asset calendar spread strategy using ETC futures with different expiries. It defines the spread from the bid and ask prices of weekly and quarterly contracts, then applies Bollinger Bands to the spread series. A move below the…
This tutorial compares several moving-average trading rules using daily commodity futures data. It starts with a single-average rule that trades when price crosses its average, then shows dual-average crossovers, adds conditions requiring the averages to…
This article explains R-Breaker, a commodity futures strategy that uses the prior day's high, low, and close to calculate a pivot and three support and resistance levels on each side. With no position, it enters long above the upper breakout level or short…
This document presents a Pine strategy intended to help discretionary traders automate a preplanned entry and exit process. The configurable inputs control trade direction, order size, initial entry mode, stop distance, trailing offset, and the price…
This guide explains the settings exposed by FMZ’s MyLanguage trading class library, which lets users configure execution and order behavior when creating a trading bot. It compares bar-based execution, which evaluates strategy logic after a candle completes,…
The document presents a short-term RSI2 strategy that seeks pullbacks within a broader trend. In its stock-market description, a long-term moving average defines the permitted direction: look for longs above the average when RSI2 is very low, and shorts…
This article walks through the design of a simple martingale-like strategy for crypto perpetual futures. It explains how to retrieve total account equity when an exchange API exposes it differently from available balance, and defines helper routines for…
The document introduces two stake-sizing schemes through coin-toss examples and simple simulations. Forward Martingale doubles the position after each loss and resets it after a win, aiming for a small gain per completed sequence. Reverse Martingale instead…
The document outlines a way to route TradingView alert webhooks directly to an FMZ robot. A small HTTP service runs alongside the robot, listens for POST requests, checks supplied access and secret keys, and translates a requested action and amount into spot…
This tutorial introduces spot–futures hedging as a form of spread trading and uses a research environment to examine an example trade. The example concerns opening and closing a hedge between BTC/USDT spot and a quarterly futures contract, with separate…
This document explains a Pine strategy tool for traders who choose entries manually but want software to manage subsequent exits. The user can configure a long or short direction, an immediate or limit entry, order size, a fixed stop loss, and a trailing…
This comparison describes differences between commodity futures systems using CTP and cryptocurrency exchange APIs. It covers historical data availability, communication patterns, market depth and trade data, request limits, and system stability. CTP…
This article examines a futures execution failure that can occur when an exchange’s position endpoint lags behind its order and fill data. A strategy may see an old position after a limit order fills, conclude that the order did not execute, and submit…
This article explains box theory as a breakout method built around a recent trading range. The upper boundary represents resistance and the lower boundary support; a move above or below a boundary is treated as a possible transition into a higher or lower…
This article describes a crypto futures framework that periodically selects liquid contracts and tunes a double moving average crossover strategy for each one. It first ranks USDT contracts by dollar trading volume, then backtests multiple fast and slow…
This installment stress-tests a futures strategy that sells assets after rises and buys after falls, using a simplified simulation to examine losses when one altcoin trends independently of the rest. It represents a 20-currency basket with a stable BTC proxy…
This tutorial translates a closing-price trend strategy into a multi-contract crypto futures implementation. It calculates Average True Range (ATR), smooths each bar’s typical price with an exponential moving average, and forms upper and lower bands by…
The document explains the standard RSI as a normalized comparison of recent average gains and losses, then reviews two common uses: fading readings near overbought or oversold thresholds, and trading crossovers between short- and long-period RSI lines. It…
The document explains how a crypto spot–futures arbitrage idea based on spread mean reversion becomes more complicated in live trading. The proposed approach enters when the spread’s Z-score moves beyond a threshold and exits as it reverts, while an…