Synced with GitHub · updated today

Free TradingView Pine Scripts

8,340 free, open-source indicators, strategies and libraries for TradingView. Copy any script and paste it into the Pine Editor to use it on your chart.

New scripts by RSS
8,340 scripts

Session Wicks

by g-moe
3 stars

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

Strategy v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Session Wicks

SLGC-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest trade marks for the SLGC stock on the price chart. It places green buy labels below bars and red sell labels above bars at fixed calendar dates, each marked with an ETF count such as X1. An input switches the view

Indicator v4
Updated 2 years ago · None stated GitHub repository of SLGC-tracker

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

Strategy v4 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Buy and Hold, which day of month is best to buy?

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

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of R² Coefficient of Determination (RSQUARED)

Sessions Toolbox

by g-moe
3 stars

Sessions Toolbox overlays key intraday trading sessions—Asia, Euro, and USA—directly on the price chart. It features optional background highlighting, markers for session open and close levels, and session-specific Volume Weighted Average Price (VWAP) lines wi

Indicator v5 Sessions & timeSupport & resistance
Updated 5 months ago · None stated GitHub repository of Sessions Toolbox

SLGCW-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest buy and sell labels for SLGCW on the price chart. An ETF input switches between a combined view and ARKG only. In the combined view, each dated label shows a buy or sell mark and a same-day ETF count. In the ARKG view

Indicator v4
Updated 2 years ago · None stated GitHub repository of SLGCW-tracker

Buy Any Bar By Chenyco

by hasnocool
106 stars

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

Strategy v4
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Any Bar By Chenyco
99 stars

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

Indicator v6 Moving averagesOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of SAK: Swiss Army Knife Indicator

Squeeze Momentum

by g-moe
3 stars

This overlay indicator combines classic Bollinger Band and Keltner Channel squeeze detection with linear regression momentum and pivot-based support and resistance levels. It plots a long-term moving average filter and tracks squeeze compression and release co

Indicator v5 Volatility & bandsOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Squeeze Momentum

Pushing request.security

by regalouisei
2 stars

This indicator generates a multi-ticker dashboard table displaying key metrics across multiple symbols on a user-defined timeframe. It calculates data such as percentage price changes, RSI values, and moving average relationships using multi-symbol requests. S

Indicator v5 Screeners & dashboards
Updated 8 months ago · None stated GitHub repository of Pushing request.security

SLGL-tracker

by Allen1212
303 stars

The SLGL-tracker is an indicator that plots labels on the price chart to visualize ARK Invest's purchases and sales of stocks from November 2019 to the present. It draws buy and sell labels showing share volume and ETF weight for selected ETFs. Users can choos

Indicator v4 Support & resistance
Updated 2 years ago · None stated GitHub repository of SLGL-tracker

Buy every Month

by hasnocool
106 stars

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

Strategy v4
Updated 2 years ago · GPL-3.0 GitHub repository of Buy every Month
99 stars

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-

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of SAM: Smoothed Adaptive Momentum

Stoch Slow

by g-moe
3 stars

This indicator calculates a Slow Stochastic Oscillator plotted in a separate pane. It calculates a smoothed %K value using a 3-period stochastic raw calculation averaged over a configurable K Period simple moving average. The %D line is calculated by applying

Indicator v5 Oscillators & momentum
Updated 5 months ago · None stated GitHub repository of Stoch Slow
2 stars

The R:R Trading System Framework is a TradingView Pine Script indicator that overlays on the price chart. It lets users select a backtest method such as Stochastic or 2x MA Cross. Multiple risk-reward levels can then be configured with adjustable stop loss per

Indicator v5 Support & resistanceOscillators & momentum
Updated 8 months ago · None stated GitHub repository of R:R Trading System Framework

SMFR-Tracker

by Allen1212
303 stars

SMFR-Tracker visualizes historical ARK Invest buy and sell transactions directly on the price chart for the SMFR ticker. It draws chart labels at specific historical trade timestamps, indicating whether ARK funds bought or sold shares on those days. Users can

Indicator v4
Updated 2 years ago · None stated GitHub repository of SMFR-Tracker

Buy The Dip

by hasnocool
106 stars

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

Strategy v4 Mean reversionVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Buy The Dip
99 stars

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

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Savitzky-Golay Filter (SGF)
3 stars

Stochastic Divergences calculates standard Stochastic Oscillator lines (%K and %D) and scans for regular and hidden divergences against price action. It evaluates pivot highs and lows over a user-defined pivot lookback period to compare oscillator peaks and tr

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of Stochastic Divergences
2 stars

This overlay indicator builds a sentiment profile across the highest-to-lowest price range of a lookback window. It splits that range into rows and draws boxes whose length reflects bullish or bearish candle bodies, optionally using lower-timeframe intrabar op

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of Range Sentiment Profile [LuxAlgo]

SNAP-tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of SNAP on the price chart. It places green buy labels below bars and red sell labels above bars on fixed calendar dates, with text that counts how many selected ETFs traded the stock that

Indicator v4
Updated 2 years ago · None stated GitHub repository of SNAP-tracker
106 stars

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

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Buy The Dips - MA200 Optimised
99 stars

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

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Schaff Trend Cycle (STC)
3 stars

Supersaiyan Strategy is an overlay indicator that plots three exponential moving averages alongside the volume-weighted average price (VWAP). It computes a standard Moving Average Convergence Divergence (MACD) oscillator and prepares trend metrics based on EMA

Indicator v5 Moving averagesOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Supersaiyan Strategy
2 stars

This indicator logs realtime bar updates across five dimensions: volume, price, time, activity, and age to plot interactive profiles directly on the price chart. It aggregates ticks, volume, and polarity into customizable level buckets, displaying double-sided

Indicator v5 VolumeSupport & resistance Repaints
Updated 8 months ago · None stated GitHub repository of Realtime 5D Profile [LucF]

SNOW Tracker

by Allen1212
303 stars

SNOW Tracker visualizes historical buy and sell transactions executed by ARK Invest ETFs for Snowflake Inc. (SNOW). It plots green and red labels directly on the main price chart at specific historical transaction timestamps. Each label indicates whether share

Indicator v4
Updated 2 years ago · None stated GitHub repository of SNOW Tracker
106 stars

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

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Buy The Dips in Bull Market

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

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Second Derivative / Acceleration (ACCEL)

Supertrend

by g-moe
3 stars

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

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Supertrend
2 stars

This indicator plots a histogram of historical risk values in a separate pane. It calculates risk with standard deviation, ATR, downside deviation, drawdown, entropy-based risk, or VIX. Drawdown can use the period high or a rolling high. Users set lookback, op

Indicator v5 Volatility & bandsScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Risk Distribution Histogram

SNPS-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest buy and sell events for Synopsys on the price chart as dated labels. Green labels mark buys below the bar and red labels mark sells above the bar, with an X count for how many ARK ETFs traded the stock that day. The E

Indicator v4
Updated 2 years ago · None stated GitHub repository of SNPS-tracker
106 stars

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.

Strategy v4
Updated 2 years ago · GPL-3.0 GitHub repository of Buy-and-hold strategy stats

Skewness (SKEW)

by mihakralj
99 stars

This indicator calculates the population skewness of a chosen source over a rolling lookback, using the Fisher-Pearson coefficient. It keeps rolling sums of the mean, variance, and third central moment, then divides the third moment by the cubed standard devia

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Skewness (SKEW)
3 stars

This indicator plots multiple moving averages directly on the price chart and identifies crossover entry and exit signals. It evaluates crossovers between a fast moving average and a slower baseline, requiring price bar direction confirmation to mark long and

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of 2 EMA Cross 10 EMA
2 stars

This overlay indicator plots a six-axis RSI radar on the price chart. It requests 14-period RSI for six user-chosen timeframes and places each reading on a polygon centered on the visible price range. Overbought and oversold marks sit at 70 and 30. Settings ch

Indicator v5 Oscillators & momentum
Updated 8 months ago · None stated GitHub repository of RSI Radar Multi Time Frame

SNTI-tracker

by Allen1212
303 stars

This overlay indicator plots historical ARK Invest buy and sell labels for SNTI on the price chart. Green labels sit below the bar for buys and red labels sit above the bar for sells, each tied to a fixed calendar date and marked with an X1 count. The only set

Indicator v4
Updated 2 years ago · None stated GitHub repository of SNTI-tracker
106 stars

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

Strategy v4 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BuyHigh-SellLow Strategy

Solar Cycle (SOLAR)

by mihakralj
99 stars

This indicator calculates a solar cycle from each bar's open time using the Sun's ecliptic longitude. The result runs from about -1 at the winter solstice through 0 at the equinoxes to about +1 at the summer solstice, and it is plotted as a yellow line in a se

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Solar Cycle (SOLAR)
3 stars

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

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of 2 EMA cross 10 EMA Strategy

Equivolume Bars

by regalouisei
2 stars

Equivolume Bars displays custom candlestick boxes on the main price chart, where each bar's width is proportional to its volume relative to a rolling lookback sum. The script calculates volume ratios to stretch or shrink historical and live price bodies and wi

Indicator v4 VolumeCandlestick patterns
Updated 8 months ago · None stated GitHub repository of Equivolume Bars

SOFI-tracker

by Allen1212
303 stars

This indicator plots hardcoded ARK Invest buy and sell dates for SOFI on the price chart. Green labels sit below bars for buys and red labels sit above bars for sells. The ETF input switches between combined activity and ARKF-only records. Combined mode marks

Indicator v4
Updated 2 years ago · None stated GitHub repository of SOFI-tracker
106 stars

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

Strategy v4 Support & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of BuyHighSellLow - Pivot points
99 stars

This indicator calculates the Spearman rank correlation coefficient between the chart asset and a secondary ticker, plotting the resulting values between minus one and plus one in a separate pane. It ranks price data over a specified lookback period and applie

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Spearman Rank Correlation (SPEARMAN)
3 stars

This overlay indicator plots ATR-based horizontal levels around the previous close of a selected higher timeframe. A trading-type input maps day, multiday, swing, position, and long-term modes to daily through yearly periods. It draws trigger bands from a perc

Indicator v5 Volatility & bandsSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of ATR Levels + CALL/PUT

Gap Filling Strategy

by regalouisei
2 stars

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

Strategy v4 Mean reversionSessions & time Repaints
Updated 8 months ago · None stated GitHub repository of Gap Filling Strategy

SPCE-tracker

by Allen1212
303 stars

This indicator plots ARK Invest trade labels for SPCE stock on the price chart. It shows buy and sell actions with share volumes and marks multiple transactions per day when several ARK ETFs trade the stock. Users select an ETF type from the input settings to

Indicator v4 Screeners & dashboardsSupport & resistance
Updated 2 years ago · None stated GitHub repository of SPCE-tracker

About the Pine Script Library

The ForexR Pine Script Library collects open-source TradingView indicators, strategies and libraries that are published on GitHub. Every script links to its repository, so you can see the author's latest version, issues and licence. Where the licence allows it, the full code is on the script's page, ready to copy into TradingView's Pine Editor. Stars, updates and licences are synced from GitHub every day, and new scripts are added every week.

Each script is read automatically before it is listed: it must declare an indicator, strategy or library for Pine Script version 4 or later, and copies of the same code are listed only once. The summaries and tags are written automatically from the code and the README. They describe what a script does; they are not a recommendation, and nothing here is tested or endorsed by ForexR.

Indicators and backtests describe the past. Check any strategy in the Strategy Tester and on a demo account before you trade with it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Pine Script Library FAQ

What is Pine Script?

Pine Script is the programming language of TradingView. Indicators, strategies and libraries written in it run directly on TradingView charts: an indicator draws lines, zones or signals, a strategy places simulated trades that the Strategy Tester reports on, and a library holds functions other scripts can import.

How do I add a Pine Script to my TradingView chart?

Open a script here and press Copy script. In TradingView, open the Pine Editor at the bottom of the chart, create a new indicator or strategy, select all of the template text and paste over it. Press Save, then Add to chart. A strategy's trades appear in the Strategy Tester tab.

Are these Pine Scripts free?

Yes. Every script listed here is published on GitHub, so you can read and use it at no cost. ForexR shows the full code only when the author published it under an open licence, such as MIT, GPL or the Mozilla Public License that TradingView adds to new scripts. For other scripts the Copy button reads the file straight from GitHub. Check the licence before reusing code in your own work.

Why are there no Pine Script v3 or older scripts?

Pine Script versions 1 to 3 are years out of date and miss most of the functions current scripts rely on. The library lists scripts written for versions 4, 5 and 6, and you can filter by version. Version 6 is the current one.

What does "Repaints" mean?

A repainting script can change its signals after the fact: on the live bar, or when it reads a higher timeframe before that bar has closed. Its history then looks better than it would have traded in real time. Scripts where the code or the author says so are marked Repaints, and the "Hide repainting" filter leaves them out.

How does ForexR choose which scripts to list?

A crawler searches GitHub every week for Pine Script files, reads each one and keeps scripts written for Pine version 4 or later in repositories with at least one star. Copies of the same code are listed once, under the most-starred repository. Repositories that ship programs, hide downloads behind passwords or show signs of bought stars are left out. Stars, updates and licences are refreshed from GitHub every day, and the summaries are written automatically from each script's code and README.

Trade on TradingView With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers