Library · Pine Script v6 · Library

SFA_FVG_Imbalance

by genesisgrubio39

This library computes Fair Value Gap imbalances for both bullish and bearish market structures.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code183
Settings0inputs
LicenceNone stated
Last update10 months ago30 Dec 2025

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new library, select all of the template text and paste. Press Save and give it a name.
  4. 4Publish or import itA library draws nothing. Publish it from the editor, then import its functions in your own scripts.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

SFA_FVG_Imbalance exports eight deterministic outputs in order: bullCreated and bearCreated boolean flags, bullTop and bullBottom price levels, bearTop and bearBottom price levels, plus bullScore and bearScore floats. The function adapts parameters by market preset such as Futures or Index ETF, incorporates CVD and session filters, displacement filters, and trend filters. It performs core logic calls to external context functions and returns values without any visual plots or drawings on the chart. The library is part of an institutional structural flow analytics framework.

Details

Published by

genesisgrubio39 on GitHub

Type

Library, Pine Script v6

Draws

Library (no plots)

Category

SMC / ICT / price action

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

AuthLib

by alboogycOdR
6 stars

AuthLib is a Pine Script v5 library that checks a caller username against a fixed list and, when authorized, prepares drawings for six killzone sessions. It stores boxes, labels, trend lines and price labels in a DrawingData type. For each window it tracks the

Library v5 Sessions & timeSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of AuthLib

Mirpapa Lib Line

by alvinng214
2 stars

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

Library v6 Support & resistanceSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Mirpapa Lib Line

SMC Overlay Generated

by skipp-dev
1 stars

This library exports constants for SMC trading intelligence. It provides market regime status, global news heat scores, bullish and bearish ticker lists, earnings calendars, and per-ticker sentiment maps. These fields support overlay companions in other script

Library v6 SMC / ICT / price actionScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of SMC Overlay Generated
261 stars

AIActivationFunctionsBipolarSigmoid is a Pine Script library that provides mathematical implementations of the bipolar sigmoid activation function and its derivatives for machine learning algorithms. It calculates bipolar sigmoid values bounded between -1 and

Library v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of AIActivationFunctionsBipolarSigmoid

KernelFunctions

by artificial-intelligence-edge
75 stars

KernelFunctions is a Pine Script v5 library that exports kernel weight functions for Nadaraya-Watson style estimation. It calculates a Rational Quadratic kernel, a Gaussian kernel based on a radial basis function, and a periodic kernel that models repeating be

Library v5
Updated 2 days ago · MIT GitHub repository of KernelFunctions

Ta

by nersent
29 stars

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

Library v5
Updated 11 months ago · Custom licence GitHub repository of Ta

More libraries

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers