This strategy calculates a fast EMA, a slow EMA, and an ATR value to implement a trend-following trading model with cash position sizing. It enters long trades when the fast EMA crosses above the slow EMA. Positions are exited when the fast EMA crosses below t
This strategy simulates a buy-and-hold or short-and-hold position across a user-defined date window. It enters a single long or short position when the bar time reaches the start date and holds that position continuously until the end date passes, where it tri
Session Wicks is a price-chart strategy that combines a Heikin Ashi weighted moving average, an RSI compared with its moving average, and a smoothed stochastic. Bullish and bearish states come from the Heikin Ashi average falling or rising and from RSI sitting
The PineForge Compass Partial Ladder strategy identifies trend-following opportunities using a fast and slow Exponential Moving Average (EMA) crossover. Upon entering a long position, the strategy manages risk and profit targets using Average True Range (ATR)
This strategy tests calendar-day buy-and-hold timing on the price chart. Inside a user-set start and end date, it opens a long entry whenever the calendar day of the month matches the entry day. If the exit-day option is on, it closes every position on the day
PineForge — Constellation Bands is a mean-reversion strategy displayed on the price chart. It calculates standard Bollinger Bands alongside price volatility. A long entry triggers when the close price crosses back above the lower band while remaining below the
This dollar-cost averaging backtesting strategy executes periodic buy entries within a user-defined date window. The script calculates position size based on a fixed USD amount input for each executed trade, accumulating long positions at regular intervals. On
This strategy uses RSI with bull and bear threshold crossovers to trade opposite market pairs. It enters long when RSI crosses above 58 and short when below 42, automatically closing the opposite position first. Entry size is 8 percent of equity with 0.05 perc
This strategy simulates a monthly dollar-cost averaging investment plan over a user-defined date range. It executes an initial long position at the start of the date window and continues to add long entries at the start of each subsequent month or year. Positi
This strategy models market regimes using principal variance concentration between price and volume. It builds a 2x2 correlation matrix from price and volume rate-of-change, then calculates its eigenvalues. It enters long positions when the principal eigenvalu
Calculates a historical dip level based on the lowest low over a specified lookback period. It enters a long strategy position when the current bar close falls below the previous dip level. Positions are managed with take profit and stop loss exits placed at f
This strategy plots adaptive upper and lower triggers on the price chart. It builds the channel from the highest high and lowest low over channelLength bars, then adjusts the width by the average logarithmic price movement captured across the lookback period u
Buy The Dips - MA200 Optimised is a mean-reversion strategy that measures short-term percentage price changes alongside a simple moving average trend filter. It opens long positions when price experiences a steep drop exceeding three percent while remaining ab
The Pine Script strategy calculates fast and slow EMAs along with RSI and ATR on the price chart. It enters long positions when the configuration string matches trend confirmation, fast EMA crosses above slow EMA, and RSI exceeds a threshold. It exits on fast-
This trend-following strategy identifies buying opportunities during bullish pullbacks on the price chart. It defines a bull market when the 50-period simple moving average trades above the 200-period moving average. Long entries trigger when the RSI drops bel
This strategy calculates trend direction using a multi-timeframe Supertrend formula based on ATR and median price, paired with RSI and Bollinger Band indicators. It enters positions when the Supertrend flips direction, plotting uptrend and downtrend bands with
This strategy plots a trend EMA and a working pullback limit on the price chart. It enters long only when flat, the EMA is rising, and close is above the EMA, placing a limit buy a set fraction of ATR below the EMA. If that trend condition fails while still fl
This strategy plots on the price chart and opens one buy-and-hold position between a user-chosen start and end time. By default it enters long with 100 percent of equity when the bar time is inside that window; a boolean input switches the same entry to short.
The Kiln Power Efficiency strategy computes an EMA trend line and a squared displacement efficiency metric from price moves relative to ATR. It plots both on the price chart. The strategy enters long trades on EMA crossover above the trend when efficiency exce
This strategy executes trend-following breakout trades based on Donchian channels, moving average alignment, and long-term price extremes. It evaluates alignment across seven moving average periods alongside multi-period and yearly high or low filters. Long po
This strategy plots exponential moving averages of length 1, 15, and 21 on the price chart and also calculates a length-5 simple moving average. It enters long when the length-1 average crosses above the length-15 average and the close is above the previous cl
This strategy enters long when the fast EMA crosses above the slow EMA and RSI exceeds the entry threshold. It closes when the fast EMA crosses under the slow EMA, RSI falls below the exit threshold, or the open position reaches the maximum hold bars. A stop s
This strategy calculates higher-timeframe pivot points, defaulting to Fibonacci calculations across configurable resolutions or symbol-based multipliers. It evaluates price interactions against these pivot levels to execute trades according to the selected tra
This strategy detects daily opening gaps and trades them on the price chart. It marks an up or down gap from the current open and close versus the previous bar, then stores the prior extreme as the fill level. By default it buys down gaps and shorts up gaps, e
This strategy plots a smoothed historical price anchor on the price chart by averaging historical closing prices. It enters a long position when price crosses under an entry threshold set below the smoothed anchor. The trade closes when price crosses back abov
BuyTheDip is a strategy script that identifies upward moving average alignments across multiple timeframes using SMA, EMA, HMA, RMA, VWMA or WMA types. It plots Bollinger Bands on the price chart and enters long positions when alignment scores reach 1 and pric
This strategy demonstrates position sizing with leverage and margin in Pine Script using a Stochastic Oscillator indicator. It plots the %K and %D lines in a separate pane with upper and lower threshold levels. Long entries trigger when %K crosses above %D bel
This strategy trades long only on the price chart. It enters when a fast exponential moving average crosses above a slower one and sizes the next order from the last closed trade: the recovery quantity after a negative result and the full quantity otherwise. I
This strategy plots an Ichimoku cloud on the price chart and opens long or short trades from a selectable crossover. Signal choices cover Tenkan and Kijun, price against those lines or the cloud, and cloud color, with optional confirmation that price is beyond
This strategy plots in a separate pane and tests a selected oscillator with one of six entry logics: moving average, moving-average crossover, zero cross, extremes, mean reversion, or take profit. Users scale and time-adjust one of three oscillators and can li
The PineForge — Meridian DMI Regime strategy evaluates trend direction and momentum using the Directional Movement Index, Average Directional Index, and an Exponential Moving Average. It enters long trades when +DI crosses above -DI, provided ADX exceeds the d
This strategy evaluates multiple MACD entry techniques on the price chart. It calculates standard or SMA-based MACD line, signal line, and histogram values, offering selectable trigger models including continuation crosses, reversal crosses, histogram zero cro
The PMax Explorer strategy calculates the Profit Maximizer indicator by applying an ATR trailing stop band to various moving average types including EMA, VAR, ZLEMA, and TSF. It plots the selected moving average and PMax line directly on the price chart to tri
PineForge — Mosaic Map Regime is a trend-following strategy that dynamically scales trading signals using volatility regimes. It calculates an Exponential Moving Average and ATR, using a map to assign risk weights based on whether ATR percentage exceeds an exp
The CDC Action Zone V.3 Test strategy calculates fast and slow exponential moving averages to generate trend-following buy and sell signals. It plots EMA lines, custom bar colors, buy and sell labels, and a visual ribbon directly on the main price chart. The s
This strategy draws a moving-average channel on the price chart and places stop entries when the source crosses the upper or lower band. Long and short orders can be cancelled if price returns through the average or reaches the stored breakout price. Optional
Orbit MTF Trend is a multi-timeframe strategy that plots higher-timeframe and local exponential moving averages on the price chart. It generates long entries on local EMA crossover above the higher EMA and closes positions on the reverse crossover. Risk manage
Crypto Price Scalper is a long-only trading strategy designed for cryptocurrency charts. It combines a custom price-range oscillator, calculated from the highest high and lowest low over a user-defined candle period, with the Vortex Indicator. A long trade ope
This strategy combines two sets of Bollinger Bands with a Laguerre RSI oscillator plotted on the price chart. It generates buy and sell signals when price touches the upper or lower bands or zones. The strategy allows enabling or disabling entries and includes
Grid Like Strategy calculates a dynamic baseline overlay that steps up or down whenever price moves beyond a defined point threshold. It enters long positions when the baseline moves upward and short positions when it moves downward, automatically placing take
The PineForge Prism Matrix Vote strategy plots two EMAs on the price chart and calculates a vote score from four factors: EMA crossover, price above fast EMA, RSI above 52, and ATR relative to close. It enters long positions when the vote score crosses above a
This strategy plots a mapped EMA-and-standard-deviation difference in a separate pane and trades moving-average crossovers filtered by that line. After the 50-period EMA crosses the 200-period SMA, it waits for price to stay on the crossover side and for the m
The Grover Llorens Activator strategy calculates a custom volatility trailing stop line based on Average True Range and price movement. It generates buy signals when price crosses above the activator line and short signals when price crosses below. Positions a
This strategy enters one long position when a fast exponential moving average crosses above a slow one. While the trade is open, it keeps an ATR stop and target under the same exit identifier. For the first revision hold bars those distances stay wide; afterwa
This strategy trades moving-average crossovers on the price chart. It buys when a fast exponential moving average crosses above a slow one in an uptrend, and sells on the opposite cross in a downtrend. An optional source average and a longer trend filter, each
This strategy executes long trades on cryptocurrency charts using initial entry signals derived from MACD, Stochastic RSI, or ATR channel logic. When an active position drops below a designated percentage threshold, the strategy automatically adds to the trade
This strategy identifies bullish trends using a fast EMA crossing above a slow EMA to enter long positions when no trade is open. Once entered it attaches a stop loss and limit order using ATR multiplied by the input values of 1.7 and 2.2 respectively. The fas
This strategy overlays a Cipher B style WaveTrend study on the price chart and is titled for Ethereum buy alerts aimed at 3Commas. It calculates a WaveTrend channel and a short moving average, and can mark buy, sell, gold, and divergence dots. Settings change
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.