A strategy for index charts such as the S&P 500 on five minutes, trading only inside a configurable New York time window. It looks for a large-bodied candle, measured against ATR, that follows a short-term liquidity sweep of recent highs or lows, with an optio
This strategy identifies the Initial Balance (IB) high and low during a user-defined opening session and trades breakout pullbacks. Once the IB window concludes and range filters are satisfied, it enters long or short when price breaks out and retraces back to
This strategy detects low-volatility consolidation by identifying when Bollinger Bands contract inside Keltner Channels. When the squeeze releases, it evaluates linear regression momentum and optional volume spikes to confirm breakouts. Long signals occur on r
A strategy that tracks fair value gaps on a higher timeframe, 15 minutes by default, and watches for price to tap a zone and then invert a one-minute fair value gap before entering. It trades only inside a set session window, limits trades per day, and can opt
A strategy that models an ICT-style sequence: it detects a liquidity sweep of a one-hour swing level, then waits for a market structure shift on the chart timeframe confirmed by a large displacement candle. Signals are limited to configurable London, New York
A template file of simple Pine strategy examples, led by an EMA crossover that goes long when a 10-bar EMA crosses above a 20-bar EMA and short on the reverse. Other templates in the file show ATR-based stop loss and take profit, an RSI overbought and oversold
A Pine v5 strategy that classifies the market as volatile, trending or ranging using ATR against its history and ADX thresholds. In trending conditions it trades a 9 and 20 EMA crossover, and in ranging conditions it fades Bollinger Band extremes. Stops and ta
This strategy executes mean-reversion trades by combining RSI momentum, Bollinger Bands volatility, dynamic ATR stops, and Exponential Moving Averages for trend filtering. It seeks entry opportunities when price reaches extreme Bollinger Band boundaries alongs
A Pine v5 long-only strategy that switches behavior with an ADX trend reading. When ADX is above the threshold it buys on a fast EMA crossing above a slow EMA, and when ADX is below it buys on RSI under 30. It closes the long on the opposite EMA cross in trend
A course example strategy that buys when a fast EMA crosses above a slow EMA and then manages the trade with a percentage stop loss and take profit measured from the average entry price. Only long trades are opened; the short condition is calculated but not us
A long-only strategy generated from the TrendLab research project, drawn on the price chart. It tracks the highest high over a 115-bar lookback. It buys when the close is at or above 70 percent of that high and sells when the close falls below 52 percent of it
A Pine v5 strategy built on a smoothed RSI and Bollinger Bands, with optional adaptive band width from ATR. Filters include a higher timeframe trend and RSI check, a volume breakout test, a volatility regime check and a trend strength check, plus an optional s
A long-only strategy that buys when a short simple moving average crosses above a long one and closes the position when it crosses back below. Defaults are 10 and 50 bars, both adjustable. It draws both averages and buy and sell triangles on the price chart, e
An ES futures fade strategy designed to trade market opening gaps during regular trading hours. It calculates opening gaps using percentage, point, and ATR thresholds while employing a market breadth TICK filter to veto trades on trend days. It features an exe
A trend-following strategy that goes long when the close breaks above the previous Donchian channel high and short when it breaks below the previous low. An optional 200 EMA filter limits direction, and an ATR regime filter skips quiet markets. Each trade has
This mean-reversion strategy identifies deep price drops following a multi-bar low, such as a 52-week low. It calculates a target threshold located a specified percentage below the period low and triggers a buy entry when price plunges to this oversold level.
This strategy automatically adapts its moving average lengths and types based on the chart's timeframe, covering scalping, intraday, and swing styles. It generates entry signals when a fast moving average crosses a slow moving average, provided price is on the
This overlay strategy requires sequential confluence before it enters. A hybrid detector blends selected oscillators, including RSI, CCI, MFI, Bollinger percent B and Keltner percent K, and treats extreme overbought or oversold readings as the market regime. V
This strategy uses a fast and a slow simple moving average with the bar's price range. In its default long-only mode it buys when price sits below the fast average, in the lower part of the bar range, while staying above the slow average, and exits when price
A trend-following strategy that goes long when the fast EMA is above the slow EMA, RSI is above its threshold and the MACD histogram is positive, and goes short on the opposite conditions. An optional filter requires the close to sit beyond both EMAs. When ena
This strategy plots Supertrend on the price chart and enters long only when the one-hour Bitcoin Supertrend is bullish, the symbol Supertrend is bullish, price is above the line, and the bar makes a higher high. It sizes each trade at 100 percent of equity and
A Pine v5 strategy, with Arabic input labels, that counts bullish signals from several groups: Turtle-style breakouts, RSI and Bollinger Band mean reversion, EMA, MACD and ADX momentum, plus order blocks, fair value gaps and supply and demand zones. It enters
A long-only strategy that ports a Freqtrade bot to TradingView. It builds Heikin-Ashi values, a ladder of EMAs standing in for several timeframes, a fan magnitude ratio and an Ichimoku-style cloud from Donchian midpoints. Entries need price above the cloud, a
A strategy that trades the crossover of two moving averages, with a default 20-bar simple average and 50-bar exponential average. Each can be changed among eight types, including SMA, EMA, TEMA, HMA, KAMA, ALMA, FRAMA and VIDYA. Entries use percentage take pro
Modified Asia Sweep is a futures strategy sample built around the Asian and London sessions, with session hours and time zone as inputs. It draws session ranges, Asian swing points, market structure and break of structure lines. Position size can be set by a f
A long strategy built on a 50-period Hull moving average crossing a 200-period EMA, with ADX strength, a short Hull slope and an optional RSI filter used to scale entry size in steps. It uses an ATR stop that tightens after a drawdown, staged profit-lock parti
A long-only strategy for stocks that buys when the close is above a 5-period EMA, the short EMA is above a 20-period EMA, and volume exceeds a multiple of its 20-bar average. Position size is a set percent of initial capital. After entry it places a fixed perc
This strategy combines Exponential Moving Averages, the Relative Strength Index, and Average True Range with optional multi-timeframe confirmation to generate trade signals. Long trades trigger on fast EMA bullish crossovers when RSI is low, while short trades
A strategy for 5-minute charts that builds a morning range of either five or fifteen minutes after the market open and takes the first breakout entry, with an entry buffer in ticks. An optional trend filter buys only above and sells only below the 50 EMA, and
Opening range breakout strategy on the price chart. It measures the high and low of a configurable opening window, 09:30 to 09:45 by default, ignores ranges below a minimum point size, and trades breakouts of that range. Position size is based on a risk percen
A breakout strategy built for S50 futures on a 30-minute chart. It tracks confirmed swing highs and lows from pivot detection and places stop-order entries when price breaks the latest swing level. The stop sits one ATR beyond the opposite swing, the target is
A strategy written for a 15-minute TRUMP perpetual swap chart. When a candle's high-to-low range exceeds a percentage threshold, it places a limit order against the candle's direction, short after a green candle and long after a red one, at a price between the
A long-biased strategy that compares two selectable trend lines (TEMA, LSMA, EMA or SMA) and enters when the fast line crosses above the slow one while an ATR trailing level sits below price. It exits when price drops under the trailing high, when the lines cr
This Pine Script strategy is designed for cryptocurrency trading on TradingView. It combines moving averages, RSI, MACD, Bollinger Bands, Stochastic oscillator and volume analysis to generate buy and sell signals. Higher time frame trend confirmation and marke
The Adaptive SuperTrend Strategy is a custom trading strategy that calculates an adaptive SuperTrend value using volatility-adjusted factors. It determines high or low volatility by comparing ATR to its 100-period SMA and adjusts the SuperTrend factor accordin
A long-only strategy that accumulates a fixed quantity by buying near the lower edge of a smoothed channel. The channel is an EMA of the highest high and lowest low over an adjustable range. A buy fires when price touches the lower line while RSI is rising out
This adaptive strategy combines multiple classic technical indicators into a unified framework to generate trading signals on the price chart. It evaluates conditions across Moving Average crossovers, Donchian channel breakouts, MACD, RSI, Bollinger Bands, Par
A strategy meant for one-minute charts that buys when price is near a recent pivot low, RSI is below an oversold level, a hammer or bullish engulfing candle appears and price is above an EMA. Sells mirror this near pivot highs with overbought RSI, bearish patt
This Pine Script strategy provides a basic moving average crossover trading template. It calculates and plots a fast simple moving average and a slow simple moving average directly on the price chart. The strategy enters a long position when the fast average c
A long-only strategy built on the built-in Supertrend indicator. It enters long when Supertrend flips to an uptrend and closes the position when it flips back to a downtrend, with orders processed on bar close. ATR length and factor are adjustable. Green and r
A pivot breakout strategy for the S50 futures on a 30-minute chart. Swing highs and lows are found from left and right bar counts, with stop entries placed beyond them. Each entry has an exit order with a stop one ATR past the pivot and a limit set by a risk t
This strategy detects whether Ethereum outperforms Bitcoin relative to the overall market using MTPI signals. It combines outputs from DEMA Adaptive Fractal Range, DEMA Supertrend, Schaff Trend Cycle, RMI Trend Sniper, and FDI-Adaptive Supertrend indicators. L
A small test strategy used to exercise a browser automation project rather than to trade. It goes long when a 14-period simple moving average crosses above a 28-period one and short on the opposite cross, with no stop loss or take profit. It also defines sampl
This strategy plots several exponential moving averages and an optional VWAP on the price chart. It defines a long setup when the short EMA crosses above the long EMA, price is above the short EMA, and, if enabled, above VWAP. A short setup uses the opposite c
This strategy goes long when ADX is above a threshold and price crosses above a 20-period simple moving average, and goes short on the opposite cross. Each entry carries an ATR-based stop loss and take profit, set by two multipliers. Orders use all available e
A strategy built on two Donchian midlines, one long and one short, plus an ATR readout. It enters long when price has crossed above the long line and the short line has crossed above the long line, in either order, and enters short on the mirror pair of crosse
This strategy trades long or short on the chart. It takes a long entry when a fast EMA is above a slow EMA, MACD is above its signal line, ADX is above a threshold and price is above VWAP, or when price breaks above a pivot high; shorts mirror this. Each trade
A strategy template that sets up Bollinger Bands, MACD and an RSI with its own Bollinger band, each with adjustable lengths, and uses a share of equity for sizing. Orders carry a percentage stop loss and take profit, defaulting to 3 and 30. The condition secti
Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.
Learn to Use Pine Scripts
Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.