PINE LIBRARY
Updated SITFX_FuturesSpec_v17

SITFX_FuturesSpec_v17 – Universal Futures Contract Library
Full-scale futures contract specification library for Pine Script v6. Covers CME, CBOT, NYMEX, COMEX, CFE, Eurex, ICE, and more – including minis, micros, metals, energies, FX, and bonds.
Key Features:
✅ Instrument‑agnostic: ES/MES, NQ/MNQ, YM/MYM, RTY/M2K, metals, energies, FX, bonds
✅ Full contract data: Tick size, tick value, point value, margins
✅ Continuation‑safe: Single‑line logic, no arrays or continuation errors
✅ Foundation for SITFX tools: Gann, Fibs, structure, and risk modules
Usage example:
import SITFX_FuturesSpec_v17/1 as fs
spec = fs.get(syminfo.root)
label.new(bar_index, high, str.format("{0}: Tick={1}, Value=${2}", spec.name, spec.tickSize, spec.tickValue))
Full-scale futures contract specification library for Pine Script v6. Covers CME, CBOT, NYMEX, COMEX, CFE, Eurex, ICE, and more – including minis, micros, metals, energies, FX, and bonds.
Key Features:
✅ Instrument‑agnostic: ES/MES, NQ/MNQ, YM/MYM, RTY/M2K, metals, energies, FX, bonds
✅ Full contract data: Tick size, tick value, point value, margins
✅ Continuation‑safe: Single‑line logic, no arrays or continuation errors
✅ Foundation for SITFX tools: Gann, Fibs, structure, and risk modules
Usage example:
import SITFX_FuturesSpec_v17/1 as fs
spec = fs.get(syminfo.root)
label.new(bar_index, high, str.format("{0}: Tick={1}, Value=${2}", spec.name, spec.tickSize, spec.tickValue))
Release Notes
v2SITFX_FuturesSpec_v17 – Complete Futures Contract Library for Pine Script v6
Author: Ken (“SITFX”) | © 2025 Solvere Trading Solutions, LLC
🔹 Overview
SITFX_FuturesSpec_v17 is a comprehensive, continuation‑safe Futures contract library for Pine Script v6.
It provides single‑line contract definitions for CME, CBOT, NYMEX, COMEX, CFE, Eurex, ICE, and other major exchanges, covering:
Equity Index Futures: ES, NQ, YM, RTY, EMD and all micros (MES, MNQ, MYM, M2K)
Volatility Futures: VIX (VX) and Mini‑DAX (FDXM)
FX & Crypto Futures: EuroFX, Yen, Pound, CAD, AUD, Swiss Franc, Micro Euro, Dollar Index, Micro Bitcoin
Treasury & Interest Rate Futures: 30‑Year, 10‑Year, 5‑Year, 2‑Year, SOFR, Fed Funds
Metals: Gold, Silver, Platinum, Copper and their E‑Mini/Micro equivalents
Energies: Crude Oil, E‑Mini Crude, Natural Gas, Heating Oil, RBOB Gasoline
🔹 Key Features
Instrument‑Agnostic Data Backbone
Returns a full FuturesSpec record with symbol, name, exchange, contract size, delivery months, tickSize, tickValue, pointValue, dayMargin, and overnightMargin.
Standardized formatting for multi‑market HUDs, Gann/Fibonacci tools, and risk models.
Continuation‑Safe
Every contract is defined on a single line for guaranteed compilation in Pine Script v6.
Avoids line‑continuation (+ or /) issues common in ternary operators.
Complete Coverage
Supports equity indices, metals, energies, FX, crypto, rates, and bonds.
Micro, mini, and full‑size contracts are fully mapped.
Plug‑and‑Play Integration
Designed as a drop‑in module for any SITFX script.
Provides a single function call:
pinescript
Copy
Edit
import SITFX_FuturesSpec_v17/1 as fs
spec = fs.get(syminfo.root)
label.new(bar_index, high, str.format("{0}: Tick={1}, Value=${2}", spec.name, spec.tickSize, spec.tickValue))
Instantly fetches tick and margin data for dynamic HUDs, risk sizing, and Gann/Fib calculations.
Future‑Ready Backbone
Centralized database for multi‑market, multi‑timeframe scripts.
Optimized for SITFX.StructureCollector, Gann/Fib Modules, and Risk Management HUDs.
🔹 Usage Notes
This library is timeframe and instrument agnostic.
Input: symbol as the root ticker (e.g., "ES", "MES", "GC", "M2K", "VX").
Output: A FuturesSpec record containing all contract details.
Fallback: Returns na if the symbol is not recognized.
🔹 Example Use Case
pinescript
Copy
Edit
import SITFX_FuturesSpec_v17/1 as fs
spec = fs.get(syminfo.root)
if not na(spec)
label.new(bar_index, close,
str.format("{0} | Tick={1} | Value=${2}", spec.symbol, spec.tickSize, spec.tickValue))
This library serves as the foundation for all professional SITFX scripts, enabling:
Real‑time margin & tick value calculation
Multi‑contract HUDs for indices, metals, energies, and FX
Preparation for Gann/Fibonacci confluence and quantified risk engines
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Solvere Trading Solutions, LLC
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
Solvere Trading Solutions, LLC
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.