This example shows a command-driven trading bot that accepts action strings and routes them to spot or futures exchange methods. For futures, it sets the contract type, fetches the ticker, and chooses order direction for opening long or short positions 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 trading script implements a daily Keltner Channel strategy for a CFFEX index futures contract. It calculates an 8-period exponential moving average as the channel center and uses a 7-period average true range with a 1.5 multiplier to set the bands. A…
The document describes an expert advisor for testing a calendar-based reversal hypothesis. It takes a position against Monday’s direction at the start of Tuesday: a Monday close below its open triggers a buy, while a close above its open triggers a sell. It…
These reading notes survey quantitative investing methods across stock selection, market timing, futures and options arbitrage, statistical arbitrage, algorithmic execution, and asset allocation. They outline factor selection, style and sector rotation,…
The document describes a rules-based strategy for the DAX GER30 on an hourly chart. It uses the prior period’s highest high and lowest low over a lookback window as breakout thresholds: a long entry follows an upward crossing of the high, while a short entry…
The document describes a Sine Wave indicator that can display its output as a colored cloud using a timeframe selected through an input parameter. It identifies two higher-timeframe variants and explains that each depends on a corresponding base indicator…
This chapter note explains how futures positions are opened and closed, how exchanges specify contract terms, and how clearing and margin systems manage counterparty risk. It covers deliverable asset quality, contract size, delivery location and timing,…
This forum post asks how a trade converter updates today and prior-day long and short positions when processing futures trades. The shown method increments today’s long quantity for a long opening trade, but decrements short quantities for a long trade that…
This article surveys Ethereum’s network activity and ecosystem developments around its eighth anniversary. It reports snapshots of staking, decentralized finance deposits, node counts, transaction activity, and ETH price and capitalization, then outlines a…
This indicator marks potential supply and demand zones by first detecting a large percentage change in the opening price over several bars. When that rate of change crosses a sensitivity threshold, it searches a recent window for the nearest candle of the…
This example describes a mean-reversion strategy for two SHFE futures contracts. It uses a Kalman filter to update the hedge ratio between the instruments, calculates the resulting spread, and standardizes it against a rolling window to create a z-score. The…
This Hummingbot controller guide describes a crypto futures strategy that watches Binance liquidation data and seeks a short-lived rebound after a large forced unwind. It aggregates liquidations over a configurable interval, checks whether their…
A VeighNa forum discussion explains how to preserve variables in a spread trading strategy across restarts. The suggested approach is to implement JSON file loading and saving in the strategy lifecycle: load stored values when the strategy starts and write…
This reference table compares futures contracts across several cryptocurrency exchanges. It organizes instruments by settlement asset, quoted currency, contract code, and availability of perpetual or dated contracts. Entries distinguish, for example,…
The strategy tracks the daily price difference between continuous WTI and Brent crude futures and compares it with a 20-day simple moving average. When the spread is above its average, it takes positions intended to profit from a decline toward that…
This forum exchange addresses how a custom daily CTA strategy can use locally stored data that is updated each day before the night session. The user asks whether a live strategy can reload the newest spreadsheet values automatically, given that the backtest…
This forum discussion explains why two-hour bars built from one-minute futures data can differ across platforms. One approach forms bars on fixed clock boundaries; another accumulates 120 minutes of active trading time, skipping exchange breaks and handling…
The document describes a cross-market futures reversal strategy. It groups contracts by recent changes in trading volume and open interest, then selects contracts in the high-volume, low-open-interest group. Within that subset, the stated method goes long…
The article introduces time series concepts for financial analysis, including univariate and multivariate data, stationarity, autocorrelation, trend, seasonality, and decomposition. It describes using ACF and PACF to examine lag dependence, and outlines a…
The document describes a MetaTrader 5 indicator variant that lets the user select the timeframe from its input settings. The stated default is a four-hour chart period. It also notes a dependency: the Float_Pivot_Smoothed_Digit indicator file must be present…
These notes introduce derivatives as contracts whose value depends on an underlying asset or other variable, then distinguish exchange-traded markets from over-the-counter trading. They outline forwards, options, futures, and swaps, explaining basic contract…
This DAX strategy calculates each candle’s body as the close minus the open, then measures changes in that body over a rolling period of 84 bars. It applies separate positive and negative thresholds, set to 81 and 6 times the platform’s pip size, and…
This document describes an MT5 indicator that constructs a classic Renko chart within a standard chart window. It builds completed bricks from incoming tick data, with each brick representing a fixed price movement rather than a fixed time interval. The…
The document introduces a modified historical Camarilla indicator and explains how Camarilla levels are organized around the prior session’s closing price. It describes two groups: lower levels labeled L and upper levels labeled H, each numbered from one to…