Pine Library · 1,372 open-source scripts

Free Crypto Pine Scripts for TradingView (page 26)

Open-source Pine scripts written for bitcoin and other crypto markets, which trade every day of the week.

Pine scripts1,372
Code shown here785open licence
Updated in a year696
No repaint flag1,164

Crypto: Indicators, Strategies and Libraries

Sergiosqueeze

by ruckard
13 stars

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

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze

Sergiosqueeze B002

by ruckard
13 stars

Sergiosqueeze B002 is an automated trading strategy based on Squeeze Momentum and moving average closing lines designed to work with Zignaly copy trading webhooks. It executes long or short positions based on momentum direction and exits when momentum weakens.

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze B002
1 stars

This Pine Script strategy probe tests the order of execution between entry orders and cancel commands within the same script evaluation pass. It places stop orders for long and short positions at specific times of the day, alternating between placing an entry

Strategy v6
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 69 - entry cancel same pass

Sergiosqueeze D004

by ruckard
13 stars

Sergiosqueeze D004 is a trading strategy designed for automated execution via Zignaly alerts. It utilizes squeeze momentum logic to open long positions when momentum expands positively and short positions when momentum expands negatively, exiting when the sign

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sergiosqueeze D004
1 stars

This Pine Script strategy enters long positions at specific times of day on the price chart. It places entries at 00:15 and 06:15 each day. It then exits or closes positions at 00:45 and 06:45 using a limit order above the average entry price and a stop order

Strategy v6 Sessions & timeMean reversion
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 70 - exit close same pass
106 stars

This strategy combines the Price Moving Average Ratio Percentile (PMARP) with Madrid Moving Average Ribbon concepts to identify overextended price conditions and trend shifts. It calculates PMAR or PMARP across selectable moving average types and a lookback wi

Strategy v5 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of PMAR and Madrid MA Strategy
1 stars

This strategy runs on the price chart and enters long positions at the top of each hour when the position is flat. It then closes those longs at the end of the hour while simultaneously entering a short position with a stop loss just below the low. Later in th

Strategy v6 Sessions & timeMean reversion
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 72 - opposite entry close

Relative Vigor Index

by hasnocool
106 stars

This strategy overlays two exponential moving averages and ATR-based price targets directly on the price chart while calculating the Relative Vigor Index internally. It enters long positions when the RVI line crosses above its signal line during an established

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Relative Vigor Index

PF probe 73 - minute zero stop

by pineforge-4pass
1 stars

This strategy is a validation probe that places stop orders only when the bar minute is zero. When flat, it enters long at 02:00 with a buy stop one tick above the bar high, and enters short at 14:00 with a sell stop one tick below the bar low. It closes a lon

Strategy v6 Sessions & timeBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 73 - minute zero stop

S2

by hasnocool
106 stars

S2 is a cryptocurrency rebalancing strategy originally designed for trading pairs like XTZ-EUR. It enters trades during buy and sell opportunity windows determined by rebalancing logic using external portfolio libraries. The strategy transacts a fixed base cry

Strategy v5 Mean reversionScalping
Updated 2 years ago · GPL-3.0 GitHub repository of S2

Trailering

by ruckard
13 stars

This strategy enters trades on the price chart using price excursion logic and historical statistical advice to identify market opportunities. Depending on the number of trigger conditions met, it scales capital allocation per position. Exits are managed throu

Strategy v5 Sessions & time
Updated 1 year ago · None stated GitHub repository of Trailering

PF probe 75 - stop after flat

by pineforge-4pass
1 stars

This strategy enters long positions at specific time windows on the price chart. It places entries using a stop price set to high plus one tick and closes positions at predefined times during the trading day. The script supports pyramiding up to one position a

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 75 - stop after flat

Trailering A004

by ruckard
13 stars

Trailering A004 is an automated trading strategy designed to optimize entry and exit points while minimizing stop loss and maximizing take profit. It calculates signals using high and low closing moving averages and supports strict long or short filtering. The

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Trailering A004

(IK) Grid Script

by hasnocool
106 stars

This strategy overlays an automated grid trading system directly onto the price chart. It defines upper and lower boundaries either manually or dynamically using recent price extremes or a simple moving average with deviation bands. An array of evenly spaced g

Strategy v4 Support & resistanceMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of (IK) Grid Script

Trailering B001

by ruckard
13 stars

Trailering B001 is an automated trading strategy designed to generate trade alerts and integrate with Zignaly copy-trading platforms. It utilizes custom moving average bounds (Curie High and Low closing MAs) to gauge price excursions and trigger long or short

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trailering B001

10PreBuyer

by hasnocool
106 stars

10PreBuyer is a dip-buying strategy that submits limit orders below recent price action using a discounted Hull Moving Average (HMA). It calculates the highest HMA value of high prices over a selected period, multiplied by a percentage discount factor, and pla

Strategy v4 Moving averagesMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of 10PreBuyer

Trailering bK003

by ruckard
13 stars

This Pine v5 strategy is a long-only template that sizes entries from the number of trigger conditions and manages exits from price's maximum favorable and adverse excursion. Take profit is a percentage by default, with an optional risk-reward ratio and option

Strategy v5
Updated 1 year ago · None stated GitHub repository of Trailering bK003
1 stars

This strategy generates long entries during the 2:00 to 2:45 hour window by placing a stop order at the current high plus one tick. It produces short entries during the 14:00 to 14:45 hour window with a stop placed at the current low minus one tick. All open p

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 78 - dual four bar no close

Trailering C002

by ruckard
13 stars

This strategy evaluates price excursion using Curie closing moving averages on the price chart to trigger trades and manage positions. It supports both long and short positions with configurable strategy date ranges and strict mode conditions. Built as an auto

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Trailering C002

Trailering D002

by ruckard
13 stars

Trailering D002 is an execution strategy template designed for automated crypto trading on price charts. It evaluates High and Low Curie moving average closing lines to identify potential entry conditions across customizable time windows. The strategy manages

Strategy v5 Moving averages
Updated 1 year ago · None stated GitHub repository of Trailering D002
1 stars

This validation strategy tests broker execution priority when opposing pending stop orders are active simultaneously. At scheduled times (02:45 and 14:45), when flat, it places paired long and short stop orders at percentage offsets from the closing price. Pos

Strategy v6 BreakoutSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 80 - Dual Stop Priority

255 EMA Strategy

by hasnocool
106 stars

255 EMA Strategy combines an exponential moving average with Average True Range bands and standard MACD crossovers to generate entry signals. Drawn directly on the price chart, it plots the central 255 EMA along with upper and lower volatility envelopes. Trade

Strategy v4 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 255 EMA Strategy

Trailering E002

by ruckard
13 stars

Trailering E002 is a trading strategy that uses moving average closing lines to optimize entries, take profit levels, and stop loss execution. Applied directly on the main price chart, it tracks price excursion to refine trades and includes date filtering for

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trailering E002
1 stars

This Pine Script v6 strategy is a validation probe that places competing stop entries close to price. At 02:45, while flat, it submits a long stop slightly above the close and a short stop slightly below the close. At 06:15, if a position is open, it closes ev

Strategy v6 BreakoutSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 81 - dual stop near only

Trailering F008

by ruckard
13 stars

Trailering F008 is a reversal strategy and execution template designed to send automated trade signals to Zignaly copy-trading platforms. It generates entry conditions using custom moving average envelopes known as Curie closing lines, aiming to optimize posit

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Trailering F008
1 stars

This strategy places two stop orders at 14:45 when flat: a long stop slightly above the close and a short stop slightly below it. Whichever stop fills first opens the position. At 18:15 it closes any open position. Quantity is fixed at one, with zero commissio

Strategy v6 BreakoutSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 82 - dual stop far only
106 stars

This strategy identifies trend-following entries using a triple exponential moving average alignment and ATR-based exits on the main price chart. Long signals trigger when the fast EMA is above the medium EMA and medium is above slow, accompanied by a close ab

Strategy v4 Moving averagesVolatility & bands Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3 EMA + Stochastic RSI + ATR

Trailering G010

by ruckard
13 stars

Trailering G010 is a Pine Script v5 strategy that draws on the price chart. It uses Curie closing lines from simple moving averages of an ohlc4 source, with separate high and low lengths, to run long-only and short-only logic at the same time, including an opt

Strategy v5 Moving averages
Updated 1 year ago · None stated GitHub repository of Trailering G010
1 stars

This Pine Script strategy draws on the price chart with overlay=true. It enters long and short positions using stop orders at the current close price at specific session times of 4:45 and 16:45. It then closes all open positions at 8:15 and 20:15. The strategy

Strategy v6 Sessions & timeScalping
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 83 - dual stop open tie

Trailering H005

by ruckard
13 stars

Trailering H005 is a trading strategy template designed for automated position management and execution via Zignaly webhooks, originally tested on BTCUSDT on the 1-hour timeframe. It evaluates price excursion across configurable sub-strategy lookback periods t

Strategy v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of Trailering H005
106 stars

This Pine Script strategy calculates three RSI indicators with periods 50, 75 and 100 on the chosen source. It computes multiple simple and exponential moving averages on the fast RSI and assigns colors based on changes relative to the slow RSI. Long entries t

Strategy v4 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 3 RSI MA movement crypto strategy

Trailering I005

by ruckard
13 stars

Trailering I005 is a crypto-focused trading strategy template designed for automated execution through Zignaly webhooks. It evaluates price excursion to minimize risk and maximize returns. The strategy supports take-profit targets, trailing take-profits, fixed

Strategy v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of Trailering I005
1 stars

This validation probe strategy tests how TradingView handles dual stop-order priority based on script source order. At a fixed time of 02:45, when no position is open, it submits a short stop order below the close followed by a long stop order above the close.

Strategy v6 BreakoutSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe 85 - Dual Stop Short First
106 stars

This trading strategy combines three Exponential Moving Averages (8, 14, and 50 periods by default) with Stochastic RSI and Average True Range (ATR). It enters a long position when EMA 1 is above EMA 2, EMA 2 is above EMA 3, and the Stochastic RSI %K line cros

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 3 x EMA + Stochastic RSI + ATR

Trailering J009

by ruckard
13 stars

Trailering J009 is a long-only strategy designed for cryptocurrency trading with Zignaly integration. It evaluates price excursion across multiple sub-strategy trigger conditions to size trade entries and refine exit points. The system features flexible exit m

Strategy v5 Volatility & bandsTrend
Updated 1 year ago · None stated GitHub repository of Trailering J009

Trailering K004

by ruckard
13 stars

Trailering K004 is a long-only strategy designed with integrated Zignaly automated alert webhooks. It calculates entry signals and dynamically adjusts capital allocation based on the number of active sub-strategy conditions met over a specified lookback period

Strategy v5 BreakoutVolatility & bands
Updated 1 year ago · None stated GitHub repository of Trailering K004

Trailering L007

by ruckard
13 stars

This long-only strategy executes automated cryptocurrency trades designed to interface directly with Zignaly webhooks. It triggers entries when a configurable minimum threshold of sub-strategy conditions are met within a lookback window, adjusting position siz

Strategy v5 Scalping
Updated 1 year ago · None stated GitHub repository of Trailering L007
1 stars

This strategy places long and short entries on the price chart at fixed daily times of 8:00 and 20:00. It uses fixed position sizing of 1 share with pyramiding set to 1, so only one position is held. At entry it immediately sets a three-way bracket exit that i

Strategy v6 ScalpingSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 88 - 3-way exit set once

Trailering M008

by ruckard
13 stars

Trailering M008 is a Pine Script v5 long-only strategy that draws on the price chart and sends orders through Zignaly alerts. It increases capital as more trigger conditions are met and sets take profit from a percentage or a risk-reward ratio, using price exc

Strategy v5
Updated 1 year ago · None stated GitHub repository of Trailering M008

This Pine Script strategy acts as a validation probe to examine TradingView order execution when using trail_points without an explicit trail_offset. It enters a long position at 08:00 and a short position at 20:00 when flat, setting wide 5% protective stop-lo

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 89 - trail_points 8 + far stop/limit

Trailering N006

by ruckard
13 stars

Trailering N006 is a crypto strategy framework designed for automated execution via Zignaly alerts. It calculates trade signals based on price excursion logic across lookback periods to enter positions with dynamic capital sizing. Key settings allow filtering

Strategy v5 TrendScalping
Updated 1 year ago · None stated GitHub repository of Trailering N006
1 stars

This strategy is a validation probe that places one long at 08:00 and one short at 20:00 when flat, using a fixed quantity of one. Each entry is paired with a stop 10 price units away, a limit 20 units away, and a trailing stop of 8 points. Orders process on b

Strategy v6 ScalpingSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 90 - narrow stop/limit + trail8

4 MA Strat

by hasnocool
106 stars

Calculates four selectable moving averages (SMA, EMA, WMA, RMA, HMA, or ALMA) with custom periods to generate crossover trading signals directly on the price chart. Signals are triggered when a selected moving average crosses another, with an optional fourth m

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 4 MA Strat

Trailering O002

by ruckard
13 stars

This long-only strategy plots on the price chart and sizes entries according to how many trigger conditions are met. It manages exits by tightening the stop and extending the take profit from the price's maximum excursion, with optional take profit and risk-re

Strategy v5
Updated 1 year ago · None stated GitHub repository of Trailering O002
1 stars

This strategy is a validation probe that opens one long at 08:00 and one short at 20:00 when the position is flat. Each entry sets an ATR-based stop, a limit at twice that stop distance, and a trailing stop whose trail points equal the current ATR. ATR length

Strategy v6 Volatility & bandsSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe 91 - atr trail fixed entry

Trailering P010

by ruckard
13 stars

A trading strategy that combines k-nearest neighbors (KNN) classification logic with custom position management and automated Zignaly signal execution. It evaluates historical price excursions and KNN patterns to identify entry opportunities and set dynamic ex

Strategy v5 AI / machine learning
Updated 1 year ago · None stated GitHub repository of Trailering P010

More Pine Script Categories

Browse the whole Pine Library

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.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers