Pine Library · 1,149 open-source scripts

Free Session and Time Pine Scripts (page 19)

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

NQ 9:45-10:15 ICT Strategy

by eddiebelaval
7 stars

This ICT-based strategy trades during the 9:45 AM to 10:15 AM New York session window. It calculates a daily bias using a 20-period daily EMA and tracks previous day highs and lows to identify liquidity sweeps. The script refines order block entry levels and m

Strategy v6 SMC / ICT / price actionSessions & time Repaints
Updated 3 months ago · None stated GitHub repository of NQ 9:45-10:15 ICT Strategy

CRT State Engine

by alboogycOdR
6 stars

Implements an institutional Candle Range Theory (CRT) framework aligned to New York market time windows at 1 AM, 5 AM, and 9 AM. It calculates Draw on Liquidity (DOL) levels using pivot points, manages session state machine boxes, and generates entry signals w

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine

GG - Levels

by g-moe
3 stars

This indicator tracks and visualizes key intraday session levels directly on the price chart. It calculates open, high, low, and close values for Regular Trading Hours (RTH), the Overnight Session (ON), and the Initial Balance (IB) period. It draws horizontal

Indicator v5 Sessions & timeSupport & resistance
Updated 5 months ago · None stated GitHub repository of GG - Levels
1 stars

This strategy evaluates market structure, volume spikes, and smart money concepts such as order blocks and fair value gaps to score trade entries. It triggers orders when signals meet a minimum confidence threshold and comply with session killzones. Positions

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN PropFirm Ultra [TeleNexus]
46 stars

This indicator summarizes higher-timeframe candle range statistics by time of day and shows them in a table in a separate pane. It groups candles into slots for 5-minute, 15-minute, 1-hour, 4-hour, 8-hour, or 12-hour periods over a chosen lookback in days, and

Indicator v5 Screeners & dashboardsSessions & time Repaints
Updated 7 weeks ago · None stated GitHub repository of HTF Candle Stats by Time of Day

CRT State Engine

by alboogycOdR
6 stars

This indicator overlays a CRT state engine on the price chart using New York time. It tracks optional 1AM, 5AM and 9AM models, session states, market structure, liquidity pools, and a volume profile with point of control and value area. Live entry markers need

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine

Day High Low Test

by ivansoft
1 stars

Experimental overlay that marks the day's high and low and the session open on the price chart, with lines, labels and background shading. It includes special handling for Moscow Exchange futures sessions (main and evening) and uses lower-timeframe requests to

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Day High Low Test

Session highs, lows & opens

by TamaraKGreen
46 stars

This indicator tracks and plots high, low, and opening levels for major trading sessions directly on the price chart. It calculates price boundaries across defined periods including London, New York, Asia, and New York afternoon sessions. The tool does not gen

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Session highs, lows & opens

CRT State Engine Complete

by alboogycOdR
6 stars

This indicator overlays an institutional Candle Range Theory (CRT) framework directly on the price chart. It analyzes session states across New York time models (1 AM, 5 AM, and 9 AM), detects market structure breaks, identifies order blocks, and tracks liquid

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine Complete
46 stars

This overlay indicator marks Asia, London and New York sessions using New York clock times. It draws a session candle plus an optional vertical line at the session open, horizontal open, high, mid and low lines, and a 25 percent level of the session range. Use

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Session Range Candles + 25% Level

CRT State Engine v6

by alboogycOdR
6 stars

This overlay indicator tracks an institutional CRT state machine on the price chart. It can plot draw-on-liquidity lines from pivot strength, session boxes for CBDR, Asia, London, London lunch and New York, and key levels colored for consolidation, manipulatio

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine v6
46 stars

This overlay indicator projects higher-timeframe open, high, and low statistics onto the price chart. It can show one or two selected timeframes, with an optional New York midnight session start, and uses a lookback window to draw average and median levels. Pl

Indicator v5 Support & resistanceSessions & time
Updated 7 weeks ago · None stated GitHub repository of Statistical OHLC Projections

CRT State Engine v7

by alboogycOdR
6 stars

CRT State Engine v7 is an overlay indicator that tracks institutional CRT session states on the price chart. It analyzes market structure, detects buy-side and sell-side liquidity pools, and plots a volume profile with point of control and value area. Optional

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine v7

PF Max Contracts Held Gate

by pineforge-4pass
1 stars

A test strategy from a reference corpus that checks the highest contract count a strategy has held. At the start of each hour it adds one long unit, up to a pyramiding limit of ten, but stops adding once the all-time maximum held reaches five contracts. Every

Strategy v6 Sessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF Max Contracts Held Gate
6 stars

CRT State Engine CURSOR is an overlay indicator that implements Candle Range Theory (CRT) models alongside Smart Money Concepts (SMC) frameworks. It tracks session ranges including Asia, London, New York, and CBDR, while identifying Direction of Liquidity (DOL

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine v7.2 CURSOR

Time Weighted Average Price (TWAP)

by mushroom-men-Trading
2 stars

This indicator calculates a session-based time-weighted average price as the simple average of a chosen source series since the last reset. It plots that value as a yellow line on the price chart. The source defaults to the average of open, high, low, and clos

Indicator v6 VolumeSessions & time
Updated 9 months ago · None stated GitHub repository of Time Weighted Average Price (TWAP)

An indicator on the price chart that draws daily and weekly separator lines and marks the previous day's high and low. Daily separators carry a label with the weekday, date and time, weekly separators are drawn separately, and the previous day levels appear as

Indicator v5 Support & resistanceSessions & time
Updated 1 year ago · None stated GitHub repository of Previous Day High and Low with Separators

CRT State Engine v7.3

by alboogycOdR
6 stars

This TradingView indicator for XAUUSD gold analyzes market structure, order blocks, liquidity pools, and volume profiles to generate entry signals on the price chart. It includes session monitoring engines and risk management modules that can be toggled via in

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of CRT State Engine v7.3

This strategy calculates double-smoothed Heikin Ashi candles and plots them directly on the price chart alongside a smoothed Relative Strength Index. It evaluates market conditions against external volatility data from an inverse symbol, generating long and sh

Strategy v5 Candlestick patternsOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Session Wicks Strategy
65 stars

This reference indicator demonstrates how to retrieve symbol data using Pine Script v4 syntax. It calls the security function to request the closing price of BATS:AAPL on the current timeframe with gaps enabled. The resulting values are plotted in a separate p

Indicator v4 Sessions & time
Updated 5 days ago · GPL-3.0 GitHub repository of Example 1: Regular Session Data

CRT State Engine v7.6

by alboogycOdR
6 stars

CRT State Engine is an institutional trading framework based on Smart Money Concepts and Candle Range Theory. It plots session ranges, order blocks, Fair Value Gaps, liquidity sweeps, and Draw on Liquidity levels directly on the main price chart. The indicator

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine v7.6

This strategy plots smoothed Heikin Ashi candlesticks directly on the price chart. It filters entries using CCI and Stochastic crossovers calculated on a separate higher timeframe. Long signals trigger on CCI crossing above 60 and Stochastic crossing above its

Strategy v5 Candlestick patternsSessions & time Repaints
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Session Wicks Strategy

Boilerplate

by hasnocool
106 stars

Boilerplate is a foundational framework designed for automated strategy development. It integrates multi-timeframe Exponential Moving Average (EMA) and Average Directional Index (ADX) filters to avoid trading counter-trends or choppy markets, along with a sess

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Boilerplate

Session Volume Averages

by eddiebelaval
7 stars

This indicator plots trading volume bars in a separate pane alongside historical volume benchmarks for up to three user-defined trading sessions. For each active session, it calculates two benchmarks over a selectable sample size of past sessions: an overall s

Indicator v6 VolumeSessions & time
Updated 3 months ago · None stated GitHub repository of Session Volume Averages
6 stars

This indicator draws the high and low of one selected higher-timeframe candle as horizontal lines on the price chart. It reads the 4-hour or 1-hour candle that starts at a chosen New York hour (1 AM, 5 AM, or 9 AM) and extends both levels for a user-set number

Indicator v5 Support & resistanceSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Dual-Mode CRT Levels (Corrected)
3 stars

Hercules Indicator 1.7 is a multi-filter trade signal generator designed to overlay entry conditions directly on the price chart. It evaluates engulfing candle patterns alongside multiple configurable filters, including trading session windows (Sydney, Tokyo,

Indicator v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Indicator 1.7
6 stars

This indicator draws high and low levels from a chosen one-hour or four-hour candle that starts at a selected New York hour. It stores those prices once each New York day, plots them as lines on the price chart, and extends the lines for a user-set number of s

Indicator v5 Support & resistanceSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Dual-Mode CRT Levels (Corrected)

Hercules Rewrite

by g-moe
3 stars

Hercules Rewrite is a signal and visual trade management indicator that overlays entry setups directly on the price chart. It detects candle setups based on minimum tick movement and engulfing patterns, filtering entries through parameters like moving averages

Indicator v5 Candlestick patternsTrend
Updated 5 months ago · None stated GitHub repository of Hercules Rewrite

S Trailing

by GammaExpansion
1 stars

S Trailing is a Pine Script v6 strategy that applies trailing stops to periodic cycle-based entries. It divides the bar index into cycles of 40 bars and activates at specific phases: long entry with trailing price stop at phase 0, short entry at phase 14, plus

Strategy v6 Mean reversionScalping
Updated 6 days ago · MIT GitHub repository of S Trailing

This indicator plots the close of BATS-listed AAPL on the chart timeframe in a separate pane, using a broken line style. It builds a tickerid for that symbol limited to the regular session, but the security call shown uses the plain BATS:AAPL symbol and reques

Indicator v4 Sessions & time
Updated 5 days ago · GPL-3.0 GitHub repository of Example 3: Regular Session Data (using tickerid)
9 stars

Smart Money Dashboard plots key Smart Money Concepts on the price chart, including Order Blocks with mitigation tracking, Fair Value Gaps, and Equal Highs or Lows sweeps. It analyzes Cumulative Volume Delta for divergence and combines multi-timeframe structure

Indicator v6 SMC / ICT / price actionVolume
Updated 2 days ago · MIT GitHub repository of Smart Money Dashboard
6 stars

Calculates and plots key high and low reference levels based on a selected candle timeframe (1-hour or 4-hour) starting at a specific New York session hour (1 AM, 5 AM, or 9 AM). The indicator tracks the high and low prices of the specified candle, resetting d

Indicator v5 Support & resistanceSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Dual-Mode CRT Levels (NY Time)
3 stars

Hercules Strategy 1.7 is a price-chart strategy that gates trades with an engulfing-candle option, a lightning tick threshold, and a choice of long, short, or both directions. It can invert signals and stop the next trade from repeating the same side. Sydney,

Strategy v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Strategy 1.7
3 stars

Hercules Strategy Rewrite is an automated backtesting strategy that generates entry signals using engulfing candlestick patterns, tick thresholds, and support or resistance level breakouts. It offers multi-layer filtering including moving average trend checks,

Strategy v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Strategy Rewrite

Educational Pine Script v4 indicator demonstrating how to request symbol data using the session settings of the main chart symbol. The script builds a custom ticker ID for a target ticker while inheriting the current session type, requests closing prices via t

Indicator v4 Sessions & time
Updated 5 days ago · GPL-3.0 GitHub repository of Example 4: Same as Main Symbol Session Type Data

Highlight Month

by g-moe
3 stars

Highlight Month is a simple chart overlay indicator that shades the chart background during the first five weeks of the calendar year. It checks whether the current bar falls within week numbers one through five, highlighting the period corresponding to Januar

Indicator v5 Sessions & time
Updated 5 months ago · None stated GitHub repository of Highlight Month

Time

by ivansoft
1 stars

A Pine Script v5 library of time helper functions. It formats a timestamp into time, date and weekday strings, and measures how many seconds a condition has stayed true, with an optional reset on each new bar. Settings in the demo code cover tick counts, hold

Library v5 Sessions & time Repaints
Updated 1 year ago · None stated GitHub repository of Time

ICT ORB

by alboogycOdR
6 stars

ICT ORB draws the opening range for a chosen session and marks breakout conditions on the price chart. It can require relative volume, a volume spike, a liquidity sweep, displacement, trend alignment, an order block, and higher-timeframe bias before a fair-val

Indicator v5 SMC / ICT / price actionBreakout
Updated 7 months ago · None stated GitHub repository of ICT ORB

ICT ORB

by alboogycOdR
6 stars

This overlay indicator marks a session opening range on the price chart and filters breakouts with relative volume. Session type, duration, and optional custom start time set the range, and historical ranges can stay on the chart. Full mode can require a liqui

Indicator v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of ICT ORB
3 stars

Calculates and plots key session reference levels directly on the price chart, specifically pre-market high and low alongside prior day high and low. Users can adjust how levels project across historical data, toggle line labels, customize spacing, and show pr

Indicator v5 Support & resistanceSessions & time
Updated 5 months ago · None stated GitHub repository of Hooplah High Low + Table

S_pending_entries

by GammaExpansion
1 stars

S_pending_entries is a strategy that places different types of pending buy and sell orders including limit, stop, and stop-limit orders at specific phases in a 68-bar cycle. It calculates reference price levels around the current close and plots them along wit

Strategy v6 Support & resistanceSessions & time
Updated 6 days ago · MIT GitHub repository of S_pending_entries
6 stars

This indicator tracks Opening Range Breakout (ORB) levels for selected sessions such as New York, London, or custom hours directly on the price chart. It detects market structure shifts (MSS), fair value gaps (FVG), and order blocks to signal potential trade e

Indicator v5 SMC / ICT / price actionBreakout
Updated 7 months ago · None stated GitHub repository of ICT ORB Manual Trading Companion
1 stars

This strategy computes a session-gated RSI value using a deep history reference of 500 bars on a source that is NA outside the session window. It signals long entries on RSI crossover above 30 with valid session and closes positions on crossover below 70. The

Strategy v6 Oscillators & momentumSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PF na-chain probe 01 - deep history int na

ICT ORB Strategy

by alboogycOdR
6 stars

This strategy backtests opening-range breakouts on the price chart for New York, London, Asia, or a custom session. Simple mode follows the opening-range direction when relative volume is high enough. ICT mode can require a fair value gap, displacement, and an

Strategy v5 BreakoutSMC / ICT / price action Repaints
Updated 7 months ago · None stated GitHub repository of ICT ORB Strategy

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