This Pine Script library encodes string data into numeric byte arrays and RGB color objects. It maps characters against standard ASCII symbol sets and packs groups of three bytes into red, green, and blue color channels. Designed as an optical data transfer ut
WebhookMessageLibrary is a helper library designed to construct structured JSON payload messages for automated trading integrations like TradersPost. It defines custom exported types and constants for trade actions, market sentiments, quantities, limit prices,
PineDraw is a Pine Script v6 library that provides object primitives for drawing and updating price levels on the chart. It enables indicators and strategies to maintain lines, boxes, and labels in place by updating existing objects instead of deleting and rec
This Pine Script v5 library exports detectYinYangCrown, which builds a standard MACD from close using caller-supplied fast, slow, and signal lengths. It tracks histogram color and a small state machine: a green histogram that rises to a peak, then declines, th
BTMM Enhanced Foundation is a Pine Script utility library designed for Beat The Market Maker (BTMM) system calculations. It provides core helper functions for multi-session detection across Asian, London, and New York trading sessions, three-day market cycle a
The Position library defines types and functions for simulating trades and managing positions in Pine Script. It provides Trade objects for individual trades and Position objects that track size, average price, value, start time, net gains, and trade history.
This Pine Script library provides reusable calculation functions for zero-lag exponential moving average variants and logarithmic regression slope analysis. It features mathematical models for calculating double-EMA zero-lag series, zero-lag with lead percenta
This library supplies shared pure helper functions for Pine Script indicators and strategies in the Pine Script Skill repository. It exports theme-aware color functions that return primary text, muted text, and panel background colors based on selected dark or
A Pine library that imports the SFA Core library and exports one function returning ten values: upward and downward structure break flags, break zone top, bottom and middle, the origin zone top and bottom, whether the origin is bullish, an origin state and a w
ArrayGenerate is a Pine Script v5 helper library that provides utility functions for array generation. It includes methods to build integer or floating-point sequence arrays over specified ranges and step sizes. It also features a function to extract historica
This library provides utilities for measuring time in Pine Script. Functions retrieve milliseconds per bar based on timeframe, calculate the start of the day from a datetime, get time of day, and convert timespans between units like seconds, minutes, days to b
A Pine library that exports one function returning fifteen values for higher-timeframe cycle ranges. From swing high and low inputs, by time or bar index, it tracks the latest price cycle, then gives its low, high, middle and quartile levels. It also returns p
A Pine Script v6 library that supports Commitment of Traders data requests. It holds the metric names and allowed directions (long, short, spreading) for the legacy, disaggregated and financial CFTC report types, so that other scripts can build the right data
This Pine Script v5 library exports basic element-wise operations on float arrays and draws nothing. Add, subtract, and multiply each return a new array the length of the first input, wrapping the second array by index when it is shorter. A divide function is
BTMM Foundation is a Pine Script library providing core utility functions for Beat The Market Maker methodology scripts. It includes exportable functions for session detection across Asian, London, and New York sessions, tracking a three-day market cycle, time
This library exports functions that measure volatility from true range and compare it with a recent normal level. It computes true range over one bar or a multi-bar span, optionally once per span, then removes outliers and derives a mean and standard deviation
This utility library provides exported helper functions for packing, encoding, and resolving state variables into compact numerical bitmasks and floating-point representations. It processes Smart Money Concepts data structures, such as trend states across time
TimeFrameUtils is a Pine Script utility library providing functions for multi-timeframe data analysis. It includes helpers to convert timeframe strings into minutes and check whether a given timeframe is higher than the chart's current resolution. The library
This library computes Fair Value Gap imbalances for both bullish and bearish market structures. It exports eight deterministic outputs in order: bullCreated and bearCreated boolean flags, bullTop and bullBottom price levels, bearTop and bearBottom price levels
This Pine Script v5 library provides basic arithmetic operations for integer arrays. It exports helper functions to add, subtract, multiply, and divide two integer arrays element by element. When the secondary array is shorter than the primary array, operation
Averages is a Pine Script utility library designed for computing custom averages directly from float arrays. It provides exportable functions to calculate triangular weighted averages, standard weighted averages using an auxiliary weight array, and combined tr
SFA_MSB_v1 is a logic-only Pine Script library providing structural flow analytics outputs. It calculates bullBreak and bearBreak booleans when swing highs or lows are crossed using specified break triggers, with optional ATR confirmation and regime detection.
This Pine library provides a single exported function, makeWebhookJson, that builds a JSON string for sending TradingView alerts to a Tbot server which places Interactive Brokers orders. The caller passes a webhook key, an order reference, a direction matching
ArrayStatistics is a Pine Script v5 library of exported functions that compute descriptive statistics on numeric arrays. It returns root mean square, Pearson first and second skewness coefficients, the Pearson correlation between two samples, and kurtosis from
This library exports one function, custom_ma, which returns a 14-period exponential moving average of a supplied source series. It declares no inputs, so the length stays fixed at 14 and the caller chooses the series. It plots nothing and does not generate ent
This library calculates arrays of daily price deviations from the open to the high, low, and close over a user-specified number of days. It optionally filters outliers using a maximum deviation threshold. The fromOpen function returns a normalized value showin
TradeModeLibrary is a helper Pine Script library providing standardized trade state management logic for custom trading strategies. It exports functions representing different execution modes that accept position active status and signal directions. Based on t
This Pine Script library provides a helper function to calculate the Pearson correlation coefficient between two numeric datasets stored as float arrays. It evaluates the linear relationship between the samples by dividing their covariance by the product of th
Mirpapa Lib HTF is a Pine Script v6 utility library designed for higher timeframe (HTF) data processing and chart timeframe conversions. It exports a custom data structure for caching open, high, low, close, and time values across multiple bars, alongside util
DailyLevels library supplies functions to fetch open, high, low and close values from daily bars using a daysPrior parameter. It supports daily and intraday charts while respecting session boundaries to prevent lookahead bias. The library tracks session start
This library builds real-time Smart Money Concepts context frames on each bar. It derives StructureFrame using engine primitives for BOS, CHoCH, trend and S-R levels. ImbalanceFrame tracks FVG lifecycle, BPR overlap, liquidity void and zone-bias. ZoneFrame man
A Pine Script v6 library for comparing current volume or another series with its history over matching points in time. It collects values within a period that restarts on an anchor timeframe, then averages the values from past periods at the same time offset.
BinaryDecimalConversion is a Pine Script utility library designed for converting data between decimal integers and binary string representations. It exports functions to convert an integer value into a binary string and to parse a binary string back into a dec
This Pine Script v5 library exports thin wrappers around built-in technical analysis functions. It covers moving averages, momentum measures such as RSI and CCI, volatility tools including ATR and standard deviation, range extremes, cross detection, and runnin
This library supplies reusable drawing helpers rather than its own indicator output. It draws take-profit and stop-loss levels around an entry price, with translucent fills between those levels and the close, and it can remove those drawings. It also plots a t
This Pine Script library provides a custom calculation of the Parabolic Stop and Reverse indicator. The exported function accepts parameters for the starting acceleration factor, increment step, and maximum acceleration limit. It evaluates bar highs, lows, and
MirPapa_Handler_HTF is a Pine Script v6 utility library designed for handling higher timeframe conversions and multi-timeframe data retrieval. It converts standard timeframe strings into minute counts, computes the numerical ratio between higher and lower time
DataCleaner is a Pine Script utility library providing functions to calculate outlier levels and generate cleaned versions of input data series. It utilizes moving averages and standard deviations to detect extreme statistical deviations, replace outlier value
A Pine Script v6 library that wraps data requests for external series. It supports economic series identified by a code, and Commitment of Traders data selected by metric name, direction and an optional CFTC code, building on the LibraryCOT library for the met
polyglot_lib is a Pine Script utility library providing shared technical analysis functions and calculations. It includes flexible moving average algorithms for SMA, WMA, and EMA, custom rolling moving average helpers, a Relative Liquidity Index derived from R
MirPapa_Lib_trend is a Pine Script utility library providing trend and momentum calculation functions for other scripts. It features implementations for several moving average types, including the Hull Moving Average (HMA), Exponential Hull Moving Average (EHM
Interpolation is a Pine Script utility library providing mathematical interpolation and easing functions, including linear and quadratic transitions. Designed for signal processing, custom smoothing algorithms, and sigmoid transformations, each exported functi
A Pine Script v6 library of technical analysis functions that are not built into the language. It exports many indicators, including Awesome Oscillator, Aroon, Donchian Channel, Ichimoku Cloud, SuperTrend, Klinger Volume Oscillator, Schaff Trend Cycle, Vortex,
This utility library provides color conversion and manipulation functions for Pine Script v5 scripts. It calculates RGB color values from Hue, Saturation, Lightness, and transparency inputs, validating ranges and returning native color objects. It also include
This library exports a function that calculates the Relative Strength Index from the close price. It measures bar-to-bar change, separates gains and losses, smooths both with a running moving average, and returns the standard 100-scale RSI. Callers pass the lo
This library provides utility functions for managing labels on a TradingView chart. It allows creating labels at the last bar with specified levels, text, colors, and sizes. The refreshXPos function updates the x position of existing labels with optional bar o
This Pine Script v6 library provides drawing wrappers for smart-money chart objects. It exports types for labels, lines and boxes, plus default style arguments and factory methods that build chart points from a bar index or a bar time. Callers create, hide and
TechnicalRating is a Pine Script library that calculates composite technical rating scores ranging from -1 to +1. It aggregates market conditions across 26 technical indicators, including moving averages, RSI, Stochastic, MACD, Ichimoku, and DMI, into overall,
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.