A strategy built on the Commodity Channel Index, plotted in a separate pane with overbought, oversold and zero lines. It enters long when the CCI crosses up through the oversold level and short when it crosses down through the overbought level. Open positions
A strategy that fits a two-state Kalman filter, tracking position and velocity, to the close price, then builds bands around the filtered price using a multiple of the mean absolute error. It goes long when the close crosses above the upper band and short when
A strategy that trades the trend flips of a volatility band trend line, either on the original flip or on a close crossing the trend level, with entries confirmed on bar close. It can reverse on an opposite signal, filter by session or higher timeframe trend,
This Pine Script strategy detects pin bar patterns on the price chart using body size relative to ATR and shadow conditions for long and short signals. It applies engulfing candle confirmation and filters by EMA trend direction with volatility bands. Multiple
A futures strategy for NSE Nifty that requires agreement from SuperTrend, a 3 and 13 EMA cross with a 21 EMA trend, MACD, RSI, ADX, volume and relative strength against a benchmark. Entries come in two stages with a larger setup ladder, so it can add to a posi
This long-only strategy buys short-term oversold dips only inside a strong uptrend: price above a rising 200-period SMA and within a set percentage of its one-year high. Entry needs a two-period RSI below a threshold, then an up-close, and volatility below an
A strategy port of the Fractal Sweep CISD indicator. It detects a sweep of a prior candle's extreme, a return and a CISD confirmation, then enters with a stop at the sweep extreme or CISD level and a take profit at a set R:R multiple. Shallow sweep and closed-
Pivot Breakout is an intraday strategy that identifies breakout opportunities using standard daily floor trader pivot points. It enters trades when price breaks above the calculated daily pivot, provided the prior daily close was within a defined approach dist
A strategy that rests a limit order at the session VWAP when a higher-timeframe 50 and 100 EMA stack shows an uptrend, VWAP is rising and price is above it, with the mirror image for shorts. The stop is an ATR multiple beyond VWAP and the target is a fixed rew
This strategy identifies liquidity sweep scalp entries on lower timeframes by analyzing 15-minute higher-timeframe candles. It verifies a valid range candle using an EMA trend filter, average body size comparison, and wick balance thresholds. In an uptrend, it
A strategy that looks for an inducement sweep: within the last three bars price wicks beyond the latest swing high or low found with a pivot lookback, then closes back inside. A long needs a bullish candle closing above the prior three highs, a short the mirro
A long-only strategy built on a rolling cumulative volume delta estimated from where each bar closes within its range. It enters when buyers dominate by a set margin, price has stayed above a trend SMA for several bars, RSI is above a minimum and the session f
A strategy on the price chart that trades smart money concepts. It detects internal and swing market structure, order blocks and fair value gaps, and can require a fair value gap and a premium or discount position before entering. Optional filters use divergen
A strategy for range box breakouts whose header comments describe changes from an earlier version: a tighter ATR stop, a trailing profit exit that triggers later, an EMA 50 direction filter, a stricter volume filter and a higher box quality score. Orders are f
This long-only strategy automates staged entries and exits based on Bitcoin all-time high drawdowns and percentage gains. It scales into positions across five configured percentage drop levels from the highest recorded price. Profit taking occurs in five parti
This strategy looks for VWAP bounce and rejection trades on the price chart during the regular trading session. It marks a percentage band around session VWAP and enters when a rejection candle meets a minimum wick-to-body ratio and volume exceeds a multiple o
This strategy trades moving-average crossovers only when the higher timeframe agrees. It requests the higher-timeframe close and a trend moving average, then goes long when that trend is bullish and the fast average crosses above the slow average, and short wh
A course example strategy that trades a simple moving average crossover. It goes long when a 14-period SMA crosses above a 28-period SMA and goes short when it crosses below, which reverses any open position. Both averages are plotted on the price chart. The l
A long-only strategy that enters on a close above the prior 20-bar high or on a cross back above a 50 EMA, in both cases only while price is above a 200 EMA. It holds one position sized at 90 percent of equity and exits when the close falls below a Chandelier-
A strategy that combines up to five external buy and sell signal sources, each with its own name and usage mode, and manages positions with ATR-based exits and an optional moving average exit. A switch chooses between faster intrabar exits and safer exits that
An experimental strategy lab script that simulates long, short and a second long position inside a date window, with a daily EMA 12 and EMA 26 cross as the trend filter. It tracks average entry prices, open profit, drawdown, win and loss counts and exchange fe
This strategy plots on the price chart and looks for confirmed pivot highs and lows using left and right lookback bars. It opens a long position when a pivot low is confirmed and a short position when a pivot high is confirmed. Position size defaults to the fu
TOTAL MTPI STRAT M_K is a trend-following crypto market direction strategy that overlays multiple technical indicators on the price chart. It combines custom weighted moving averages, dynamic EMA ribbons, RMTA, and Kijun Sen baselines to evaluate overall marke
This strategy trades flips of the Parabolic SAR. It enters long when price closes above the SAR after being at or below it on the prior bar, and short on the opposite flip. Each trade has an ATR-based stop loss and take profit set by separate multipliers. Acce
This strategy detects divergences in MACD, MACD histogram, and RSI indicators to generate buy and sell signals on the price chart. It supports long and short positions with customizable take-profit and stop-loss percentages. The main settings allow switching b
A trend-following strategy that goes long when price closes above the prior 20-bar high while a fast EMA is above a slow EMA, and short on a close below the prior 20-bar low when the fast EMA is below. Positions close on a 10-bar opposite extreme, and an ATR-b
A strategy-type script for the price chart that plots the high, low and midpoint of the first part of each session, using end hour and minute inputs, and marks those bars. It adds pivot-based support and resistance lines with left and right bar counts, labels
This strategy plots the built-in Supertrend line in green or red on the price chart. When the Supertrend value steps up it enters a long position, and when it steps down it enters a short position, so it stays in the market and reverses on each change. Each or
This strategy follows Supertrend, with a 10-period ATR and a multiplier of three by default. It goes long when price crosses above the Supertrend line and short when price crosses below, and also closes on the opposite cross. In addition, each trade has a perc
Relative Volatility Index is a Pine v5 strategy that calculates a relative volatility index and draws Bollinger Bands, with a basis line and fill, in a separate pane with reference lines at 20 and 80. The index line itself is commented out of the plots. It goe
A Pine v4 strategy that plots VWAP with one percent outer bands and tighter 0.8 percent inner bands. A long begins on a green non-doji candle whose high reaches the inner upper band, and a short on a red one reaching the inner lower band. Inputs set percentage
This strategy enters long when price is above a long moving average and the RSI falls below an oversold level. It closes the long position when the RSI rises above an overbought level or price drops below the moving average. The RSI length, oversold and overbo
Sick Sigma detects extreme statistical standard deviation moves (sigma events) to execute trades directly on the main price chart. The strategy supports both momentum and mean-reversion trading styles. Traders can configure calculation lookback periods, sigma
This overlay strategy backtests a dollar-cost-averaging bot on the price chart. It opens a long base order when the selected oscillator signals: MACD line cross, MFI or RSI below a threshold, or Stochastic RSI K crossing above D. Further orders average down by
This overlay strategy combines a Nadaraya-Watson envelope, an RSI calculation, and an ATR stop-loss finder. With repainting off, it plots yellow upper and lower bands from a Gaussian endpoint estimate; with repainting on, it redraws the envelope on the last ba
This educational strategy demonstrates moving average crossovers filtered by RSI momentum, incorporating ATR-based risk management. It calculates a 10-period SMA, a 30-period SMA, a 14-period RSI, and a 14-period ATR. Long entries trigger when the fast SMA cro
This strategy combines an exponential moving average ribbon with MACD momentum indicators to identify trend-following entry and reversal signals. It draws in a separate pane, tracking MACD signal crossovers, zero-line crosses, and EMA structural alignments. En
The Greeffer RSI Strategy is a basic momentum-based trading strategy that plots a 14-period Relative Strength Index (RSI) in a separate indicator pane. It generates long entry signals when the RSI falls to or below an oversold threshold of 29, and short entry
A trend-following strategy based on Ed Seykota's Donchian breakout framework, modified to take a single full-risk entry instead of pyramiding multiple units. It enters long or short on 55-bar channel breakouts with ATR-based position sizing and an initial stop
Crossing EMAs D is a moving average crossover strategy designed to automate trade execution through Zignaly webhook and email integration. It detects simple moving average crossovers (14-period and 28-period) and formats detailed payload alert messages for cry
This script executes hardcoded historical trade entries and exits based on exact Unix timestamps. Designed for backtesting the Lazarus3 model on Bitfinex BTC-USD 2-hour data from January to February 2018, it places fixed-size buy and sell orders at predetermin
This strategy plots five exponential moving averages of typical price on the price chart and treats a fully ordered stack as a trend signal. It enters long when the averages rise in order or when the 14-period RSI crosses above 60.5, and short on the opposite
This strategy calculates standard Ichimoku Cloud components, including the conversion line, base line, and displaced leading spans. It opens long positions when price resides above a bullish cloud and the conversion line crosses above the base line. Short entr
This strategy identifies bullish and bearish order blocks using an average true range impulse filter and plots corresponding boxes on the price chart. It enters positions on price retests of the order block zones, optionally filtered by an exponential moving a
This strategy generates trading signals based on crossovers between daily session VWAP and a 4-hour 90-period Exponential Moving Average (EMA). When VWAP crosses above the 4-hour EMA, the strategy closes open short positions and enters a long trade with full e
This strategy example builds TradersPost webhook JSON messages and plots them as colored labels on the price chart. At fixed clock hours it shows a long with a trailing-stop percent, an add, a cancel, an exit, a short with a trailing-stop price, a flatten, and
This strategy executes long positions by combining a 200-period EMA trend filter, Stochastic RSI oversold crosses, and Williams Alligator retracements, supplemented by RSI divergence detection. It triggers long entries when the price trades above the 200 EMA w
AG Momentum Breakout is a strategy that identifies continuation signals after pullbacks in trending markets. It filters for uptrends using EMAs and detects recent pullbacks via RSI conditions before entering on RSI crossovers above 50 with ADX confirmation. Th
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.