This Pine Script strategy computes buying selling volume (BV/SV) and normalized pressure volumes (BPN/SPN) in a custom timeframe. It plots a column chart of the combined metric minus in a separate pane and draws Bollinger Bands on the source for volatility ana
Sergapi A005 is a trend-following strategy designed for crypto pairs on intraday timeframes. It enters long positions when both ATR and EMA multi-timeframe conditions align bullishly, and enters short positions when both turn bearish. The strategy draws on the
This strategy tests repeated entries that reuse the same order id while the stop price changes, so only the latest pending stop stays active. On a 15-minute chart it places a one-contract long stop one tick above the high during the 02:00 window and a short st
A trend strategy on the price chart. It enters long when a fast EMA crosses above a slow EMA with RSI below 60 and short on the opposite cross with RSI above 40. An optional higher-timeframe EMA filter, set to four hours by default, requires price to agree wit
This strategy draws exponential moving averages and automatic Fibonacci retracement levels on the price chart. It opens a short when the previous close is below the upper Fibonacci extreme and the 21-period average is below the 55-period average. It closes the
This strategy builds a price channel from the highest high and the lowest low over a user-set lookback. Once enough bars exist, it places a long stop order at the channel high and a short stop order at the channel low. The only setting changes the channel leng
Sergapi B002 is a price-chart strategy that opens long trades when both an ATR signal and an EMA signal indicate buying, and short trades when both indicate selling. A strategy-type setting controls direction. Optional percentage or ATR stop losses, take profi
This overlay strategy builds independent timed session ranges and marks range, trendline, mean, VWAP, and high-low levels when those displays are enabled. It enters on range breakouts and exits with strategy exits, choosing among range, ATR, fixed-point, and r
A test strategy from a reference corpus that isolates the timing of market close orders. It buys one unit at 03:15 and closes at 05:15, then sells short one unit at 15:15 and covers at 17:15, based only on the clock. There are no indicators, stop loss or take
This strategy overlays a multi-timeframe trend system on the price chart. It reads a higher timeframe, selected in minutes, for fast and slow EMA alignment and Supertrend direction, using the prior bar. It enters long or short only when flat, after an executio
This strategy generates trend-following entries using double-smoothed exponential moving averages, two Commodity Channel Index (CCI) periods, VWAP, and volume filters. Long entries require price to trade above smoothed EMAs and VWAP alongside high volume and b
This strategy generates long and short signals using high and low closing moving average channels combined with ATR trend filtering. It plots directly on the price chart alongside an optional moving average ribbon. Positions enter when directional criteria ali
A test strategy from a reference corpus that checks how closing by order id behaves after several entries have been stacked. It buys one unit at 00:15, 00:30 and 00:45 under the same id and closes all at 01:15, then repeats the pattern on the short side at 12:
A trend strategy that requires four conditions to agree: price on the right side of a 200 EMA, ADX at or above a threshold, the positive directional index leading the negative for longs or the reverse for shorts, and a custom ATR-band Supertrend pointing the s
This intraday strategy enters positions based on an alignment of trend, momentum, and oscillator indicators. It triggers long entries when the Commodity Channel Index is above a positive threshold, a fast Relative Strength Index crosses above a slow RSI, price
Multi Risk Demo is an educational strategy script demonstrating Pine Script risk management functions. It attempts to enter long positions on every bar after the year 2014 up to a pyramiding limit of ten positions. The strategy applies intraday order managemen
Sergdi A002 is a directional strategy designed for crypto trading. It generates long entry signals when the 4-hour DI+ crosses over the 4-hour DI-, and short entry signals on a cross under. It features configurable risk management options, including fixed perc
A test strategy from a reference corpus that moves a pending stop entry in one direction before it fills. At 02:15, 02:30 and 02:45 it re-submits a buy stop one tick above the bar high, and at 14:15, 14:30 and 14:45 a sell stop one tick below the bar low, usin
TN Sovereign Optimized Trend v6 is a Pine Script v6 strategy that plots fast, slow, and macro EMAs on the price chart. It generates buy signals on fast EMA crossover above the slow EMA when price exceeds the 200 EMA macro filter, RSI exceeds 50, and volume sur
This Pine Script strategy uses the Commodity Channel Index (CCI) with a 20-period SMA to generate long-only signals. It plots the CCI line and dashed bands at 150 and -150 on the chart, filling the area between bands. Entries occur when CCI crosses above the l
Sergdi B003 is a trend-following strategy designed to capture directional momentum using higher-timeframe Directional Movement Index signals. It opens long positions when the 4-hour DI+ crosses over the 4-hour DI-, and short positions when DI+ crosses under DI
This strategy tests pending stop order modification behavior in the Pine Script engine. It enters long or short positions using stop orders triggered at specific times of the trading day. An initial stop order is submitted, then modified on a later bar if no p
A simple trend and momentum strategy on the price chart. It goes long when RSI is above an upper threshold while price sits above a 200-period EMA, and short when RSI is below a lower threshold with price under the EMA. Each entry places an ATR-based stop loss
This strategy plots the Commodity Channel Index of the OHLC4 price in a separate pane and uses fixed CCI zones to allow long or short trades. Longs open when the CCI is above its long level, optionally above an SMA of the CCI, and the long RSI crosses a buy le
Sergdi C003 is a trading strategy that generates entry signals using directional movement index (DI+ and DI-) crossovers on a four-hour higher timeframe. It opens long positions on bullish DI crossovers and short positions on bearish crossovers. The script inc
This strategy rotates pending stop entries by the clock. Before noon it places a long stop one tick above the bar high and cancels the short order id; from noon it places a short stop one tick below the bar low and cancels the long order id. An open long is cl
This strategy identifies breakouts from session highs and lows on the price chart. It tracks the current session high and low for the configured time window in the specified timezone. Price crosses above the prior session high with an upward EMA trend confirm
Filtered Stoch is a long-only strategy that combines a Stochastic RSI oscillator with a trend filter based on the highest EMA of price highs. A bullish trend state is identified when close prices trade above the EMA filter level. The strategy enters a long pos
This strategy detects trend reversals on the 4H timeframe using ADX crossover signals. Long entries occur when +DI crosses above -DI, and short entries when +DI crosses below -DI. Built-in risk management includes ATR-based stop loss, optional take profit, tra
Combines an upgraded WaveTrend oscillator engine with market structure swing pivots, volume profile point of control (POC), and multi-timeframe trend alignment scoring. Trades are triggered by WaveTrend reversal or pullback continuation signals that pass conte
A test strategy from a reference corpus that sends two market entry calls with the same order id on the same bar, to see whether they merge or stack. It does this long at 00:15 and closes at 01:15, then short at 12:15 and closes at 13:15. Pyramiding is set to
Tn Sovereign SMC v6 is a Smart Money Concepts strategy that overlays trade entries and an status HUD table directly on the price chart. It identifies liquidity sweeps by checking if price pierces recent swing highs or lows before closing back within range, fil
This long-only Pine v5 strategy plots RSI, Money Flow Index, Stochastic RSI, and a MACD calculation in a separate pane. Visible buy logic requires Money Flow below a maximum and a Stochastic RSI K-line cross above D while below the oversold band; the matching
Sergdi E002 is a directional trading strategy based on higher-timeframe Directional Movement Index crossovers. It enters long when the 4-hour DI+ crosses above DI- and short when DI+ crosses below DI-. The strategy features extensive risk management options in
The WaveTrend v4 Strategy generates trading signals when the WaveTrend oscillator crosses at oversold or overbought levels. Long positions enter on bullish crosses in oversold territory, while short positions enter on bearish crosses in overbought territory. I
This strategy acts as an engine execution validation probe designed to test how same-pass, same-identifier entries and exits are processed within the same bar. It triggers fixed long and short position entries at specific intraday times, followed by simultaneo
Tn Sovereign STC v6 is an overlay strategy that combines the Schaff Trend Cycle oscillator with a 200-period Exponential Moving Average trend filter. It triggers long entries when the Schaff Trend Cycle crosses above the oversold boundary during a general uptr
This strategy evaluates market trend and momentum by combining moving average rate of change, Stochastic Oscillator levels, and MACD signal line directions on the main chart overlay. It calculates a directional signal from each of the three indicators and requ
Sergio Squeeze C002 is a Pine Script v5 strategy template designed to interact with Zignaly for automated trading. It relies on the SqueezeMomentum indicator to generate signals: it opens long positions when the indicator shows positive shine and short positio
This strategy calculates the WaveTrend oscillator alongside Stochastic RSI to identify reversal setups at overbought and oversold extremes. It enters long positions when the WaveTrend oscillator crosses upward below configured oversold levels, and enters short
This strategy tests whether a second strategy.exit call that reuses the same exit id replaces an existing bracket. At 08:15, when flat, it opens one long unit. While long, it submits a one-percent limit and stop, then immediately submits a tighter 0.3 percent
This strategy calculates the Stochastic oscillator (%K and %D) alongside overbought and oversold reference levels to detect divergences against price pivots. Using left and right pivot lookbacks on price and the Stochastic line, it identifies bullish and beari
This overlay strategy combines a Schaff Trend Cycle, an ATR trailing stop, and a fixed 200-period simple moving average. It enters long when the cycle turns upward, the ATR bias is bullish, and price is at or above the average, and short on the opposite alignm
This script implements a classic Relative Strength Index mean-reversion strategy overlaid directly on the price chart. It calculates an RSI value based on close prices over a user-defined length. A long position enters when the RSI crosses above the oversold l
This strategy executes trades based on the Squeeze Momentum indicator and overlays directly on the price chart. It opens long positions when momentum is positive and active, and enters short positions when momentum is negative and active. Trades exit when the
This validation strategy evaluates the execution order when strategy entry and exit orders sharing the same identifier are placed during the same bar calculation pass. It submits paired long and short entry and close orders at specific hours and minutes of the
This strategy computes a Stochastic Oscillator K and D lines with customizable length, smooth periods, and overbought/oversold thresholds. It generates long signals on K/D crossover below the oversold level in a bullish regime defined by price above a 200 EMA,
This strategy draws on the price chart and opens a long when a five-period exponential moving average crosses above a ten-period exponential moving average. It opens a short when a six-period exponential moving average crosses below an eleven-period exponentia
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.