This tutorial explains Zipline’s event-driven structure for writing and running trading algorithms. A strategy defines an initialization function for persistent state and a handler that runs on each market event, where it can read current or historical…
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 tutorial explains two ways to run a strategy across multiple instruments with different parameters, using a dual moving-average crossover as its example. One approach launches a separate process for each instance, passing the symbol and moving-average…
The note describes a trailing-stop setting that delays trailing until an open position reaches a specified profit threshold, measured in points. It presents this threshold as a breakeven-like activation condition: trailing begins only after the position has…
The document describes a MetaTrader 5 utility for estimating lot size before a trade. A trader supplies either a risk percentage or a fixed amount, an account value, and a stop-loss distance; the calculator converts those inputs into a volume compatible with…
This documentation explains how to connect OctoBot to Telegram's API so it can listen to public groups for trading signals. It distinguishes this setup from the simpler Telegram configuration used to control OctoBot or listen to private groups. To use the…
The document describes a software workflow for managing option volatility strategies. It covers model selection for European and American options, choosing a futures or synthetic underlying, monitoring option quotes and Greeks, and calibrating pricing…
This document describes a small MT5 acceptance harness for checking an Expert Advisor’s entry-state logic against deterministic synthetic cases. Its eight fixtures cover a valid closed-bar entry, duplicate signal bar, open-bar rejection, cooldown handling,…
This guide explains how to inspect balances across connected exchanges and wallets, including assets allocated to active orders, and how to view and adjust a paper-trading account. Paper balances can be increased for a specified asset, enabling simulated…
This document describes a utility that monitors a selected basket of open positions and attempts to close that basket when its floating loss reaches a user-set threshold. The loss limit can be a fixed cash amount or a percentage of account balance or equity;…
This product description outlines an MT5 indicator for tracking trading performance over the current broker day. It reports closed profits and losses, net results, floating profit or loss, and combined daily performance. The dashboard also includes daily…
The author describes a Binance perpetual futures strategy that used recent trades, order book depth, and current positions to infer short-term direction and place maker orders. In a rising market it opened longs and closed shorts; in a falling market it did…
This forum thread discusses futures orders that remain in a submission state when placed through VeighNa, including manual orders and occasional reports from live trading. One suggestion is to check that the contract symbol uses the correct capitalization,…
This Expert Advisor description presents a channel-based trading method. It finds the highest high and lowest low over a chosen lookback period and derives a reference level from those bounds and the close. A close between the reference level and the channel…
The document explains a limitation in a Chinese equities platform’s daily backtest matching: it assumes a stock at its limit-down price cannot be sold. That assumption can miss cases where buy orders remain queued at the limit price, as in the example of a…
The document explains how an Expert Advisor or indicator can protect communications with a server using hybrid encryption. RSA with PKCS#1 v1.5 padding encrypts a randomly generated AES session key, while AES encrypts the larger request or response payload.…
This document describes an MT5 conversion of an earlier MT4 utility for managing trade exits. The expert advisor can apply stop loss and take profit levels, lock in profits, and trail stops using methods whose details are not explained. It also supports…
This Backtrader example shows how a strategy can use two data feeds: a moving average crossover on the second asset generates long entry and exit signals, while orders are placed on the first. The signal uses a simple moving average and a crossover of the…
The document explains how OctoBot can act on buy and sell signals from TradingView indicators or strategies. Alerts sent through a webhook can prompt the bot to create corresponding simulated or live orders on a supported exchange. Signals may also include…
The document discusses a backtesting problem in a traditional trading strategy: filtering the data to include only instruments with a positive value for a buy signal improves reported performance, but also changes the sample available to the sell condition.…
This document describes an MT5 expert advisor designed as a chart interface and quick-trading layer. It replaces default chart clutter with larger custom price and time labels, adds buy and sell controls with editable volume, and displays open positions as…
This article explains how to build an options strategy with VeighNa’s template-based OptionStrategy module and evaluate it with historical data. Its example sells one at-the-money call and one at-the-money put on the current month’s China Financial Futures…
The article surveys execution algorithms by their main objective: reducing market impact, controlling total trading costs, or adapting execution to favorable market conditions. It describes TWAP as time-based order slicing, VWAP as matching execution to…
The document reports a mismatch between a portfolio strategy’s expected rebalance schedule and its simulated trading activity. The author says the backtest rebalances every five days or after a take-profit trigger, while the simulation records trades on many…
This expert advisor follows signals from the MaChannel indicator. A signal is taken at a bar close when the indicator displays a large colored dot. The advisor depends on a separately compiled indicator file, while a trading library is described as…