Library · Pine Script v6 · Library

Mirpapa_Lib_Unicorn

by alvinng214

The Mirpapa_Lib_Unicorn library defines data structures and logic for the Unicorn pattern within smart money concepts trading.

View on GitHub

GitHub stars2on the repository
Pine versionv6current
Lines of code223
Settings0inputs
LicenceNone stated
Last update2 months ago5 Aug 2026

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

Mirpapa_Lib_Unicorn creates UnicornData types that track order blocks, fair value gaps, their overlaps into Unicorn zones, CHoCH confirmations, retests, and full position states including pending, active, triggered, win, loss or cancelled. The library handles entry prices, stop losses, target prices, profit and loss calculations, and risk ratios. It supports high time frame analysis and is imported for use in strategies. The library draws no elements on the price chart.

Details

Published by

alvinng214 on GitHub

Type

Library, Pine Script v6

Draws

Library (no plots)

Category

SMC / ICT / price action, Support & resistance

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

SFA FlowLiquidity v1

by genesisgrubio39
1 stars

The SFA FlowLiquidity library computes structural flow and liquidity events from price data. It detects sweep ups and downs with associated scores, identifies liquidity levels, and applies session and regime filters. Persistent arrays track liquidity prices, b

Library v6 SMC / ICT / price actionSupport & resistance
Updated 10 months ago · None stated GitHub repository of SFA FlowLiquidity v1

SMC Engine Private

by skipp-dev
1 stars

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

Library v6 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · None stated GitHub repository of SMC Engine Private

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

Daily Deviation

by Electrified-Trading
2 stars

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

Library v5 Volatility & bandsSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of Daily Deviation

Calculates continuous structural market bias by detecting swing high and low pivots (higher highs, higher lows, lower highs, and lower lows) using configurable left and right bar lookbacks. It assigns weighted values to classified pivots within a rolling windo

Indicator v6 SMC / ICT / price actionTrend
Updated yesterday · MIT GitHub repository of Market Structure Advanced [WavesUnchained]
5 stars

Monthly Candle Closed Yesterday is a price action and Smart Money Concepts helper indicator that plots rolling virtual monthly candles in a separate pane, treating yesterday as the end of the monthly period. It uses daily price data to dynamically calculate op

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
Updated 7 months ago · MIT GitHub repository of Monthly Candle Closed Yesterday

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