This indicator calculates and plots a specified statistical quantile of a price series over a rolling lookback window using linear interpolation. It draws directly on the price chart as an overlay line. Users can adjust the input source, the lookback period, a
This strategy identifies severe close-to-close volatility shocks and triggers an immediate exit from any open long position. It enters long when the rate of change of close crosses above a user-defined momentum threshold and the close sits above the trend EMA.
Quantile Loss (Pinball Loss) calculates the pinball loss between an actual series and a predicted series on each bar, then averages those losses with a simple moving average. It plots that rolling mean as a yellow line in a separate pane, with a dotted zero re
This Pine Script v6 strategy gates long trades to a user-defined session window (default 0900-1700 Asia/Taipei) and enforces a maximum daily filled orders limit. It generates entries solely on fast EMA crossover above the slow EMA while inside the session. Pos
This indicator plots Quantitative Qualitative Estimation in a separate pane. It computes Wilder RSI from the chosen source, smooths it with an exponential moving average, and derives a dynamic average range from a double EMA of absolute RSI changes. A trailing
A long-only breakout strategy that uses a stop-limit style entry. It tracks the highest high of the previous 35 bars and the range midpoint, and arms an order when the close is above the midpoint but below an activation level set a fraction of ATR above that h
This indicator calculates the fractional Rate of Change (ROCP) between the current price and the price N periods ago. Unlike standard percentage-based momentum oscillators, it expresses the price difference as a decimal fraction. The indicator draws in a separ
This strategy calculates a linearly weighted moving average centerline explicitly using a while loop, accompanied by a standard deviation upper band. It enters a long position when the close crosses over the upper band. Exits occur when the price crosses back
The ROC indicator calculates the percentage change in price from the current bar to N bars ago. It draws the resulting values in a separate pane on the chart. The main setting allows selection of a price source such as close and a length parameter that control
A long-only strategy that enters when the close crosses above a 34-period simple moving average. Each trade has an ATR-based protective stop and is closed after a fixed number of bars if still open. Inputs set the average length, hold period, ATR length and st
This indicator calculates a rate of change ratio: the current source value divided by the source value a set number of bars earlier. It plots that ratio as a yellow line in a separate pane and does not mark entries, exits, or price levels. The source defaults
The PineForge Loopback Method For is a strategy that calculates an average vote by comparing current close to historical closes across user-defined horizons. It enters a long position when the average vote crosses above a minimum threshold and price exceeds th
This indicator calculates the Range Action Verification Index as the absolute percentage difference between a short simple moving average and a long simple moving average of close. It plots that value in a separate pane with a dashed threshold line and a dotte
The strategy calculates a volume-weighted moving average of close prices as the volume-weighted center and a price-volume trend smoothed by EMA as the signal line. It plots the VWMA and PVT distance on the price chart. The strategy enters long positions when p
This indicator applies the rectified linear unit to the difference between the selected source and a 20-period simple moving average. Positive deviations plot in green and negative deviations plot in red in a separate pane. The only input changes the price ser
This strategy calculates an ALMA smoothed version of the close price and the correlation between close and volume. It enters long trades when price crosses above ALMA and correlation exceeds the minimum threshold. It exits on price crossing below ALMA, correla
This indicator applies a recursive least squares adaptive FIR filter to a chosen price source and plots the resulting smoothed series on the price chart. Each bar it predicts from past source values, updates a weight vector from the prediction error, and refre
A long-only strategy that plots the prior day's high, low and midpoint on the price chart. It enters long when the close crosses above the prior daily high, provided the prior day's range met a minimum percentage. It closes when price falls below the prior dai
Regression Channels calculates a linear regression trend line and standard deviation channel bands over a specified lookback period. It computes standard deviations from the residuals to form symmetrical upper and lower channel bands around the central regress
This strategy is a request.security parity probe. On a 15-minute chart it reads the 60-minute close with lookahead off and opens one long when that higher-timeframe close changes from the prior bar. It closes the position on the following bar and forces a flat
Relative Absolute Error (RAE) measures the accuracy of a moving average model against an underlying price series. It compares the sum of absolute forecast errors between the source and its Exponential Moving Average to the baseline absolute errors relative to
This strategy plots a fast and a slow exponential moving average on the price chart. It enters long and closes any short when the fast average crosses above the slow average, and enters short and closes any long when the fast average crosses below the slow ave
This indicator calculates Relative Squared Error between a selected price source and an exponential moving average of that source. It divides the rolling sum of squared differences by the rolling sum of squared deviations from the source mean, using circular b
A long-only strategy that enters when a 19-period EMA crosses above a 58-period EMA. Half of the position is closed by a market order once price reaches an ATR multiple above the average entry. The rest is closed when the EMAs cross back down or when the close
This indicator calculates the Relative Strength Index from a chosen price source using Wilder's smoothing of average gains and losses. It plots a single RSI line in a separate pane. The length sets the lookback period and the source selects the series used in
A long-only breakout strategy that waits for volatility contraction, defined as ATR falling below a set fraction of its own moving average. While that holds, it arms a buy stop just above the highest high of the prior 28 bars, plus a small ATR buffer, and canc
This indicator plots Relative Strength Xtra in a separate pane. It splits the source into positive and negative bar-to-bar changes, then smooths each side with an integrated Jurik-style moving average before combining them into an RSX momentum reading. Length
This strategy overlays a fast and a slow exponential moving average on the price chart and treats their crossovers as entries. It opens a long position when the fast average crosses above the slow average and, when shorts are allowed, opens a short on the oppo
This indicator plots the Relative Vigor Index and a four-bar symmetrically weighted signal line in a separate pane. It compares the close-open range with the high-low range using fixed four-bar SWMA weights, then divides a simple moving average of the numerato
This session-based strategy triggers long entries at the start of the New York trading session when trend and momentum conditions align. It calculates a 38-period Exponential Moving Average and a 14-period RSI. A long position is taken at session open if the c
This indicator calculates and plots a rolling sum of an input price series over a specified lookback period in a separate pane. It implements the Kahan-Babuška algorithm to maintain numerical precision and mitigate floating-point errors across rolling addition
The Cadence Matrix Pairing strategy calculates price direction changes and volume confirmation across short, medium, and long horizons using close comparisons and simple moving averages of volume. It assembles these binary votes into a transposed matrix and ta
This indicator measures the root mean squared error between a chosen price source and an exponential moving average of that same source. It averages squared differences over a user-set lookback with a circular buffer, then plots the square root as a red area i
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 indicator calculates root mean squared logarithmic error between a selected price source and an exponential moving average of that source. It squares the difference of the logarithms of one plus each series, averages those values over the lookback with a
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 indicator calculates the R-squared coefficient of determination between a chosen price source and its exponential moving average over a specified lookback period. It plots the resulting statistical fit score as an area curve in a separate pane, alongside
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 indicator implements John Ehlers' Swiss Army Knife as a second-order recursive filter and plots the result in a separate pane. A mode string selects EMA, SMA, Gaussian, Butterworth, smoother, high-pass, two-pole high-pass, band-pass, or band-stop coeffici
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 indicator calculates John Ehlers' Smoothed Adaptive Momentum oscillator in a separate pane. It identifies the dominant cycle period using a Hilbert Transform and Homodyne Discriminator, then measures price momentum across that dynamic cycle length. A two-
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
The Savitzky-Golay Filter applies polynomial convolution to smooth price series while preserving features like local extrema better than simple moving averages. It calculates filter coefficients based on the selected window size and polynomial order, applying
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
This indicator calculates the Schaff Trend Cycle and plots it in a separate pane. It subtracts a slow EMA from a fast EMA, applies a stochastic over the cycle length, smooths that result, and applies a second stochastic. A second-stage smoother then feeds opti
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 indicator calculates the second finite difference of a chosen source series, treating that value as price acceleration. It subtracts twice the previous bar from the current bar and adds the value two bars earlier, then plots the result as a yellow line in
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
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.