This Backtrader example demonstrates a simple breakout-style strategy and a way to process daily bars in two stages. The strategy compares the current high with a rolling highest-high indicator, submits an entry when they match, and exits after a configured…
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 implements a tick-driven futures or securities strategy using the wtpy framework. It estimates a theoretical price from the best bid and ask, weighted by the quantities resting on the opposite sides of the book, then compares that estimate with…
This overview argues that no programming language is best for every algorithmic trading system. The choice depends on strategy frequency and volume, data needs, performance targets, development and maintenance costs, and the functions the system must…
This guide explains how to construct, monitor, and trade synthetic spreads in the VeighNa SpreadTrading module. A spread can combine several contract legs using a formula, including pricing legs that are not traded, which supports relationships involving…
This quickstart walks through a bar-based exponential moving average crossover strategy in a backtesting engine. The strategy waits for its fast and slow averages to initialize, then buys when the fast average is at or above the slow one and sells when it is…
This community exchange discusses a VeighNa live-trading strategy that uses imported local one-minute bars. The user asks whether a futures-style symbol such as rb2501 is recognized, reports an initialization error indicating that a data service is not…
This brief description outlines an automated trading strategy built around the Average Directional Movement Index and Bollinger Bands. The EA evaluates signals only when a new bar appears and keeps at most one open position, allowing it to operate on either…
This essay argues that a trading system only helps when a trader can follow it and its demands fit the trader’s goals, temperament, and market. It outlines four recurring price structures—triangular consolidations, directional channels, ranges, and expanding…
This forum post documents a failure in a stock strategy’s trailing-stop routine. The routine reads each position’s last sale date, subtracts it from the current date to estimate holding days, and uses that value as the bar count when requesting historical…
This guide explains a dollar-cost averaging trading mode for placing repeat entries and managing the resulting positions. Entries can be triggered on a schedule or when an evaluator produces a new maximum signal, defined as a value of -1 or 1. The guide says…
This example script demonstrates how to connect Backtrader to OANDA data and optionally use an OANDA broker. It defines a sample strategy that logs market data and a simple moving average, tracks data and order notifications, and can submit sample buy or…
This expert-advisor description explains an order trigger based on price crossing a moving average rather than on candle values. It says a hedge order can follow when a later candle produces another crossover relative to prior orders. The supplied logic…
Hummingbot 1.27 introduces Strategy V2 templates for funding rate arbitrage and cross-exchange market making (XEMM). The funding strategy compares current perpetual futures funding rates across configured exchanges for selected tokens, then evaluates whether…
This document outlines an intraday Chinese stock selection idea. It screens the metaverse industry for non-ST shares, ranks candidates by the day’s opening auction amount, keeps the top five, and applies a named five-stage limit-up method before 10 a.m. The…
This short description explains a chart operated tool for modifying protective exits on all open orders for the current instrument. The trader drags the script’s placement relative to the current market price: below the market it adjusts stop losses, and…
This overview explains how a crypto derivatives portfolio can combine instruments with positive and negative delta to keep net directional exposure near zero. Traders may then focus on changes in implied volatility, time decay, or other option effects rather…
This indicator calculates volume-weighted average price from intraday bars and resets the calculation at the start of each trading day. It plots the VWAP alongside upper and lower bands at one, two, and three times a dispersion measure, intended to help…
This brief technical note explains a design for placing interactive buttons on a MetaTrader 5 chart. The buttons behave like chart objects with time and price coordinates, can be dragged, and remain positioned when the chart is scrolled. The technique may…
This document describes adapting several MT5 standard trading classes for use in MT4, with the goal of sharing an Expert Advisor codebase across both platforms. It sets two constraints: the program must avoid MT5-only classes unless they are also ported, and…
This beginner tutorial introduces how to write automated trading strategies on the FMZ Quant platform. It explains the difference between REST requests and WebSocket subscriptions, describes the platform’s unified exchange API, and compares supported…
This translated discussion distinguishes the apparent simplicity of a trading rule from the difficulty of implementing and validating it. A basic buy-low, sell-high idea may be easy to state, but high-frequency firms must receive market data, calculate, and…
The script runs an EMA-crossover backtest on USD/JPY five-minute bid bars built from one-minute FXCM data. It configures a simulated margin venue, balances, fees, rollover interest, and probabilistic fills, then collects bars and fills from the engine. The…
This forum exchange documents a connection problem between VeighNa's CTP interface and a Guangfa Futures simulation system. The user reports running a newer CTP interface build than the simulation system's stated version; connections to another simulation…
This document describes an adapter for collecting DeFi data from EVM blockchains and making it available through a trading system’s data model. It covers historical and live block feeds, DEX pool discovery, pool event replay, snapshots, and an experimental…