Pine Library · 1,149 open-source scripts

Free Session and Time Pine Scripts (page 14)

Open-source Pine scripts that mark time: Asian, London and New York session boxes, opening ranges, kill zones, day and week separators.

Pine scripts1,149
Code shown here551open licence
Updated in a year961
No repaint flag969

Sessions & time: Indicators, Strategies and Libraries

ES Absolute Trigger

by knectardev
1 stars

This strategy captures the first bar of each new day as an opening range and plots those high and low levels on the price chart. It enters one long position if price trades above the range high, or one short if price trades below the range low, then blocks fur

Strategy v5 BreakoutSessions & time
Updated 9 months ago · None stated GitHub repository of ES Absolute Trigger
46 stars

This indicator calculates and plots standard deviation projection levels based on historical session ranges. It draws the session open line alongside positive and negative standard deviation bands (0.5, 1.0, 2.0, 3.0, and 4.0 SD) directly on the main chart, ac

Indicator v6 Sessions & timeVolatility & bands
Updated 8 weeks ago · None stated GitHub repository of Session Standard Deviations with Stats

Morning Scalp

by benso87
24 stars

This strategy tracks an opening session time range to establish directional bias and triggers pullback trades using Stochastic RSI. Once price breaks out of the initial range, it establishes a directional bias and enters when the Stochastic RSI crosses over in

Strategy v5 Sessions & timeBreakout
Updated 4 years ago · MPL-2.0 GitHub repository of Morning Scalp

Market Profile

by s4mn0v
7 stars

This overlay indicator builds a Market Profile on the price chart from time-price opportunity letters. It marks the point of control, a value area at a configurable percent, single prints, session VWAP, and the initial balance, and can extend those levels. Use

Indicator v5 Support & resistanceVolume
Updated 5 months ago · None stated GitHub repository of Market Profile
6 stars

This indicator plots ICT Silver Bullet setups on the price chart. It marks New York and London session windows, fair value gaps, and optional swing highs and lows. Signals use fair value gap or market structure shift execution, with wick or close breakout dete

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of ICT Silver Bullet | Flux Charts v2
4 stars

This strategy trades E-mini and Micro E-mini S&P 500 futures on the price chart. It enters long when a fast EMA crosses above a slow EMA during New York regular trading hours, and enters short on the opposite cross unless long-only mode is on. Each entry place

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of ES S&P500 Strategy [trugurpala]

HTF Candles & Pivots

by itmakesyousick
2 stars

HTF Candles & Pivots projects higher timeframe candle bodies, wicks, and pivot levels directly onto the price chart. It visualizes open-close ranges, high-low ranges, time divisions, and pivot calculations such as Central Pivot Range across automated or manual

Indicator v5 Support & resistanceSessions & time Repaints
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

Option Selling

by ankurksoni
1 stars

A price-chart overlay that draws Fibonacci-style levels from the first five-minute candle of each day, and separately from the first red five-minute candle. Levels at 0, 0.44, 0.5, 0.56 and 1 of the candle range are drawn as lines, with an optional shaded band

Indicator v5 Support & resistanceSessions & time
Updated 3 days ago · None stated GitHub repository of Option Selling

An overlay indicator that captures the high and low of an opening range starting at a configurable hour and minute, then computes the range average and extension levels from it. A 9 and 21 EMA pair is plotted with triangle markers on crossovers. Toggles show o

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of OR Levels + EMA Cross Integrated

Silverstrat

by GreyssonEnterprises
1 stars

A strategy that shades a chosen trading session on the price chart and looks for candles whose low sits above the high from two bars back, or whose high sits below the low from two bars back. Entry is placed at the midpoint of the gap, the stop at the signal c

Strategy v5 Sessions & timeSupport & resistance
Updated 3 months ago · MIT GitHub repository of Silverstrat

XSP Daily Lotto

by majohnst
1 stars

This indicator tracks intraday key levels, premarket ranges, and opening range boundaries on index instruments like XSP. To compensate for missing premarket data on index charts, it streams and scales MES futures data to compute sentiment thresholds and target

Indicator v5 Support & resistanceSessions & time Repaints
Updated 4 months ago · None stated GitHub repository of XSP Daily Lotto

IB25 Strategy

by riegodavid-git
1 stars

A New York session strategy built on the initial balance, the price range of the first hour after the 09:30 Eastern open. It tracks the high and low of that opening window, draws a box, computes an anchored session VWAP and, once the range has formed, scans a

Strategy v5 BreakoutSessions & time
Updated 4 months ago · None stated GitHub repository of IB25 Strategy

Asian Session Range

by Ahmed1926
1 stars

A Pine v4 overlay that draws the Asian session range as a box with high, low and midline levels that extend to a chosen time, using Eastern time hours. It can also show a London session box with its range in pips. Start and end hours, line extension time, colo

Indicator v4 Sessions & timeSupport & resistance Repaints
Updated 9 months ago · None stated GitHub repository of Asian Session Range

ES Alpha (Logic Fix)

by knectardev
1 stars

This strategy tracks the opening 1-minute range during regular market hours and trades the subsequent breakout on the price chart. It locks the high and low of the 09:30 to 09:31 session and plots both levels as trigger lines. A long position is taken if price

Strategy v5 BreakoutSessions & time Repaints
Updated 9 months ago · None stated GitHub repository of ES Alpha (Logic Fix)

Bars per Day

by ivansoft
1 stars

This indicator calculates and plots the total number of bars that occurred during the previous day. It tracks daily boundaries by detecting changes in the day of the month, continuously counting bars between transitions. Whenever a new day begins, it stores th

Indicator v6 Sessions & time
Updated 1 year ago · None stated GitHub repository of Bars per Day
6 stars

This indicator plots session boxes, high-low ranges, and optional open lines for Asia, London, and New York sessions on the price chart. It detects breakouts when price crosses the prior session range. Inputs let users toggle visibility of boxes, open lines, b

Indicator v6 Sessions & time
Updated 2 months ago · MIT GitHub repository of Capital41 Session Flow Simple v2

BTMM-Sessions

by jcortes254
3 stars

BTMM Session Analysis is an indicator that draws session background boxes on the price chart for Asian, London and NY sessions. It tracks Asian session range with midpoint, extension and statistics display. The script detects liquidity sweep levels, stop hunts

Indicator v5 Sessions & timeSupport & resistance
Updated 1 year ago · None stated GitHub repository of BTMM-Sessions

Session Open Line

by piecioshka
2 stars

This indicator draws a horizontal line across each session on the main price chart, anchoring to either the previous session close or the current session open. It displays session price performance through customizable labels showing percentage change, currenc

Indicator v6 Sessions & timeSupport & resistance
Updated 12 days ago · MIT GitHub repository of Session Open Line

SessionInfo

by Electrified-Trading
2 stars

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

Library v5 Sessions & time
Updated 1 year ago · MPL-2.0 GitHub repository of SessionInfo

An overlay indicator that builds opening range levels from a configurable market open time in the Asia/Kolkata timezone, then derives sub-levels and second and third support and resistance lines from the range. It adds 9 and 21 EMAs with crossover arrows and c

Indicator v5 Sessions & timeSupport & resistance

Algo Trend System TG

by Focal-QuantAI
1 stars

An indicator on the price chart that follows an ATR-based trend line with a factor setting, plus a fast and slow EMA cloud, and prints signals with fixed dollar stop loss and three take profit distances. Signals can be limited to two time sessions in a chosen

Indicator v5 TrendSessions & time
Updated 6 months ago · None stated GitHub repository of Algo Trend System TG

Gap and Go

by Basant1Saini
1 stars

This strategy trades opening gap continuation on the price chart. It measures the gap between the daily open and the prior daily close, then enters long after a qualifying gap up or short after a qualifying gap down when price stays beyond the open and a trend

Strategy v5 BreakoutOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of Gap and Go

ES Professional Fade

by knectardev
1 stars

ES Professional Fade is an intraday mean-reversion strategy designed for fading opening gaps on ES futures. It identifies market opening gaps using defined percentage and ATR thresholds, then places stop orders to fade the move while utilizing market breadth e

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
575 stars

This indicator builds Market Profile Time Price Opportunity (TPO) structures across defined session timeframes directly on the main price chart. It visualizes the Point of Control (POC) and Value Area boundaries using dynamic box drawings. An integrated multi-

Indicator v5 Support & resistanceScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of Market Profile with Screener
219 stars

This indicator plots reference levels for previous daily high and low prices directly on the price chart. It requests daily timeframe data using the security function and plots the offset values as continuous lines, displaying resistance in red and support in

Indicator v4 Support & resistanceSessions & time
Updated 5 years ago · None stated GitHub repository of 昨日高低點標示

Zen Bar Count

by Zen-Tim
29 stars

This indicator counts bars from the start of each trading day and resets the count when the daily session changes. It plots the running count in the data window and, when enabled, draws that number below the bar every N bars. A second interval switches the lab

Indicator v5 Sessions & time
Updated 2 weeks ago · MIT GitHub repository of Zen Bar Count
6 stars

This indicator plots a session volume-weighted average price on the price chart and resets the cumulative price-volume totals when a new session begins. It uses typical price and volume, and can draw optional standard-deviation bands around the VWAP. A corner

Indicator v6 Sessions & timeVolume
Updated 2 months ago · MIT GitHub repository of Capital41 Session VWAP v2
4 stars

Tracks the high and low of a user-defined intraday session and enters breakout trades when the bar closes outside this range. It can enter during the session or wait until the session ends. Long trades enter on a close above the session high, while short trade

Strategy v5 BreakoutSessions & time
Updated 11 months ago · Custom licence GitHub repository of Session Breakout Strategy [Lab]
1 stars

A long-only strategy for one-minute spot charts that uses two Bollinger Bands, a standard 20-period band on close and a short 4-period wide band on open, to classify entries into three cases. Entries can be limited to the first two hours of the Asian, European

Strategy v5 Volatility & bandsScalping
Updated 13 days ago · None stated GitHub repository of Double Bollinger Band 1M Scalper

ES Professional Fade

by knectardev
1 stars

ES Professional Fade is an overlay strategy aimed at the ES futures contract. This archived file is only a placeholder and contains no entry, exit, or order logic. Its changelog says the version adds opening-range calculation with freeze logic, session-boundar

Strategy v5 Sessions & timeSupport & resistance
Updated 9 months ago · None stated GitHub repository of ES Professional Fade

Exit Orders

by TradersPost
228 stars

This strategy provides reusable building blocks for entries, exits, and risk management in Pine Script. It calculates profit and loss units, applies session filtering based on timezone, and handles backtest date ranges. It includes risk settings like stop loss

Strategy v6 Sessions & time Repaints
Updated 3 months ago · None stated GitHub repository of Exit Orders

6-9 session & levels

by TamaraKGreen
46 stars

This indicator marks a user-defined session, defaulting to 06:00-09:00 in the America/New_York time zone, and draws that session's high-low range on the price chart. It can show a session anchor, a session open line, a shaded range box, and horizontal levels a

Indicator v6 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of 6-9 session & levels
4 stars

This strategy trades on the price chart using a fast and slow exponential moving average crossover. It enters long when the fast EMA crosses above the slow EMA and short when it crosses below, but only during the London or New York session in GMT. Each entry s

Strategy v6 TrendMoving averages Repaints
Updated 2 months ago · MIT GitHub repository of EUR/USD Forex Strategy [trugurpala]
4 stars

This indicator tracks the high and low of a user-defined intraday session and plots them as broken horizontal lines on the price chart. It can also show the previous session extremes and places a label at each session start. The session window, previous-level

Indicator v5 Sessions & timeSupport & resistance
Updated 11 months ago · Custom licence GitHub repository of Session High/Low Indicator [Lab]

Time Window Highlight

by piecioshka
2 stars

Time Window Highlight is an intraday chart overlay that shades specific daily time windows with background boxes. It measures price performance from the start of the defined time window to the latest point within it, coloring the background green when price ri

Indicator v6 Sessions & time
Updated 12 days ago · MIT GitHub repository of Time Window Highlight
1 stars

An overlay indicator that records the high and low of an opening range from a configurable open time and draws high, low and average lines to the session end. Optional toggles add sub-levels, second and third support and resistance lines and rounded buy strike

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of OR Levels v10 Formula Toggle

Arty-W

by GreyssonEnterprises
1 stars

A Pine v4 indicator that draws four smoothed moving averages (21, 50, 100 and 200) on the price chart, with a fill between a two-period EMA and the 200 average that turns green or red with trend. It also looks for W and M price shapes with adjustable width and

Indicator v4 Moving averagesTrend
Updated 3 months ago · MIT GitHub repository of Arty-W

ES Professional Fade

by knectardev
1 stars

The ES Professional Fade strategy plots entry and exit signals on the price chart for E-mini S&P futures. It fades price action after the opening range closes during regular trading hours. The strategy declares a fixed position size of one contract with $2.01

Strategy v5 Mean reversionSessions & time Repaints
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
4 stars

This strategy tracks the high and low range established during the Asian trading session and executes breakout trades during the London session. It draws directly on the price chart. When the price crosses above the Asian high or below the Asian low, it enters

Strategy v6 BreakoutSessions & time
Updated 2 months ago · MIT GitHub repository of EUR/USD London Breakout [trugurpala]

Vertical Hour Lines

by piecioshka
2 stars

Vertical Hour Lines draws vertical gridlines at user-defined intraday timestamps directly on the main price chart. It helps traders mark key session events, market opens, or specific time thresholds across any intraday timeframe. The script provides multiple c

Indicator v6 Sessions & time
Updated 12 days ago · MIT GitHub repository of Vertical Hour Lines

ES Professional Fade

by knectardev
1 stars

This strategy executes gap-fade trades on E-mini S&P 500 futures during Regular Trading Hours. It compares the current market open with the prior session close to identify opening gaps, qualifying entries using minimum gap percentages, index point minimums, an

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade

PaperHands Strategy

by lunarticktrading
7 stars

PaperHands Strategy is an intraday trading system displayed in a separate pane, driven by momentum signals such as Laguerre RSI. It executes long and short entries, re-entries, and signal-based exits with risk management rules. Position exits support fixed-tic

Strategy v6 Oscillators & momentumSessions & time
Updated 2 weeks ago · None stated GitHub repository of PaperHands Strategy

Diego's Strategy

by jerryinyang
5 stars

Diego's Strategy draws confirmed swing pivots on the price chart and connects them with dashed lines when the price move exceeds an ATR-based deviation threshold. It can plot Fibonacci retracement levels and use a chosen zone for entries, with separate Fibonac

Strategy v4 Support & resistanceTrend
Updated 2 years ago · None stated GitHub repository of Diego's Strategy

MasterAlgo

by TamTH-Dev
2 stars

MasterAlgo is an overlay indicator that combines Ichimoku Kinko Hyo, session range highlights, and volume-based candle coloring into a single tool. It plots standard Ichimoku components—including Tenkan-Sen, Kijun-Sen, Chikou Span, and Kumo Cloud—and highlight

Indicator v5 Sessions & timeVolume
Updated 6 weeks ago · None stated GitHub repository of MasterAlgo

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