This strategy builds Keltner-style bands from a simple moving average of closing prices and a simple moving average of true range. On five-minute bars, when flat, it places linked stop orders above and below the bands so that a move beyond either boundary…
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 application example connects a trading engine to a crypto exchange, loads a channel-based CTA strategy, and starts it. Separately, it requests recent hourly bars for a symbol through a market-data endpoint, converts the response to a tabular format,…
This document describes a wrapper for trading delivery futures. It places buy and sell orders, checks their status, and can respond to unfilled or partially filled orders using price-based cancellation, timed cancellation, or automatic cancellation. When an…
This guide explains spread trading across related instruments, contrasting it with single-instrument trend strategies. It presents several approaches: latency-sensitive arbitrage between equivalent markets, threshold or Bollinger Band mean-reversion trades…
This strategy uses 15-minute bars to trade breakouts beyond Bollinger Bands. When flat, it places stop entries at the upper and lower bands, so a move through either boundary can open a long or short position. Band settings determine the entry channel, while…
The strategy computes fast and slow exponential moving averages from hourly price bars and treats a crossover as a directional signal. A bullish crossover sets a long bias, while a bearish crossover sets a short bias. Before calculating the indicators, it…
This strategy uses Bollinger-style price bands to enter long or short positions when a bar reaches beyond the upper or lower band. It adds a directional filter based on the difference between the latest close and a close from an earlier lookback: positive…
This guide explains a market-data recorder that subscribes to selected instruments and saves live tick or one-minute bar data to a database. The stored history can then be reviewed in a data-management interface, used in historical backtests, or loaded to…
This code describes an exchange-trading wrapper that submits orders, checks their status, and optionally manages unfilled quantities. Its order workflow can cancel and reissue an order after a price move or a configured wait, using the remaining amount after…
This guide describes configuring and running an automated cryptocurrency grid trader for spot or futures markets. Its settings include the trading pair, percentage spacing between grid levels, per-order quantity, price and quantity precision constraints, and…
This document describes an execution wrapper for futures orders. It submits an order, checks its status, and can respond to an unfilled or partially filled order in several ways: cancel and reissue when the market price moves beyond a configured threshold,…
The strategy uses a fast and slow moving average to trade both directions in a USD margined futures contract. It checks completed bars for a bullish or bearish crossover, entering a position when flat and reversing an existing position when the signal points…
This document describes a client for futures exchange HTTP endpoints. It covers public market data requests for exchange specifications, order books, candlesticks across several intervals, recent prices, and best bid and ask quotes. It also defines common…
The document surveys several ways to seek returns in cryptocurrency markets: lending assets through deposit products, supplying liquidity to earn fees, collecting perpetual-futures funding, trading price differences between contracts with different…
This example shows a workflow for backtesting an ATR-RSI strategy on one-minute futures data. The setup specifies the contract, date range, transaction costs, slippage, contract size, tick size, and starting capital, then loads data, runs the simulation,…
The strategy compares a synthetic futures price, calculated from a call price minus a put price plus the strike, with the traded futures price. It measures the difference and opens a three-leg position when the spread crosses a configurable entry level: one…
This example shows how to run a double exponential moving average strategy through an event-driven trading system. It creates an event engine, subscribes to tick updates, and sends those updates to a strategy callback. A websocket supplies live market data,…
This strategy builds 15-minute bars and uses Bollinger Bands to place stop entries at the upper band for a long position and the lower band for a short position when flat. It calculates the middle band as a simple moving average and also computes ATR. Once…
This strategy uses Bollinger Bands on 15-minute bars to place stop entries above the upper band and below the lower band while flat. It calculates a simple moving average as the middle band and uses that level as an exit trigger: long positions are sold when…
This example describes a two-sided grid for a futures market. It tracks open buy and sell limit orders, checks their statuses, and after a fill places a replacement order on the opposite side at a configured percentage gap. It also maintains another order…
This document explains how to configure a trading application to store historical data and connect to an exchange. It compares SQLite, MongoDB, and MySQL settings, describes database fields such as driver, database name, host, port, and authentication…
This example manages a spread position using configurable entry and exit prices, a maximum position, order pay-up, and an execution interval. On each spread update, it checks whether the current time falls within the configured trading window. Outside that…
This overview maps a CTA trading system into components for strategy templates, example strategies, backtesting, order conversion, live execution, and a graphical interface. It describes how live initialization can retrieve historical bars through a data…
This strategy uses the previous trading day’s high-to-low range to set stop-entry levels around the next day’s opening price. Separate multipliers scale the upward and downward thresholds. During the session, it chooses an entry side based on whether the…