This example implements an intraday breakout strategy around the prior session’s high and low. It opens a long position when the latest price rises above the prior high and a short when it falls below the prior low, targeting a fixed position size in either…
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
7 documents
The script describes a two-sided futures strategy on hourly bars. It identifies confirmed swing low and swing high fractals, then enters long when price breaks above a bullish fractal’s high during a short-over-long moving-average uptrend. It enters short…
This example implements a futures Turtle-style trend-following system. It enters long when price breaks above a prior Donchian channel high and short when price breaks below the channel low. Position size is based on account balance, contract multiplier, and…
This example presents a basic futures strategy using daily Bollinger Bands. It calculates the 26-period bands with a parameter of 2, enters long when the latest price rises above the upper band, and enters short when it falls below the lower band. The target…
This trading script implements a daily Keltner Channel strategy for a CFFEX index futures contract. It calculates an 8-period exponential moving average as the channel center and uses a 7-period average true range with a 1.5 multiplier to set the bands. A…
This code example implements an intraday R-Breaker strategy for a futures contract. It calculates seven reference levels from the previous daily bar: a pivot, breakout thresholds, setup levels, and reversal entry levels. When flat, price crossing a breakout…
This code example implements an intraday R-Breaker strategy for a futures contract while allowing positions to remain open overnight. It calculates a pivot and six reference levels from the prior daily bar: breakout thresholds, observation levels, and…