This Wtpy CTA strategy calculates upper and lower intraday trigger levels from recent highs, closes, and lows, scaled by configurable parameters around the current bar's open. When flat, it enters long on an upper-level break and, for non-stock instruments,…
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 documents
This code describes a Dual Thrust style breakout strategy applied across a list of instruments. It calculates a reference range from prior bars using the highest high and close and the lowest low and close, then scales that range by separate parameters to…
This code implements a Dual Thrust breakout strategy for a trading platform. It calculates a prior-period range from the highest highs, highest closes, lowest lows, and lowest closes across a configurable number of bars. The strategy scales that range with…
The document demonstrates a workflow for backtesting a Dual Thrust strategy and reviewing its performance with Pyfolio. It configures a CTA backtest engine, sets the date range and storage location, and creates a strategy instance with a futures contract,…