This Backtrader example compares three ways to attach protective exits to a moving-average crossover entry: a stop set after the entry completes, a stop submitted alongside the entry using cheat-on-close behavior, and a parent-child order arrangement that…
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,660 documents
This example generates order-latency records for a crypto trading backtest from historical feed data. It first keeps events that contain both exchange and local timestamps, then aggregates to one record per second using the last timestamps in each interval.…
This brief configuration note explains how Hummingbot users can replace an exchange’s default fee assumptions with custom fee rates, such as rates that reflect a VIP discount. The setting is stored in a fee override configuration file located in the…
HIP-1 defines capped-supply fungible tokens and native spot order books. A token’s genesis configuration sets its name, precision, maximum supply, initial allocations, optional allocation to holders of an anchor token, and possible initialization of…
The document describes an MQL5 utility for calculating pip values and position sizes from a target account-currency risk and stop-loss distance. It addresses cross-currency instruments by first using the platform’s symbol tick-value and tick-size properties,…
This design document sets out policies for building a trading system around data integrity, controlled failure, and verifiable behavior. It prioritizes reliability, then performance, modularity, testability, maintainability, and deployability. Invalid…
This reference guide describes Lumibot as a Python framework for creating, executing, and backtesting trading strategies across several asset classes and broker or data services. It outlines the strategy lifecycle, including initialization and a recurring…
This tutorial demonstrates replaying Bybit’s depth-500 order book deltas in a NautilusTrader backtest. It loads a daily archive or a small sample, converts the records into instrument-specific order book events, writes them to a Parquet catalog, and…
This live-trading dashboard describes a Gate.io spot triangular arbitrage operation using BTC, ETH, and USDC pairs. Trade logs show the bot routing through USDT, executing three-leg hedged trades when quoted prices imply a small spread, and recording…
This article surveys ten cryptocurrency trading bot platforms and outlines the kinds of automation they offer. Features described include grid trading within a price range, dollar-cost averaging, signal-based trading, market making, technical-indicator…
This document explains a workflow for extending a MetaTrader 4 condition scanner. A new scan is assigned an identifier, then organized into custom indicators, chart and panel indicators, and an include file that returns a value for each tested bar. The…
This sample configuration describes portfolio-level risk controls for a Chinese-market trading engine. It enables an intraday trailing-stop monitor that tracks dynamic equity and reduces the target position after a specified drawdown from the intraday high.…
This document describes an on-chart trading panel for placing market and pending orders, managing position size, and automating exits. Traders can size positions using manual lots, a percentage of equity, or a fixed cash risk amount. The panel also supports…
The article outlines a real-time ETH/USDT trading framework that combines LightGBM for tabular inputs with a Transformer for sequential data. It describes WebSocket market-data ingestion, minute-bar construction, technical, statistical, volume, and…
A forum participant asks whether a short position opened in one futures delivery month must be closed by buying the next lead contract at its higher quoted price when market attention shifts to that contract. The concern is that the apparent price gap…
This quick start explains how a Freqtrade strategy turns exchange candle data into indicators, entry and exit signals, and orders. A strategy is implemented as a Python class with separate methods for calculating indicators and populating long or short…
The 4click Trade Opener describes a chart-based workflow for opening trades with position size tied to a chosen risk budget. The user sets a risk percentage or fixed risk amount, the broker's minimum lot size, the number of positions, and a maximum slippage…
This BigQuant forum post presents a daily-bar backtest example that submits several limit buy orders during a bar callback. Before each order, the callback reads available cash and frozen cash from the trading account. The reported output shows those values…
This technical guide explains how NautilusTrader connects to Polymarket’s central limit order book for binary outcome tokens. It outlines market data and execution components, wallet signature types, pUSD collateral, allowance setup, session keys, and…
The article explains backtesting as evaluating a trading strategy against historical market data before committing capital. It outlines a workflow: obtain suitable data, use or build a testing tool, repeatedly inspect results, then consider live or simulated…
This document explains a modular risk-control library for MetaTrader 5 expert advisors. Its position sizer calculates lot size from stop distance and a balance- or equity-based risk allowance, floors volume to the broker’s step, and returns zero when the…
The article explains liquidity through trading volume, bid-ask spread, slippage, and order book depth. Its example compares two books with similar quoted prices but different depth, showing how a large market order can incur greater price impact and…
This reference explains how a crypto perpetual futures instrument is represented in a trading system. A perpetual swap has no expiration and tracks a crypto asset, while its metadata records identifiers, base, quote, and settlement currencies, inverse…
This forum post reports a desktop application crash after a progress bar finishes loading market bar data in a background task. The example uses PySide or Qt threading with a QRunnable, Peewee ORM selection, and a query against stored futures bar records.…