This overlay strategy classifies trend from a higher-timeframe Heikin Ashi close and an exponential moving average of that close. When the confirmed price is above the average it enters long and closes any short; when price is below it enters short and closes
This script provides a standardized template for building and testing trading strategies in Pine Script v4. It includes built-in risk management modules such as backtest date filtering, trade direction toggles (long-only, short-only, or flipped), signal-count
This strategy enters long when a 20-period EMA crosses above a 50-period EMA and price is above the previous closed daily close. It sizes the position from a percentage of equity and the ATR stop distance, then exits with an ATR stop and a reward-to-risk limit
Stella's SuperTrend Basic is a trend-following strategy that calculates the SuperTrend indicator directly on the price chart. It enters long positions when the price crosses above the SuperTrend line and switches to short positions when the price crosses below
This strategy plots long and short markers on the price chart. It builds a composite index from RSI change and a short RSI average, then requires that index, a one-minute cumulative volume delta, and a relative volatility index to agree. EMA, SMA, and VWAP rel
This intraday strategy calculates fast, mid, and slow Simple Moving Averages to confirm alignment alongside steady bar accumulation on short timeframes. It filters entries by rejecting large candle spikes and restricting execution to a defined morning session
This strategy calculates up to three Double Exponential Moving Averages (DEMA) to generate buy and sell signals based on crossover and crossunder conditions. It plots the moving average lines directly on the price chart. The indicator includes input controls f
This mean-reversion trading strategy targets XAUUSD during the Asian trading session. It generates buy signals when price touches the lower Bollinger Band and RSI is oversold, and sell signals when price reaches the upper band and RSI is overbought. Trades are
This strategy calculates a rolling volume-weighted average price and Chris Moody's Williams Vix Fix to detect market bottoms and oversold volatility spikes. It plots in a separate pane and colors chart bars based on filtered exhaustion criteria and price actio
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 on a cross below. Longs also require ADX above a threshold, RSI below 65, ATR above a minimum, and a b
This strategy enters long when the close breaks above the prior lookback high and volume exceeds its simple moving average, but only if a VIX regime score is at least three. The score counts whether the VIX to three-month VIX ratio and the VIX level sit below
This strategy draws on the price chart and combines a momentum zigzag, a custom QQE built from RSI, ADX directional strength, an SSL filter, and a coefficient-of-variation weighted average. Box period, deviation, and threshold inputs set the box filter, while
This strategy overlays SuperTrend, a QQE MOD oscillator, and an A-V2 moving average on the price chart. SuperTrend uses an ATR period and factor to plot a trend line and flags flips between up and down trends. QQE MOD smooths RSI, builds fast ATR-style bands,
This strategy enters long positions when the fast SMA of 10 periods crosses above the slow SMA of 30 periods. It calculates the trailing stop price as the position average price multiplied by one minus the trailing stop percentage divided by 100. The strategy
This strategy looks for three prior bars moving the same way with successively smaller bodies, followed by a current bar that closes the other way. It enters long when those prior bars are bearish and the current bar is bullish. A short entry is present only a
This strategy plots SuperTrend lines on the price chart using ATR period and multiplier settings to identify trend direction and generate buy and sell signals. It integrates with Algomojo automation to automatically execute trades via API calls to supported br
This Pine Script strategy identifies and plots horizontal support levels by searching for price clusters across historical price lows. It scans a configurable number of past bars to group nearby low prices within a user-defined tick deviation. When a price lev
This strategy identifies sandwich patterns using RSI, ALMA, and Stochastic indicators. It plots RSI, Choppiness Index (CI), Stochastic K, and D in a separate pane. Long entries trigger when RSI is above CI, both Stochastic lines fall between CI and RSI, and K
A simulated leveraged perpetual futures strategy with three modes in one script. Direction comes from a 50-bar SMA or a 21 and 55 EMA cross, and exits use either a fixed take profit and hard stop or an ATR chandelier trail. Leverage is capped, with maintenance
A strategy version of the Ghost Alpha overlay, using the same Hull band, TRAMA, Keltner bands, moving averages, swing structure, Williams %R exhaustion and squeeze components with a minimum grade filter. The strategy settings use percent-of-equity sizing at th
A strategy that detects a volatility squeeze when Bollinger Bands sit inside Keltner Channels. After a squeeze, it waits for the bands to expand outside the channels, then enters long if a linear regression momentum value is positive or short if it is negative
Calculates normalized momentum against a threshold and combines it with an exponential moving average trend filter. It triggers trades in the direction of the EMA trend when momentum surges, subject to optional session, weekend, and cooldown filters. Exits are
A strategy that classifies each bar as bull or bear trend, bull or bear expansion, chop or neutral using EMA slope, ADX and an ATR ratio, with an optional higher timeframe EMA bias. Depending on the regime it uses trend pullback entries, expansion breakout ent
A Pine v6 strategy for crypto charts that looks for an RSI oversold setup together with a Fibonacci-spaced Bollinger Band setup, then waits for a reclaim as confirmation. Optional filters include a trend moving average on the chart and a higher timeframe, a vo
A long-only spot strategy that enters when all enabled gates agree, each on its own timeframe, 15 minutes by default: Supertrend bullish, RSI above a threshold and below a cap, Volume Flow Indicator above a level, and a support check. One reward-to-risk stop a
A long-only research strategy that enters when momentum, the close divided by the close several bars back minus one, crosses from zero or below to above zero. It exits when momentum turns negative or an ATR-based trailing stop is hit. Signals are decided on co
This strategy detects pin bars within an EMA volatility channel using custom user-defined types. It determines market direction based on price action relative to a 21-period EMA and a body-based ATR range. When a qualifying bullish or bearish pin bar prints in
Kernal Cipher Strategy is a price-chart overlay that backtests the Kernal Cipher confirmed-bar signal engine. It enters long or short at the next bar's open when trend, regime, and oscillator filters agree, then exits on an adaptive ATR stop or an opposite sig
A long-only strategy template meant to send webhook alerts to an external bot. It enters on a fast and slow EMA cross with a volume surge while RSI is below the overbought level, or on an oversold RSI at the lower Bollinger Band with a volume surge. Each entry
A long-only strategy built on two TRAMA adaptive averages, a short one of 20 bars and a long one of 50 bars, each with its own source and optional timeframe. It buys when price crosses above the short average while that average is below the long one, or when t
A trend strategy on the price chart based on an ATR chandelier trailing line with a five-level trend state that marks warning and danger zones as price nears the line. A flip needs a minimum candle body. The multiplier can stay fixed or adapt using a simple me
A long strategy for one-hour or two-hour charts based on structure and volume-price analysis. Side is set by price being inside the value area and at or above the point of control, with an optional higher-timeframe Heikin-Ashi MACD filter. Position size comes
This strategy combines Heikin Ashi candlestick pattern recognition with Smoothed Moving Average (SMMA) trend filtering to generate long and short entries. It detects doji candles, three-line strikes, and engulfing patterns aligned with SMMA trends. Risk manage
Fusion Cipher Strategy is an overlay strategy that scores wave momentum, money flow, VWAP, RSI, Stochastic RSI, ADX, and divergence conditions before opening trades. It enters long when the composite score meets a minimum and the wave is below a pullback thres
This strategy backtests a Candle Range Theory model on the price chart, with variants that also require a CVD divergence, an absorption candle, or both. Entries can be taken on a midline retest, with the stop placed using an ATR buffer. Risk is sized as a perc
This short-only scalping strategy combines multi-timeframe analysis to identify panic selling opportunities. It uses higher-timeframe data (15-minute by default) to establish a downtrend context characterized by strong bearish candles with minimal lower wicks.
A strategy that detects three-candle fair value gaps larger than a set ATR multiple and draws them as boxes on the price chart. It then waits for price to retrace to the gap midpoint and enters with a limit order, optionally only in the direction of a 200 EMA
A long-only futures strategy that simulates Renko bricks on a normal time chart and calculates MACD on the brick closes, which filters out time-based noise. A bullish MACD crossover on the bricks opens a long when price is above a trend SMA by a buffer. Exits
This strategy trades XAUUSD on the one-hour chart. It builds a scaled Vortex oscillator from directional movement and flags bars that leave an upper or lower extreme with a matching candle. Entries also need ADX at or above a set minimum and a swing-pivot tren
A strategy version of the QUANT-OMEGA regime and ensemble signal. It classifies the market with ADX and ATR, scores trend, mean-reversion and breakout signals into a confidence value, and enters only above set thresholds. Stops and targets are ATR multiples. P
A futures strategy for 30-minute charts that fades extreme moves away from a daily-reset VWAP. It looks for price beyond a configurable number of standard deviations from VWAP, a short RSI in oversold or overbought territory, and an ADX reading below a maximum
A long-only calendar strategy for Bitcoin. At a chosen hour on Sunday it compares price with the price recorded at a chosen hour the previous Friday, and enters long when the weekend gain exceeds a minimum percentage. The position is closed at the Friday hour.
The balanced preset of a strategy that routes orders to MetaTrader through connector alert messages. Inputs cover symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk percentage, with higher risk tiers for selected inde
This strategy overlays technical indicators and staged dip-buying logic designed for Bitcoin market cycles. It incorporates a geometric mean indicator, multi-timeframe EMA bands, a customizable range filter, and supply and demand zones directly onto the price
This strategy identifies an Opening Range based on user-defined Eastern Time session parameters and waits for a breakout. Rather than chasing the initial move, it enters positions when price pulls back to retest the Opening Range boundary with volume and EMA t
This strategy builds the high and low of a configurable Asian session and locks that range when the session ends. During the London window it enters long when price closes above the range high plus a pip buffer, or short when it closes below the range low minu
This Pine Script is a strategy that performs tactical dollar cost averaging with periodic cash top-ups. It accumulates a fixed cash amount each bar and deploys the full pile at a bullish crossover above a simple moving average, provided the date is within the
A long-only strategy generated from the TrendLab research project, drawn on the price chart. It uses the built-in Supertrend with an ATR period of 18 and a multiplier of 4.3. It buys when the Supertrend turns to an uptrend and closes the position when it turns
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.