The single open-interest series, oi, and what it holds where an instrument has no open interest.
oi is a series float holding the open interest of the bar. It is the only open-interest name: there is no oi namespace and no other function.
//@lipi=2indicator("Open interest change")plot(oi - oi[1], title="Change in open interest", style=plotStyle.histogram)
Where the instrument has no open-interest data, the bar carries none and oi is 0, not na. Test oi > 0 rather than na(oi) to find out whether there is data.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"GoCharting","description":"GoCharting documentation. This site currently covers Lipi Script, GoCharting's scripting language: the v2 manual and the language reference. The platform user guide and the Charting SDK documentation are at https://gocharting.com/docs.","colors":{"primary":"#ffaa01","light":"#ffaa01","dark":"#ffaa01"},"logo":{"light":"https://mintcdn.com/go-charting-inc/JBs2pgZxOIEv87rH/logo/light.svg?fit=max\u0026auto=format\u0026n=JBs2pgZxOIEv87rH\u0026q=85\u0026s=e11aff4c1906dd58c9f7eceeea946e41","dark":"https://mintcdn.com/go-charting-inc/JBs2pgZxOIEv87rH/logo/dark.svg?fit=max\u0026auto=format\u0026n=JBs2pgZxOIEv87rH\u0026q=85\u0026s=9072a8977cf3d186f5b38de87d18af44","href":"https://gocharting.com"},"favicon":"https://mintcdn.com/go-charting-inc/JBs2pgZxOIEv87rH/favicon.svg?fit=max\u0026auto=format\u0026n=JBs2pgZxOIEv87rH\u0026q=85\u0026s=ae9441a870f9461b51bfedbae2718f20","appearance":{"default":"dark","strict":true},"background":{"color":{"light":"#1a1923","dark":"#1a1923"}},"navbar":{"links":[{"href":"https://gocharting.com/","label":"Products"},{"href":"https://gocharting.com/pricing","label":"Pricing"},{"href":"https://gocharting.com/education","label":"Resources"},{"href":"https://gocharting.com/sign-in","label":"Sign in"}],"primary":{"type":"button","label":"Open GoCharting","href":"https://gocharting.com"}},"footer":{"socials":{"x":"https://x.com/GoCharting","youtube":"https://youtube.com/@GoCharting","linkedin":"https://linkedin.com/company/gocharting","facebook":"https://facebook.com/GoCharting","instagram":"https://instagram.com/gocharting_official"}},"seo":{"metatags":{"canonical":"https://gocharting.com/docs","og:image":"https://gocharting.com/og/docs.png","twitter:image":"https://gocharting.com/og/docs.png"}},"fonts":{"heading":{"family":"Satoshi","weight":500,"source":"https://go-charting-inc.mintlify.site/docs/fonts/satoshi-latin-500-normal.woff2","format":"woff2"},"body":{"family":"Inter","weight":400,"source":"https://go-charting-inc.mintlify.site/docs/fonts/inter-latin-wght-normal.woff2","format":"woff2"}},"styling":{"codeblocks":{"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}},"latex":false},"integrations":{"gtm":{"tagId":"GTM-TF6Q9FJ"},"intercom":{"appId":"nrxfha2b"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","add-mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"go-charting-inc","hasAudioNarration":false,"actualSubdomain":"go-charting-inc","customDomains":["gocharting.com"],"gitSource":{"type":"github","owner":"gochartinginc","repo":"gocharting-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true,"edits":false,"issues":false,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae8736c6bec035f345955c1","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Lipi Script","count":147},{"language":"default","tag":"Manual","count":72},{"language":"default","tag":"Reference","count":70},{"language":"default","tag":"How to","count":21},{"language":"default","tag":"Functions","count":18},{"language":"default","tag":"Language map","count":18},{"language":"default","tag":"Constants","count":14},{"language":"default","tag":"Variables","count":14},{"language":"default","tag":"Writing Lipi","count":11},{"language":"default","tag":"Putting results on the chart","count":8}],"searchSettings":{"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@gocharting.com"}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--gc-bg: #1a1923;--gc-header-bg: #05060e;--gc-elevated: #232128;--gc-accent: #ffaa01;--gc-on-accent: #1a1923;--gc-positive: #009d54;--gc-negative: #ca4a4a;--gc-border: rgba(255, 255, 255, 0.08);--gc-radius: 12px}#navbar,#navbar>div{background-color:var(--gc-header-bg);border-color:var(--gc-border)}#navbar a[href][class*=\"rounded\"]{background-color:var(--gc-accent);color:var(--gc-on-accent);border-radius:var(--gc-radius)}code,pre{font-family:\"IBM Plex Mono\", ui-monospace, Consolas, monospace}"}],"page":{"pagePath":"scripting/market-data/open-interest","slug":"/scripting/market-data/open-interest","pageMetadata":{"title":"Open interest","description":"The single open-interest series, `oi`, and what it holds where an instrument has no open interest.","canonical":"https://gocharting.com/docs/scripting/market-data/open-interest","href":"/scripting/market-data/open-interest"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"The single open-interest series, \", _jsx(_components.code, {\n children: \"oi\"\n }), \", and what it holds where an instrument has no open interest.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`oi`}),` is a series float holding the open interest of the bar. It is the only open-interest name: there is no `,_jsx(_components.code,{children:`oi`}),` namespace and no other function.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`lipi`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`lipi`,children:_jsxs(_components.code,{language:`lipi`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`//@lipi=2`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`indicator`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Open interest change\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`plot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`oi`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` -`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` oi`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Change in open interest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, style`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`plotStyle.histogram)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Where the instrument has no open-interest data, the bar carries none and `,_jsx(_components.code,{children:`oi`}),` is 0, not `,_jsx(_components.code,{children:`na`}),`. Test `,_jsx(_components.code,{children:`oi > 0`}),` rather than `,_jsx(_components.code,{children:`na(oi)`}),` to find out whether there is data.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":{"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}},"config":{},"pageMetadata":{"title":"Open interest","description":"The single open-interest series, `oi`, and what it holds where an instrument has no open interest.","canonical":"https://gocharting.com/docs/scripting/market-data/open-interest","href":"/scripting/market-data/open-interest"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"go-charting-inc","siteName":"GoCharting","title":"Open interest - GoCharting","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T14:12:32.726Z","originalFileLocation":"scripting/market-data/open-interest.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"The single open-interest series, oi, and what it holds where an instrument has no open interest.\">\u003cmeta data-mint-head name=\"application-name\" content=\"GoCharting\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Open interest - GoCharting\">\u003cmeta data-mint-head property=\"og:description\" content=\"The single open-interest series, oi, and what it holds where an instrument has no open interest.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GoCharting\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://gocharting.com/docs/scripting/market-data/open-interest\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gocharting.com/og/docs.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Open interest - GoCharting\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"The single open-interest series, oi, and what it holds where an instrument has no open interest.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gocharting.com/og/docs.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/go-charting-inc/Kr_zHwHt63dK5kAC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GoCharting\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ffaa01\">\u003clink data-mint-head rel=\"canonical\" href=\"https://gocharting.com/docs/scripting/market-data/open-interest\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/scripting/market-data/open-interest.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://gocharting.com/#organization\",\"name\":\"GoCharting\",\"url\":\"https://gocharting.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/go-charting-inc/JBs2pgZxOIEv87rH/logo/light.svg?fit=max\u0026auto=format\u0026n=JBs2pgZxOIEv87rH\u0026q=85\u0026s=e11aff4c1906dd58c9f7eceeea946e41\"}},{\"@type\":\"WebSite\",\"@id\":\"https://gocharting.com/docs#website\",\"name\":\"GoCharting\",\"url\":\"https://gocharting.com/docs\",\"publisher\":{\"@id\":\"https://gocharting.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://gocharting.com/docs/scripting/market-data/open-interest#webpage\",\"url\":\"https://gocharting.com/docs/scripting/market-data/open-interest\",\"name\":\"Open interest\",\"description\":\"The single open-interest series, oi, and what it holds where an instrument has no open interest.\",\"dateModified\":\"2026-10-28T14:12:32.726Z\",\"isPartOf\":{\"@id\":\"https://gocharting.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://gocharting.com/docs/scripting/market-data/open-interest#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://gocharting.com/docs/scripting/market-data/open-interest#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Manual\",\"item\":\"https://gocharting.com/docs/scripting/getting-started/first-script\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Market data a script can read\",\"item\":\"https://gocharting.com/docs/scripting/market-data/price-and-volume\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Open interest\",\"item\":\"https://gocharting.com/docs/scripting/market-data/open-interest\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://gocharting.com/docs/scripting/market-data/open-interest#article\",\"headline\":\"Open interest\",\"name\":\"Open interest\",\"description\":\"The single open-interest series, oi, and what it holds where an instrument has no open interest.\",\"url\":\"https://gocharting.com/docs/scripting/market-data/open-interest\",\"mainEntityOfPage\":{\"@id\":\"https://gocharting.com/docs/scripting/market-data/open-interest#webpage\"},\"image\":\"https://gocharting.com/og/docs.png\",\"dateModified\":\"2026-10-28T14:12:32.726Z\",\"publisher\":{\"@id\":\"https://gocharting.com/#organization\"},\"isPartOf\":{\"@id\":\"https://gocharting.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"GoCharting\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"GoCharting\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/scripting/market-data/open-interest.md","siteName":"GoCharting","nav":{"global":null,"tabs":[{"tab":"Lipi Script","pages":[{"title":"Scripting on GoCharting","href":"/scripting"},{"title":"Why Lipi exists","href":"/scripting/lipi-genesis"},{"group":"Manual","pages":[{"group":"Getting started","pages":[{"title":"Write your first script","href":"/scripting/getting-started/first-script"},{"title":"The Lipi editor","href":"/scripting/getting-started/editor"},{"title":"Reading someone else's script","href":"/scripting/getting-started/reading-scripts"},{"title":"What Lipi does not do","href":"/scripting/getting-started/not-supported"},{"title":"Moving a script from Lipi v1 to v2","href":"/scripting/getting-started/migrating-from-v1"}]},{"group":"Tutorials","pages":[{"title":"Add an input to your script","href":"/scripting/learn/add-an-input"},{"title":"Alert on your own condition","href":"/scripting/learn/alert-on-your-condition"},{"title":"Color a plot by condition","href":"/scripting/learn/color-by-condition"},{"title":"Read someone else's script","href":"/scripting/learn/read-someone-elses-script"},{"title":"Draw a level and a label","href":"/scripting/learn/draw-a-level-and-a-label"},{"title":"Keep the last values in an array","href":"/scripting/learn/keep-the-last-values-in-an-array"},{"title":"Backtest a moving-average crossover","href":"/scripting/learn/backtest-a-crossover"}]},{"group":"How to","pages":[{"title":"How to avoid a result that changes after the bar closes","sidebarTitle":"Avoid a result that changes after the bar closes","href":"/scripting/how-to/avoid-a-result-that-changes-after-the-bar-closes"},{"title":"How to color bars by a condition","sidebarTitle":"Color bars by a condition","href":"/scripting/how-to/color-bars-by-a-condition"},{"title":"How to draw a line between two pivots","sidebarTitle":"Draw a line between two pivots","href":"/scripting/how-to/draw-a-line-between-two-pivots"},{"title":"How to group and lay out your inputs","sidebarTitle":"Group and lay out your inputs","href":"/scripting/how-to/group-and-lay-out-your-inputs"},{"title":"How to keep a running total across bars","sidebarTitle":"Keep a running total across bars","href":"/scripting/how-to/keep-a-running-total-across-bars"},{"title":"How to let the chart user choose a color","sidebarTitle":"Let the chart user choose a color","href":"/scripting/how-to/let-the-chart-user-choose-a-color"},{"title":"How to plot a value on its own scale rather than over price","sidebarTitle":"Plot a value on its own scale rather than over price","href":"/scripting/how-to/plot-a-value-on-its-own-scale"},{"title":"How to plot only during part of the session","sidebarTitle":"Plot only during part of the session","href":"/scripting/how-to/plot-only-during-part-of-the-session"},{"title":"How to put a marker on a specific bar","sidebarTitle":"Put a marker on a specific bar","href":"/scripting/how-to/put-a-marker-on-a-specific-bar"},{"title":"How to reference a value from a previous bar","sidebarTitle":"Reference a value from a previous bar","href":"/scripting/how-to/reference-a-value-from-a-previous-bar"},{"title":"How to return more than one value from a function","sidebarTitle":"Return more than one value from a function","href":"/scripting/how-to/return-more-than-one-value-from-a-function"},{"title":"How to reuse a calculation with your own function","sidebarTitle":"Reuse a calculation with your own function","href":"/scripting/how-to/reuse-a-calculation-with-your-own-function"},{"title":"How to send a webhook when your condition fires","sidebarTitle":"Send a webhook when your condition fires","href":"/scripting/how-to/send-a-webhook-when-your-condition-fires"},{"title":"How to shade the area between two plots","sidebarTitle":"Shade the area between two plots","href":"/scripting/how-to/shade-the-area-between-two-plots"},{"title":"How to tell a forming bar from one that has closed","sidebarTitle":"Tell a forming bar from one that has closed","href":"/scripting/how-to/tell-a-forming-bar-from-one-that-has-closed"},{"title":"How to work around a name Lipi does not have","sidebarTitle":"Work around a name Lipi does not have","href":"/scripting/how-to/work-around-a-name-lipi-does-not-have"},{"title":"How to keep one label that moves with the last bar","sidebarTitle":"Keep one label that moves with the last bar","href":"/scripting/how-to/keep-one-label-that-moves"},{"title":"How to show a table of values","sidebarTitle":"Show a table of values","href":"/scripting/how-to/show-a-table-of-values"},{"title":"How to group values in your own type","sidebarTitle":"Group values in your own type","href":"/scripting/how-to/group-values-in-your-own-type"},{"title":"How to keep drawings under the limit","sidebarTitle":"Keep drawings under the limit","href":"/scripting/how-to/keep-drawings-under-the-limit"},{"title":"How to format a time as text","sidebarTitle":"Format a time as text","href":"/scripting/how-to/format-a-time-as-text"}]},{"group":"How scripts are evaluated","pages":[{"title":"Bar-by-bar evaluation","href":"/scripting/evaluation/bar-by-bar"},{"title":"Referencing previous bars","href":"/scripting/evaluation/referencing-past-bars"},{"title":"Values that persist across bars","href":"/scripting/evaluation/persistence"},{"title":"Recalculation and confirmation","href":"/scripting/evaluation/recalculation"},{"title":"Calls that must run on every bar","href":"/scripting/evaluation/call-contract"}]},{"group":"Writing Lipi","pages":[{"title":"Script anatomy","href":"/scripting/language/anatomy"},{"title":"Statements and lines","href":"/scripting/language/statements-and-lines"},{"title":"Values and types","href":"/scripting/language/values-and-types"},{"title":"const, input, simple and series","href":"/scripting/language/qualifiers"},{"title":"Operators and expressions","href":"/scripting/language/expressions"},{"title":"Branching","href":"/scripting/language/branching"},{"title":"Loops","href":"/scripting/language/repetition"},{"title":"Your own functions","href":"/scripting/language/custom-functions"},{"title":"Custom types and enums","href":"/scripting/language/custom-types"},{"title":"Arrays","href":"/scripting/language/arrays"},{"title":"Names and conventions","href":"/scripting/language/names-and-conventions"}]},{"group":"Market data a script can read","pages":[{"title":"Price and volume","href":"/scripting/market-data/price-and-volume"},{"title":"Orderflow: buying, selling and delta","description":"The orderflow series for trade counts, buy and sell volume and delta, and the cumulative volume delta function.","href":"/scripting/market-data/orderflow"},{"title":"Open interest","href":"/scripting/market-data/open-interest"},{"title":"Sessions and intervals","description":"Bar times and their parts, building a time with timestamp, testing a trading session, and reading the chart's interval.","href":"/scripting/market-data/sessions-and-intervals"},{"title":"Instrument properties","href":"/scripting/market-data/instrument"},{"title":"Data availability by market","href":"/scripting/market-data/availability"}]},{"group":"Putting results on the chart","pages":[{"title":"Plotting","href":"/scripting/chart-output/plotting"},{"title":"Color and transparency","href":"/scripting/chart-output/color"},{"title":"Fills and levels","href":"/scripting/chart-output/fills-and-levels"},{"title":"Bar coloring and background","href":"/scripting/chart-output/bars-and-background"},{"title":"Text and markers","href":"/scripting/chart-output/text-and-markers"},{"title":"Lines, labels, boxes and polylines","href":"/scripting/chart-output/drawings"},{"title":"Tables","href":"/scripting/chart-output/tables"},{"title":"Plots or drawings: which to use","href":"/scripting/chart-output/plots-or-drawings"}]},{"group":"Strategies","pages":[{"title":"Strategies and backtesting","href":"/scripting/strategies/overview"},{"title":"Orders and positions","href":"/scripting/strategies/orders-and-positions"},{"title":"Reading a strategy's results","href":"/scripting/strategies/strategy-results"}]},{"group":"Configuration","pages":[{"title":"Inputs","href":"/scripting/configuration/inputs"}]},{"group":"Alerts and automation","pages":[{"title":"Alerts","href":"/scripting/automation/alerts"},{"title":"Webhooks for algo trading","href":"/scripting/automation/webhooks"}]},{"group":"Distribution","pages":[{"title":"House style and naming","href":"/scripting/distribution/house-style"},{"title":"Limits","href":"/scripting/distribution/limits"},{"title":"Sharing scripts","href":"/scripting/distribution/sharing"}]}]},{"group":"Use Lipi with AI","pages":[{"title":"Use Lipi with AI","sidebarTitle":"Overview","href":"/scripting/ai/overview"},{"title":"The GoCharting Lipi skill","sidebarTitle":"Lipi skill","href":"/scripting/ai/skill"},{"title":"Docs for AI tools","href":"/scripting/ai/docs-for-ai-tools"}]},{"group":"Reference","pages":[{"title":"Lipi v2 reference","href":"/scripting/reference/index"},{"title":"Compiler messages","href":"/scripting/reference/errors"},{"group":"Functions","pages":[{"title":"Global functions","sidebarTitle":"Global","href":"/scripting/reference/functions/global"},{"title":"array functions","sidebarTitle":"array","href":"/scripting/reference/functions/array"},{"title":"box functions","sidebarTitle":"box","href":"/scripting/reference/functions/box"},{"title":"chartPoint functions","sidebarTitle":"chartPoint","href":"/scripting/reference/functions/chartpoint"},{"title":"color functions","sidebarTitle":"color","href":"/scripting/reference/functions/color"},{"title":"input functions","sidebarTitle":"input","href":"/scripting/reference/functions/input"},{"title":"interval functions","sidebarTitle":"interval","href":"/scripting/reference/functions/interval"},{"title":"label functions","sidebarTitle":"label","href":"/scripting/reference/functions/label"},{"title":"line functions","sidebarTitle":"line","href":"/scripting/reference/functions/line"},{"title":"linefill functions","sidebarTitle":"linefill","href":"/scripting/reference/functions/linefill"},{"title":"math functions","sidebarTitle":"math","href":"/scripting/reference/functions/math"},{"title":"orderflow functions","sidebarTitle":"orderflow","href":"/scripting/reference/functions/orderflow"},{"title":"polyline functions","sidebarTitle":"polyline","href":"/scripting/reference/functions/polyline"},{"title":"str functions","sidebarTitle":"str","href":"/scripting/reference/functions/str"},{"title":"strategy functions","sidebarTitle":"strategy","href":"/scripting/reference/functions/strategy"},{"title":"ta functions","sidebarTitle":"ta","href":"/scripting/reference/functions/ta"},{"title":"table functions","sidebarTitle":"table","href":"/scripting/reference/functions/table"},{"title":"talib functions","sidebarTitle":"talib","href":"/scripting/reference/functions/talib"}]},{"group":"Variables","pages":[{"title":"Global variables","sidebarTitle":"Global","href":"/scripting/reference/variables/global"},{"title":"barstate variables","sidebarTitle":"barstate","href":"/scripting/reference/variables/barstate"},{"title":"box variables","sidebarTitle":"box","href":"/scripting/reference/variables/box"},{"title":"chart variables","sidebarTitle":"chart","href":"/scripting/reference/variables/chart"},{"title":"interval variables","sidebarTitle":"interval","href":"/scripting/reference/variables/interval"},{"title":"label variables","sidebarTitle":"label","href":"/scripting/reference/variables/label"},{"title":"line variables","sidebarTitle":"line","href":"/scripting/reference/variables/line"},{"title":"linefill variables","sidebarTitle":"linefill","href":"/scripting/reference/variables/linefill"},{"title":"orderflow variables","sidebarTitle":"orderflow","href":"/scripting/reference/variables/orderflow"},{"title":"polyline variables","sidebarTitle":"polyline","href":"/scripting/reference/variables/polyline"},{"title":"session variables","sidebarTitle":"session","href":"/scripting/reference/variables/session"},{"title":"strategy variables","sidebarTitle":"strategy","href":"/scripting/reference/variables/strategy"},{"title":"syminfo variables","sidebarTitle":"syminfo","href":"/scripting/reference/variables/syminfo"},{"title":"table variables","sidebarTitle":"table","href":"/scripting/reference/variables/table"}]},{"group":"Constants","pages":[{"title":"Global constants","sidebarTitle":"Global","href":"/scripting/reference/constants/global"},{"title":"color constants","sidebarTitle":"color","href":"/scripting/reference/constants/color"},{"title":"dayofweek constants","sidebarTitle":"dayofweek","href":"/scripting/reference/constants/dayofweek"},{"title":"extend constants","sidebarTitle":"extend","href":"/scripting/reference/constants/extend"},{"title":"format constants","sidebarTitle":"format","href":"/scripting/reference/constants/format"},{"title":"label constants","sidebarTitle":"label","href":"/scripting/reference/constants/label"},{"title":"line constants","sidebarTitle":"line","href":"/scripting/reference/constants/line"},{"title":"math constants","sidebarTitle":"math","href":"/scripting/reference/constants/math"},{"title":"order constants","sidebarTitle":"order","href":"/scripting/reference/constants/order"},{"title":"position constants","sidebarTitle":"position","href":"/scripting/reference/constants/position"},{"title":"strategy constants","sidebarTitle":"strategy","href":"/scripting/reference/constants/strategy"},{"title":"text constants","sidebarTitle":"text","href":"/scripting/reference/constants/text"},{"title":"xloc constants","sidebarTitle":"xloc","href":"/scripting/reference/constants/xloc"},{"title":"yloc constants","sidebarTitle":"yloc","href":"/scripting/reference/constants/yloc"}]},{"title":"Lipi types","sidebarTitle":"Types","href":"/scripting/reference/types"},{"title":"Lipi keywords","sidebarTitle":"Keywords","href":"/scripting/reference/keywords"},{"title":"Lipi operators","sidebarTitle":"Operators","href":"/scripting/reference/operators"},{"title":"Lipi enums","sidebarTitle":"Enums","href":"/scripting/reference/enums"},{"group":"Language map","pages":[{"title":"Lipi language map","sidebarTitle":"Overview","href":"/scripting/reference/language-map/index"},{"title":"Execution and types across languages","sidebarTitle":"Execution and types","href":"/scripting/reference/language-map/execution-and-types"},{"title":"History and state across languages","sidebarTitle":"History and state","href":"/scripting/reference/language-map/history-and-state"},{"title":"Control flow, functions and collections across languages","sidebarTitle":"Control flow, functions and collections","href":"/scripting/reference/language-map/control-flow-and-functions"},{"title":"Inputs across languages","sidebarTitle":"Inputs","href":"/scripting/reference/language-map/inputs"},{"title":"Plots and drawings across languages","sidebarTitle":"Plots and drawings","href":"/scripting/reference/language-map/plots-and-drawings"},{"title":"Strategies and alerts across languages","sidebarTitle":"Strategies and alerts","href":"/scripting/reference/language-map/strategies-and-alerts"},{"title":"Market data and time across languages","sidebarTitle":"Market data and time","href":"/scripting/reference/language-map/market-data-and-time"},{"title":"Math and strings across languages","sidebarTitle":"Math and strings","href":"/scripting/reference/language-map/math-and-strings"},{"title":"Arrays across languages","sidebarTitle":"Arrays","href":"/scripting/reference/language-map/arrays"},{"group":"Technical indicators","pages":[{"title":"Moving averages across languages","sidebarTitle":"Moving averages","href":"/scripting/reference/language-map/indicators/moving-averages"},{"title":"Oscillators across languages","sidebarTitle":"Oscillators","href":"/scripting/reference/language-map/indicators/oscillators"},{"title":"Volatility and bands across languages","sidebarTitle":"Volatility and bands","href":"/scripting/reference/language-map/indicators/volatility-and-bands"},{"title":"Volume across languages","sidebarTitle":"Volume","href":"/scripting/reference/language-map/indicators/volume"},{"title":"Extremes, pivots and statistics across languages","sidebarTitle":"Extremes, pivots and statistics","href":"/scripting/reference/language-map/indicators/extremes-and-pivots"},{"title":"Series helpers across languages","sidebarTitle":"Series helpers","href":"/scripting/reference/language-map/indicators/series-helpers"}]},{"title":"What Lipi does not have","sidebarTitle":"Not in Lipi","href":"/scripting/reference/language-map/not-in-lipi"},{"title":"How to convert a script to Lipi","sidebarTitle":"Convert a script","href":"/scripting/reference/language-map/convert-a-script"}]}]}]}]},"basePath":"","title":"Open interest - GoCharting","buildId":"dpl_Aw98ji4XvBsgtZwL1VrkUF9ehFqz","deploymentId":"dpl_Aw98ji4XvBsgtZwL1VrkUF9ehFqz","dynamics":[],"chunks":[]}