This strategy tests whether two price series can support a mean-reverting spread. It applies augmented Dickey–Fuller tests to each series and their first differences, then uses a linear regression to estimate a hedge ratio and intercept when the series…
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
The article examines a daily long and short trading setup in the CSI 300 index futures. Each side enters at the open, uses a 30-point stop, and closes any remaining position before the session ends. It reports that both standalone directions were profitable…
The document describes a simple timed long strategy for the FTSE MIB: enter at market at 17:30, near the close, and exit at market at 09:15 the following morning, shortly after the next session opens. The supplied rules use a single contract and trigger…
This code implements a Dual Thrust breakout strategy for a trading platform. It calculates a prior-period range from the highest highs, highest closes, lowest lows, and lowest closes across a configurable number of bars. The strategy scales that range with…
This strategy outline uses the DAX cash market on a three-minute chart. It records the day’s open at a specified time, then enters long when price moves a configurable number of points above that level or short when it moves the same distance below. Trade…
This document summarizes a commodity futures strategy based on carry and the futures term structure. It describes a directional rule in which the nearby, or main, contract is bought when its price is below the next contract and sold when it is above it. The…
This overview describes a commodity futures CTA strategy that ranks contracts using a combined score. It considers technical signals—cross-sectional momentum, volatility, open-interest changes, and term structure—alongside macroeconomic measures including…
This short forum exchange addresses what happens to a strategy's recorded position when a trader manually closes a position during a simulated or live run, including around a futures contract roll. The reply clarifies that the `pos` value tracks positions…
This reference explains how TqSdk identifies contracts across Chinese exchanges and describes available quote, K-line, and tick data. It gives examples of futures, options, spread contracts, continuous contracts, indices, stocks, and exchange warehouse…
This document describes a long-only strategy for the DAX on a four-hour chart. It builds a triangular moving average style center line from recent closes, then sets a lower channel band by subtracting an average true range measure multiplied by a fixed…
This event announcement introduces spread trading as a relative-value approach that focuses on price differences between related futures contracts or between futures and spot instruments. The idea is to trade whether a spread has moved outside a reasonable…
This MetaTrader indicator plots a set of Murrey Math pivot levels on the price chart for traders who use support, resistance, and pivot references. It displays eight primary lines with additional levels, and can alert when a candle closes across one of them.…
A VeighNa user reports that after installing version 4.0 and entering CTP connection details, the interface gives no successful connection message and contract lookup returns no results. The discussion offers two concrete checks: verify that the configured…
This example implements a Dual Thrust breakout strategy on a futures contract using daily bars. It calculates a range from the prior five completed sessions: the larger of the highest high minus the lowest close, or the highest close minus the lowest low.…
This Chinese-language forum exchange distinguishes between optimizing a strategy separately for each instrument and optimizing it as a combined portfolio. One reply suggests looping over instrument symbols, initializing the backtest within each iteration,…
This example runs two existing futures strategies independently, using separate instruments, date ranges, trading costs, contract sizes, and capital settings. It then adds their result data frames, removes missing rows, and passes the combined data to a…
This document reports an attempt to submit a Gate.io futures order through an exchange API wrapper. The example first sets the contract currency, then sends a POST request with a contract identifier, size, price, time-in-force, and text fields. The author…
This FAQ collects practical guidance for operating strategies on the FMZ platform. It explains where runtime logs are stored, notes that the standard order query returns pending orders, and suggests using an exchange’s underlying API when filled-order…
This example implements a daily futures strategy around triple-smoothed exponential moving averages. It calculates TRIX and a rolling signal line, then enters long when TRIX crosses above the signal or short when it crosses below. The position is set to a…
This brief troubleshooting note explains one cause of an empty-data error in a futures backtest. It says that the exchange’s contract symbol convention matters: for Dalian Commodity Exchange contracts, the letter portion should be lowercase, and using…
This trading essay argues that traders should respond to observed price changes and predefined system signals instead of becoming attached to a directional forecast. It highlights how an open position can bias judgment toward evidence that supports the…
This terminal guide explains how to launch, stop, review, and rerun a strategy backtest. It describes the evolving strategy report, logs, and trade chart, including how fills, positions, working orders, and log timestamps are displayed. Saved runs can be…
This document presents an intraday long-only system for the DAX40 CFD using hourly bars. It requires the close to exceed both a 185-period moving average, used as a broad trend filter, and a 16-period moving average, used to confirm nearer-term direction. It…
The indicator divides recent price action into clusters using one-dimensional K-means on bar midpoint prices, with trade volume weighting the centroid updates. It then builds a separate volume profile for each cluster, using the actual high-low envelope of…