This forum post presents a question about why a simulated account with other positions does not show margin as expected. It includes a long VeighNa CTA strategy example that attempts to find a USD account, read account balance and available funds, and derive…
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
4,613 documents
This ProOrder system takes long and short positions from an external Delphic-TP Combo indicator, with fast and slow simple moving averages used as reference lines. The author gives one daily-chart starting configuration and says the averages need retuning…
This document describes a chart-based trade management tool for positions on the current symbol. Its controls include basket-level breakeven tied to total profit, configurable profit locking, price-distance trailing stops, and per-position breakeven and…
This example describes a futures grid strategy centered on a chosen starting price. It creates a fixed number of price levels on both sides, with each successive level set a constant percentage lower for the long side or higher for the short side. The target…
The document describes a trading class that tracks hidden stop loss and take profit levels while placing wider live levels with the broker. The live orders are intended to provide protection if the connection between the client and broker fails. The class…
The document describes an automated trading system that combines a drawn trend line with two moving averages. It trades in the direction of the trend, using the trend line as a filter alongside the averages. The system is intended for forex pairs and stocks,…
This note describes a simple expert-advisor rule based on the signs of two MACD indicator lines. It opens a buy when both lines are positive and a sell when both are negative. When their signs differ, the position is closed. The document also lists…
This Expert Advisor looks for a chosen number of identical directional candles in sequence. It opens a buy position after a run of bullish candles and a sell position after a run of bearish candles. The version described exposes inputs for the required…
This document describes an automated strategy that combines two moving averages with trend lines drawn from zigzag points. The trend line is intended to filter trades, while the EA uses open-candle prices and offers take-profit, stop-loss, trailing-stop,…
This example describes a single-symbol expert advisor that uses the DeMarker indicator to generate contrarian entries. It reads indicator values on a selected timeframe and sets a sell signal when the prior reading is above an upper threshold and the current…
The strategy demonstrates time-weighted average price execution by splitting entries and exits into equal-sized portions spaced at fixed time intervals. It configures the number of slices and spacing, and uses an RSI indicator on a 15-minute timeframe to…
The document offers practical guidance on using automated trading systems: limit strategy changes, choose a small set of instruments or approaches, keep positions controlled, and give a selected model time to operate. It emphasizes that a system is a tool…
The indicator looks for price to remain beyond a dynamic band around an exponential-average anchor, then return inside it. It treats that failed acceptance as a possible reversal setup and combines acceptance duration with the close-back distance, candle…
The document explains why a broker-submitted stop loss may execute at a different price from the requested level. It attributes this to slippage: in the described ECN account setup, the broker closes the position at the first available price after the stop…
This article defines a trading system as the full set of decisions and practices surrounding a strategy, rather than entry signals alone. It recommends choosing specific markets and assets, setting measurable return goals, studying and backtesting candidate…
This tutorial walks through building a basic quantitative strategy for a single Chinese equity. It uses a five-day and a twenty-day moving average of adjusted daily closing prices: the strategy targets a fully invested position when the shorter average is…
This code example implements a long-only moving average crossover strategy in Backtrader. It calculates two simple moving averages, with default lookback periods of 10 and 20 bars, and adds a long signal when the shorter average crosses the longer one. A…
The document describes a trade-analysis method that turns a stream of transactions into completed round trips. It first combines nearby transactions in the same direction, using volume-weighted average prices, then matches opposing quantities in FIFO order…
This trading script opens a buy position with stop-loss and take-profit distances set in points from the current price. Its stated risk-control feature uses a configurable fraction of account equity to determine the loss associated with a triggered stop.…
The document explains how order lists group orders and how OTO, OCO, and OUO relationships coordinate child activation, cancellation, or quantity changes. The behavior depends on the matching engine, emulator, adapter, venue, or strategy logic, so metadata…
This module calculates trade size so that the loss at a specified stop price corresponds to a chosen percentage of the account deposit. The described inputs are the risk percentage and stop-loss price; the calculation converts the permitted cash loss into…
This Chinese stock-selection post describes a screen combining metaverse-related stocks, a close above the prior day’s low, and exclusion of stocks that closed at the prior day’s limit-up level. It gives indicator-style and Python examples for these…
This ProRealTime indicator script is designed to help plan and monitor a trade on a price chart. Inputs include capital, a percentage risk allowance, entry and stop prices, a reward-to-risk ratio, and an option to adjust the stop using average true range.…
This tutorial demonstrates how to combine reusable strategy components in a backtesting framework. It turns a short and a long simple moving average crossover into a vectorized, long-only entry signal, sizes entries as a share of available liquidity, and…