This document presents a reusable Pine Script strategy template rather than a defined trading system. Its configurable framework includes an external indicator input, optional custom closing signals, session and date filters, long or short direction…
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 trend-following framework combines Parabolic SAR, RSI, volume expansion, and moving averages. SAR supplies the primary direction and reversal cue; RSI is used to track movement back toward its midpoint from an overbought or oversold region; rising…
This strategy uses a band formed by 12-period and 21-period exponential moving averages to define trend direction and look for pullback rejections. For a bullish setup, price touches the band and closes above both averages with a strong candle and limited…
The document presents a long-only grid for TRX perpetual futures. It defines fixed upper and lower price bounds and distributes buy levels between them using either geometric or arithmetic spacing. A downward crossing of a level triggers a buy; an upward…
This document describes a long-and-short trend strategy that combines EMA direction with Supertrend changes. The source compares a fast EMA with a slower EMA and enters when Supertrend flips in the same direction; it opens or closes positions as the trend…
This strategy derives two sets of turning points from smoothed price series. For each set, it applies three sequential exponential moving averages, then identifies a local turn and associates it with a recent high or low over a configurable detection window.…
This document outlines a trend-following approach that enters when the Supertrend direction changes. It uses an ATR-based distance to set a stop and a risk-to-reward multiple to set a target. Position size is calculated from a stated fraction of account…
This partial strategy script combines pivot-based swing detection and Fibonacci levels with an EMA trend filter across multiple timeframes. Its visible settings include a Fibonacci entry level, an extension target, a minimum swing size relative to ATR, setup…
This swing strategy uses the crossover of RSI and a moving average of RSI to trigger long and short positions. It is described for four-hour charts, with configurable RSI and average lengths and a choice between simple and exponential averaging. The exit and…
This strategy looks for reversals after price briefly moves beyond a confirmed swing high or low and then closes back through that level. It measures the sweep relative to ATR, accepts only depths within configured bounds, and requires the reclaim to occur…
This long-only averaging strategy uses a low RSI reading on a higher timeframe to arm an initial entry. If price falls further from the base entry, it places up to five additional orders at preset percentage distances, with each order sized twice as large as…
This intraday strategy sets an upper and lower range from an early session bar, then watches for price to break beyond that range. The code also compares the first bar’s opening price with the prior daily close to decide whether to enable a long or short…
This long-only system combines Parabolic SAR, SuperTrend, and a volume oscillator to confirm trend conditions. It enters when price is above SAR and the SuperTrend lower line while the volume oscillator is positive; it closes the long when price is below SAR…
This Pine strategy combines a SuperTrend indicator with regime detection and a composite signal score. Its visible settings provide an ATR-based SuperTrend, an ADX trend threshold, a regime lookback, and an option to adapt the SuperTrend multiplier. The…
This strategy uses two Donchian channels to trade breakouts in either direction. A 50-bar slow channel sets entry levels: a break above its upper boundary opens a long position, while a break below its lower boundary opens a short. The midpoint of a 20-bar…
This spot strategy looks for a price decline from a recent Donchian high before making an initial purchase. After entry, it tracks the lowest price; if price falls sufficiently below the last entry and then rebounds by a set amount from that low, it adds…
This Pine strategy uses Bollinger %B, calculated from a moving average and standard deviation bands, to time long trades. It opens an initial long when %B crosses above zero, then closes the position when %B reaches or exceeds one. A bullish divergence…
This daily-system design combines an EMA trend signal with a price-channel breakout. The trend component compares a user-set fast EMA with a slow EMA five times longer, then scales their difference by return volatility. The breakout component measures price…
This strategy combines RSI-based oversold entries with ATR-based position sizing and profit targets. On a four-hour or daily chart, it opens up to four staged long entries when RSI falls below 30. Each entry is sized using a stated $200 total risk amount and…
This script combines higher-timeframe signal detection with configurable execution rules. It can trade failure patterns and inside bars, then either enter when price breaks the signal bar or wait for a matching lower-timeframe signal bar and its break. Bias…
This grid strategy divides a chosen price range into evenly spaced levels and assigns a fixed base-currency order size to each level. It activates once price closes inside the range. A level can open a long position when price moves down through it, provided…
This strategy seeks long entries after a confirmed pivot high. It stores the latest pivot level, arms an entry condition when a pivot is detected within a user-selected date range, then submits a stop entry just above that level when the close is above a…
This strategy pairs bullish and bearish engulfing candles with rolling price extremes presented as supply and demand zones. It enters long after a bullish engulfing pattern when price is above the recent low zone, and short after a bearish engulfing pattern…
This document describes a configurable futures strategy for one trade in a selected contract and direction. The trader can specify quantity, entry cost, and take-profit or stop-loss prices, or use price differences from the cost to set those levels. The…