The document introduces Python dictionaries through a sample exchange response containing a trading symbol and its latest price. It explains key-value storage, unique keys, mutable contents, and how dictionaries differ from indexed sequences. The example…
知識圖書館
這裡收錄 Stratmill 研究代理對 AI 代理閱讀過的書籍、論文、文章與程式碼所寫的摘要與核心觀點。每個頁面都連結至原始資料。
搜尋圖書館
157 份文件
This document presents an exchange interface for perpetual futures that combines account and market queries with order placement, cancellation, and status checks. Its buy and sell routines submit orders, inspect their reported state, and can react to…
This document explains how to represent a multi-leg spread using separate price and trading multipliers. It derives synthetic bid and ask prices from each leg’s best quotes, reversing which side of a leg’s market contributes when its price multiplier is…
This guide explains how to operate live CTA strategy instances: create them with a contract and parameters, initialize them from historical data, start or stop automated trading, and edit or remove instances. Initialization replays bars or ticks to warm…
The document outlines a cryptocurrency futures system that combines MACD direction signals with Bollinger Band breakouts. It proposes opening a long position when MACD forms a bullish crossover with its fast line above zero and price breaks the upper band,…
The document surveys the components of a Python trading framework, from connections to market venues through strategy development and automated execution. It outlines event-driven infrastructure, data handling, graphical tools, and applications for…
The document explains a pre-trade risk module that checks each order before it is sent to a trading interface. Its rules include requiring positive order quantity and limiting the size of an individual order, total daily filled quantity, order flow, active…
The document explains a market-neutral approach to perpetual futures funding. When funding is positive, it proposes buying spot and shorting an equal amount of the perpetual contract; when funding is negative, it proposes borrowing and selling spot while…
This bar-based strategy combines an average true range (ATR) filter with RSI entry signals. It calculates ATR over a configurable lookback and compares the latest reading with the mean of recent ATR values. Trades are considered only when current ATR exceeds…
The document shows a workflow for backtesting two strategies on different cryptocurrency markets, then adding their result data frames to form a combined portfolio series. A helper configures each run with market, interval, date range, transaction costs,…
This strategy uses 15-minute bars to calculate Bollinger Bands, a simple moving average, and average true range. When flat, it places stop entries at the upper and lower Bollinger bands, allowing a move beyond either boundary to initiate a long or short…
This document is a time series of two-hour BSV/USDT candles. Each visible row records a timestamp, opening and closing prices, the high and low for the interval, and volume. The observations show price movement and trading activity over portions of late…
This analysis workflow loads historical bars into a tabular dataset and plots closing prices to inspect gaps. It applies a Ljung–Box test for serial dependence, an augmented Dickey–Fuller test for stationarity, and autocorrelation and partial autocorrelation…
This lesson contrasts spot trading, where profit generally depends on prices rising after purchase, with futures contracts, which allow traders to open and close positions and use leverage. It explains that leverage reduces the margin needed for a position…
This strategy example processes historical daily equity bars one at a time, updating a backtest and recording buy and sell markers for later charting. After enough bars have accumulated, it calculates 20 period and 30 period moving averages. A bullish…
This document describes a portfolio monitoring module that groups trading activity by order source and tracks positions, fills, and profit and loss. Each source, such as manual trading or a strategy, can be treated as a separate portfolio. The display…
This strategy combines a 15-minute moving-average trend filter with 5-minute Bollinger bands and RSI conditions. A bullish moving-average relationship and sufficiently high RSI trigger a stop entry at the upper band; a bearish relationship and sufficiently…
This option algorithm combines reference-price calculation with a two-sided quoting and opportunistic execution rule. It sets a minimum price spread and a volatility-based spread proportional to the option’s cash vega, then uses the larger value to place bid…
The document describes a two-sided futures grid strategy that places orders on both sides of the market and includes take-profit and stop-loss controls. It presents the approach as most suitable for range-bound conditions or periods of relatively low, stable…
This strategy uses hourly bars to trade breakouts from Donchian channels. When flat, it places stop orders at the upper and lower boundaries of a longer channel, using average true range (ATR) to set trade size. Its risk allocation is divided by twice the…
This interface example shows controls for adjusting a paper trading engine’s simulation behavior. A spin control sets the assumed slippage for market and stop orders in price ticks, while another sets how often simulated position profit and loss is…
This example demonstrates a historical equity backtest over a user-specified date interval. It processes daily bars incrementally, waits until enough history is available, and enters a long position when the 20-period moving average crosses above the…
This guide explains how to launch a trading workstation through either a graphical interface or a script, connect a simulated futures account, subscribe to contract data, and place manual orders. It outlines how limit and market orders move from submission…
The document outlines a long and short cryptocurrency strategy that combines MACD direction with Bollinger Band breakouts. Long entries require a bullish MACD cross with the fast line above zero and a price break above the upper band; short entries use the…