ColorScheme is a Pine Script v5 library that stores named colors in paired string and color arrays. It creates an empty registry, checks that the key and color arrays stay the same length, and adds, reads, or renames entries by unique keys. Duplicate or missin
This Pine Script v6 library calculates trade position sizes and provides risk management functions for external scripts. It computes position sizes from account equity, percentage risk, and stop-loss distance, and offers dynamic sizing adjustments based on vol
MathX is a Pine Script v6 library that exports a z-score function. It measures how far a source series sits from its simple moving average, divided by the standard deviation over the same length. A private mean helper wraps the built-in simple moving average a
This library calculates TheStrat price action states, classifying candles by directional break structure, close relative to open, and rejected break conditions. It draws demo bar labels directly on the price chart using standard or glyph notation. User inputs
LocalLimit is a Pine Script library designed to calculate local upper and local lower limits for price or indicator series. By tracking local price extrema through multi-phase state logic, it helps scripts construct dynamic support and resistance boundaries. T
This Pine Script v6 library serves as an internal engine for Smart Money Concepts (SMC), providing types, tracking, and rendering logic for order blocks, fair value gaps, and market structure. It calculates order block parameters including quality scores, heig
This Pine Script v5 library exposes numerical helpers for correlation and special-function work and draws nothing on a chart. It returns machine-dependent floating-point constants, truncates a Chebyshev coefficient array to a requested accuracy, and evaluates
PriceAction is a Pine Script v6 library designed to calculate and track market structure elements based on customizable pivot lengths. It exports custom data structures for pivots, structure breaks, and market trends, categorizing price movement into internal
This Pine Script library calculates various momentum metrics and oscillator values for other scripts to use. It provides functions for standard-deviation-normalized price change, dual-moving-average momentum, Stochastic RSI, and a customizable MACD. Function p
A Pine Script v6 library that stores timestamped values and retrieves the value at a past point in time, such as one week, one month or year-to-date ago. It defines a data type with parallel time and value arrays, helper functions that limit array size to the
DebugConsole is a Pine Script v5 library that stores debug text in a fixed-length string array and shows it in a single chart table cell. init creates a bottom-left table and an empty line buffer whose size defaults to 20. queue drops the oldest line and appen
MyLabUtils is an open-source utility library for Pine Script v5 that provides reusable functions for custom indicator and strategy development. It includes an example calculation for a normalized Relative Strength Index, which scales standard values relative t
This Pine Script library exports multiple technical analysis functions for use in TradingView indicators and strategies. It includes helper functions for moving averages such as dema, ema2, t3, tema, and rma2, oscillators like macd2, stochFull, stochRsi, and p
MomentumSignals is a Pine Script utility library designed to detect changes in momentum across technical series such as moving averages and oscillator histograms. It offers helper functions that quantize directional changes, detect reversal signals, and comput
PivotPointsDailyTraditional is a Pine Script library that provides calculation functions for standard daily pivot points. It imports daily high, low, and close values to compute the main pivot point along with multiple resistance and support levels. The librar
Points is a Pine Script v5 library that stores paired x and y coordinates as two synchronized arrays. It creates empty or sized integer and float arrays, checks that both arrays share the same length, and raises a runtime error when they diverge or when an ind
A Pine Script library providing helper functions to evaluate local trend conditions across a user-defined lookback period. It exports functions that check if the current candle's low price is strictly higher or lower than all preceding lows within the specifie
SessionInfo is a Pine Script utility library providing functions for session-specific state tracking and calculations. It exports routines to determine whether the current intraday bar falls within a specified session, before the session begins, or after it co
SMC Lifecycle Private is a Pine Script library that provides modular helper functions to manage setup lifecycle states and market environment gating for Smart Money Concepts calculations. It evaluates market regime, volatility, and event risk conditions, compu
This library supplies utility functions for handling signal values in Pine Script. The quantize function selects one of four results depending on whether the input value is positive, negative, zero or NaN. The negMult function multiplies the value by a given m
This Pine Script utility library provides exported helper functions and data structures for calculating market trend directions and key support and resistance boundaries. It includes a custom SuperTrend function with configurable bar confirmation requirements
This Pine Script v6 library defines shared types and price checks for smart-money boxes. It stores box type, bullish or bearish direction, start and end breach modes, state, and top, bottom, and midpoint prices, plus a box and line handle. A higher-timeframe c
This library creates and tracks horizontal lines on the chart. It supports two breach modes: price and close. When a line is breached, it increments a break count up to a maximum value and can finalize the line with a close color. The data structure holds line
This Pine Script v6 library provides custom exported data types and initialization functions for tracking Smart Money Concepts and ICT market structure shifts. It defines structures to manage states for Break of Structure, Change of Character, Market Structure
This Pine Script library provides reusable helper functions for composing and formatting Smart Money Concepts (SMC) debug text strings and observability data. It builds structured labels and diagnostic lines containing setup sources, zone quality metrics, touc
This library provides data structures and validation functions for bundled candle analysis in ICT trading scripts. It defines SumCandleStates type with pending, confirmed and completed values, plus a function to create instances of the state set. SumCandleData
MirPapa Library ICT is a Pine Script utility library designed to support Inner Circle Trader (ICT) analysis across trading scripts. It exports custom data structures, including BoxData and HTFCache, to manage higher-timeframe historical price data and track zo
SMC Profile Engine is a Pine Script library designed to build custom volume profiles on TradingView. It provides structured data types including Bucket, ProfileConfig, and Profile to manage volume calculations across price levels. The library facilitates track
Mirpapa_Lib_Structs is a Pine Script library designed to assist in detecting Smart Money Concepts (ICT) market structure shifts. It provides exported custom types and helper functions to manage trend state, track swing highs and swing lows, and verify structur
ZenLibrary is a custom Pine Script utility library providing standard helper functions for trading scripts. It includes calculations for quote currency decimal precision, market pip sizes, decimal truncation, pip conversions, percentage change over lookback pe
The Mirpapa_Lib_Unicorn library defines data structures and logic for the Unicorn pattern within smart money concepts trading. It creates UnicornData types that track order blocks, fair value gaps, their overlaps into Unicorn zones, CHoCH confirmations, retest
This Pine Script v5 library provides an exported function to calculate moving averages directly over float arrays. Users can supply a sample array, set the smoothing length, choose whether to omit initial values prior to reaching the lookback window, and speci
FunctionBestFitFrequency is a Pine Script v5 library that smooths a float array with a rolling average and searches a frequency range for the moving-average length whose residual signs are closest to evenly split. The array function can omit early values short
This Pine Script v5 library turns a Unix timestamp into zero-padded text for date, time, or both. It exports datetime, date_, and time_, each defaulting to the current time, and prefixes single-digit months, days, hours, minutes, and seconds with a leading zer
SMC Utils is a Pine Script library providing helper functions for Smart Money Concepts indicators and strategies. It features functions for value range checks, range overlap determination, lower-timeframe selection, formatting price levels and trend states, dy
This Pine Script v5 library provides functions to calculate and plot linear regression channels using sample point arrays. It evaluates paired X and Y arrays to calculate the regression slope, intercept, fitted values, maximum deviation, minimum deviation, and
This Pine Script library provides a standardized function to format and send custom trade alerts. It processes incoming parameters such as trade direction, setup types, chart timeframe, and price levels including entry, take profit, and stop loss. The library
This library exports a linreg method that fits a straight line through paired sample arrays. It returns fitted Y values plus the largest positive deviation, the largest negative deviation, and the average absolute deviation. Callers pass matching X and Y array
This Pine Script library provides core enumeration types used across the SMC script ecosystem. It exports standardized definitions for moving average options including SMA, EMA, RMA, WMA, VWMA, Hull, and Zero Lag variations. Additionally, it defines break mode
This Pine Script v5 library exposes methods for a generalized neural network. It builds random weight arrays, runs a forward pass through stacked layers using an imported layer function, and begins a backward pass that compares output nodes with targets. Calle
FunctionNNLayer is a Pine Script v5 library providing a generalized neural network layer computation. It accepts an input array, a weight matrix flattened into an array, the target number of nodes, a bias value, and an activation function name. It computes per
This Pine Script v5 library exports SwitchingColorMode, which takes a color and a mode string and returns a theme-adjusted color. It reads red, green, blue, and transparency, classifies brightness into coarse channel buckets, and labels the color as hard dark,
This library exports a generalized perceptron node for neural networks. The function takes float arrays of inputs and weights, adds a bias, and applies a named activation function to the weighted sum. Bias defaults to 1.0 and the activation defaults to sigmoid
This Pine Script library detects and plots Smart Money Concept Fair Value Gaps (FVGs) for both demand and supply zones directly on the price chart. It exports a detection function that accepts configurable filter thresholds ranging from standard three-bar imba
This Pine Script library provides helper functions to detect and validate harmonic patterns using price and time ratio calculations. It includes utilities to calculate price and time rates between consecutive pattern points, check if values fall within specifi
MathComplexArray is a Pine Script v5 utility library that provides array functions for managing complex numbers. It represents complex arrays as flat float arrays storing interleaved real and imaginary components. The library includes functions to instantiate
This library provides core functions to handle complex numbers in Pine Script v5. Complex numbers are represented as float arrays containing real and imaginary parts. Functions set the real or imaginary component of a number, create new complex numbers from gi
MathComplexEvaluate is a Pine Script v5 utility library designed to evaluate string-based mathematical expressions containing complex numbers. It parses tokens into reverse Polish notation using external helper libraries and computes arithmetic operations such
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.