This strategy uses the sign of a benchmark’s long-window log return to set a directional regime for a US equity index instrument. With the default eighteen-month lookback, positive momentum calls for a long position; negative momentum either leaves the…
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
16,761 documents
This TradingView script adds an on-chart table of common strategy backtest statistics, designed to be copied into an existing strategy. It displays trade count, win rate, starting and ending capital, average winning and losing trade amounts, profit factor,…
This indicator calculates Sharpe and Sortino ratios from sampled returns for the chart instrument. Users select a return timeframe and maximum sample length, then choose either a fixed annual benchmark rate or the returns of a comparison instrument. In the…
This strategy standardizes closing price against its recent simple moving average and standard deviation, then smooths the resulting Z-score over short and long windows. A higher short-term smoothed value than the long-term value enables a long entry; the…
This strategy looks for unusually large candle bodies relative to a recent range. It measures the highest open or close and lowest open or close across a configurable lookback, then enters long on a bullish candle or short on a bearish candle when the…
This strategy uses an SSL channel derived from moving averages of highs and lows, alongside a baseline calculated from closing prices. A smoothed SSL line crossing the baseline generates directional signals, with an optional higher-timeframe baseline filter.…
This strategy labels conditions as range bound when ADX is below its ceiling, RSI stays inside a middle band, and Bollinger Band width remains below a threshold. When all three filters agree, it enters a long position, presented as a proxy for timing credit…
This backtest template uses autocorrelation to detect repeating behavior in closing prices, then applies a linear regression of recent percentage returns to form a forecast component. When the autocorrelation exceeds a fixed threshold, the latest regression…
This long-only Nasdaq-100 strategy combines a monthly 10-period simple moving average with weekly signals. It enters when the weekly close crosses above the monthly average, provided the weekly close is also above its 200-period exponential moving average.…
This strategy enters long when a 14-period RSI rises above the overbought threshold and short when RSI falls below the oversold threshold. The defaults are 70 and 30, respectively. It also converts percentage-based stop and target settings into price ticks…
This crypto-oriented strategy combines four technical modules: a smoothed RSX-style RSI, a QQE-like RSI with a trailing stop, Keltner channel zones, and WaveTrend crosses. Each module contributes a discrete bullish, neutral, or bearish signal. The script…
This 45-minute BTC/USDT strategy combines Ichimoku-style price signals with an RSI trigger. It can use Heikin Ashi candle data, then compares price with a 26-period Kijun line and the projected cloud boundaries. Long entries require a Kijun crossover with…
This BTC perpetual scalping strategy combines Williams fractals with three exponential moving averages and RSI. It signals long entries when the shorter EMA is above the two longer averages, a downward fractal appears, price is above the slowest average, and…
This strategy models a static grid for UNI/USDT spot trading. It divides a fixed price band into geometric or arithmetic levels and buys when a bar closes down through an unfilled level. A position is closed when price crosses the next level upward. The…
This example demonstrates staged exit management for a position using an initial stop and three profit thresholds. Once the first threshold is reached, the stop moves to break-even; at the second, it moves to the first target. At the third, the default…
This strategy builds a directional setup from a sequence of price-action conditions. During configured London or New York sessions, it flags a sweep when price pierces a prior swing and closes back across it. It then tracks displacement, a fair value gap,…
This strategy divides a user-defined price interval into levels spaced either geometrically or arithmetically. It buys a fixed cash allocation when the closing price crosses down through a level and closes that level’s position when price crosses up through…
The strategy defines bullish and bearish Failed 2 patterns after a configurable streak of consecutive candles. A bullish setup follows a bearish streak: the signal candle sweeps below the prior candle’s low, stays within its high, and closes back inside the…
This strategy derives Heikin-Ashi close as the average of the bar’s open, high, low, and close, and derives Heikin-Ashi open recursively from the prior Heikin-Ashi values. It colors bars by whether the derived close is above or at or below the derived open.…
This flexible strategy calculates Heikin-Ashi candle values internally while running on a standard price chart. Long and short signals depend on configurable runs of bullish or bearish Heikin-Ashi bars, along with counts over a wider lookback window and…
This script defines bullish and bearish candles with no shadows: the full candle range lies between its open and close, while the close moves in the same direction as the previous close. It also identifies sequences of two such candles in the same direction.…
The Caldera Meridian strategy combines several signal families in a close-confirmed framework: moving-average trend state, MACD and RSI momentum, VWAP direction, volatility ranking, a conditional higher-timeframe EMA filter, volume-weighted pressure, auction…
This strategy marks bullish and bearish price zones from confirmed swing pivots, then looks for a candle to close inside the latest zone with directional confirmation. A bullish entry requires a close within the zone associated with a swing low and a rising…
This BTCUSDT four-hour strategy combines support and resistance levels with RSI, MACD, and moving-average filters. It defines long setups for bullish retests of a breakout zone and closes above resistance, plus a short setup when price closes below a…