This document revisits a multi-coin Binance futures strategy that trades each altcoin against a basket-level index of altcoin-to-BTC prices. Positions are scaled to the deviation from the cross-sectional mean, with an exchange simulation tracking margin,…
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
4,613 documents
This article presents an FMZ framework for trading several perpetual futures symbols through unified platform APIs. It organizes per-symbol state for prices, orders, positions, precision, and account metrics, then describes routines for loading market…
This article models how to choose an order size for FMEX's proposed debt-unlock program, where part of the daily return depends on a trader's share of each minute's trading volume. It focuses on that minute-based allocation, accounting for taker fees and an…
This document outlines changes to an AI-driven cryptocurrency system intended to address delayed exits, lack of historical learning, one-sided trade selection, and repeated losses. Its main architectural change separates the slower strategy process, which…
This document describes a cryptocurrency rotation system that ranks liquid coins using a composite of moving-average arrangement, spread changes, and the direction of several averages. It selects high and low scoring assets for potential long and short…
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,…
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…
This educational example describes a dynamic balancing strategy for a crypto account, aiming to keep the value held in the coin and the quote currency equal. It calculates paired buy and sell limit orders from account balances and a configurable distance.…
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…
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…
The document presents a trading strategy as a complete set of rules covering what to trade, how much to allocate, when to enter and exit, how to place orders, and how to respond to unusual conditions. It surveys broad strategy families and recommends trend…
This tutorial describes training an agent to choose hold, buy, or sell actions for Bitcoin using a recurrent Proximal Policy Optimization model. It pairs an LSTM policy and value function with a custom Gym-style backtest environment. The environment supplies…
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…
The article explains how to relay TradingView strategy alerts to exchange execution through FMZ. It contrasts action-based alerts, such as an instruction to buy a quantity, with position-based copying, where each alert reports the current target position.…
This document explains a workflow for turning TradingView strategy alerts into live orders through FMZ and an exchange. Earlier integrations sent trade actions through webhook parameters or JSON messages. The newer approach sends the strategy’s current…
The document explains how a strategy lessor can attach a short metadata string to a rental registration code and have the strategy interpret it as a usage tier. Its example assigns different maximum spot holdings to codes with different tier labels, while an…
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 article describes a rule-based DCA approach for digital assets. After an initial entry, the strategy adds positions when price falls by a preset percentage, potentially increasing each order by a chosen multiple. It stops adding at a defined order limit…
This case study describes building an automated concentrated-liquidity strategy for V3 and V4 pools. After two of three newly discovered tokens could not be sold, the author distinguishes token-level sell restrictions from liquidity removal and concludes…
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…
The document explains FMEX's ranking-based unlock allocation, where periodic snapshots divide rewards among users according to their share of posted size at specific bid and ask levels. It models each level's contribution as a function of the user's…
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…
This document describes a grid strategy that trades the relative price of two crypto assets, illustrated with LTC/USDT and ETH/USDT. Instead of using the price difference between assets, it tracks their price ratio. As the ratio rises through preset levels,…