This script executes a pivot reversal strategy while displaying a comprehensive monthly and yearly returns table on the chart. It calculates pivot high and low levels using user-defined left and right bar parameters, placing stop orders to enter long or short
PineForge — Sextant CCI HMA is a trend-following momentum strategy that combines the Commodity Channel Index with a Hull Moving Average filter. The strategy opens long positions when the CCI crosses above a specified entry level, provided the HMA is rising and
Ezieh Str.v2 is a momentum and volatility strategy combining Bollinger Bands with two distinct RSI periods to identify trading opportunities. It opens long positions when a fast RSI crosses above an oversold threshold while price crosses over the lower Bolling
This overlay strategy keeps a bounded deque of one-bar rate-of-change values and measures how many are positive and their average. It enters one long position of two units when the positive share rises through the minimum share, the average return is positive,
Fibs Limit Only is an automated limit order strategy designed for crypto futures trading. It calculates pivot highs and lows over a user-defined length to establish Fibonacci retracement and extension levels. Traders select a specific Fibonacci tier to place l
This strategy plots the Trend EMA and Deep Terrace levels on the price chart to identify rising trends. It signals long pyramid entries in staged terraces when price crosses above the first, second, or third ATR-based levels during an upward trend, with up to
This strategy runs on the price chart under the title golden buy. It sets cash order size and a percent commission. Traders adjust an ATR stop-loss multiplier and a risk-reward ratio, and they can enable shorts or divergence filters. The visible inputs configu
This strategy computes the MACD with user-defined fast, slow, and signal lengths, then plots the MACD line, signal line, and histogram in a separate pane. It generates long entries on MACD crossover and short entries on MACD crossunder, but restricts signals t
Calculates dynamic entry and exit price levels based on rolling lowest and highest bars with optional Average True Range (ATR) offsets. It places limit orders to enter long positions at the lowest price level and exits at the highest price level. An optional t
Pivot Array Breakout is a breakout strategy that tracks dynamic pivot high resistance and pivot low support levels using array buffers. When a new pivot is identified, it is added to a size-limited array while older levels are removed. The strategy enters a lo
This strategy enters long trades based on standard Stochastic oscillator conditions combined with a 60-minute higher-timeframe trend filter. It opens positions when lower-timeframe Stochastic %D is below a buy threshold and both lower and higher-timeframe %D l
A strategy that detects confirmed swing highs and lows using left and right bar counts, remembers the latest of each, and trades breaks of them. It goes long when the close exceeds the last confirmed pivot high and short when the close falls below the last con
Line Break Strategy generates trading signals by fetching Line Break chart data using a synthetic ticker context. It plots custom Line Break candlesticks in a separate pane and checks whether the line break bar closed higher or lower than its open. The strateg
A minimal strategy using the built-in Traditional pivot point levels. Each bar's levels are computed from the previous bar's high, low and close. It enters long when the close crosses above the first resistance level and short when it crosses below the first s
MA5X_L is a long-only trend-following momentum strategy built on weighted and simple moving averages combined with an ATR trailing exit. It calculates four moving averages (short, medium, long, extra-long WMA/SMA) and enters long trades when the short WMA cros
A minimal strategy that compares the Price Volume Trend indicator with a 21-period EMA of itself. It enters long when PVT crosses above the average and short when it crosses below, reversing the position each time. It has no adjustable inputs, no stop loss and
Order At Specified Time is a TradingView strategy that executes trades at a designated time of day within a specified backtest date range. At the user-configured UTC hour and minute, the strategy enters a short market position while simultaneously placing a lo
This strategy detects momentum breakouts identified as lightning candles where the absolute candle body size exceeds a user-defined tick threshold. It enters long positions on large bullish candles and short positions on large bearish candles, with an option t
Calculates an exponential moving average of candle ranges scaled by a multiplier to build an adaptive, stateful trend filter. It updates dynamic upper and lower bands that drift with price action and track market direction. The strategy enters long when the fi
This strategy overlays Supertrend-style ATR trailing stop levels on the price chart alongside multi-period moving averages, volume metrics, and Bollinger Bands. It flags trend direction changes using an ATR offset channel, plotting buy and sell signals directl
Calculates RSI and MACD indicators to evaluate trade signals parsed dynamically from an input text rule string. It uses regular expression matching to determine whether an RSI threshold rule, a MACD bullish signal line rule, or both must be satisfied. When all
This strategy draws on the price chart and enters long when the open crosses above the Parabolic SAR and is above a 50-period simple moving average of close. It enters short on the opposite cross below that average. Offset prices of 0.5 percent and 1.5 percent
A minimal strategy that trades the 14-period RSI crossing the 50 midline. It enters long when RSI crosses up through 50 and short when it crosses down through 50, reversing the position on each opposite signal so only one direction is held at a time. It has no
This strategy calculates a simple moving average of closing prices and executes a basic trend-following system on the main chart. It enters a long position when the closing price crosses above the moving average and exits the position when the price crosses be
This strategy combines Ichimoku Cloud analysis with Linear Regression alongside momentum and trend indicators, including MACD, RSI, Stochastic RSI, and Supertrend. It executes long and short entries when an aggregate weighted score of sub-strategies crosses a
A strategy that smooths the RSI with an EMA and trades crossovers between the two. It enters long when RSI crosses above its signal line while RSI is below 50, and short when RSI crosses below its signal while RSI is above 50. RSI length and signal length are
This strategy overlays buy and sell signals on the price chart by combining selectable RSI conditions, ADX trend rules, and EMA pullback filters. Users can configure the RSI mode, toggle global EMA trend filtering, enforce EMA pullback requirements, and limit
A minimal strategy that stays long while two conditions hold together: a 14-period RSI above 50 and the MACD line above its signal line, using 12, 26 and 9 settings. When either condition fails, it closes the long position. It never goes short, has no adjustab
This strategy overlays bull and bear setup filters on the price chart. It compares a reference symbol, QQQ by default, on the daily timeframe with hot and cool percent-change levels, then combines RSI, DMI, three simple moving averages, Bollinger Bands, and Ke
Calculates the Relative Strength Index (RSI) and wraps Bollinger Bands directly around the RSI series rather than price. It enters long positions when the RSI drops below its lower band and hooks back upward, and enters short positions when the RSI exceeds the
This strategy evaluates trade entries by combining Stochastic RSI crossovers with MACD momentum and three exponential moving averages (8, 15, and 50 EMAs). Positions are filtered by directional alignment across indicators and date ranges. Exits are managed via
A test strategy from a reference corpus that builds a VWAP restarted on the first bar of each trading session, using typical price times volume during market hours. It buys one unit when the close crosses above this session VWAP and closes the long when the cl
This strategy combines a smoothed stochastic oscillator with three exponential moving averages. It opens a long position of 1000 units when the stochastic K line crosses above D and the 5-period and 15-period EMAs both cross above the 50-period EMA. It closes
This strategy enters long positions when a 9-period Simple Moving Average (SMA) crosses above a 21-period SMA during active market session hours. To avoid holding positions overnight, it automatically exits all open trades on the final bar of the session using
This strategy demonstrates how to place and cancel pending stop orders with syntax formatted for MT4 and MT5 webhook bridges. It generates entries using a smoothed Stochastic oscillator crossover and crossunder. Stop orders are placed at a configurable tick di
A test strategy from a reference corpus that only trades during regular market hours as reported by the session variable. Within those hours it buys one unit when a 9-period simple moving average crosses above a 21-period one and closes the long on the opposit
This strategy plots three moving averages on the price chart, although the calculations use simple moving averages despite the EMA title. It enters long when the fastest average crosses above the other two and short when it crosses below them, limited to the L
This strategy evaluates premarket session activity on equity markets like NASDAQ. During premarket hours, it enters a long position whenever an intraday candle closes higher than its open price. Once the regular market session opens, the strategy automatically
This overlay strategy is aimed at silver and combines a length-based simple moving average with a MACD-style histogram. Inside a user-set date window it looks for bullish or bearish candles aligned with the average and a rising or falling histogram. One mode a
A strategy based on the slow stochastic oscillator. Raw %K is smoothed into slow %K and then averaged into %D, with adjustable lengths. It enters long when slow %K crosses above %D while below 80, and short when it crosses below %D while above 20, reversing th
This strategy calculates a smoothed Stochastic RSI oscillator and generates trading signals based on overbought and oversold crossovers. It opens a long position when the %K line crosses above %D while below the oversold threshold, and enters short when %K cro
Range Filter is a chart strategy that estimates a smoothed price range from absolute bar-to-bar changes using two exponential averages and a multiplier. It plots a filtered price line plus high and low target bands on the price chart, colors bars by filter dir
The Supertrend ADX Filter strategy calculates Supertrend direction and ADX strength to generate trend signals. It plots the Supertrend line on the price chart in green for bullish and red for bearish. Long entries trigger on Supertrend direction change to bull
The RSI Strategy calculates the Relative Strength Index with a user-defined length. It generates long entries on crossover above the oversold threshold and short entries on crossover below the overbought threshold. The strategy overlays signals directly on the
Swing Pivot ATR is a trend-breakout strategy that identifies swing highs and lows using pivot points and enters positions on price breakouts. It tracks historical pivot high and low levels, plotting them as steplines directly on the price chart. When price clo
This strategy evaluates intraday trading execution for US equities during regular trading hours while handling overnight gaps. It calculates a 14-period Relative Strength Index (RSI) across price history without daily resets. Trades are gated by the market ses
A long-only strategy that measures the rate of change of the Negative Volume Index and Positive Volume Index over separate windows. It enters long when both growth rates first exceed their minimum thresholds and price is above a trend EMA. It exits when either
The strategy tests untested TA classes including ALMA, SAR and rolling correlation under bar magnifier. It enters long only when ALMA crosses above close, SAR flips below price and 20-period correlation of close and volume is positive. It exits long when SAR f
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.