S_risk is a test strategy designed to demonstrate and verify Pine Script strategy risk management functions. It applies built-in risk rules to restrict order direction to long-only (converting short orders into position closures), caps maximum position sizes,
The script detects pivot highs and lows on the price chart using user-defined left and right bars. It projects future price paths with the golden ratio and calculates intersection points between paths. These intersections are stored in an array for geometric b
This price-chart strategy enters long when a fast EMA crosses above a slow EMA and short when it crosses below, provided optional filters pass. Volume must exceed a multiple of its average, price must sit on the matching side of a higher-timeframe EMA, and the
This strategy buys when price breaks above the upper Bollinger Band and exits by trailing a stop on the lower band. Trades can execute on a wick or a candle close, and an optional fixed-percentage stop can set a tighter initial exit until the lower band catche
Ruckard Squeezed B004 is a trading strategy based on Squeeze Momentum indicator transitions. It tracks section height changes across momentum color cycles using high and low closing moving averages. Entries fire when momentum values breach key threshold levels
HTF Condition Strategy is a multi-timeframe trading strategy that evaluates market structure conditions on both a higher timeframe and the current chart timeframe. Users can configure entry rules combining conditions such as bullish bias, higher lows, or lower
A test strategy from a reference corpus that checks independent exit brackets. It goes long two units when a 9-period EMA crosses above a 21-period EMA and RSI is below 60. Two exit orders each handle one unit, one with a stop and target one ATR from the avera
This Pine Script v6 strategy fixture tests a long-only entry restriction. It splits bars into cycles of 16, enters long at phase 0, tries short entries at phases 4 and 8, closes every position at phase 12, and cancels pending orders at phase 15. An opposing sh
A Fibonacci pullback strategy on the price chart. It finds the highest high and lowest low over a lookback, then draws long and short retracement levels at a chosen ratio from 0.236 to 0.786. A trade is only considered at one specific hour, in the direction of
This strategy calculates standard Bollinger Bands and plots the basis, upper band, and lower band directly on the price chart. It places breakout stop orders, entering long when price crosses above the upper band and short when price falls below the lower band
Ruckard Squeezed C005 is a strategy that identifies divergence patterns based on section height changes in the Squeeze Momentum indicator. It evaluates transitions between histogram color phases to detect momentum peaks for long and short entries. Trades are m
PF poc exit-while-flat false is an overlay strategy designed to test Pine Script execution engine parity. It calculates 9-period and 21-period Exponential Moving Averages (EMA). When a bullish crossover occurs while flat, it places a limit buy order 2% below t
This strategy tests TradingView’s maximum position size risk limit in a separate pane. Every 20 bars it tries a long entry of 40 units, a second long entry, and a long order of 10, then closes all trades, repeats the same idea on the short side, and cancels re
This strategy pairs the Fisher Transform oscillator with a long-term exponential moving average trend filter to execute trend-aligned reversal entries. It enters long when the Fisher line crosses above its trigger line while price remains above the EMA, and en
This strategy combines three technical indicators: the Boom Hunter Pro oscillator, the Hull Suite moving average, and a Volatility Oscillator. It calculates trade entries from indicator conditions, using recent swing high and low lookbacks to set stop loss lev
This strategy demonstrates TradingView exit and entry calls on the price chart. It opens a first long position of five units when flat, then adds a second long of ten units with a stop order ten percent above the average price once size reaches five. When size
This strategy monitors section height changes within the Squeeze Momentum Indicator to identify momentum shifts and divergence entry signals. It uses high and low closing moving averages to evaluate price trends and overlay a visual ribbon on the price chart.
This strategy is a validation probe designed to test order execution behavior when issuing bracket exit orders while flat alongside a pending limit entry. It calculates 9-period and 21-period exponential moving averages on price data. On a bullish EMA crossove
Trend Breakout is a price-chart strategy that builds a simple moving average and upper and lower bands from a multiple of standard deviation. It enters long when close crosses above the upper band and short when close crosses below the lower band. Position siz
Tn Sovereign FlowZone v6 is a strategy script that plots signals on the price chart using EMA crossovers combined with confluence scoring. The script calculates confluenceScore from trend EMA, volume SMA comparison, and RSI momentum to confirm EMA20/50 crossov
This strategy calculates normalized price or on-balance volume differentials across a user-defined timeframe and passes them through an activation function such as Swish, Step, or LeakyReLU. It opens long positions when the activated vector crosses above a pos
This long-only strategy enters when a 14-period simple moving average crosses above a 28-period average and closes that long when the faster average crosses back below. While a position is open, it sets a stop a configurable percent below the entry, then moves
This strategy demonstrates staged long entries and a bracket exit on the price chart. It opens a first long of five units when the position is flat and the year is after 2014. When size reaches five, it adds a second long of ten units with a stop price ten per
Ruckard Squeezed E004 is a price-chart strategy that compares successive Squeeze Momentum colour-section changes. A smaller squeeze value with a higher price opens a short; a higher squeeze value with a lower price opens a long. Direction can be limited to lon
The strategy applies the Parabolic SAR indicator to detect trend reversal flips. It monitors when the SAR crosses from above to below the close (bullish flip) to enter long positions or from below to above (bearish flip) to enter short positions. Opposite posi
The TN Sovereign Footprint POC v6 strategy calculates a simulated Point of Control by identifying the highest volume node in a lookback period using the average of high, low, and close prices. It plots on the price chart as an overlay and signals buy or sell e
The Breakeven Line Demo strategy is a Pine Script demonstration tool designed to visualize the average position price of stacked trades. It enters long positions after seven consecutive bearish candles and short positions after seven consecutive bullish candle
This strategy demonstrates a partial bracket exit. It enters a long position of four units when the current position size is zero or negative. It then places an exit for two of those units, with a ten-point profit target and a ten-point stop. There are no user
This strategy calculates a simple moving average of closing prices to detect trend shifts directly on the price chart. It enters a long position when the price remains above the moving average for a specified number of consecutive confirmation bars, and enters
Calculates divergence between price movement and the Squeeze Momentum Indicator transitions to identify entry conditions. A short position is opened when the squeeze value decreases while price makes a higher high during bullish momentum decay. A long position
This strategy calculates the Supertrend indicator using a configurable ATR length and factor to identify trend reversals. It plots directly on the main price chart. When the Supertrend direction flips from bearish to bullish, the strategy closes any open short
GOLDEN-PIVOT φ v2 is a Pine Script strategy that plots on the price chart. It calculates a golden pivot region using Fibonacci retracement at 0.618 of a swing high-low range spanning 96 candles. The script applies a volume filter requiring current volume to ex
A long-only strategy built on fair value gaps. A bullish gap is detected when a bar's low is above the high two bars back. Depending on the confirmation setting, it enters on the gap alone, on the gap plus a high-volume breakout candle used as a simple order b
Breakout Trend Follower is a price-chart strategy that enters long when price breaks a recent swing high. It places the stop at the recent swing low and trails that stop upward as higher lows form, exiting when a higher low is breached. A pivot lookback sets h
This strategy calculates two Simple Moving Averages (SMA) with fast and slow length inputs. It generates a long signal when the fast SMA crosses above the slow SMA, and a short signal when it crosses below. Reversal signals automatically close existing trades
Ruckard Swim Waves is a Pine Script v5 strategy that trades long, short, or both on the price chart. It opens positions according to the selected side and exits with a percentage stop loss, take profit, and optional trailing take profit. After two consecutive
This strategy draws Bollinger-style bands on the price chart using ta.sma and ta.stdev of close. It plots upper and lower bands based on the baseline SMA and a multiplier applied to standard deviation. Entries trigger when close breaks above the upper band for
A strategy based on 21 and 55 period Hull moving averages. A long needs the fast line rising and above the slow line, price above a 200 EMA and volume above its 20-bar average times a multiplier; a short needs the opposite. Each entry has an ATR-based stop at
The Brrrrr Strategy is a macro-based breakout strategy designed for crypto markets. It tracks the Glassnode total USDT supply daily metric and calculates a Donchian Channel over a user-defined lookback period. The strategy enters a long position when the USDT
This trend-following scalping strategy combines a moving average trend filter with the Absolute Strength Histogram indicator. It opens long positions when price is above a selectable baseline moving average and the histogram signals bullish momentum, and short
This strategy plots four exponential moving averages on the price chart and compares their order. It treats a fully rising stack, shortest above the next three lengths, as bullish and the reverse order as bearish. It opens one long contract on the first bar th
Probe B Orders Strings is a diagnostic testing strategy designed to verify order execution rules, string formatting, and price rounding behavior for stop and limit orders. Operating on a repeating 24-bar cycle, it enters alternating long and short market posit
This strategy implements a modified Ichimoku Cloud system with causal HTF trend filtering on the price chart. It computes Tenkan-sen, Kijun-sen, Senkou A and B lines using user-set lengths for displacement. Long signals trigger on cloud breakout above with Ten
This strategy tracks Bitcoin network hashrate data from external sources like Quandl, Glassnode, or IntoTheBlock using short and long moving averages. It generates buy or sell signals when the short hashrate moving average crosses above or below the long movin
This strategy plots on the price chart and enters from a moving-average filter, ADX and Gann colours. Price above a 200-period EMA allows only longs; price below allows only shorts. A Gann aqua colour with ADX above a key level opens a long, and a Gann brown c
PF Probe 4EMA-RSI Probe 02 RSI Pullback is a stateful momentum strategy that triggers trades based on Relative Strength Index dip-and-recovery patterns. It arms a persistent long variable when RSI drops below a pullback threshold and opens a long trade when RS
This strategy serves as a test fixture for commission and slippage calculations across market, stop, and limit orders, utilizing percentage-based commission settings. It periodically opens long and short positions based on bar index cycles, applying predefined
This strategy draws on the price chart and trades ICT-style market structure. It uses swing pivots to set a bullish or bearish bias, then requires a fair value gap larger than a fraction of ATR and a simplified engulfing order block. Long and short entries fir
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.