This XAUUSD strategy uses the relationship between 20-period and 50-period exponential moving averages to define direction. It enters long when price crosses above the faster average while that average is above the slower one, and enters short on the inverse…
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
1,976 documents
This indicator manages a user-defined long or short trade from a selected chart time and price. It offers four stop approaches: an offset based on ATR, a percentage of price, recent swing highs or lows, or Parabolic SAR. For ATR and percentage modes, the…
This strategy uses a SuperTrend calculation based on average true range to classify the market as rising or falling. Users can choose among several averaging methods for the ATR, set its period and multiplier, and optionally filter unusually large true-range…
This document describes a reusable TradingView strategy framework intended to let users supply their own long and short signals while retaining common backtest controls. Its interface separates entry triggers from directional filters, with four named…
This strategy detects a broad collection of bullish and bearish candlestick formations, including reversal and continuation patterns. Candle attributes such as body size, shadow length, direction, and gaps are compared with recent averages and…
This strategy builds an initial balance range from the first hour of the Asia, London, and New York sessions. It classifies a symbol as bullish when its close is above all three session highs, bearish when below all three lows, and neutral otherwise. The…
This indicator pairs a fixed-period SuperSmoother with an adaptive version and plots their difference as an oscillator. The method first filters the input with a base SuperSmoother, measures its one-bar change, and scales that change by its root mean square…
This unfinished strategy looks for reversals after price closes beyond a session VWAP band. A short setup begins with a shooting star or doji near a recent high, followed by a bearish confirmation such as an engulfing candle or a lower high that closes below…
This indicator estimates volume distribution across price levels after adjusting for a line between a chosen starting point and an ending price. The user selects the start time and price, then sets the ending price; the chart’s last bar serves as the…
This Pine Script library draws horizontal rays from user-defined conditions and price levels. A ray can extend to the right or stop at the current bar; when price reaches the level, the active ray is removed and may be retained as a historical line. Its…
This strategy uses the SuperTrend indicator, calculated from ATR length and multiplier inputs, to classify the market as bullish or bearish. It generates a long entry when direction flips from bearish to bullish and a short entry when it flips the other way.…
This indicator collects several rolling volatility estimators built from price bars. The visible functions include Parkinson, Garman–Klass, Rogers–Satchell–Yoon, Yang–Zhang, and historical volatility; the code also contains modified variants and an…
This intraday strategy identifies recent pivot highs and lows, then treats a move beyond a swing level that closes back inside it as a liquidity sweep. Long setups require a sweep below a swing low while price is above a 200-period EMA; short setups require…
This strategy takes long or short positions according to whether a selected higher-timeframe candle closes above or below its open. It can add a chart-timeframe EMA filter, requiring price to be above the EMA for longs and below it for shorts, and a volume…
This strategy calculates approximately one year of price return and compares it with a moving average of that return. Its lookback adapts to chart frequency: the script uses 252 bars for daily data, 52 for weekly, 12 for monthly, and estimates the number of…
This strategy uses a fast and a slow exponential moving average to classify direction and trade crossovers. With the defaults shown, the fast average uses 12 periods and the slow average uses 21. A cross of the fast average above the slow one opens a long…
This document describes a long-only spot grid approach that divides a price range into levels. It buys as price falls through a level and sells a position when price rises to the next higher level. The described configuration uses ten levels and allocates…
This strategy combines a trend measure and a momentum measure into a bounded oscillator. It compares a 24-period Arnaud Legoux moving average with a 120-period volume-weighted moving average, scales their relative difference, and combines that result with…
This strategy organizes Ichimoku conditions into a directional score for the current chart timeframe and a higher timeframe. Its components assess whether price is above or below the cloud, the relative ordering of the projected cloud spans and…
This hybrid accumulation strategy scores potential oversold conditions using three inputs: a close below the lower Bollinger Band, price below long moving averages, and tiered low RSI readings. Higher combined scores activate one of two monitoring modes.…
This automated long strategy derives Fibonacci-style price levels from recent pivot highs and lows, then lets the user select one level as a candidate entry. When the preceding bar’s low crosses below the selected level and other state conditions allow a…
This long-only strategy combines Bollinger Bands, MACD, volume, and candle direction to seek entries after a price or MACD breakout. A signal requires a bullish candle, adequate volume when that filter is enabled, and positive MACD momentum; price crossing…
This long-only strategy combines an RSI oversold trigger with price thresholds for two staged entries. The first entry requires RSI to cross below its oversold level while price is at or below a user-set limit. After that fill, the script calculates a second…
This indicator identifies candidate support and resistance from confirmed pivot highs and lows. For each pivot, it encodes RSI relative to 50 and candle body size relative to ATR as binary features, then applies a logistic function to estimate whether the…