The checkpoint stores the EMA, cumulative imbalance, global tick counter, previous price and direction, pending trades, and emitted sequence. This prevents archive boundaries and process restarts from changing future bars.
The adaptive threshold is a sampling rule, not a directional forecast. Positive or negative ending imbalance does not by itself constitute a trading signal.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Meridian","description":"Normalized crypto futures, spot, and custom trade-bar data for developers and agents.","colors":{"primary":"#3B82F6","light":"#8EBCFF","dark":"#1D4ED8"},"logo":{"light":"https://mintcdn.com/meridian-8f4232c2/GuX7nVwFuFEYL7yj/logo/light.svg?fit=max\u0026auto=format\u0026n=GuX7nVwFuFEYL7yj\u0026q=85\u0026s=87e034096bae4d137ac7b0f7a73c5b78","dark":"https://mintcdn.com/meridian-8f4232c2/GuX7nVwFuFEYL7yj/logo/dark.svg?fit=max\u0026auto=format\u0026n=GuX7nVwFuFEYL7yj\u0026q=85\u0026s=f77f3387daf3130313863afa9f67265e","href":"https://meridiandata.xyz"},"favicon":"https://mintcdn.com/meridian-8f4232c2/GuX7nVwFuFEYL7yj/favicon.svg?fit=max\u0026auto=format\u0026n=GuX7nVwFuFEYL7yj\u0026q=85\u0026s=adc7a126889adaee365e5ed37a98f77d","background":{"decoration":"gradient","color":{"light":"#F6F8FC","dark":"#0B1B33"}},"navbar":{"links":[{"href":"https://meridiandata.xyz","label":"Website"},{"href":"https://docs.meridiandata.xyz/operations/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Get an API key","href":"https://ctxprotocol.com/settings"}},"seo":{"metatags":{"canonical":"https://docs.meridiandata.xyz"}},"fonts":{"heading":{"family":"Zalando Sans Expanded","weight":700},"body":{"family":"Inter"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Meridian","icon":"chart-candlestick","href":"https://meridiandata.xyz"},{"anchor":"Context Protocol","icon":"network-wired","href":"https://docs.ctxprotocol.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"meridian-8f4232c2","hasAudioNarration":false,"actualSubdomain":"meridian-8f4232c2","customDomains":["docs.meridiandata.xyz"],"gitSource":{"type":"github","owner":"banga-agents","repo":"meridianv2","deployBranch":"main","contentDirectory":"website/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae95be862209e0b20b91167:success","clientVersion":"0.0.4088","searchFilterCounts":[{"language":"default","tag":"Custom Bars","count":6},{"language":"default","tag":"Data Catalog","count":6},{"language":"default","tag":"Tool Reference","count":5},{"language":"default","tag":"Context Integration","count":4},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Operations","count":3},{"language":"default","tag":"Overview","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"llms-txt-v2","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":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"custom-bars/imbalance-bars","slug":"/custom-bars/imbalance-bars","pageMetadata":{"title":"Imbalance bars","description":"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.","icon":"scale-unbalanced-flip","href":"/custom-bars/imbalance-bars"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Meridian’s imbalance bars use signed price-tick direction and an adaptive threshold.`}),`\n`,_jsx(Heading,{level:`2`,id:`tick-direction`,children:`Tick direction`}),`\n`,_jsx(_components.p,{children:`For each aggTrade price:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`price increased → +1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`price decreased → -1`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`price unchanged → carry the previous non-zero direction`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`The processor maintains an exponentially weighted average of tick signs:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`alpha = 2 / (expected_ticks_per_bar + 1)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`ema_tick_signs = alpha × tick + (1 - alpha) × previous_ema`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`adaptive-close-threshold`,children:`Adaptive close threshold`}),`\n`,_jsx(_components.p,{children:`After the warmup period, each signed tick is added to cumulative imbalance. The current threshold is:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`dynamic_threshold = max(`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` expected_ticks_per_bar × abs(ema_tick_signs),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` expected_ticks_per_bar × min_threshold_fraction`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`The bar closes when:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`abs(cumulative_imbalance) >= dynamic_threshold`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Parameter`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`expected_ticks_per_bar`})}),_jsx(_components.td,{children:`Baseline expected bar length and EMA span`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`warmup_ticks`})}),_jsx(_components.td,{children:`Initial ticks used to establish directional expectation`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`min_threshold_fraction`})}),_jsx(_components.td,{children:`Lower bound preventing a zero or near-zero threshold`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Warmup defaults to `,_jsx(_components.code,{children:`expected_ticks_per_bar`}),`. No imbalance bar is emitted during warmup.`]}),`\n`,_jsx(Heading,{level:`2`,id:`continuous-state`,children:`Continuous state`}),`\n`,_jsx(_components.p,{children:`The checkpoint stores the EMA, cumulative imbalance, global tick counter, previous price and direction, pending trades, and emitted sequence. This prevents archive boundaries and process restarts from changing future bars.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The adaptive threshold is a sampling rule, not a directional forecast. Positive or negative ending imbalance does not by itself constitute a trading signal.`})})]})}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":{"config":{},"pageMetadata":{"title":"Imbalance bars","description":"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.","icon":"scale-unbalanced-flip","href":"/custom-bars/imbalance-bars"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Tick direction","slug":"tick-direction","depth":2,"children":[]},{"title":"Adaptive close threshold","slug":"adaptive-close-threshold","depth":2,"children":[]},{"title":"Parameters","slug":"parameters","depth":2,"children":[]},{"title":"Continuous state","slug":"continuous-state","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"meridian-8f4232c2","siteName":"Meridian","title":"Imbalance bars - Meridian","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-14T08:30:44.353Z","originalFileLocation":"custom-bars/imbalance-bars.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"system\"}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=\"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Meridian\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_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=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Imbalance bars - Meridian\">\u003cmeta data-mint-head property=\"og:description\" content=\"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Meridian\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://meridian-8f4232c2.mintlify.site/_mintlify/api/og/v2?division=Custom+Bars\u0026amp;title=Imbalance+bars\u0026amp;description=Adaptive+Lopez+de+Prado-style+tick+imbalance+bars+with+continuous+state.\u0026amp;theme=b94d84be5ab4c05870869f5c\u0026amp;signature=84a25fe8d2a9af37155367eeeaad0e94c840ae38d73c821e956762a8bd19a288\">\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=\"Imbalance bars - Meridian\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://meridian-8f4232c2.mintlify.site/_mintlify/api/og/v2?division=Custom+Bars\u0026amp;title=Imbalance+bars\u0026amp;description=Adaptive+Lopez+de+Prado-style+tick+imbalance+bars+with+continuous+state.\u0026amp;theme=b94d84be5ab4c05870869f5c\u0026amp;signature=84a25fe8d2a9af37155367eeeaad0e94c840ae38d73c821e956762a8bd19a288\">\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=\"/mintlify-assets/_mintlify/favicons/meridian-8f4232c2/jo3jYT63SDGyI5_9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Meridian\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3B82F6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/custom-bars/imbalance-bars.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.meridiandata.xyz/#organization\",\"name\":\"Meridian\",\"url\":\"https://docs.meridiandata.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/meridian-8f4232c2/GuX7nVwFuFEYL7yj/logo/light.svg?fit=max\u0026auto=format\u0026n=GuX7nVwFuFEYL7yj\u0026q=85\u0026s=87e034096bae4d137ac7b0f7a73c5b78\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.meridiandata.xyz#website\",\"name\":\"Meridian\",\"url\":\"https://docs.meridiandata.xyz\",\"publisher\":{\"@id\":\"https://docs.meridiandata.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars#webpage\",\"url\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars\",\"name\":\"Imbalance bars\",\"description\":\"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.\",\"dateModified\":\"2026-07-14T08:30:44.353Z\",\"isPartOf\":{\"@id\":\"https://docs.meridiandata.xyz#website\"},\"breadcrumb\":{\"@id\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Custom Bars\",\"item\":\"https://docs.meridiandata.xyz/custom-bars/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Imbalance bars\",\"item\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars#article\",\"headline\":\"Imbalance bars\",\"name\":\"Imbalance bars\",\"description\":\"Adaptive Lopez de Prado-style tick imbalance bars with continuous state.\",\"url\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars\",\"mainEntityOfPage\":{\"@id\":\"https://docs.meridiandata.xyz/custom-bars/imbalance-bars#webpage\"},\"dateModified\":\"2026-07-14T08:30:44.353Z\",\"publisher\":{\"@id\":\"https://docs.meridiandata.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.meridiandata.xyz#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Meridian\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Meridian","nav":{"global":{"anchors":[{"anchor":"Meridian","icon":"chart-candlestick","href":"https://meridiandata.xyz"},{"anchor":"Context Protocol","icon":"network-wired","href":"https://docs.ctxprotocol.com"}]},"pages":[{"group":"Overview","pages":[{"title":"Meridian documentation","icon":"chart-candlestick","href":"/index"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"}]},{"group":"Getting Started","pages":[{"title":"Authentication and billing","icon":"key","href":"/getting-started/authentication"},{"title":"Query mode and Execute mode","icon":"route","href":"/getting-started/query-vs-execute"},{"title":"Pricing and request limits","icon":"badge-dollar","href":"/getting-started/pricing"}]},{"group":"Context Integration","pages":[{"title":"Tool ID and methods","icon":"fingerprint","href":"/reference/tool-id"},{"title":"TypeScript SDK","icon":"code","href":"/integrations/typescript"},{"title":"Python SDK","icon":"code","href":"/integrations/python"},{"title":"Official MCP endpoint","icon":"plug","href":"/integrations/mcp"}]},{"group":"Tool Reference","pages":[{"title":"futures","icon":"chart-candlestick","href":"/reference/futures"},{"title":"spot","icon":"circle-dollar","href":"/reference/spot"},{"title":"custom_bars_catalog","icon":"list-tree","href":"/reference/custom-bars-catalog"},{"title":"custom_bars","icon":"chart-column","href":"/reference/custom-bars"},{"title":"Response contract","icon":"brackets-curly","href":"/reference/response-contract"}]},{"group":"Data Catalog","pages":[{"title":"Instruments and aliases","icon":"coins","href":"/data/instruments"},{"title":"Futures columns","icon":"table-columns","href":"/data/futures-columns"},{"title":"Spot columns","icon":"table-columns","href":"/data/spot-columns"},{"title":"Custom-bar columns","icon":"table-columns","href":"/data/custom-bar-columns"},{"title":"Coverage","icon":"grid-2-plus","href":"/data/coverage"},{"title":"Provenance","icon":"route","href":"/data/provenance"}]},{"group":"Custom Bars","pages":[{"title":"Custom bars overview","icon":"chart-column","href":"/custom-bars/overview"},{"title":"Dollar bars","icon":"dollar-sign","href":"/custom-bars/dollar-bars"},{"title":"Volume bars","icon":"scale-balanced","href":"/custom-bars/volume-bars"},{"title":"Tick bars","description":"Bars that close after a configured number of Binance aggTrade records.","icon":"list-ol","href":"/custom-bars/tick-bars"},{"title":"Imbalance bars","icon":"scale-unbalanced-flip","href":"/custom-bars/imbalance-bars"},{"title":"Worked examples","description":"Understand custom-bar threshold mechanics and query exact stored configurations.","icon":"flask","href":"/custom-bars/worked-example"}]},{"group":"Operations","pages":[{"title":"Pagination and large results","icon":"pages","href":"/operations/pagination"},{"title":"Errors and empty results","icon":"triangle-exclamation","href":"/operations/errors"},{"title":"Changelog","icon":"clock-rotate-left","href":"/operations/changelog"}]}]},"basePath":"","title":"Imbalance bars - Meridian","buildId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","deploymentId":"dpl_DTau1J5HqS9UTgVSDwGksstFWtPa","dynamics":[],"chunks":[]}