This Pine Script strategy demonstrates a basic moving average crossover backtest overlay on the main price chart. It plots a 20-period simple moving average and a 60-period simple moving average. The script enters a long position of 1,000 units when the faster
This strategy overlays three exponential moving averages on the price chart, with periods of 9, 50, and 200. It calculates a MACD histogram from a 1-minute timeframe, applies Bollinger Bands to the histogram, and tracks two RSI oscillators of different lengths
This strategy identifies breakout entries on low-timeframe cryptocurrency charts by combining rolling pivot support and resistance levels with a smoothed trend filter and a 3-period exponential moving average. Long and short entries trigger when price momentum
This strategy calculates the Relative Strength Index (RSI) alongside Bollinger Bands to identify oversold bounce opportunities on fast timeframes. Drawn in a separate pane, it plots the RSI oscillator with customizable overbought and oversold thresholds. A lon
This strategy implements the classic Turtle System 1 fast breakout model on the price chart. It calculates 20-bar Donchian channel highs and lows for trade entries and 10-bar bands for exits, utilizing ATR for position sizing and trailing stops. The strategy e
Divergenced C002 is a trading strategy that identifies entry points using price divergences against the Squeeze Momentum Indicator. It compares price moves across Squeeze Momentum color changes to trigger long or short positions. Exits are generated by Curie c
This strategy scaffold calculates a standard Volume Weighted Average Price (VWAP) alongside upper and lower volatility bands set 1.5 ATRs away. It generates long entry signals when a confirmed bar closes below the lower band and short entry signals when a conf
This strategy calculates the Relative Strength Index (RSI) and identifies bullish and bearish divergences using RSI and price pivot points. It plots the RSI oscillator, overbought and oversold threshold lines, and divergence markers in a separate pane. A long
This strategy identifies momentum breakouts by detecting sudden volume spikes relative to a simple moving average alongside rapid bar price gains. It plots signal triangles and volume spike markers directly on the price chart. When volume and bar return exceed
This strategy combines the Moving Average Convergence Divergence oscillator with an Exponential Moving Average trend filter. It enters long positions when the MACD histogram crosses above zero while price stays above the long-term EMA filter. Long trades close
This strategy seeks long entries by combining moving average trend filters with VMC Cipher momentum and money flow indicators. It identifies bullish trend alignment when price trades above the 200 EMA and records recent pullbacks to the 50 EMA, confirmed by po
This strategy evaluates price movement over a specified lookback period against custom percentage or price change thresholds. It generates buy or sell signals when movement rules are met, overlaid directly on the price chart. Users can customize entry criteria
This strategy combines triple exponential moving averages, RSI, Stochastic, ATR, and Fibonacci levels to generate confirmation and scalp entry signals tailored for XAUUSD. It evaluates M15 overbought and oversold conditions alongside rejection wicks and trend
Alper is a separate-pane momentum trading strategy that combines WaveTrend oscillator crossovers with dual RSI divergence. It calculates fast and slow RSI metrics alongside WaveTrend indicator lines to identify momentum shifts. The strategy enters long positio
This strategy plots EMA 25 in yellow and EMA 100 in green on the price chart. It generates buy signals on EMA 25 crossing above EMA 100 when ATR length 14 rises over two prior bars and volume exceeds prior bar. It opens a long position of 1 unit on signal. It
This strategy executes trades based on the initial MACD line crossover in the direction of the long-term trend defined by a 200 EMA filter. Position risk is calculated using a lookback swing high or low padded by an ATR multiple. The trade features a dual take
This strategy overlays Parabolic SAR, linear regression channels, and Supertrend directly on the price chart. It identifies directional momentum shifts when Parabolic SAR flips, issuing buy and sell signals. Position exits are controlled using customizable per
This strategy tracks price breakouts using Donchian Channels calculated from the highest highs and lowest lows over configurable lookback periods. It plots the upper, lower, and mid entry channels directly on the price chart. A long entry triggers when the bar
This strategy plots Keltner Channels on ETHUSDT 4H charts to detect breakouts with volatility measurement. It draws the 200-period EMA trend line along with upper and lower Keltner bands calculated from 20-period EMA and 14-period ATR. Long entries trigger on
A long-only strategy for one-minute spot charts that reads Heikin-Ashi candles for its pattern logic while pricing orders on the real candles. It looks for a pullback in an uptrend above a 100-period EMA, with doji candles whose bodies are small relative to th
This strategy calculates the Z-score divergence of return spreads between two forex assets such as EURUSD and GBPUSD. It enters long positions when the Z-score falls below the entry threshold with confirmed uptrend from EMA, RSI and MACD filters plus sufficien
A momentum strategy on the price chart that combines RSI, MACD histogram, ADX with directional lines and a large-candle test against ATR. Bullish and bearish momentum states require all of these to agree and exclude overbought or oversold readings. It also rea
This strategy combines trend, volatility, and multi-oscillator filters to generate directional trades. It calculates an Arnaud Legoux Moving Average (ALMA), Keltner Channels, Bollinger Band width, the Chande Momentum Oscillator (CMO), Money Flow Index (MFI), a
A strategy that enters only when several conditions agree. For longs, a 50 EMA above a 200 EMA, close above the fast EMA, RSI between 50 and 70, and a positive and rising MACD histogram with MACD above signal. Shorts use the mirrored rules. The stop is an ATR
Trend Surfer Strategy (Full Configurable) is a trend-following trading strategy displayed on the main price chart. It pairs multi-timeframe exponential moving averages with a relative strength index and a stochastic oscillator. The script pulls higher-timefram
This strategy combines two Supertrend indicators with different factors and periods to identify trend direction on the price chart. The primary Supertrend (factor 3, period 10) signals flips for entries, confirmed optionally by a faster Supertrend (factor 2, p
A strategy that takes buy and sell signals from up to five external indicators, each wired in through a source input and given a name and a usage mode such as entry, exit or observe. A fixed contract quantity sets position size, an ATR length is configurable,
An unfinished strategy template on the price chart. It sizes positions from a share of equity and sets up long and short entries with a stop loss and take profit placed as percentages of the entry price, defaulting to 3 and 30. The indicator, input and conditi
A Pine v4 strategy built on the classic ATR Supertrend, with the ATR calculated either by Wilder's method or a simple moving average. It plots up and down trend lines with buy and sell labels, optional highlight fills, and alert conditions for direction change
A Pine v4 strategy built on a session VWAP with percentage bands above and below. It enters long on a green candle opening above VWAP and short on a red one opening below it, ignoring doji candles through a body-size precision setting. A long that reaches the
This strategy places buy-stop and sell-stop orders around the opening-session high and low, offset by a user-defined pip gap, and only allows those orders during a separate trading session. It exits with a fixed or ATR-based stop loss and a matching take-profi
This strategy plots an RSI line in a separate pane and calculates Bollinger Bands and band width without showing those plots. It enters long when price crosses under the lower band and RSI is at or below the buy level. When price crosses the upper band and RSI
This strategy executes trend-following breakout trades using asymmetric parameters for long and short directions. It calculates Donchian channels and ATR (N) to adapt to directional market speeds. Long positions utilize a longer entry lookback and tighter ATR
Divergenced D002 is a trading strategy designed to identify entries based on price and Squeeze Momentum indicator divergences. It triggers long or short positions when histogram color transitions conflict with price higher highs or lower lows. Position exits a
This strategy plots a fast and a slow simple moving average on the price chart and enters long when the fast average crosses above the slow average, or short when it crosses below. Opposite crosses reverse the position. Inputs change the two lengths, leverage,
MA+ATR+ADX+PP Strategy is a trend-following system that plots a simple moving average with an ATR-based envelope directly on the main price chart. It changes trend state to bullish when the low exceeds the upper envelope, and bearish when the high breaks below
The VWAP + Volume strategy trades crossovers of the Volume Weighted Average Price confirmed by volume surges. It enters long or short positions when the closing price crosses above or below the VWAP line while volume exceeds its 20-period simple moving average
This strategy plots a short and a long exponential moving average on the price chart and compares them. It enters long after the short average stays above the long average for ten bars, and enters short after the opposite holds for ten bars. It tries to close
This strategy combines optional Hull moving average, SuperTrend, and MACD conditions in a separate pane. It marks HMA rising or falling over a chosen period and SuperTrend long or short direction, and it treats MACD above or below its signal line as buy or sel
This strategy executes short trades based on trend confirmation and momentum exhaustion. It calculates a 50-period and 200-period EMA, requiring price to trade below the 200 EMA with a recent upward pullback through the 50 EMA. Short entries are further filter
This multi-mode trading strategy executes trades on the price chart using selectable technical models, including RSI-2 mean reversion, SuperTrend, MACD crossovers, Triple EMA, Bollinger Bands, or a combined multi-indicator approach. It filters trade entries us
This strategy calculates fast and slow exponential moving averages alongside an Average True Range value. It enters a long position when the fast EMA crosses above the slow EMA, and enters a short position on a cross under unless long-only mode is active. Stop
This Pine Script v5 strategy calculates a simple moving average of a configurable source over a user-defined length. It generates long entries when close crosses above the moving average and short entries when close crosses below it. The strategy draws on the
This strategy plots a fast, a slow and a derived average moving average on the price chart, each selectable as an EMA or SMA. A long entry requires a recent fast-over-slow cross outside the last four bars, price above the fast and the longer trend average, and
Simple Alert Strategy is a moving-average crossover system designed for automated webhook alerting. It computes a 3-period simple moving average on closing prices directly on the main chart. The strategy enters a long position when the price crosses above the
This strategy executes trend-following and scalp trades on gold using EMA alignment, RSI, Stochastic oscillators, and M15 rejection triggers. Entries are confirmed through multi-indicator filters, Fibonacci zones, and EMA chase limits. Exits utilize swing high
Alper is a Pine Script v4 strategy that plots a WaveTrend oscillator in a separate pane and colors bars when the two WaveTrend lines cross. It requests one-minute Binance DOGE perpetual prices, builds fast and slow RSI values, and enters long or short only ins
NEODCA is a Dollar Cost Averaging (DCA) strategy that combines MACD oscillators with volume-weighted moving average (VWMA) filters to execute trades. It supports long and short modes, placing base orders followed by up to eight safety orders scaled by multipli
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.