Stacked imbalances above a bar’s point of control, on bars that closed above it, marked on the footprint’s own rows.
BTC on 15-minute bars in the 0xArchive Terminal, 2026-10-23.
Open on a chart
Load it on BTC 15m in the terminal, then change its settings or open it in the script editor.
Buyers stepping up through a bar’s busiest price and holding there into the close: three or more imbalanced rows in a row, wholly above the bar’s point of control, on a bar that closed above it. Each stack is shaded across the bar, on the Bid × Ask footprint’s own rows, so it sits exactly on the imbalances the footprint colours. Side marks selling stacks too, or only them.The imbalances follow the footprint chart’s rule: buying at a row against the selling one row below it (diagonal), three times or more, leaving out cells under 8% of the bar’s biggest. Each is an input. Only closed bars are marked, since “closed above” needs a close.
chart.rowSize is the row size the footprint draws, Auto or the reader’s own. volumeProfile() gives each bar’s rows and point of control at that size, and plot.cells shades each stack as one band inside the bar. When Auto picks other rows as you zoom, the script runs again on them.
// Stacked imbalances above the point of control, on bars that closed above it: buyers stepping up// through the bar's busiest price and holding there into the close. Each stack is shaded across the// bar, on the footprint's own rows. Imbalances follow the footprint chart's rule: buying at a row// against the selling one row below it (diagonal), 3x or more, leaving out cells under 8% of the// bar's biggest; three imbalanced rows in a row make a stack.indicator('Stacked imbalances above PoC', { overlay: true, shortName: 'Stacked > PoC' });const ratio = input.float('Imbalance ratio', 3, { min: 1, step: 0.5 });const stack = input.int('Rows in a stack', 3, { min: 2, max: 20 });const floorPct = input.float('Ignore cells under % of the bar\'s biggest', 8, { min: 0, max: 100 });const side = input.choice('Side', 'buy', ['buy', 'sell', 'both'] as const, { labels: { buy: 'Buying', sell: 'Selling', both: 'Both' } });const chart = bars();const profile = volumeProfile();const marks = plot.cells('Stacks', { candles: 'overlay', scale: 'unit' });const fired = alert('Stacked imbalance above PoC', { message: 'Stacked imbalance above the PoC, bar closed above it' });chart.onBar(() => { // "Closed above" needs a close: the forming bar waits until it has one. if (!chart.confirmed || !profile.available) return; const bar = profile.bar(); const rows = bar.rows({ rowSize: chart.rowSize }); const poc = bar.poc({ rowSize: chart.rowSize }); if (rows === null || poc === null || chart.close < poc.high) return; let biggest = 0; for (const row of rows) biggest = Math.max(biggest, row.buy, row.sell); const floor = biggest * floorPct / 100; // Rows run lowest price first, so the row below is i - 1 and the row above is i + 1. const buyImb = rows.map((row, i) => i > 0 && row.buy > 0 && row.buy >= floor && row.buy >= ratio * rows[i - 1].sell); const sellImb = rows.map((row, i) => i + 1 < rows.length && row.sell > 0 && row.sell >= floor && row.sell >= ratio * rows[i + 1].buy); let found = false; const shade = (flags: boolean[], tone: Color) => { let run = 0; for (let i = 0; i <= rows.length; i += 1) { if (i < rows.length && flags[i]) { run += 1; continue; } const from = i - run; // The whole stack sits above the point of control's row. if (run >= stack && rows[from].low >= poc.high) { marks.add({ low: rows[from].low, high: rows[i - 1].high, color: color.withAlpha(tone, 0.22), border: tone }); found = true; } run = 0; } }; if (side !== 'sell') shade(buyImb, color.up); if (side !== 'buy') shade(sellImb, color.down); fired.fire(found);});
{"docsConfig":{"theme":"palm","$schema":"https://mintlify.com/docs.json","name":"0xArchive","description":"Hyperliquid and Lighter market data through the REST API, WebSocket, Webhook Alerts, and Bulk Exports. Start with your first request on the Free plan.","colors":{"primary":"#15803D","light":"#21C55E","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/0xarchive-e895b8e7/_8ck-oUq6ufsot88/logo-light.svg?fit=max\u0026auto=format\u0026n=_8ck-oUq6ufsot88\u0026q=85\u0026s=125ef51299181bd38460b33344f30ff5","dark":"https://mintcdn.com/0xarchive-e895b8e7/_8ck-oUq6ufsot88/logo-dark.svg?fit=max\u0026auto=format\u0026n=_8ck-oUq6ufsot88\u0026q=85\u0026s=829b1f9b3638e20a5c6bc6032ab00025","href":"https://0xarchive.io/?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=logo_home"},"favicon":"https://mintcdn.com/0xarchive-e895b8e7/_8ck-oUq6ufsot88/favicon.svg?fit=max\u0026auto=format\u0026n=_8ck-oUq6ufsot88\u0026q=85\u0026s=df84c8913362b83bdf0443dd4b49a717","api":{"openapi":{"source":"openapi.json","directory":"api-reference"},"params":{"expanded":"all"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript","go"],"prefill":true,"autogenerate":true},"url":"full"},"appearance":{"default":"dark","strict":false},"navbar":{"links":[{"href":"https://0xarchive.io/pricing?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_pricing","label":"Pricing"},{"href":"https://0xarchive.io/status?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_status","label":"Status"},{"href":"https://0xarchive.io/changelog?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_changelog","label":"Changelog"},{"href":"https://github.com/0xArchiveIO","label":"GitHub"}],"primary":{"type":"button","label":"Dashboard","href":"https://0xarchive.io/dashboard?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=navbar_dashboard"}},"footer":{"socials":{"x":"https://x.com/0xarchiveIo","github":"https://github.com/0xArchiveIO","telegram":"https://t.me/archivedotio","linkedin":"https://www.linkedin.com/company/0xarchive"},"links":[{"header":"Product","items":[{"label":"Pricing","href":"https://0xarchive.io/pricing?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_pricing"},{"label":"Status","href":"https://0xarchive.io/status?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_status"},{"label":"Data Catalog","href":"https://0xarchive.io/data?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_data_catalog"},{"label":"Dashboard","href":"https://0xarchive.io/dashboard?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_dashboard"}]},{"header":"Developers","items":[{"label":"Data rights","href":"/data-rights"},{"label":"AI clients","href":"/ai-clients"},{"label":"Coding agents","href":"/coding-agents"},{"label":"Choose an interface","href":"/tooling"}]},{"header":"Resources","items":[{"label":"Reference","href":"/reference"},{"label":"OpenAPI","href":"/openapi"},{"label":"Free crypto data API","href":"/free-crypto-data-api"},{"label":"Sitemap","href":"/sitemap"},{"label":"llms.txt","href":"/llms.txt"},{"label":"llms-full.txt","href":"/llms-full.txt"},{"label":"Resources","href":"https://0xarchive.io/resources?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_blog"}]},{"header":"Company","items":[{"label":"Home","href":"https://0xarchive.io/?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_home"},{"label":"Contact","href":"https://0xarchive.io/contact?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_contact"},{"label":"Terms","href":"https://0xarchive.io/terms?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_terms"},{"label":"Privacy","href":"https://0xarchive.io/privacy?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=docs_nav\u0026utm_content=footer_privacy"}]}]},"search":{"prompt":"Search routes, symbols, SDKs, WebSocket replay, and data quality"},"seo":{"metatags":{"canonical":"https://docs.0xarchive.io","og:site_name":"0xArchive Docs","og:type":"website","twitter:card":"summary_large_image","twitter:site":"@0xarchiveIo","google-site-verification":"Hpedp6bedqc3av1195euaGMwyFEVHcJhcyUY9YiMvTY"},"organization":{"id":"https://0xarchive.io/#organization","name":"0xArchive","legalName":"Archive Labs Inc.","url":"https://0xarchive.io/","logo":"https://0xarchive.io/logo-square-1024.png","sameAs":["https://x.com/0xarchiveIo","https://github.com/0xArchiveIO","https://t.me/archivedotio","https://www.linkedin.com/company/0xarchive/"]},"indexing":"all"},"fonts":{"family":"Geist","source":"fonts/geist-variable.woff2","format":"woff2"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":{"theme":"github-dark"},"latex":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"Open the quickstart, REST reference, or search the docs for the route you need."}},"contextual":{"options":["copy","view","assistant","chatgpt","claude","perplexity","cursor","vscode","windsurf","grok","devin","aistudio"],"display":"header"},"thumbnails":{"background":"https://mintcdn.com/0xarchive-e895b8e7/ZmnWL31Kq8lGIdPW/images/og-background.svg?fit=max\u0026auto=format\u0026n=ZmnWL31Kq8lGIdPW\u0026q=85\u0026s=802efd004c3811d20f873d5f00c5ef32"},"metadata":{"timestamp":true},"markdown":{"schema":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"0xarchive-e895b8e7","hasAudioNarration":false,"actualSubdomain":"0xarchive-e895b8e7","customDomains":["docs.0xarchive.io"],"gitSource":{"type":"github","owner":"0xarchiveio","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af3559c0510a428249d8a1b","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"REST API","count":506},{"language":"default","tag":"OpenAPI and schemas","count":242},{"language":"default","tag":"Operation schemas","count":237},{"language":"default","tag":"Endpoint reference","count":225},{"language":"default","tag":"HIP-3","count":104},{"language":"default","tag":"Hyperliquid core","count":104},{"language":"default","tag":"Terminal","count":85},{"language":"default","tag":"Lighter","count":60},{"language":"default","tag":"Webhook Alerts","count":53},{"language":"default","tag":"HIP-4","count":52}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"[email protected]","showHelpButton":true}},"basePath":"","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":"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}],"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","href":"/_mintlify/custom/0xarchive-e895b8e7/54ecd93dfe2b25b9/styles.css"}],"page":{"pagePath":"terminal/examples/stacked-above-poc","slug":"/terminal/examples/stacked-above-poc","pageMetadata":{"title":"Stacked imbalances above PoC","description":"Stacked imbalances above a bar's point of control, on bars that closed above it, marked on the footprint's own rows.","href":"/terminal/examples/stacked-above-poc"},"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: \"Stacked imbalances above a bar’s point of control, on bars that closed above it, marked on the footprint’s own rows.\"\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={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Card,CodeBlock,Frame,Heading,OptimizedImage}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(Frame,{caption:`BTC on 15-minute bars in the 0xArchive Terminal, 2026-10-23.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/0xarchive-e895b8e7/dci2Lrw-3r2OqL5u/images/terminal/examples/stacked-above-poc.webp?fit=max\u0026auto=format\u0026n=dci2Lrw-3r2OqL5u\u0026q=85\u0026s=4fffc2294a3e7a5cda69c34c9a10931f`,alt:`Stacked imbalances above PoC on a BTC Bid × Ask footprint chart`,width:`1022`,height:`690`,\"data-og-width\":`2044`,\"data-og-height\":`1380`,\"data-path\":`images/terminal/examples/stacked-above-poc.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/0xarchive-e895b8e7/dci2Lrw-3r2OqL5u/images/terminal/examples/stacked-above-poc.webp?w=280\u0026fit=max\u0026auto=format\u0026n=dci2Lrw-3r2OqL5u\u0026q=85\u0026s=c34a5ce608d5f218376ff0163da3246e 280w, https://mintcdn.com/0xarchive-e895b8e7/dci2Lrw-3r2OqL5u/images/terminal/examples/stacked-above-poc.webp?w=560\u0026fit=max\u0026auto=format\u0026n=dci2Lrw-3r2OqL5u\u0026q=85\u0026s=362e622df3e7d6458efcc8cc456dc03e 560w, https://mintcdn.com/0xarchive-e895b8e7/dci2Lrw-3r2OqL5u/images/terminal/examples/stacked-above-poc.webp?w=840\u0026fit=max\u0026auto=format\u0026n=dci2Lrw-3r2OqL5u\u0026q=85\u0026s=54f5b432cead31d53c6251d29800739f 840w, https://mintcdn.com/0xarchive-e895b8e7/dci2Lrw-3r2OqL5u/images/terminal/examples/stacked-above-poc.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=dci2Lrw-3r2OqL5u\u0026q=85\u0026s=ec68a23bcee2ff4ce89fc6b5312179f9 1100w, https://mintcdn.com/0xarchive-e895b8e7/dci2Lrw-3r2OqL5u/images/terminal/examples/stacked-above-poc.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=dci2Lrw-3r2OqL5u\u0026q=85\u0026s=55039dfeeb219485d7b07b638acc3488 1650w, https://mintcdn.com/0xarchive-e895b8e7/dci2Lrw-3r2OqL5u/images/terminal/examples/stacked-above-poc.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=dci2Lrw-3r2OqL5u\u0026q=85\u0026s=87738ccb32516733ab4b33d84abffd8f 2500w`})}),`\n`,_jsx(Card,{title:`Open on a chart`,icon:`chart-candlestick`,href:`https://terminal.0xarchive.io/?symbol=BTC\u0026interval=15m\u0026scripts=example%3Astacked-above-poc`,horizontal:true,children:_jsx(_components.p,{children:`Load it on BTC 15m in the terminal, then change its settings or open it in the script editor.`})}),`\n`,_jsxs(_components.p,{children:[`Buyers stepping up through a bar’s busiest price and holding there into the close: three or more imbalanced rows in a row, wholly above the bar’s point of control, on a bar that closed above it. Each stack is shaded across the bar, on the Bid × Ask footprint’s own rows, so it sits exactly on the imbalances the footprint colours. `,_jsx(_components.strong,{children:`Side`}),` marks selling stacks too, or only them.`]}),`\n`,_jsx(_components.p,{children:`The imbalances follow the footprint chart’s rule: buying at a row against the selling one row below it (diagonal), three times or more, leaving out cells under 8% of the bar’s biggest. Each is an input. Only closed bars are marked, since “closed above” needs a close.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/terminal/guides/order-flow#footprint-rows`,children:_jsx(_components.code,{children:`chart.rowSize`})}),` is the row size the footprint draws, Auto or the reader’s own. `,_jsx(_components.a,{href:`/terminal/guides/order-flow#volume-by-price`,children:_jsx(_components.code,{children:`volumeProfile()`})}),` gives each bar’s rows and point of control at that size, and `,_jsx(_components.a,{href:`/terminal/guides/outputs#cells-inside-bars`,children:_jsx(_components.code,{children:`plot.cells`})}),` shades each stack as one band inside the bar. When Auto picks other rows as you zoom, the script runs again on them.`]}),`\n`,_jsx(Heading,{level:`2`,id:`try-changing`,children:`Try changing`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Require the close above the stack itself, not just the PoC, for buyers who held every row they took.`}),`\n`,_jsx(_components.li,{children:`Turn on its alert to hear of each one as the bar closes.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-script`,children:`The script`}),`\n`,_jsx(CodeBlock,{filename:`stacked-above-poc.ts`,numberOfLines:`51`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-dark github-dark`,style:{backgroundColor:`#24292e`,\"--shiki-dark-bg\":`#24292e`,color:`#e1e4e8`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`51`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// Stacked imbalances above the point of control, on bars that closed above it: buyers stepping up`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// through the bar's busiest price and holding there into the close. Each stack is shaded across the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// bar, on the footprint's own rows. Imbalances follow the footprint chart's rule: buying at a row`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// against the selling one row below it (diagonal), 3x or more, leaving out cells under 8% of the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// bar's biggest; three imbalanced rows in a row make a stack.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`indicator`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Stacked imbalances above PoC'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, { overlay: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`true`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, shortName: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Stacked > PoC'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` ratio`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` input.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`float`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Imbalance ratio'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`3`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, { min: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`1`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, step: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`0.5`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` stack`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` input.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`int`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Rows in a stack'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`3`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, { min: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`2`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, max: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`20`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` floorPct`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` input.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`float`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Ignore cells under % of the bar`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`\\\\'`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`s biggest'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`8`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, { min: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`0`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, max: `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`100`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` side`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` input.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`choice`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Side'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'buy'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, [`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'buy'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'sell'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'both'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`] `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`as`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, { labels: { buy: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Buying'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, sell: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Selling'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, both: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Both'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` } });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` chart`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:` bars`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` profile`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:` volumeProfile`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` marks`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` plot.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`cells`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Stacks'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, { candles: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'overlay'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, scale: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'unit'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` fired`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:` alert`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Stacked imbalance above PoC'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, { message: `}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:`'Stacked imbalance above the PoC, bar closed above it'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`chart.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`onBar`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(() `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=>`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` // \"Closed above\" needs a close: the forming bar waits until it has one.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`!`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`chart.confirmed `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`||`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` !`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`profile.available) `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`return`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` bar`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` profile.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`bar`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` rows`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` bar.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`rows`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`({ rowSize: chart.rowSize });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` poc`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` bar.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`poc`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`({ rowSize: chart.rowSize });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (rows `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`===`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` null`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` ||`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` poc `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`===`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` null`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` ||`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` chart.close `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` poc.high) `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`return`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` let`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` biggest `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 0`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` for`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` row`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` of`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows) biggest `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` Math.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`max`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(biggest, row.buy, row.sell);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` floor`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` biggest `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`*`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` floorPct `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`/`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 100`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` // Rows run lowest price first, so the row below is i - 1 and the row above is i + 1.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` buyImb`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`map`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`((`}),_jsx(_components.span,{style:{color:`#FFAB70`,\"--shiki-dark\":`#FFAB70`},children:`row`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#FFAB70`,\"--shiki-dark\":`#FFAB70`},children:`i`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=>`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 0`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` row.buy `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 0`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` row.buy `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` floor `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` row.buy `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` ratio `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`*`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows[i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 1`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`].sell);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` sellImb`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`map`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`((`}),_jsx(_components.span,{style:{color:`#FFAB70`,\"--shiki-dark\":`#FFAB70`},children:`row`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#FFAB70`,\"--shiki-dark\":`#FFAB70`},children:`i`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=>`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`+`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 1`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` \u003c`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows.`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`length`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` row.sell `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 0`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` row.sell `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` floor `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` row.sell `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` ratio `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`*`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows[i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`+`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 1`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`].buy);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` let`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` found `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` false`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:` shade`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (`}),_jsx(_components.span,{style:{color:`#FFAB70`,\"--shiki-dark\":`#FFAB70`},children:`flags`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`:`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` boolean`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`[], `}),_jsx(_components.span,{style:{color:`#FFAB70`,\"--shiki-dark\":`#FFAB70`},children:`tone`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`:`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:` Color`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=>`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` let`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` run `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 0`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` for`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`let`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 0`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`\u003c=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows.`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`length`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`+=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 1`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows.`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`length`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` flags[i]) { run `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`+=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 1`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`continue`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`; }`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` const`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` from`}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` run;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:` // The whole stack sits above the point of control's row.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (run `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` stack `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` rows[from].low `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`>=`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` poc.high) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` marks.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`add`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`({ low: rows[from].low, high: rows[i `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`-`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 1`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`].high, color: color.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`withAlpha`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(tone, `}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:`0.22`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`), border: tone });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` found `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` true`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` run `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#79B8FF`,\"--shiki-dark\":`#79B8FF`},children:` 0`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` };`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (side `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`!==`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` 'sell'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`shade`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(buyImb, color.up);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:` if`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` (side `}),_jsx(_components.span,{style:{color:`#F97583`,\"--shiki-dark\":`#F97583`},children:`!==`}),_jsx(_components.span,{style:{color:`#9ECBFF`,\"--shiki-dark\":`#9ECBFF`},children:` 'buy'`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`) `}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`shade`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(sellImb, color.down);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:` fired.`}),_jsx(_components.span,{style:{color:`#B392F0`,\"--shiki-dark\":`#B392F0`},children:`fire`}),_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`(found);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#E1E4E8`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`next-step`,children:`Next step`}),`\n`,_jsxs(_components.p,{children:[`See the next example, `,_jsx(_components.a,{href:`/terminal/examples/trapped-traders`,children:`Trapped traders`}),`.`]})]})}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":{"theme":"github-dark"},"config":{},"pageMetadata":{"title":"Stacked imbalances above PoC","description":"Stacked imbalances above a bar's point of control, on bars that closed above it, marked on the footprint's own rows.","href":"/terminal/examples/stacked-above-poc"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Try changing","slug":"try-changing","depth":2,"children":[]},{"title":"The script","slug":"the-script","depth":2,"children":[]},{"title":"Next step","slug":"next-step","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/0xarchive-e895b8e7/7de7178c454c8311/analytics-delayed.js","/_mintlify/custom/0xarchive-e895b8e7/64d76990ea4d1101/ahrefs-analytics.js","/_mintlify/custom/0xarchive-e895b8e7/9c04a5e34ef7363a/assistant-ui.js","/_mintlify/custom/0xarchive-e895b8e7/ae934b733ebeac03/single-public-docs.js","/_mintlify/custom/0xarchive-e895b8e7/ab832e8be54292e5/webhooks-anchors.js"],"subdomain":"0xarchive-e895b8e7","siteName":"0xArchive","title":"Stacked imbalances above PoC - 0xArchive","contextualStarterQuestions":[{"_id":"6adbd960d609cb0841a1997c","deploymentId":"69fcef8bc84766ada2de665b","questionText":"When do imbalances appear above PoC?","status":"active","generatedBy":"contextual","path":"terminal/examples/stacked-above-poc","createdAt":"2026-10-23T22:02:08.461Z","updatedAt":"2026-10-23T22:02:08.461Z","__v":0},{"_id":"6adbd960d609cb0841a1997b","deploymentId":"69fcef8bc84766ada2de665b","questionText":"How do I view this on a chart?","status":"active","generatedBy":"contextual","path":"terminal/examples/stacked-above-poc","createdAt":"2026-10-23T22:02:08.461Z","updatedAt":"2026-10-23T22:02:08.461Z","__v":0},{"_id":"6adbd960d609cb0841a1997a","deploymentId":"69fcef8bc84766ada2de665b","questionText":"What are stacked imbalances?","status":"active","generatedBy":"contextual","path":"terminal/examples/stacked-above-poc","createdAt":"2026-10-23T22:02:08.461Z","updatedAt":"2026-10-23T22:02:08.461Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T22:01:56.354Z","gitLastModified":"2026-10-23T22:01:25.000Z","originalFileLocation":"terminal/examples/stacked-above-poc.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=\"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=\"Stacked imbalances above a bar\u0026#x27;s point of control, on bars that closed above it, marked on the footprint\u0026#x27;s own rows.\">\u003cmeta data-mint-head name=\"application-name\" content=\"0xArchive\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Stacked imbalances above PoC - 0xArchive\">\u003cmeta data-mint-head property=\"og:description\" content=\"Stacked imbalances above a bar\u0026#x27;s point of control, on bars that closed above it, marked on the footprint\u0026#x27;s own rows.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"0xArchive Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://0xarchive-e895b8e7.mintlify.site/_mintlify/api/og/v2?division=Flow+setups\u0026amp;title=Stacked+imbalances+above+PoC\u0026amp;description=Stacked+imbalances+above+a+bar%27s+point+of+control%2C+on+bars+that+closed+above+it%2C+marked+on+the+footprint%27s+own+rows.\u0026amp;theme=77376188720d2fe77317e930\u0026amp;signature=452e73da4cf84b20b4d8df155cbbd488eeb314f96269cc81042b3eb4255178c8\">\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=\"Stacked imbalances above PoC - 0xArchive\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Stacked imbalances above a bar\u0026#x27;s point of control, on bars that closed above it, marked on the footprint\u0026#x27;s own rows.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://0xarchive-e895b8e7.mintlify.site/_mintlify/api/og/v2?division=Flow+setups\u0026amp;title=Stacked+imbalances+above+PoC\u0026amp;description=Stacked+imbalances+above+a+bar%27s+point+of+control%2C+on+bars+that+closed+above+it%2C+marked+on+the+footprint%27s+own+rows.\u0026amp;theme=77376188720d2fe77317e930\u0026amp;signature=452e73da4cf84b20b4d8df155cbbd488eeb314f96269cc81042b3eb4255178c8\">\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/0xarchive-e895b8e7/epsl9cg6_-QmFjTh/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"0xArchive\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#15803D\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"Hpedp6bedqc3av1195euaGMwyFEVHcJhcyUY9YiMvTY\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/terminal/examples/stacked-above-poc.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://0xarchive.io/#organization\",\"name\":\"0xArchive\",\"legalName\":\"Archive Labs Inc.\",\"url\":\"https://0xarchive.io/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://0xarchive.io/logo-square-1024.png\"},\"sameAs\":[\"https://x.com/0xarchiveIo\",\"https://github.com/0xArchiveIO\",\"https://t.me/archivedotio\",\"https://www.linkedin.com/company/0xarchive/\"]},{\"@type\":\"WebSite\",\"@id\":\"https://docs.0xarchive.io#website\",\"name\":\"0xArchive\",\"url\":\"https://docs.0xarchive.io\",\"publisher\":{\"@id\":\"https://0xarchive.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc#webpage\",\"url\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc\",\"name\":\"Stacked imbalances above PoC\",\"description\":\"Stacked imbalances above a bar's point of control, on bars that closed above it, marked on the footprint's own rows.\",\"dateModified\":\"2026-10-23T22:01:25.000Z\",\"isPartOf\":{\"@id\":\"https://docs.0xarchive.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Examples\",\"item\":\"https://docs.0xarchive.io/terminal/examples\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Stacked imbalances above PoC\",\"item\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc#article\",\"headline\":\"Stacked imbalances above PoC\",\"name\":\"Stacked imbalances above PoC\",\"description\":\"Stacked imbalances above a bar's point of control, on bars that closed above it, marked on the footprint's own rows.\",\"url\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc\",\"mainEntityOfPage\":{\"@id\":\"https://docs.0xarchive.io/terminal/examples/stacked-above-poc#webpage\"},\"dateModified\":\"2026-10-23T22:01:25.000Z\",\"publisher\":{\"@id\":\"https://0xarchive.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.0xarchive.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"0xArchive\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"0xArchive\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/terminal/examples/stacked-above-poc.md","siteName":"0xArchive","nav":{"global":null,"tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":""}]},{"tab":"REST API","pages":[{"title":"REST API","href":"/rest-api"}]},{"tab":"WebSocket","pages":[{"title":"WebSocket","href":"/websocket"}]},{"tab":"Webhook Alerts","pages":[{"title":"Webhook Alerts","href":"/webhooks"}]},{"tab":"Bulk Exports","pages":[{"title":"Bulk Exports","href":"/exports"}]},{"tab":"SDKs \u0026 Tools","pages":[{"title":"SDKs \u0026 Tools","href":"/tooling"}]},{"tab":"Terminal","pages":[{"title":"Terminal scripting","sidebarTitle":"Overview","href":"/terminal"},{"title":"Trade on Hyperliquid","sidebarTitle":"Trading","href":"/terminal-trading"},{"group":"Start","icon":"rocket","pages":[{"title":"Your first script","href":"/terminal/guides/first-script"},{"title":"How a script runs","href":"/terminal/guides/how-scripts-run"}]},{"group":"Guides","icon":"book-open","pages":[{"title":"State and indicators","sidebarTitle":"State","href":"/terminal/guides/state"},{"title":"Statistics and machine learning","sidebarTitle":"Stats and machine learning","href":"/terminal/guides/machine-learning"},{"title":"Strategies","href":"/terminal/guides/strategies"},{"title":"Data and timeframes","href":"/terminal/guides/data"},{"title":"Read order flow in terminal scripts","sidebarTitle":"Order flow","href":"/terminal/guides/order-flow"},{"title":"Read liquidations in terminal scripts","sidebarTitle":"Liquidations","href":"/terminal/guides/liquidations"},{"title":"BTC options","href":"/terminal/guides/options"},{"title":"Outputs","href":"/terminal/guides/outputs"},{"title":"Add script inputs","sidebarTitle":"Inputs","href":"/terminal/guides/inputs"},{"title":"Missing values","href":"/terminal/guides/missing-values"},{"title":"Pine Script","href":"/terminal/guides/pine"},{"title":"Limits and determinism","sidebarTitle":"Limits","href":"/terminal/guides/limits"},{"title":"Tools for agents","href":"/terminal/guides/agents"}]},{"group":"Examples","icon":"chart-candlestick","pages":[{"title":"Terminal script examples","sidebarTitle":"Examples","href":"/terminal/examples"},{"group":"On 0xArchive's data","expanded":true,"pages":[{"title":"Opening and closing flow","href":"/terminal/examples/opening-closing-flow"},{"title":"Squeeze or new positions","href":"/terminal/examples/squeeze-or-new-positions"},{"title":"Most-liquidated wallets","href":"/terminal/examples/liquidated-wallets"},{"title":"Liquidation levels ahead","href":"/terminal/examples/liquidation-levels-ahead"},{"title":"Large taker orders","href":"/terminal/examples/large-takers"},{"title":"Opening sweeps","href":"/terminal/examples/opening-sweeps"},{"title":"Option sweeps","href":"/terminal/examples/option-sweeps"},{"title":"Dealer gamma","href":"/terminal/examples/dealer-gamma"},{"title":"Liquidations indicator example","sidebarTitle":"Liquidations","href":"/terminal/examples/liquidations"},{"title":"Liquidation clusters","href":"/terminal/examples/liquidation-clusters"},{"title":"Tape CVD","href":"/terminal/examples/cvd"},{"title":"Funding and open interest","href":"/terminal/examples/funding-oi"},{"title":"Breadth above VWAP","href":"/terminal/examples/breadth-above-vwap"},{"title":"Bid share within a band","href":"/terminal/examples/book-imbalance"},{"title":"Book walls","href":"/terminal/examples/book-walls"},{"title":"Footprint cells","href":"/terminal/examples/footprint-cells"},{"title":"Stopped-out footprint","href":"/terminal/examples/stopped-out-footprint"},{"title":"Stopped vs profit footprint","href":"/terminal/examples/stopped-profit-footprint"},{"title":"Opens and closes footprint","href":"/terminal/examples/opens-closes-footprint"},{"title":"Open interest footprint","href":"/terminal/examples/open-interest-footprint"},{"title":"Makers opening footprint","href":"/terminal/examples/makers-opening-footprint"},{"title":"Tape speed heat","href":"/terminal/examples/tape-speed-heat"},{"title":"Stopped-out heat","href":"/terminal/examples/stopped-out-heat"},{"title":"Makers opening heat","href":"/terminal/examples/makers-opening-heat"},{"title":"Open interest heat","href":"/terminal/examples/open-interest-heat"},{"title":"Session volume profile","description":"The point of control and value area each session developed from 00:00 UTC, bar by bar, with each session's profile as a histogram.","href":"/terminal/examples/session-volume-profile"}]},{"group":"Flow setups","expanded":false,"pages":[{"title":"Stacked imbalances above PoC","href":"/terminal/examples/stacked-above-poc"},{"title":"Trapped traders","description":"Most of a bar's new longs opened above its point of control and the bar closed below it, so they are underwater; shorts the other way round.","href":"/terminal/examples/trapped-traders"},{"title":"Stopped out at the extreme","href":"/terminal/examples/stopped-at-extreme"},{"title":"Breakout with new money","href":"/terminal/examples/breakout-new-money"}]},{"group":"Indicators and outputs","expanded":false,"pages":[{"title":"EMA","href":"/terminal/examples/ema"},{"title":"4h EMA","href":"/terminal/examples/higher-timeframe"},{"title":"Anchored VWAP bands","href":"/terminal/examples/anchored-vwap"},{"title":"Open bands","href":"/terminal/examples/open-bands"},{"title":"Relative strength","href":"/terminal/examples/relative-strength"},{"title":"Trend bars","href":"/terminal/examples/trend-bars"},{"title":"Session table","href":"/terminal/examples/session-table"},{"title":"Ichimoku","href":"/terminal/examples/ichimoku"},{"title":"RSI cross","href":"/terminal/examples/rsi-cross"},{"title":"Volume by hour","href":"/terminal/examples/volume-by-hour"},{"title":"Return after RSI","href":"/terminal/examples/rsi-forward-returns"}]},{"group":"Stats and machine learning","expanded":false,"pages":[{"title":"Kalman pairs spread","href":"/terminal/examples/kalman-pairs"},{"title":"Basket residual","href":"/terminal/examples/basket-residual"},{"title":"Order-flow forecast","href":"/terminal/examples/order-flow-forecast"},{"title":"Market Read","href":"/terminal/examples/market-read"}]},{"group":"Strategies","expanded":false,"pages":[{"title":"Funding carry","href":"/terminal/examples/funding-carry"},{"title":"RSI PCA forecast","href":"/terminal/examples/rsi-pca-forecast"},{"title":"Residual momentum","href":"/terminal/examples/residual-momentum"}]},{"group":"Pasted Pine","expanded":false,"pages":[{"title":"RSI cross, pasted Pine","href":"/terminal/examples/rsi-pine"},{"title":"Ichimoku, pasted Pine","href":"/terminal/examples/ichimoku-pine"},{"title":"4h EMA and daily close, pasted Pine","href":"/terminal/examples/htf-pine"}]}]},{"group":"Reference","icon":"code","pages":[{"title":"Terminal scripting reference","sidebarTitle":"Reference","href":"/terminal/reference"},{"title":"Basic types","href":"/terminal/reference/types"},{"title":"The declaration","href":"/terminal/reference/indicator"},{"title":"Script input reference","sidebarTitle":"Inputs","href":"/terminal/reference/inputs"},{"title":"Streams","href":"/terminal/reference/streams"},{"title":"State","href":"/terminal/reference/state"},{"title":"Indicators (ta)","href":"/terminal/reference/ta"},{"title":"Statistics and machine learning (stats, ml)","href":"/terminal/reference/machine-learning"},{"title":"Matrices (linalg)","href":"/terminal/reference/linalg"},{"title":"Plots","href":"/terminal/reference/plots"},{"title":"Graphs","href":"/terminal/reference/graphs"},{"title":"Panels","href":"/terminal/reference/panels"},{"title":"Drawings","href":"/terminal/reference/drawings"},{"title":"Alerts","href":"/terminal/reference/alerts"},{"title":"Colours, text and time","href":"/terminal/reference/utilities"},{"title":"Diagnostics","href":"/terminal/reference/diagnostics"}]}]}]},"basePath":"","title":"Stacked imbalances above PoC - 0xArchive","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-u3J1-UOn.js","DynamicMarkdown-B-f2cqXQ.js","zoom-image-lightbox-DTFzvaXJ.js","lightbox-handle-r17bVUz3.js"]}