This strategy plots a Supertrend and a double exponential moving average on the price chart. Supertrend direction flips mark buy and sell signals, with optional labels and trend highlighting. The DEMA uses a selectable timeframe and source and is requested wit
This strategy enters long or short Donchian breakouts and sizes each unit from a percentage of equity and ATR. It sets an initial ATR stop, trails with a chandelier stop, and tightens that trail after a chosen number of bars. Optional profit targets close one
Divergenced I002 is a trading strategy that identifies entry points using Squeeze Momentum Indicator divergences across price and momentum structure. Long positions trigger on bullish momentum divergences, while short positions trigger on bearish divergences.
This strategy tracks the Williams %R oscillator to trade mean-reversion bounces from overbought and oversold extremes. It opens long or short positions when a reversal signal occurs alongside confirming price direction, while generating JSON-formatted alert pa
This short-only strategy enters when price is below a daily 50-period EMA, crosses under a four-hour 50-period EMA, and closes below the previous bar low. Position size is 20 percent of equity. Exits use a limit and stop based on percentage distances by defaul
This strategy draws up to three exponential moving averages, default lengths 34, 89 and 610, across as many as seven user-chosen timeframes in a separate pane. Each series uses a gradient by timeframe, and optional smoothing or variable line width changes how
This strategy trades Ethereum with a fast and slow exponential moving average crossover filtered by a 200-period EMA. It enters long when the fast EMA crosses above the slow EMA and price is above the 200 EMA. Shorts stay off by default and open only when that
Tracks the high and low of a user-defined intraday session and enters breakout trades when the bar closes outside this range. It can enter during the session or wait until the session ends. Long trades enter on a close above the session high, while short trade
This strategy identifies buy and sell entry points for XAUUSD using a combination of exponential moving averages, RSI, Stochastic oscillators, ATR, and Fibonacci zones. It supports multi-mode execution featuring confirmation and scalp entries triggered by over
Alpy Kazan is a multi-timeframe momentum strategy combining a WaveTrend oscillator with dual-length RSI divergence calculations. It evaluates custom timeframes to plot overbought and oversold bands, WaveTrend crossovers, and RSI differentials in a separate pan
This strategy plots support and resistance from the highest high and lowest low over a lookback window, and can overlay Bollinger Bands on the price chart. It calculates RSI or MFI, optionally from Heikin Ashi prices, and exposes WaveTrend, Laguerre smoothing
This educational strategy demonstrates how to implement trailing stop losses in Pine Script. It executes a single mock trade in the chosen direction starting at a user-defined timestamp. The trailing stop is calculated using either Average True Range or percen
This strategy plots an exponential moving average on the price chart and opens a long position when the close crosses above that average, but only when no position is already open. It exits with a percentage stop loss and a percentage take profit measured from
This strategy plots a 14-period simple moving average as a chart line and fills the space between two overlapping lines. It creates a small label on each bar, then overwrites the label text. It enters one long contract when close crosses above the line level a
This strategy identifies breakouts using Keltner Channels combined with volume spike filters, ADX trend strength, RSI thresholds, and an optional EMA trend direction filter. It triggers long entries when price crosses above the upper channel and short entries
A strategy that builds a volume profile with delta over a lookback window and trades touches of its point of control and value area high and low levels, long or short. The window, bin count, value area percentage and touch tolerance in ticks are adjustable. Po
A long-only strategy for one-minute spot charts that uses two Bollinger Bands, a standard 20-period band on close and a short 4-period wide band on open, to classify entries into three cases. Entries can be limited to the first two hours of the Asian, European
This strategy plots on the price chart and calculates an initial balance (IB) range from specified IB start to end hours in ET. It computes VWAP using cumulative typical price and volume during the regular trading hours. Confluence is detected when price align
This strategy computes the midpoint of the highest high and lowest low over a configurable lookback and enters long when price crosses above that line and short when it crosses below. An exponential moving average of each bar's high-low range is calculated but
This strategy plots 10, 55 and 200 period exponential moving averages on the price chart and calculates a smoothed stochastic oscillator from user K, D and smoothing periods. It opens a long when the K line crosses above D while K is below a fixed oversold lev
Heikin Ashi Trend is a trend-following strategy that calculates Heikin Ashi candle values and moving averages directly on the main price chart. It generates long and short entry signals when a user-defined number of consecutive Heikin Ashi bars align with fast
This strategy detects bounces from support and resistance levels using swing pivot highs and lows. It waits for the price to touch an identified pivot level within a user-defined percentage tolerance and confirms an entry when a rejection candlestick forms, ch
ES Professional Fade is an overlay strategy aimed at the ES futures contract. This archived file is only a placeholder and contains no entry, exit, or order logic. Its changelog says the version adds opening-range calculation with freeze logic, session-boundar
A strategy on the price chart that reads an external long and a short signal and manages trades with selectable exits. Position size is a set number of contracts. Exit options include a moving average exit, a fixed stop with up to three targets measured in ATR
A Pine v4 strategy that combines rolling highest and lowest values over fast, medium and slow lookbacks with a 12/26 MACD and a 14-period RSI. Inputs set the three lookbacks, an RSI level for closing longs in a short zone, whether shorts are allowed, and two M
This mean-reversion strategy plots Bollinger Bands and a long-term moving average directly on the price chart. It enters trades when price candles penetrate the outer Bollinger Bands beyond a user-defined body percentage, anticipating a price reversal. Entries
This strategy combines Arnaud Legoux Moving Average percentage price change calculations with an adaptive Gaussian Moving Average to generate trend-following signals. Long and short entries are triggered when the ALMA change calculation crosses above or below
This strategy provides reusable building blocks for entries, exits, and risk management in Pine Script. It calculates profit and loss units, applies session filtering based on timezone, and handles backtest date ranges. It includes risk settings like stop loss
Identifies the 80-20 candlestick setup, triggering when a bar opens in the lower 20% of its total range and closes in the upper 20%, or opens in the upper 20% and closes in the lower 20%. Blue and red arrows plot above qualifying bars directly on the price cha
This strategy executes trades based on price interactions with standard Bollinger Bands plotted on the price chart. It calculates a simple moving average basis line along with upper and lower standard deviation bands. Long entries are triggered when price cros
This script provides a foundational starter template for building custom Pine Script v5 trading strategies. It overlays on the main price chart and establishes the scaffolding for long and short positions, including bracketed exit orders. Configurable date inp
This overlay strategy trades Donchian breakouts in either direction. The first unit is sized from a risk percent of equity and an ATR-based initial stop; later units are added at fixed ATR steps and are progressively smaller, up to four units. Optional profit
Divergenced J001 is a price-chart strategy that finds squeeze-momentum divergences and can send Zignaly alert messages. It shorts when a light-green to dark-green squeeze section shows a smaller value while price is higher, and longs on the opposite red-sectio
This trading strategy detects key support and resistance zones on the price chart by identifying candle rejection wicks over a customizable lookback period. It filters potential trades using an Exponential Moving Average (EMA), Change in Status/Direction (CISD
This overlay strategy combines RSI, which can be read from another timeframe, with fast and slow exponential moving averages. It sequences overbought and oversold crosses with returns into a base zone, optionally counting those events only when the moving-aver
This long-only strategy overlays 50-period exponential moving averages taken from the daily and four-hour timeframes. It opens a long trade when price is above the daily average, crosses above the four-hour average, and closes above the previous bar high. Exit
This strategy trades on the price chart using a fast and slow exponential moving average crossover. It enters long when the fast EMA crosses above the slow EMA and short when it crosses below, but only during the London or New York session in GMT. Each entry s
This strategy combines the Stochastic Oscillator with Chaikin Money Flow (CMF) to generate trading signals on the price chart. It enters long positions when the Stochastic %K line crosses above the %D line while CMF is above 0.1, and enters short positions on
This strategy executes gold trades by combining multiple exponential moving averages with RSI, Stochastic oscillator, and ATR indicators alongside Fibonacci zones. It triggers confirmed buy or sell positions and optional scalp legs based on trend direction and
Alpy Kazan combines a WaveTrend oscillator with a Bollinger Bands and Keltner Channels squeeze detector. It plots the WaveTrend lines, overbought and oversold boundary levels, and visual crossover markers in a separate pane, while highlighting crossover bars o
The strategy combines support and resistance levels with RSI or MFI momentum oscillators, optional WaveTrend indicators, and Bollinger Bands filters. Strategy logic evaluates trade signals on either Heikin Ashi or standard candle data to execute DCA entries wi
TrendSignal + Supertrend Strategy detects trend changes using a custom indicator based on recent high-low ranges and a percentage K value calculated from RISK input. It sets buy or sell signals when the trend shifts. Supertrend is overlaid using ATR period and
A strategy that scores signals from ten sources: RSI, MACD, Bollinger Bands, head and shoulders, wedges, multiple tops and bottoms, candlestick reversals, pivot support and resistance, volume spikes and an EMA ribbon filter. A trade needs a minimum pattern sco
A moving average crossover strategy where the average type is chosen in the settings: EMA, SMA, WMA or HMA. A fast and a slow average are calculated on a selectable price source. It enters long when the fast line crosses above the slow line and short on the op
A strategy that estimates bull, bear and neutral state probabilities from recent price transitions and trades only when they pass minimum levels. It adds previous day high and low breakout entries and filters, swing liquidity levels, and an optional 50 to 61.8
This Pine Script v6 strategy plots fast and slow moving average crossovers on the price chart to generate buy and sell signals. It calculates EMA or alternative MA types on a selectable source and triggers entries when the lines cross, subject to confluence fi
Corpus EMA Cross is a strategy that plots two exponential moving averages on the price chart. The fast EMA uses a length of 12 and the slow EMA uses 26. It generates long entries on the crossover of the fast line above the slow line and short entries on the cr
This strategy plots exponential moving averages of 10, 55 and 200 on the price chart and shades the background when a smoothed stochastic is oversold or overbought. It opens long positions when the stochastic K line crosses above D below the oversold level, in
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.