The post asks why a daily stock-ranking strategy sells positions in backtests but appears only to buy them in simulation. Its code includes a trailing stop based on a percentage below the highest observed price since purchase, then manages capital and ranks…
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 short exchange addresses how to sell stock shares according to the age of each entry. The example strategy opens separate lots in the same stock on consecutive days, then intends to close each lot after a specified holding period. That requires tracking…
This reference outlines the main building blocks for writing trading scripts in Hummingbot. It describes scripts as subclasses of a strategy base class, with strategy variables held as class variables, and shows how to configure exchange connectors and…
The document explains how OctoBot supports automated futures trading through several trading modes: DCA, Dip Analyser, TradingView, and Daily. It names Binance, Bybit, and Kucoin as supported exchanges, with regional and account limitations for some venues.…
This release announcement describes OctoBot 1.0.9 features for automated crypto trading. Its Index Mode allocates funds across configured crypto pairs and allows users to set a rebalancing interval and threshold as basket values change. The announcement also…
This trading robot uses MACD signals to open positions and increases lot size as the number of positions grows, applying a martingale-style scaling rule. The description recommends higher chart timeframes and provides controls for initial position sizing,…
This strategy modifies a two-way martingale by opening a position against the current exposure when price reaches a configurable hedge threshold. It describes settings for initial order size, take-profit distance, leverage, position growth, and the…
This page points to a presentation and code for a multi-instrument CTA strategy built around Dual Thrust. Its outline identifies trend capture, fixed-fraction position sizing for risk control, diversification or hedging across three instruments, and backtest…
This intraday DAX strategy combines periodically refreshed support and resistance levels with candlestick reversals and breakout pullbacks. It looks for bullish or bearish pin bars and engulfing patterns near those levels, trading a rejection in the…
This product description outlines a scalping expert advisor intended for major forex pairs and NASDAQ stocks. It says the EA acts using the current candle's opening price and lists configurable moving averages, trade limits, lot sizing, stop loss and take…
This short question-and-answer concerns a futures backtest in which the account's total assets appear to rise to roughly twice the amount used to buy a stock. The author reports trying several order methods, including placing an order by quantity, by…
This article discusses how to manage strategy exposure during changing market conditions. It contrasts concentrating capital in one stock with spreading risk across positions or strategies, noting that concentration can produce sharp gains as well as large…
The report examines position management and timing for absolute-return equity strategies. It tests fundamental proxies for liquidity, earnings, and valuation: the year-over-year change in quarterly EPS, historical price-to-earnings valuation, and the…
This code commentary explains a directional spot trading bot that can open either a long or short position, add to the position as price moves against it, and close when a profit target or stop-loss condition is reached. It exposes settings for order size,…
This expert advisor is described as a moving average crossover system that trades using the open candle’s price. Its settings cover fast and slow moving average periods, trade limits, fractal highs and lows, and use across time frames on major Forex pairs…
This code implements a portfolio stage that recalculates instrument positions across dates. For each date, it builds an optimization objective from target contract positions, a covariance estimate, contract values, transaction costs, previous positions,…
This position-sizing stage converts a combined trading forecast into a subsystem position. It scales the forecast by an average position size derived from the account’s daily cash volatility target and the instrument’s volatility, then normalizes by the…
The document outlines an expert advisor that combines the Commodity Channel Index with a moving average and trailing behavior. It notes that the CCI level is treated as an integer and that users can choose the current and previous bars used for its values.…
This product description outlines a trading-panel interface for entering and managing trades. Its controls include an account and position information panel, dedicated buy and sell actions, and support for a Magic Number so the expert advisor can identify…
This document describes a MetaTrader 4 chart utility aimed at traders managing funded accounts with daily loss limits. It tracks daily profit and loss from open positions and trades closed that day, including commissions and swaps, to help users monitor…
The document describes an Expert Advisor that runs separate long and short trading systems using ColorPEMA_Digit signals. Each direction has independent entry and exit blocks and its own position-sizing settings, so outcomes on one side do not determine…
The document explains a MetaTrader script that moves the stop-loss on one or more positions to the breakeven price. Breakeven is described as the opening price, where the trade’s profit is zero. Setting a stop at that level is presented as a way to keep an…
This five-minute index strategy uses two smoothed moving averages to set a long entry trigger. When the faster average exceeds the slower one, it places a buy stop above the market, with the offset based on average true range. The stated spread assumption is…
This MQL5 Expert Advisor is described as a general tool for trailing stop levels on both market positions and pending orders. It can also open positions or place pending orders, apply a scalping mode, track percentage changes in account value, and display…