This trading-terminal plugin automates a simple buy-then-sell sequence. The user sets a buy price, purchase amount, target sell price, and account-check interval. The script first cancels all pending orders, checks that the account balance can cover the…
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 spot trading routine rebalances a coin and USDT toward a configured target share of portfolio value. It reads account balances and the ticker, values the coin holdings at the sell price, and compares that value with the target allocation. If the…
This simple trading bot places a limit buy at a configured price, then monitors the account for an increase in the BTC balance and submits a limit sell for the detected amount at a higher configured price. It checks that the buy price is below the sell price…
This document presents a single-asset rebalancing method that compares an account’s cash balance with the marked value of its crypto holdings. When the imbalance exceeds a configurable threshold, it buys or sells part of the asset to move the two sides…
This prototype outlines a statistical arbitrage strategy for the price spread between spot assets and delivery futures. It proposes running an Augmented Dickey–Fuller stationarity test hourly and allowing trades only when the spread passes a p-value…
This prototype describes a market-neutral approach to trading the spread between spot assets and dated futures. It proposes checking spread stationarity with an Augmented Dickey–Fuller test, then using a Z-score to identify unusually wide or narrow spreads.…
This single-venue strategy aims to keep the cash balance and the marked value of a crypto holding near parity. It compares the account’s cash with the asset value, then calculates half the difference as the amount to shift: buy when cash exceeds the…
This strategy identifies bullish and bearish Three-Line Strike candle patterns, then filters them using ADX so trades are taken only when the indicator exceeds a threshold. ATR sets dynamic stop-loss and take-profit levels. The described pattern uses three…
This document describes a polling tool for comparing prices from two exchanges, including spot and futures markets. Users can choose each market’s quote currency, futures contract and leverage settings, and whether to compare best ask, last price, or best…
This educational moving-average strategy uses separate EMA crossover settings for entries and exits. It opens a long position after the entry crossover persists for a configured observation period, sizing the purchase as a fraction of available cash. While…
This market-making bot adjusts its orders according to the relative value of its coin inventory and cash balance. It values inventory using prices offset from the best ask and bid by a configured percentage spread. When coin value is high relative to cash,…
This strategy seeks directional trades from fair value gaps (FVGs), filtered by trend, volume, and price movement. It uses the relationship between 50-period and 200-period EMAs to set the trend direction. An FVG is considered actionable when volume exceeds…
This spot strategy repeatedly places a buy limit order at a preset price, then places a sell limit order after the buy fills. Once the sell fills, it returns to the buy stage, creating a simple two-price trading loop. The parameters include the buy and sell…
This strategy pairs a volatility channel with Stochastic RSI to generate long entries. The channel uses a 20-period exponential moving average as its center and places its boundaries two standard deviations from that average. Stochastic RSI is calculated…
This monitoring tool collects Binance spot trade events for a configurable pair and interval. It classifies each trade by the exchange’s maker-side flag, accumulates traded quantity and notional value for buyer- and seller-initiated flow, and displays the…
This educational strategy monitors two spot exchanges for a price gap large enough to justify buying on one venue and selling on the other. The trigger can be set as an absolute price difference or a percentage of an average price derived from both books.…
This short example illustrates regular fixed-amount investing: at each weekly interval, it uses a fixed 100 USDT to buy an asset at the latest quoted price. The purchase quantity therefore changes inversely with price. It updates cumulative holdings and…
This long-only grid strategy places price levels between configurable upper and lower bounds. Levels can be spaced geometrically or arithmetically; the script description says it buys when price crosses a level downward and sells on an upward crossing to the…
The document describes a long-only grid strategy for LINK/USDT that places a series of buy and sell levels between configured high and low prices. It supports geometric or arithmetic spacing, with geometric spacing selected by default. A downward crossing of…
This strategy uses fast and slow simple moving averages to generate directional trades. A crossover of the fast average above the slow average opens a long position; a cross below opens a short position. Date inputs restrict the trading window, and any open…
PowerTower is a long-only crypto strategy on a five-minute timeframe. Its entry condition compares each of the latest three closes with closes two and four candles earlier, using an adjustable exponent; the exit condition applies a corresponding less-than…
This Binance spot strategy rebalances a selected basket of crypto assets toward configured target weights. It values each holding using the midpoint of the bid and ask, compares each asset’s share of the tracked account value with its target allocation, and…
This execution strategy divides a target purchase or sale into repeated market orders sized from visible order book depth. It converts a total quote-currency budget into a fixed base-asset target using the initial price, then checks the book out to a…
This strategy identifies bullish and bearish engulfing candles by comparing the current candle with the previous one. It requires the current candle’s range to cover the prior candle’s high and low, while its open and close also span the previous body in the…