This strategy executes long-only entries based on moving average pullbacks relative to a 504-period high. It enters when price dips between the 13 and 21 EMAs while remaining within ten percent of the recent high. The script plots green markers on new highs an
This indicator calculates the mean absolute percentage error between a chosen price source and an exponential moving average of that same source. It averages absolute percentage differences with a circular buffer over the selected lookback and plots the result
This strategy plots a fast and a slow exponential moving average on the price chart and flips position when they cross. A crossover of the fast EMA above the slow EMA enters one unit long, and a crossunder enters one unit short. There is no stop loss, take pro
This indicator calculates the mean absolute error between a selected price source and an exponential moving average of that same source. Absolute differences are averaged with a circular buffer over the chosen period, and the period is limited between 1 and 40
Calculates and plots momentum bars in a separate pane using three moving averages: a fast MA, a slow MA with a delay setting, and a trend filter MA. Loosely inspired by the Elder Impulse system, it measures momentum relative to a zero filter line. Users can cu
This strategy combines a three-tier EMA stack, RSI momentum filtering, and channel breakout rules to generate trend-following entries on the price chart. It detects swing highs and swing lows to draw connecting trend lines across pivot points. Entries trigger
This strategy places resting limit orders at VWAP for pullbacks in the direction of a higher-timeframe EMA trend. Longs require the fast EMA above the slow EMA, a rising VWAP, and price above VWAP; shorts mirror those rules. A filled trade uses an ATR multiple
This overlay strategy builds two moving averages from a selectable EMA, WMA, or SMA and plots the faster one on the price chart. A buy signal is a crossover of the fast average above the slow average, and a sell signal is the opposite cross. It colors the aver
This indicator plots Mean Absolute Scaled Error between a selected price source and an exponential moving average of that source. Absolute differences are divided by a scale equal to the mean absolute bar-to-bar change of the source, computed once from the fir
This strategy tracks a three-tier exponential moving average (EMA) stack to identify trend alignment regimes. It defines a bullish state when fast EMA is above mid and mid is above slow, and a bearish state when inverted. Orders execute strictly on state trans
The Aroon Strategy Long Only is a trend-following strategy that combines the Aroon indicator with a Least Squares Moving Average filter. It enters long positions when the Aroon Up line crosses above the Aroon Down line while the closing price trades above the
This strategy calculates the average closing price from a lower 3-minute timeframe and plots the result in a separate pane using array sum on multi-bar aggregate data. It fetches lower-timeframe data via security lower tf and includes commented out crossover c
This strategy detects long and short signals using a fast EMA crossing above or below a slow EMA. Entries only trigger when a recent pivot exists for anchoring. Long entries place a stop loss at the last pivot low and a take profit at 2R distance using the ent
A gold pullback strategy for intraday charts. It trades in the direction of a 20 over 50 EMA trend when price dips to the fast EMA and closes back beyond it, with RSI rising in that direction. Filters require a minimum ATR, an ADX of at least 16, a cooldown an
This indicator calculates the mean error between a selected price source and an exponential moving average of that source. It subtracts the EMA from the source, then averages those errors over a user-defined lookback with a circular buffer that behaves like a
RedK Volume-Accelerated Directional Energy Ratio (VADER) measures directional momentum accelerated by volume activity. It calculates price change relative to the average bar range, limits the ratio, and scales it using relative, raw, or static volume weighting
This strategy evaluates a triple-confluence entry gate combining trend, momentum, and structure filters on the price chart. It enters long when a fast exponential moving average is above a slow exponential moving average, RSI exceeds a defined threshold, and t
The Opening Range indicator combines multiple technical analysis tools onto the main price chart. It calculates MACD momentum sequences alongside Stochastic oscillator limits to generate buy and sell triangle shapes. Additionally, it evaluates trend alignment
Calculates normalized bandwidth readings across various volatility channel types including Bollinger Bands, Keltner Channels, and Donchian Channels. It compares bandwidth values against a secondary band baseline to evaluate relative volatility expansion or con
PF probe wunder-scalper-probe-02-alert-message-templates is a strategy that generates long and short signals using a fast EMA of 5 crossing above a slow EMA of 13 on the price chart. It places fixed-size entries of 1 share on each crossover signal and emits al
This indicator overlays a Directional Sentiment Line ribbon on the price chart using moving averages of high, low, open, and close prices. It combines higher-timeframe MACD and RSI filters with standard deviation volume heatmap thresholds to assess directional
Calculates fast and slow Exponential Moving Averages (EMAs) to identify trend shifts on the price chart. When the fast EMA crosses above the slow EMA, any open short position is closed before opening a long trade. When the fast EMA crosses below, any open long
This indicator calculates the Mean Squared Logarithmic Error (MSLE) between a selected price source and its exponential moving average over a specified lookback period. It evaluates prediction error by computing the squared difference of natural logarithms, sm
A test strategy from a reference corpus that fills orders at the close of the signal bar. It goes long when a 9-period EMA crosses above a 21-period EMA while RSI is below 70, and closes the long when the EMAs cross back down. One unit is traded, with no stop
Calculates the rolling statistical median of a chosen price or indicator series over a specified lookback period. For each bar, the script gathers valid data points across the window into an array, sorts them, and determines the midpoint value, averaging the t
This strategy serves as a validation probe to test default order execution timing where orders are processed on the open of the following bar. It implements a simple long-only system using a 9-period and 21-period exponential moving average crossover filtered
This strategy tests deferred position flips under pyramiding. It enters long at market when a 9-period EMA crosses above a 21-period EMA and RSI stays below 70, and it queues short stop entries when RSI crosses under 50, with the stop placed a quarter of ATR b
This indicator detects Williams fractals and calculates time-symmetric projections anchored to a user-selected point on the chart. It determines the bar distance between consecutive fractal highs and lows to establish a dynamic cycle length, then mirrors past
This strategy executes opening range breakout trades on the price chart during New York market hours. It tracks the high and low of a customizable opening session and enters long or short positions when price breaks above or below the range. Position sizing de
This Pine Script strategy evaluates fast and slow exponential moving average crossovers gated by an RSI boundary to enter long positions. It utilizes fixed cash position sizing and permits up to three pyramided entries, converting cash to fractional contract a
This strategy plots daily ATR bands, an optional midline, and an exponential moving average directly on the price chart. It executes long trades when price breaks above the upper ATR band and opens short positions when price falls below the lower band, with an
This indicator demonstrates different syntax methods for setting color transparency in Pine Script v4. It calculates and plots five simple moving averages with lengths of 10, 30, 50, 70, and 90 periods directly on the main price chart. Each moving average line
This Pine Script strategy calculates the accumulation/distribution line with ta.accdist and its 21-period EMA. It plots these in a separate pane. The strategy issues long entries on ta.crossover of the accumulation/distribution line above its EMA and short ent
This strategy draws two moving averages on the price chart and uses their bias to open long or short trades. It places the stop beyond a swing high or low using an ATR risk multiple, then sets a limit exit from the reward-to-risk ratio. An optional ATR trail c
This indicator plots the original simple moving average, a symmetric moving average calculated from the highest and lowest moving averages over the window length, and a dynamic midline. It generates buy signals when the deviation from the symmetric moving aver
An automated trend-following investment strategy designed for Bitcoin. It compares two customizable trend lines (such as TEMA, LSMA, EMA, or SMA) to detect crossovers and filters entries using an ATR-based trailing stop channel. Positions are exited when the p
Calculates a central base line directly on the price chart using a chosen reference, such as a moving average, highest high, lowest low, or range midpoint across a customizable period. Starting at a user-defined timestamp and anchored by two target price level
This strategy overlays two SMA lines with a cloud fill to show trend direction. It detects band reversals with Bollinger Bands and uses RSI for mean-reversion signals. Long entries trigger when the trend is bullish, price touches the lower band, and RSI is bel
This strategy implements the B-Xtrender indicator, calculating short-term and long-term momentum oscillators using RSI applied to moving average spreads and smoothings. It plots the momentum oscillators as colored histograms in a separate pane. Trades are filt
This strategy plots the Positive Volume Index and Negative Volume Index in a separate pane and compares each with its own exponential moving average of length 255. It opens a long when PVI crosses above its EMA and opens a short when NVI crosses below its EMA.
Symmetric Price - Invertible System calculates geometric trend baselines, symmetric moving averages, and Fibonacci wave oscillations overlaid directly on the price chart. Users select two anchor points with custom timestamps and prices to define a central slop
Backtest Custom HiLo Strategy overlays a high-low trailing line on the price chart calculated from moving averages of highs and lows. It establishes upper and lower bounds using simple or exponential moving averages along with optional period extremes. Signal
This strategy calculates a custom Signal-to-Noise ratio derived from logarithmic aggregation of inverse close prices and compares it against a Simple Moving Average. It plots both lines in a separate pane and alters price bar colors based on signal direction.
Modular Filter (MODF) calculates and plots an adaptive dual-path smoothing filter on the main price chart. Based on work by alexgrover, it computes upper and lower EMA bands that snap to price extremes and maintain a bullish or bearish state. The beta paramete
The Pivot Trendlines strategy identifies swing pivots on the price chart using a configurable swing lookback period and draws trendlines connecting these pivots. It generates buy and sell signals based on three-move patterns with user-defined move sizes, filte
Symmetric Price with MA calculates centered and mirrored price values using moving average midpoints and user-defined slope projections. It allows users to set a time anchor and slope angle to dynamically offset price data, optionally applying Golden Ratio mul
This strategy tests the 55-period Hull Moving Average (HMA) calculation. It enters a long position when the closing price crosses above the HMA(55) line and enters a short position when the closing price crosses below it. The script operates directly on the pr
The MACD indicator calculates the difference between two exponential moving averages with fast and slow periods to identify momentum shifts in the market. It plots the MACD line, signal line, and histogram bars in a separate pane below the price chart. The his
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.