This short-term strategy combines rolling supply and demand levels with a midpoint reference and an SMA trend filter. It defines the zones from the highest high and lowest low over a configurable lookback, then calculates their midpoint. A long setup…
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
3,101 documents
This document describes a simple inventory hedge for a small trading platform. A recurring process reads account balances, compares each coin’s current total—including frozen funds—with recently stored balances, and sends trades to offset the change on…
This strategy attempts to identify consolidation zones from price pivots, then trade breaks above or below those zones. It finds local highs and lows over a loopback period, uses a ZigZag-style process to track pivots, and requires a minimum consolidation…
This document describes a spot crypto strategy that seeks to keep the account value split roughly evenly between a coin and cash. It estimates the coin’s share of total account value from the latest price and account balances. When that share moves outside…
This introductory example shows how to accumulate a target amount using repeated small buy orders. It records the starting asset balance, checks the acquired amount on each loop, and submits an order at the current ticker’s ask price while the remaining…
This strategy combines rate-of-change momentum, smoothed with three successive exponential moving averages, with the Money Flow Index. It enters long when smoothed momentum is positive and MFI is above its middle level, and enters short when both are below…
This ETH/USDT spot strategy runs a price grid while in attack mode. It places staggered buy orders and sells filled positions at grid levels, sizing orders as a fraction of total account value divided across the configured node count. The user can tune…
This channel strategy smooths typical price, calculated from the high, low, and close, with an EMA. It creates upper and lower percentage bands around a further smoothed centerline, using a 5% multiplier in the supplied formulas. The entry rules go long when…
This strategy monitors two spot exchanges for price differences in either direction. It sells on one venue and buys on the other when the top-of-book spread exceeds a configurable threshold, expressed either as a fixed price difference or a percentage. Trade…
This strategy opens a spot position, places a profit-taking order, and adds to the position after an adverse move to bring its average entry price closer to the market. Parameters set the initial direction and amount, spacing between additions, desired…
This document presents a two-exchange Bitcoin spot strategy that monitors account balances and top-of-book prices, then places paired orders when the observed cross-exchange spread meets a threshold. The threshold varies with a measure of how much trading…
This spot strategy aims to sell a held cryptocurrency when price reaches or exceeds a prior high while MACD is weaker than at the associated earlier peak. It scans recent MACD values for a local maximum that remains dominant over a run of bars, then compares…
This small order-placement bot waits until it can retrieve a ticker for a newly added trading pair, treating ticker availability as a sign that trading has opened. It then submits a fixed number of limit orders and exits. For buy orders, prices step down…
This introductory digital-asset bot compares fast and slow moving averages of recent candles and uses the crossover distance as an entry signal. When the fast average has moved sufficiently above the slow average, it attempts to buy with most of the…
This brief example shows how to use TA-Lib’s three black crows candlestick recognizer on market bars. The program scans the returned pattern values for the bearish pattern code and checks whether its index is the final bar in the current record set. On…
This example shows how to configure candle data feeds without setting up trading markets. Users can specify a connector, trading pair, interval, and record limit, either through structured configuration or a delimited text input. The example initializes each…
The strategy assigns Bollinger Band position to eight states on each of three timeframes. The largest timeframe provides directional context, the middle timeframe guides operations, and the smallest is intended to signal when a move may be ending. The author…
This long-only strategy seeks to enter established uptrends when RSI reaches or crosses a trigger level and price is above both a fast EMA and a longer trend EMA. It offers several RSI trigger modes, including immediate threshold qualification,…
This execution method divides a large spot-market purchase into smaller buy orders. The trader sets a total budget, an average child-order size, a size variation, a price depth below the best bid, and a maximum purchase price. After a child order fills, the…
This long-only trend-following strategy enters when a fast EMA crosses above a slow EMA. Its default averages are 5 and 200 periods, with a 14-period ATR used to set a stop below the current close. The stop distance is two ATR by default, while a fixed…
This document describes a robot that receives TradingView alert commands and routes them to exchange orders. It parses action-and-amount messages and supports spot buys and sells, plus futures long, short, and position-closing commands. A futures…
This script outlines a long-only dollar-cost-averaging approach for SOL. A base order is armed when the one-hour RSI, using a configurable length and threshold, is below its entry level. If price moves down, up to three averaging orders can be placed at…
This spot strategy tracks the highest observed price after startup and places a sell when price falls below a chosen fraction of that high. For example, its stated ratio of 0.98 means a retreat to 98% of the tracked peak triggers the take-profit action. The…
The article argues that a trading business needs a plausible, explainable source of returns rather than relying on discretionary chart reading or feeding features into a machine-learning model without a clear rationale. It frames durable edges as…