[{"data":1,"prerenderedAt":6617},["ShallowReactive",2],{"wrun-open-editor-url":3,"indicators:cookbook/cvd-divergence":4},"https://openmarket.xyz/chart/#wrun-open=v1",{"slug":5,"filePath":6,"frontmatter":7,"rawMarkdown":12,"tree":13},"cookbook/cvd-divergence","cookbook/cvd-divergence.md",{"title":8,"description":9,"order":10,"section":11},"CVD divergence","Cumulative volume delta (aggressive buys minus aggressive sells, summed bar after bar) in coins, in its own pane under the chart, with its own axis. Every…",82,"cookbook","---\ntitle: \"CVD divergence\"\ndescription: \"Cumulative volume delta (aggressive buys minus aggressive sells, summed bar after bar) in coins, in its own pane under the chart, with its own axis. Every…\"\norder: 82\nsection: \"cookbook\"\n---\n\n\u003C!-- source: docs/indicators/cookbook/cvd-divergence.md; generated by packages/cli/scripts/gen-indicator-docs.ts, do not edit -->\n\n# CVD divergence\n\n![CVD pane under BTC with divergence lines and div tags](/wrun/images/cvd-divergence.png)\n\nCumulative volume delta (aggressive buys minus aggressive sells, summed bar after bar) in coins, in its own pane under the chart, with its own axis. Every confirmed swing high and swing low of price is dotted on the CVD line in the pane. When price makes a higher high while CVD makes a lower high, or a lower low while CVD makes a higher low, the example draws the evidence: a line joining the two price swings on the chart (orange for the bearish case, amber for the bullish one), a dashed line joining the two CVD swings in the pane, and a small \"div\" tag beside the price line. Nothing is drawn on ordinary bars.\n\nThe parts are side-split `trades.volume` inputs ([Data sources](../core-concepts/data-sources.md)), a `shape` output displaced back to the swing bar, and three handle kinds: line handles on price, a polyline handle in the lower pane and label handles for the tags ([Drawing objects](../presentation/drawing-objects.md)). This is also the `cvd-divergence` template: the **CVD Divergence** card under **Order flow** in the editor's starter list, and it compiles as written.\n\n## The wrun indicator\n\n```typescript sample=cvd-divergence\n// CVD Divergence: cumulative volume delta, in coins, in its own pane. When price makes a higher high while CVD makes\n// a lower high (or a lower low while CVD makes a higher low), a line joins the two price swings on the chart, a dashed\n// line joins the two CVD swings in the pane, every confirmed swing is dotted in the pane, and a small \"div\" tag names it.\n\nparam.int(\"swing\", 8, { min: 3, max: 30, label: \"Swing strength in bars\", description: \"Bars on each side a swing high or low must beat; a swing is confirmed this many bars later\" });\nparam.bool(\"cvd_reset\", false, { label: \"Reset at midnight\", description: \"Restart CVD at every UTC midnight; off, it runs from the first loaded bar\" }); // a toggle: pb_cvd_reset() reads it in onStart()\nparam.int(\"lines_kept\", 12, { min: 1, max: 60, label: \"Divergence lines kept\", description: \"Divergence lines kept on the chart; the oldest is recycled\" });\nlegend({ title: \"({{swing}})\" }); // the words after the name in the legend: the swing strength, read by name\ninput(\"close\", ohlcv.close); // the primary input: the chart's own candles define the grid every other input lines up on\ninput(\"buy\", trades.volume, { side: \"BUY\", missing: \"zero\" }); // aggressive buy volume; a bar with no prints reads 0\ninput(\"sell\", trades.volume, { side: \"SELL\", missing: \"zero\" }); // aggressive sell volume, the other half of the tape\noutput(\"cvd\", line, lower, { color: \"#38bdf8\", width: 2, label: \"CVD\", format: \"si\", unit: \" coins\" }); // cumulative volume delta in the base asset (trades.volume reads coins), in its own pane under the chart\noutput(\"cvd_swing\", shape, lower, { color: \"#a78bfa\", shape_where: \"swing_here\", displacement_bars: -8, displacement_bars_by: { param: \"swing\", scale: -1 }, label: \"CVD swing\", format: \"si\", unit: \" coins\" }); // a dot on the CVD at each confirmed swing, drawn back at the swing bar: `swing` bars before the bar that confirms it (-8 is the default strength's shift)\noutput(\"swing_here\", none); // data-only: 1 on the bar that confirms a swing (the dot's gate)\noutput(\"divergence\", none); // data-only: -1 bearish, +1 bullish, 0 none; read it in the Console or fire an alert(...) on it\nstring(\"text\", { max_bytes: 40 }); // one bounded slot every label is written through\nhandles.line({ width: 2 }); // the price link between the two swings (chart time and price)\nhandles.polyline({ panel: \"lower\", width: 1, lineStyle: \"dashed\" }); // the CVD link between the two swings, in the pane\nhandles.label({ size: 11, color: \"#e2e8f0\" }); // the \"div\" tag on price, and the one line of words when the market has no sided trades\n\nconst RING = 64; // the swing window: 2 x 30 + 1 bars at the largest strength\nconst MAX_LINES = 60; // handles per kind at the largest setting\nconst highs = new StaticArray\u003Cf64>(RING); // the last RING bars, rings the swing test reads\nconst lows = new StaticArray\u003Cf64>(RING);\nconst cvds = new StaticArray\u003Cf64>(RING);\nconst times = new StaticArray\u003Cf64>(RING);\nconst points = new StaticArray\u003Cf64>(4); // x0, y0, x1, y1 for the pane link\nconst lines: LineHandle[] = []; // handle objects allocate once; ids are one space across kinds\nconst links: PolylineHandle[] = [];\nconst tags: LabelHandle[] = [];\nfor (let i = 0; i \u003C MAX_LINES; i += 1) {\n  lines.push(draw.line(i));\n  links.push(draw.polyline(100 + i));\n  tags.push(draw.label(200 + i));\n}\nconst notice = draw.label(300);\nconst ORANGE = rgba(248, 104, 0, 255); // bearish: price up, CVD down\nconst AMBER = rgba(248, 192, 0, 255); // bullish: price down, CVD up\nconst SLATE = rgba(148, 163, 184, 255);\n\nlet swing = 8; // settings, read in onStart()\nlet resetDaily = false;\nlet linesKept = 12;\nlet barCount = 0; // bars seen\nlet cvd = 0.0; // the running delta\nlet sidedVolume = 0.0; // every sided print seen: 0 means the market has no sided trades\nlet prevDay = -1.0; // the UTC day of the previous bar, for the daily reset\nlet rangeAvg = NaN; // a running mean of high - low: the tag's distance from the line\nlet lastHighPrice = NaN; // the previous confirmed swing high and the CVD at it\nlet lastHighCvd = NaN;\nlet lastHighTime = NaN;\nlet lastLowPrice = NaN; // the previous confirmed swing low and the CVD at it\nlet lastLowCvd = NaN;\nlet lastLowTime = NaN;\nlet divergences = 0; // how many have been drawn: the ring position\nlet swingHere = 0.0; // this bar's results, set by testSwing()\nlet swingCvd = NaN;\nlet pendingKind = 0; // 0 none, -1 bearish, +1 bullish: a divergence to draw this bar\nlet x1 = NaN; // the two price swings and the CVD at each\nlet y1 = NaN;\nlet x2 = NaN;\nlet y2 = NaN;\nlet c1 = NaN;\nlet c2 = NaN;\n\n// testSwing() tests the bar `swing` bars back for a swing, then the swing against the previous one of its kind for a divergence.\nfunction testSwing(): void {\n  swingHere = 0.0;\n  swingCvd = NaN;\n  pendingKind = 0;\n  if (barCount \u003C 2 * swing + 1) return; // not enough bars on both sides yet\n  const center = barCount - 1 - swing; // the bar under test, `swing` bars back\n  const c = center % RING;\n  let isHigh = true;\n  let isLow = true;\n  for (let k = 1; k \u003C= swing; k += 1) {\n    const leftSlot = (center - k) % RING;\n    const rightSlot = (center + k) % RING;\n    if (!(highs[c] > highs[leftSlot]) || !(highs[c] >= highs[rightSlot])) isHigh = false; // above every bar before it, at or above every bar after it (a flat top counts once, on its first bar)\n    if (!(lows[c] \u003C lows[leftSlot]) || !(lows[c] \u003C= lows[rightSlot])) isLow = false; // the mirror for a swing low\n  }\n  if (!isHigh && !isLow) return;\n  swingHere = 1.0;\n  swingCvd = cvds[c];\n  if (isHigh) {\n    if (!isNaN(lastHighPrice) && highs[c] > lastHighPrice && cvds[c] \u003C lastHighCvd) { // higher high in price, lower high in CVD\n      pendingKind = -1;\n      x1 = lastHighTime;\n      y1 = lastHighPrice;\n      c1 = lastHighCvd;\n      x2 = times[c];\n      y2 = highs[c];\n      c2 = cvds[c];\n    }\n    lastHighPrice = highs[c];\n    lastHighCvd = cvds[c];\n    lastHighTime = times[c];\n  }\n  if (isLow) {\n    if (!isNaN(lastLowPrice) && lows[c] \u003C lastLowPrice && cvds[c] > lastLowCvd) { // lower low in price, higher low in CVD\n      pendingKind = 1;\n      x1 = lastLowTime;\n      y1 = lastLowPrice;\n      c1 = lastLowCvd;\n      x2 = times[c];\n      y2 = lows[c];\n      c2 = cvds[c];\n    }\n    lastLowPrice = lows[c];\n    lastLowCvd = cvds[c];\n    lastLowTime = times[c];\n  }\n}\n\nfunction onStart(): void {\n  swing = i32(p_swing());\n  resetDaily = pb_cvd_reset();\n  linesKept = i32(p_lines_kept());\n}\n\n// onBar() runs once per bar: fold the bar into CVD and the rings, test for a swing, write the outputs on every bar, and\n// draw a divergence on the bar that confirms it.\nfunction onBar(): void {\n  const high = bar.high();\n  const low = bar.low();\n  const barTime = bar.time();\n  const buy = in_buy();\n  const sell = in_sell();\n  if (resetDaily) {\n    const day = Math.floor(barTime / 86400.0);\n    if (day != prevDay) cvd = 0.0;\n    prevDay = day;\n  }\n  cvd += buy - sell;\n  sidedVolume += buy + sell;\n  const range = high - low;\n  rangeAvg = isNaN(rangeAvg) ? range : rangeAvg + (range - rangeAvg) * 0.1;\n  const slot = barCount % RING;\n  highs[slot] = high;\n  lows[slot] = low;\n  cvds[slot] = cvd;\n  times[slot] = barTime;\n  barCount += 1;\n  testSwing();\n  out_cvd(cvd);\n  out_swing_here(swingHere);\n  out_cvd_swing(sidedVolume > 0.0 ? swingCvd : NaN); // no dots on a market with no sided trades: the pane holds a flat zero line and the words\n  out_divergence(f64(pendingKind));\n  if (pendingKind != 0) {\n    const k = divergences % linesKept; // the ring position: the oldest line, link and tag are reused\n    divergences += 1;\n    const tone = pendingKind \u003C 0 ? ORANGE : AMBER;\n    lines[k].set(x1, y1, x2, y2).color(tone);\n    points[0] = x1;\n    points[1] = c1;\n    points[2] = x2;\n    points[3] = c2;\n    links[k].setPoints(points, 2).color(tone);\n    const offset = (isNaN(rangeAvg) ? 0.0 : rangeAvg) * 0.6; // the tag sits just outside the line, on the swing side\n    const tagY = pendingKind \u003C 0 ? Math.max(y1, y2) + offset : Math.min(y1, y2) - offset;\n    sb_clear();\n    sb_text(\"div\");\n    tags[k].set((x1 + x2) * 0.5, tagY).text(str_text_sb);\n    tags[k].color(tone);\n  }\n  if (bar.isLast() && sidedVolume \u003C= 0.0) { // the market served no sided prints at all: say so once, top right\n    sb_clear();\n    sb_text(\"No sided trades on this market\");\n    notice.set(16, 14).text(str_text_sb);\n    notice.anchor(ANCHOR_TOP_RIGHT).align(ALIGN_RIGHT).color(SLATE);\n  }\n}\n```\n\n## How it works\n\n**CVD is a running sum.** `input(\"buy\", trades.volume, { side: \"BUY\", missing: \"zero\" })` and its SELL twin deliver the bar's aggressive volume per side (a bar with no prints counts as zero); their difference summed bar after bar is `cvd`, a line in the lower pane labelled CVD. `trades.volume` reads the base asset, so the sum is in coins: `format: \"si\"` with `unit: \" coins\"` prints it in the legend as \"CVD -17.6K coins\". `cvd_reset` (off) runs it from the first loaded bar; on, it restarts at every UTC midnight.\n\n**Swings confirm late.** `swing` (8, 3 to 30) is the number of bars on each side a swing must beat, so a swing is confirmed `swing` bars after itself. A swing must beat every bar before it and at least match every bar after it, so a flat top on an odds chart counts once, on its first bar. `swing_here` is 1 on a confirming bar and gates the `cvd_swing` dot, which `displacement_bars_by: { param: \"swing\", scale: -1 }` draws back on the swing bar itself, `swing` bars before the confirming bar at whatever strength is set (`displacement_bars: -8`, the default's shift, stays for a host that reads only the literal).\n\n**A divergence is two swings that disagree.** A higher price high against a lower CVD high is bearish (-1), a lower price low against a higher CVD low is bullish (+1); `divergence` carries the sign on the confirming bar and 0 elsewhere, a data-only signal the editor's Console prompt reads and a declared alert can fire on. On that bar a line handle joins the two price swings (x from `bar.time()`), a dashed polyline handle joins the two CVD swings in the pane, and a label handle writes \"div\" beside the price line through the one bounded slot. `lines_kept` (12, 1 to 60) lines stay on the chart; the oldest is recycled.\n\n## Where it runs\n\nMarkets with sided trades: crypto perps and spot, prediction markets. A market where one side does all the trading (CVD climbing the whole window) shows swings and no divergence, which is the honest reading.\n\n## When data is missing\n\nOn a market with no sided trades (FX, stocks) CVD stays flat at zero, no swing is dotted, and one slate line of words sits at the top right of the chart: \"No sided trades on this market\".\n\n## Customize it\n\n- **Faster swings.** Lower `swing`; more swings confirm and more pairs qualify.\n- **A session CVD.** Switch `cvd_reset` on to restart the sum at every UTC midnight.\n- **Dollars instead of coins.** Add `currency: \"USD\"` to both `trades.volume` inputs and declare `format: \"usd\"` without the unit on `cvd` and `cvd_swing`: the sum is then each trade's notional, as the native Cumulative Volume Delta reads by default.\n- **Alert on a divergence.** Bind `divergence` to a `const` and declare `alert(\"cvd_divergence\", { when: ... })`: it fires on the bar a divergence confirms, since the output turns from 0 to -1 or +1 there. Once the indicator is published and on a chart, the signal is in the chart's alert dialog ([Alerts](../functions/alerts.md)).\n\n## Run it\n\n1. In the editor's Explorer, press the **Templates** icon (\"Browse starter templates\") and pick **CVD Divergence** under **Order flow**.\n2. Press **Run** on a crypto perp or spot market: CVD draws in its own pane, and the evidence lines appear where a divergence confirmed.\n3. At the editor's Console prompt, type `last 60 divergence` to read the sign on each of the last 60 bars.\n\n## Concepts used\n\n- [Data sources](../core-concepts/data-sources.md) for the `trades` source, its sides and the `missing` policy\n- [Drawing objects](../presentation/drawing-objects.md) for line, polyline and label handles and the lower-pane placement\n- [Plotting](../presentation/plotting.md) for `shape_where` gates and `displacement_bars_by`\n",{"type":14,"children":15,"data":6610,"position":6612},"root",[16,26,29,30,51,52,67,68,244,245,263,264,5386,5387,5403,5404,5553,5554,5721,5722,5812,5813,5829,5830,5845,5846,5861,5862,5876,5877,5892,5893,6242,6243,6259,6260,6424,6425,6440,6441],{"type":17,"value":18,"position":19},"comment"," source: docs/indicators/cookbook/cvd-divergence.md; generated by packages/cli/scripts/gen-indicator-docs.ts, do not edit ",{"start":20,"end":23},{"line":21,"column":21,"offset":22},1,0,{"line":21,"column":24,"offset":25},130,129,{"type":27,"value":28},"text","\n",{"type":27,"value":28},{"type":31,"tagName":32,"properties":33,"children":34,"position":48},"element","p",{},[35],{"type":31,"tagName":36,"properties":37,"children":40,"position":41},"img",{"src":38,"alt":39},"/wrun/images/cvd-divergence.png","CVD pane under BTC with divergence lines and div tags",[],{"start":42,"end":45},{"line":43,"column":21,"offset":44},5,149,{"line":43,"column":46,"offset":47},90,238,{"start":49,"end":50},{"line":43,"column":21,"offset":44},{"line":43,"column":46,"offset":47},{"type":27,"value":28},{"type":31,"tagName":32,"properties":53,"children":54,"position":64},{},[55],{"type":27,"value":56,"position":57},"Cumulative volume delta (aggressive buys minus aggressive sells, summed bar after bar) in coins, in its own pane under the chart, with its own axis. Every confirmed swing high and swing low of price is dotted on the CVD line in the pane. When price makes a higher high while CVD makes a lower high, or a lower low while CVD makes a higher low, the example draws the evidence: a line joining the two price swings on the chart (orange for the bearish case, amber for the bullish one), a dashed line joining the two CVD swings in the pane, and a small \"div\" tag beside the price line. Nothing is drawn on ordinary bars.",{"start":58,"end":61},{"line":59,"column":21,"offset":60},7,240,{"line":59,"column":62,"offset":63},617,856,{"start":65,"end":66},{"line":59,"column":21,"offset":60},{"line":59,"column":62,"offset":63},{"type":27,"value":28},{"type":31,"tagName":32,"properties":69,"children":70,"position":241},{},[71,80,94,101,120,127,140,147,165,172,185,192,210,217,234],{"type":27,"value":72,"position":73},"The parts are side-split ",{"start":74,"end":77},{"line":75,"column":21,"offset":76},9,858,{"line":75,"column":78,"offset":79},26,883,{"type":31,"tagName":81,"properties":82,"children":83,"position":91},"code",{},[84],{"type":27,"value":85,"position":86},"trades.volume",{"start":87,"end":88},{"line":75,"column":78,"offset":79},{"line":75,"column":89,"offset":90},41,898,{"start":92,"end":93},{"line":75,"column":78,"offset":79},{"line":75,"column":89,"offset":90},{"type":27,"value":95,"position":96}," inputs (",{"start":97,"end":98},{"line":75,"column":89,"offset":90},{"line":75,"column":99,"offset":100},50,907,{"type":31,"tagName":102,"properties":103,"children":105,"position":115},"a",{"href":104},"../core-concepts/data-sources.md",[106],{"type":27,"value":107,"position":108},"Data sources",{"start":109,"end":112},{"line":75,"column":110,"offset":111},51,908,{"line":75,"column":113,"offset":114},63,920,{"start":116,"end":117},{"line":75,"column":99,"offset":100},{"line":75,"column":118,"offset":119},98,955,{"type":27,"value":121,"position":122},"), a ",{"start":123,"end":124},{"line":75,"column":118,"offset":119},{"line":75,"column":125,"offset":126},103,960,{"type":31,"tagName":81,"properties":128,"children":129,"position":137},{},[130],{"type":27,"value":131,"position":132},"shape",{"start":133,"end":134},{"line":75,"column":125,"offset":126},{"line":75,"column":135,"offset":136},110,967,{"start":138,"end":139},{"line":75,"column":125,"offset":126},{"line":75,"column":135,"offset":136},{"type":27,"value":141,"position":142}," output displaced back to the swing bar, and three handle kinds: line handles on price, a polyline handle in the lower pane and label handles for the tags (",{"start":143,"end":144},{"line":75,"column":135,"offset":136},{"line":75,"column":145,"offset":146},266,1123,{"type":31,"tagName":102,"properties":148,"children":150,"position":160},{"href":149},"../presentation/drawing-objects.md",[151],{"type":27,"value":152,"position":153},"Drawing objects",{"start":154,"end":157},{"line":75,"column":155,"offset":156},267,1124,{"line":75,"column":158,"offset":159},282,1139,{"start":161,"end":162},{"line":75,"column":145,"offset":146},{"line":75,"column":163,"offset":164},319,1176,{"type":27,"value":166,"position":167},"). This is also the ",{"start":168,"end":169},{"line":75,"column":163,"offset":164},{"line":75,"column":170,"offset":171},339,1196,{"type":31,"tagName":81,"properties":173,"children":174,"position":182},{},[175],{"type":27,"value":176,"position":177},"cvd-divergence",{"start":178,"end":179},{"line":75,"column":170,"offset":171},{"line":75,"column":180,"offset":181},355,1212,{"start":183,"end":184},{"line":75,"column":170,"offset":171},{"line":75,"column":180,"offset":181},{"type":27,"value":186,"position":187}," template: the ",{"start":188,"end":189},{"line":75,"column":180,"offset":181},{"line":75,"column":190,"offset":191},370,1227,{"type":31,"tagName":193,"properties":194,"children":195,"position":205},"strong",{},[196],{"type":27,"value":197,"position":198},"CVD Divergence",{"start":199,"end":202},{"line":75,"column":200,"offset":201},372,1229,{"line":75,"column":203,"offset":204},386,1243,{"start":206,"end":207},{"line":75,"column":190,"offset":191},{"line":75,"column":208,"offset":209},388,1245,{"type":27,"value":211,"position":212}," card under ",{"start":213,"end":214},{"line":75,"column":208,"offset":209},{"line":75,"column":215,"offset":216},400,1257,{"type":31,"tagName":193,"properties":218,"children":219,"position":229},{},[220],{"type":27,"value":221,"position":222},"Order flow",{"start":223,"end":226},{"line":75,"column":224,"offset":225},402,1259,{"line":75,"column":227,"offset":228},412,1269,{"start":230,"end":231},{"line":75,"column":215,"offset":216},{"line":75,"column":232,"offset":233},414,1271,{"type":27,"value":235,"position":236}," in the editor's starter list, and it compiles as written.",{"start":237,"end":238},{"line":75,"column":232,"offset":233},{"line":75,"column":239,"offset":240},472,1329,{"start":242,"end":243},{"line":75,"column":21,"offset":76},{"line":75,"column":239,"offset":240},{"type":27,"value":28},{"type":31,"tagName":246,"properties":247,"children":248,"position":259},"h2",{},[249],{"type":27,"value":250,"position":251},"The wrun indicator",{"start":252,"end":256},{"line":253,"column":254,"offset":255},11,4,1334,{"line":253,"column":257,"offset":258},22,1352,{"start":260,"end":262},{"line":253,"column":21,"offset":261},1331,{"line":253,"column":257,"offset":258},{"type":27,"value":28},{"type":14,"children":265},[266],{"type":31,"tagName":267,"properties":268,"children":272,"data":-1},"pre",{"class":269,"style":270,"tabindex":271,"data-sample":176},"shiki shiki-themes github-dark github-light","--shiki-dark:#e1e4e8;--shiki-light:#24292e;--shiki-dark-bg:#24292e;--shiki-light-bg:#fff","0",[273],{"type":31,"tagName":81,"properties":274,"children":277},{"class":275},[276],"language-typescript",[278,289,290,298,299,307,308,311,312,394,395,454,455,524,525,552,553,580,581,626,627,669,670,745,746,854,855,880,881,906,907,943,944,974,975,1024,1025,1066,1067,1070,1071,1104,1105,1135,1136,1192,1193,1238,1239,1283,1284,1328,1329,1379,1380,1422,1423,1457,1458,1491,1492,1556,1557,1584,1585,1624,1625,1662,1663,1671,1672,1710,1711,1776,1777,1839,1840,1899,1900,1903,1904,1934,1935,1961,1962,1987,1988,2017,2018,2048,2049,2078,2079,2114,2115,2145,2146,2175,2176,2200,2201,2225,2226,2255,2256,2280,2281,2305,2306,2335,2336,2365,2366,2390,2391,2420,2421,2450,2451,2475,2476,2500,2501,2525,2526,2550,2551,2575,2576,2579,2580,2588,2589,2621,2622,2642,2643,2663,2664,2684,2685,2744,2745,2788,2789,2823,2824,2850,2851,2875,2876,2932,2933,2976,2977,3017,3018,3091,3092,3159,3160,3168,3169,3211,3212,3232,3233,3249,3250,3262,3263,3328,3329,3353,3354,3371,3372,3389,3390,3407,3408,3425,3426,3443,3444,3460,3461,3469,3470,3486,3487,3503,3504,3520,3521,3528,3529,3541,3542,3605,3606,3625,3626,3642,3643,3659,3660,3676,3677,3692,3693,3709,3710,3725,3726,3733,3734,3750,3751,3767,3768,3784,3785,3792,3793,3800,3801,3804,3805,3833,3834,3865,3866,3888,3889,3918,3919,3926,3927,3930,3931,3939,3940,3948,3949,3977,3978,4008,4009,4038,4039,4068,4069,4094,4095,4120,4121,4133,4134,4179,4180,4214,4215,4232,4233,4240,4241,4267,4268,4292,4293,4323,4324,4396,4397,4429,4430,4447,4448,4464,4465,4482,4483,4500,4501,4521,4522,4534,4535,4548,4549,4562,4563,4610,4611,4632,4633,4657,4658,4692,4693,4713,4714,4763,4764,4792,4793,4819,4820,4844,4845,4869,4870,4894,4895,4930,4931,4993,4994,5075,5076,5088,5089,5110,5111,5160,5161,5176,5177,5184,5185,5233,5234,5245,5246,5266,5267,5309,5310,5370,5371,5378,5379],{"type":31,"tagName":279,"properties":280,"children":282},"span",{"class":281},"line",[283],{"type":31,"tagName":279,"properties":284,"children":286},{"style":285},"--shiki-dark:#6A737D;--shiki-light:#6A737D",[287],{"type":27,"value":288},"// CVD Divergence: cumulative volume delta, in coins, in its own pane. When price makes a higher high while CVD makes",{"type":27,"value":28},{"type":31,"tagName":279,"properties":291,"children":292},{"class":281},[293],{"type":31,"tagName":279,"properties":294,"children":295},{"style":285},[296],{"type":27,"value":297},"// a lower high (or a lower low while CVD makes a higher low), a line joins the two price swings on the chart, a dashed",{"type":27,"value":28},{"type":31,"tagName":279,"properties":300,"children":301},{"class":281},[302],{"type":31,"tagName":279,"properties":303,"children":304},{"style":285},[305],{"type":27,"value":306},"// line joins the two CVD swings in the pane, every confirmed swing is dotted in the pane, and a small \"div\" tag names it.",{"type":27,"value":28},{"type":31,"tagName":279,"properties":309,"children":310},{"class":281},[],{"type":27,"value":28},{"type":31,"tagName":279,"properties":313,"children":314},{"class":281},[315,321,327,332,338,343,349,354,359,364,369,374,379,384,389],{"type":31,"tagName":279,"properties":316,"children":318},{"style":317},"--shiki-dark:#E1E4E8;--shiki-light:#24292E",[319],{"type":27,"value":320},"param.",{"type":31,"tagName":279,"properties":322,"children":324},{"style":323},"--shiki-dark:#B392F0;--shiki-light:#6F42C1",[325],{"type":27,"value":326},"int",{"type":31,"tagName":279,"properties":328,"children":329},{"style":317},[330],{"type":27,"value":331},"(",{"type":31,"tagName":279,"properties":333,"children":335},{"style":334},"--shiki-dark:#9ECBFF;--shiki-light:#032F62",[336],{"type":27,"value":337},"\"swing\"",{"type":31,"tagName":279,"properties":339,"children":340},{"style":317},[341],{"type":27,"value":342},", ",{"type":31,"tagName":279,"properties":344,"children":346},{"style":345},"--shiki-dark:#79B8FF;--shiki-light:#005CC5",[347],{"type":27,"value":348},"8",{"type":31,"tagName":279,"properties":350,"children":351},{"style":317},[352],{"type":27,"value":353},", { min: ",{"type":31,"tagName":279,"properties":355,"children":356},{"style":345},[357],{"type":27,"value":358},"3",{"type":31,"tagName":279,"properties":360,"children":361},{"style":317},[362],{"type":27,"value":363},", max: ",{"type":31,"tagName":279,"properties":365,"children":366},{"style":345},[367],{"type":27,"value":368},"30",{"type":31,"tagName":279,"properties":370,"children":371},{"style":317},[372],{"type":27,"value":373},", label: ",{"type":31,"tagName":279,"properties":375,"children":376},{"style":334},[377],{"type":27,"value":378},"\"Swing strength in bars\"",{"type":31,"tagName":279,"properties":380,"children":381},{"style":317},[382],{"type":27,"value":383},", description: ",{"type":31,"tagName":279,"properties":385,"children":386},{"style":334},[387],{"type":27,"value":388},"\"Bars on each side a swing high or low must beat; a swing is confirmed this many bars later\"",{"type":31,"tagName":279,"properties":390,"children":391},{"style":317},[392],{"type":27,"value":393}," });",{"type":27,"value":28},{"type":31,"tagName":279,"properties":396,"children":397},{"class":281},[398,402,407,411,416,420,425,430,435,439,444,449],{"type":31,"tagName":279,"properties":399,"children":400},{"style":317},[401],{"type":27,"value":320},{"type":31,"tagName":279,"properties":403,"children":404},{"style":323},[405],{"type":27,"value":406},"bool",{"type":31,"tagName":279,"properties":408,"children":409},{"style":317},[410],{"type":27,"value":331},{"type":31,"tagName":279,"properties":412,"children":413},{"style":334},[414],{"type":27,"value":415},"\"cvd_reset\"",{"type":31,"tagName":279,"properties":417,"children":418},{"style":317},[419],{"type":27,"value":342},{"type":31,"tagName":279,"properties":421,"children":422},{"style":345},[423],{"type":27,"value":424},"false",{"type":31,"tagName":279,"properties":426,"children":427},{"style":317},[428],{"type":27,"value":429},", { label: ",{"type":31,"tagName":279,"properties":431,"children":432},{"style":334},[433],{"type":27,"value":434},"\"Reset at midnight\"",{"type":31,"tagName":279,"properties":436,"children":437},{"style":317},[438],{"type":27,"value":383},{"type":31,"tagName":279,"properties":440,"children":441},{"style":334},[442],{"type":27,"value":443},"\"Restart CVD at every UTC midnight; off, it runs from the first loaded bar\"",{"type":31,"tagName":279,"properties":445,"children":446},{"style":317},[447],{"type":27,"value":448}," }); ",{"type":31,"tagName":279,"properties":450,"children":451},{"style":285},[452],{"type":27,"value":453},"// a toggle: pb_cvd_reset() reads it in onStart()",{"type":27,"value":28},{"type":31,"tagName":279,"properties":456,"children":457},{"class":281},[458,462,466,470,475,479,484,488,493,497,502,506,511,515,520],{"type":31,"tagName":279,"properties":459,"children":460},{"style":317},[461],{"type":27,"value":320},{"type":31,"tagName":279,"properties":463,"children":464},{"style":323},[465],{"type":27,"value":326},{"type":31,"tagName":279,"properties":467,"children":468},{"style":317},[469],{"type":27,"value":331},{"type":31,"tagName":279,"properties":471,"children":472},{"style":334},[473],{"type":27,"value":474},"\"lines_kept\"",{"type":31,"tagName":279,"properties":476,"children":477},{"style":317},[478],{"type":27,"value":342},{"type":31,"tagName":279,"properties":480,"children":481},{"style":345},[482],{"type":27,"value":483},"12",{"type":31,"tagName":279,"properties":485,"children":486},{"style":317},[487],{"type":27,"value":353},{"type":31,"tagName":279,"properties":489,"children":490},{"style":345},[491],{"type":27,"value":492},"1",{"type":31,"tagName":279,"properties":494,"children":495},{"style":317},[496],{"type":27,"value":363},{"type":31,"tagName":279,"properties":498,"children":499},{"style":345},[500],{"type":27,"value":501},"60",{"type":31,"tagName":279,"properties":503,"children":504},{"style":317},[505],{"type":27,"value":373},{"type":31,"tagName":279,"properties":507,"children":508},{"style":334},[509],{"type":27,"value":510},"\"Divergence lines kept\"",{"type":31,"tagName":279,"properties":512,"children":513},{"style":317},[514],{"type":27,"value":383},{"type":31,"tagName":279,"properties":516,"children":517},{"style":334},[518],{"type":27,"value":519},"\"Divergence lines kept on the chart; the oldest is recycled\"",{"type":31,"tagName":279,"properties":521,"children":522},{"style":317},[523],{"type":27,"value":393},{"type":27,"value":28},{"type":31,"tagName":279,"properties":526,"children":527},{"class":281},[528,533,538,543,547],{"type":31,"tagName":279,"properties":529,"children":530},{"style":323},[531],{"type":27,"value":532},"legend",{"type":31,"tagName":279,"properties":534,"children":535},{"style":317},[536],{"type":27,"value":537},"({ title: ",{"type":31,"tagName":279,"properties":539,"children":540},{"style":334},[541],{"type":27,"value":542},"\"({{swing}})\"",{"type":31,"tagName":279,"properties":544,"children":545},{"style":317},[546],{"type":27,"value":448},{"type":31,"tagName":279,"properties":548,"children":549},{"style":285},[550],{"type":27,"value":551},"// the words after the name in the legend: the swing strength, read by name",{"type":27,"value":28},{"type":31,"tagName":279,"properties":554,"children":555},{"class":281},[556,561,565,570,575],{"type":31,"tagName":279,"properties":557,"children":558},{"style":323},[559],{"type":27,"value":560},"input",{"type":31,"tagName":279,"properties":562,"children":563},{"style":317},[564],{"type":27,"value":331},{"type":31,"tagName":279,"properties":566,"children":567},{"style":334},[568],{"type":27,"value":569},"\"close\"",{"type":31,"tagName":279,"properties":571,"children":572},{"style":317},[573],{"type":27,"value":574},", ohlcv.close); ",{"type":31,"tagName":279,"properties":576,"children":577},{"style":285},[578],{"type":27,"value":579},"// the primary input: the chart's own candles define the grid every other input lines up on",{"type":27,"value":28},{"type":31,"tagName":279,"properties":582,"children":583},{"class":281},[584,588,592,597,602,607,612,617,621],{"type":31,"tagName":279,"properties":585,"children":586},{"style":323},[587],{"type":27,"value":560},{"type":31,"tagName":279,"properties":589,"children":590},{"style":317},[591],{"type":27,"value":331},{"type":31,"tagName":279,"properties":593,"children":594},{"style":334},[595],{"type":27,"value":596},"\"buy\"",{"type":31,"tagName":279,"properties":598,"children":599},{"style":317},[600],{"type":27,"value":601},", trades.volume, { side: ",{"type":31,"tagName":279,"properties":603,"children":604},{"style":334},[605],{"type":27,"value":606},"\"BUY\"",{"type":31,"tagName":279,"properties":608,"children":609},{"style":317},[610],{"type":27,"value":611},", missing: ",{"type":31,"tagName":279,"properties":613,"children":614},{"style":334},[615],{"type":27,"value":616},"\"zero\"",{"type":31,"tagName":279,"properties":618,"children":619},{"style":317},[620],{"type":27,"value":448},{"type":31,"tagName":279,"properties":622,"children":623},{"style":285},[624],{"type":27,"value":625},"// aggressive buy volume; a bar with no prints reads 0",{"type":27,"value":28},{"type":31,"tagName":279,"properties":628,"children":629},{"class":281},[630,634,638,643,647,652,656,660,664],{"type":31,"tagName":279,"properties":631,"children":632},{"style":323},[633],{"type":27,"value":560},{"type":31,"tagName":279,"properties":635,"children":636},{"style":317},[637],{"type":27,"value":331},{"type":31,"tagName":279,"properties":639,"children":640},{"style":334},[641],{"type":27,"value":642},"\"sell\"",{"type":31,"tagName":279,"properties":644,"children":645},{"style":317},[646],{"type":27,"value":601},{"type":31,"tagName":279,"properties":648,"children":649},{"style":334},[650],{"type":27,"value":651},"\"SELL\"",{"type":31,"tagName":279,"properties":653,"children":654},{"style":317},[655],{"type":27,"value":611},{"type":31,"tagName":279,"properties":657,"children":658},{"style":334},[659],{"type":27,"value":616},{"type":31,"tagName":279,"properties":661,"children":662},{"style":317},[663],{"type":27,"value":448},{"type":31,"tagName":279,"properties":665,"children":666},{"style":285},[667],{"type":27,"value":668},"// aggressive sell volume, the other half of the tape",{"type":27,"value":28},{"type":31,"tagName":279,"properties":671,"children":672},{"class":281},[673,678,682,687,692,697,702,707,711,716,721,726,731,736,740],{"type":31,"tagName":279,"properties":674,"children":675},{"style":323},[676],{"type":27,"value":677},"output",{"type":31,"tagName":279,"properties":679,"children":680},{"style":317},[681],{"type":27,"value":331},{"type":31,"tagName":279,"properties":683,"children":684},{"style":334},[685],{"type":27,"value":686},"\"cvd\"",{"type":31,"tagName":279,"properties":688,"children":689},{"style":317},[690],{"type":27,"value":691},", line, lower, { color: ",{"type":31,"tagName":279,"properties":693,"children":694},{"style":334},[695],{"type":27,"value":696},"\"#38bdf8\"",{"type":31,"tagName":279,"properties":698,"children":699},{"style":317},[700],{"type":27,"value":701},", width: ",{"type":31,"tagName":279,"properties":703,"children":704},{"style":345},[705],{"type":27,"value":706},"2",{"type":31,"tagName":279,"properties":708,"children":709},{"style":317},[710],{"type":27,"value":373},{"type":31,"tagName":279,"properties":712,"children":713},{"style":334},[714],{"type":27,"value":715},"\"CVD\"",{"type":31,"tagName":279,"properties":717,"children":718},{"style":317},[719],{"type":27,"value":720},", format: ",{"type":31,"tagName":279,"properties":722,"children":723},{"style":334},[724],{"type":27,"value":725},"\"si\"",{"type":31,"tagName":279,"properties":727,"children":728},{"style":317},[729],{"type":27,"value":730},", unit: ",{"type":31,"tagName":279,"properties":732,"children":733},{"style":334},[734],{"type":27,"value":735},"\" coins\"",{"type":31,"tagName":279,"properties":737,"children":738},{"style":317},[739],{"type":27,"value":448},{"type":31,"tagName":279,"properties":741,"children":742},{"style":285},[743],{"type":27,"value":744},"// cumulative volume delta in the base asset (trades.volume reads coins), in its own pane under the chart",{"type":27,"value":28},{"type":31,"tagName":279,"properties":747,"children":748},{"class":281},[749,753,757,762,767,772,777,782,787,793,797,802,806,811,815,819,824,829,833,837,841,845,849],{"type":31,"tagName":279,"properties":750,"children":751},{"style":323},[752],{"type":27,"value":677},{"type":31,"tagName":279,"properties":754,"children":755},{"style":317},[756],{"type":27,"value":331},{"type":31,"tagName":279,"properties":758,"children":759},{"style":334},[760],{"type":27,"value":761},"\"cvd_swing\"",{"type":31,"tagName":279,"properties":763,"children":764},{"style":317},[765],{"type":27,"value":766},", shape, lower, { color: ",{"type":31,"tagName":279,"properties":768,"children":769},{"style":334},[770],{"type":27,"value":771},"\"#a78bfa\"",{"type":31,"tagName":279,"properties":773,"children":774},{"style":317},[775],{"type":27,"value":776},", shape_where: ",{"type":31,"tagName":279,"properties":778,"children":779},{"style":334},[780],{"type":27,"value":781},"\"swing_here\"",{"type":31,"tagName":279,"properties":783,"children":784},{"style":317},[785],{"type":27,"value":786},", displacement_bars: ",{"type":31,"tagName":279,"properties":788,"children":790},{"style":789},"--shiki-dark:#F97583;--shiki-light:#D73A49",[791],{"type":27,"value":792},"-",{"type":31,"tagName":279,"properties":794,"children":795},{"style":345},[796],{"type":27,"value":348},{"type":31,"tagName":279,"properties":798,"children":799},{"style":317},[800],{"type":27,"value":801},", displacement_bars_by: { param: ",{"type":31,"tagName":279,"properties":803,"children":804},{"style":334},[805],{"type":27,"value":337},{"type":31,"tagName":279,"properties":807,"children":808},{"style":317},[809],{"type":27,"value":810},", scale: ",{"type":31,"tagName":279,"properties":812,"children":813},{"style":789},[814],{"type":27,"value":792},{"type":31,"tagName":279,"properties":816,"children":817},{"style":345},[818],{"type":27,"value":492},{"type":31,"tagName":279,"properties":820,"children":821},{"style":317},[822],{"type":27,"value":823}," }, label: ",{"type":31,"tagName":279,"properties":825,"children":826},{"style":334},[827],{"type":27,"value":828},"\"CVD swing\"",{"type":31,"tagName":279,"properties":830,"children":831},{"style":317},[832],{"type":27,"value":720},{"type":31,"tagName":279,"properties":834,"children":835},{"style":334},[836],{"type":27,"value":725},{"type":31,"tagName":279,"properties":838,"children":839},{"style":317},[840],{"type":27,"value":730},{"type":31,"tagName":279,"properties":842,"children":843},{"style":334},[844],{"type":27,"value":735},{"type":31,"tagName":279,"properties":846,"children":847},{"style":317},[848],{"type":27,"value":448},{"type":31,"tagName":279,"properties":850,"children":851},{"style":285},[852],{"type":27,"value":853},"// a dot on the CVD at each confirmed swing, drawn back at the swing bar: `swing` bars before the bar that confirms it (-8 is the default strength's shift)",{"type":27,"value":28},{"type":31,"tagName":279,"properties":856,"children":857},{"class":281},[858,862,866,870,875],{"type":31,"tagName":279,"properties":859,"children":860},{"style":323},[861],{"type":27,"value":677},{"type":31,"tagName":279,"properties":863,"children":864},{"style":317},[865],{"type":27,"value":331},{"type":31,"tagName":279,"properties":867,"children":868},{"style":334},[869],{"type":27,"value":781},{"type":31,"tagName":279,"properties":871,"children":872},{"style":317},[873],{"type":27,"value":874},", none); ",{"type":31,"tagName":279,"properties":876,"children":877},{"style":285},[878],{"type":27,"value":879},"// data-only: 1 on the bar that confirms a swing (the dot's gate)",{"type":27,"value":28},{"type":31,"tagName":279,"properties":882,"children":883},{"class":281},[884,888,892,897,901],{"type":31,"tagName":279,"properties":885,"children":886},{"style":323},[887],{"type":27,"value":677},{"type":31,"tagName":279,"properties":889,"children":890},{"style":317},[891],{"type":27,"value":331},{"type":31,"tagName":279,"properties":893,"children":894},{"style":334},[895],{"type":27,"value":896},"\"divergence\"",{"type":31,"tagName":279,"properties":898,"children":899},{"style":317},[900],{"type":27,"value":874},{"type":31,"tagName":279,"properties":902,"children":903},{"style":285},[904],{"type":27,"value":905},"// data-only: -1 bearish, +1 bullish, 0 none; read it in the Console or fire an alert(...) on it",{"type":27,"value":28},{"type":31,"tagName":279,"properties":908,"children":909},{"class":281},[910,915,919,924,929,934,938],{"type":31,"tagName":279,"properties":911,"children":912},{"style":323},[913],{"type":27,"value":914},"string",{"type":31,"tagName":279,"properties":916,"children":917},{"style":317},[918],{"type":27,"value":331},{"type":31,"tagName":279,"properties":920,"children":921},{"style":334},[922],{"type":27,"value":923},"\"text\"",{"type":31,"tagName":279,"properties":925,"children":926},{"style":317},[927],{"type":27,"value":928},", { max_bytes: ",{"type":31,"tagName":279,"properties":930,"children":931},{"style":345},[932],{"type":27,"value":933},"40",{"type":31,"tagName":279,"properties":935,"children":936},{"style":317},[937],{"type":27,"value":448},{"type":31,"tagName":279,"properties":939,"children":940},{"style":285},[941],{"type":27,"value":942},"// one bounded slot every label is written through",{"type":27,"value":28},{"type":31,"tagName":279,"properties":945,"children":946},{"class":281},[947,952,956,961,965,969],{"type":31,"tagName":279,"properties":948,"children":949},{"style":317},[950],{"type":27,"value":951},"handles.",{"type":31,"tagName":279,"properties":953,"children":954},{"style":323},[955],{"type":27,"value":281},{"type":31,"tagName":279,"properties":957,"children":958},{"style":317},[959],{"type":27,"value":960},"({ width: ",{"type":31,"tagName":279,"properties":962,"children":963},{"style":345},[964],{"type":27,"value":706},{"type":31,"tagName":279,"properties":966,"children":967},{"style":317},[968],{"type":27,"value":448},{"type":31,"tagName":279,"properties":970,"children":971},{"style":285},[972],{"type":27,"value":973},"// the price link between the two swings (chart time and price)",{"type":27,"value":28},{"type":31,"tagName":279,"properties":976,"children":977},{"class":281},[978,982,987,992,997,1001,1005,1010,1015,1019],{"type":31,"tagName":279,"properties":979,"children":980},{"style":317},[981],{"type":27,"value":951},{"type":31,"tagName":279,"properties":983,"children":984},{"style":323},[985],{"type":27,"value":986},"polyline",{"type":31,"tagName":279,"properties":988,"children":989},{"style":317},[990],{"type":27,"value":991},"({ panel: ",{"type":31,"tagName":279,"properties":993,"children":994},{"style":334},[995],{"type":27,"value":996},"\"lower\"",{"type":31,"tagName":279,"properties":998,"children":999},{"style":317},[1000],{"type":27,"value":701},{"type":31,"tagName":279,"properties":1002,"children":1003},{"style":345},[1004],{"type":27,"value":492},{"type":31,"tagName":279,"properties":1006,"children":1007},{"style":317},[1008],{"type":27,"value":1009},", lineStyle: ",{"type":31,"tagName":279,"properties":1011,"children":1012},{"style":334},[1013],{"type":27,"value":1014},"\"dashed\"",{"type":31,"tagName":279,"properties":1016,"children":1017},{"style":317},[1018],{"type":27,"value":448},{"type":31,"tagName":279,"properties":1020,"children":1021},{"style":285},[1022],{"type":27,"value":1023},"// the CVD link between the two swings, in the pane",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1026,"children":1027},{"class":281},[1028,1032,1037,1042,1047,1052,1057,1061],{"type":31,"tagName":279,"properties":1029,"children":1030},{"style":317},[1031],{"type":27,"value":951},{"type":31,"tagName":279,"properties":1033,"children":1034},{"style":323},[1035],{"type":27,"value":1036},"label",{"type":31,"tagName":279,"properties":1038,"children":1039},{"style":317},[1040],{"type":27,"value":1041},"({ size: ",{"type":31,"tagName":279,"properties":1043,"children":1044},{"style":345},[1045],{"type":27,"value":1046},"11",{"type":31,"tagName":279,"properties":1048,"children":1049},{"style":317},[1050],{"type":27,"value":1051},", color: ",{"type":31,"tagName":279,"properties":1053,"children":1054},{"style":334},[1055],{"type":27,"value":1056},"\"#e2e8f0\"",{"type":31,"tagName":279,"properties":1058,"children":1059},{"style":317},[1060],{"type":27,"value":448},{"type":31,"tagName":279,"properties":1062,"children":1063},{"style":285},[1064],{"type":27,"value":1065},"// the \"div\" tag on price, and the one line of words when the market has no sided trades",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1068,"children":1069},{"class":281},[],{"type":27,"value":28},{"type":31,"tagName":279,"properties":1072,"children":1073},{"class":281},[1074,1079,1084,1089,1094,1099],{"type":31,"tagName":279,"properties":1075,"children":1076},{"style":789},[1077],{"type":27,"value":1078},"const",{"type":31,"tagName":279,"properties":1080,"children":1081},{"style":345},[1082],{"type":27,"value":1083}," RING",{"type":31,"tagName":279,"properties":1085,"children":1086},{"style":789},[1087],{"type":27,"value":1088}," =",{"type":31,"tagName":279,"properties":1090,"children":1091},{"style":345},[1092],{"type":27,"value":1093}," 64",{"type":31,"tagName":279,"properties":1095,"children":1096},{"style":317},[1097],{"type":27,"value":1098},"; ",{"type":31,"tagName":279,"properties":1100,"children":1101},{"style":285},[1102],{"type":27,"value":1103},"// the swing window: 2 x 30 + 1 bars at the largest strength",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1106,"children":1107},{"class":281},[1108,1112,1117,1121,1126,1130],{"type":31,"tagName":279,"properties":1109,"children":1110},{"style":789},[1111],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1113,"children":1114},{"style":345},[1115],{"type":27,"value":1116}," MAX_LINES",{"type":31,"tagName":279,"properties":1118,"children":1119},{"style":789},[1120],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1122,"children":1123},{"style":345},[1124],{"type":27,"value":1125}," 60",{"type":31,"tagName":279,"properties":1127,"children":1128},{"style":317},[1129],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":1131,"children":1132},{"style":285},[1133],{"type":27,"value":1134},"// handles per kind at the largest setting",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1137,"children":1138},{"class":281},[1139,1143,1148,1152,1157,1162,1167,1172,1177,1182,1187],{"type":31,"tagName":279,"properties":1140,"children":1141},{"style":789},[1142],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1144,"children":1145},{"style":345},[1146],{"type":27,"value":1147}," highs",{"type":31,"tagName":279,"properties":1149,"children":1150},{"style":789},[1151],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1153,"children":1154},{"style":789},[1155],{"type":27,"value":1156}," new",{"type":31,"tagName":279,"properties":1158,"children":1159},{"style":323},[1160],{"type":27,"value":1161}," StaticArray",{"type":31,"tagName":279,"properties":1163,"children":1164},{"style":317},[1165],{"type":27,"value":1166},"\u003C",{"type":31,"tagName":279,"properties":1168,"children":1169},{"style":323},[1170],{"type":27,"value":1171},"f64",{"type":31,"tagName":279,"properties":1173,"children":1174},{"style":317},[1175],{"type":27,"value":1176},">(",{"type":31,"tagName":279,"properties":1178,"children":1179},{"style":345},[1180],{"type":27,"value":1181},"RING",{"type":31,"tagName":279,"properties":1183,"children":1184},{"style":317},[1185],{"type":27,"value":1186},"); ",{"type":31,"tagName":279,"properties":1188,"children":1189},{"style":285},[1190],{"type":27,"value":1191},"// the last RING bars, rings the swing test reads",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1194,"children":1195},{"class":281},[1196,1200,1205,1209,1213,1217,1221,1225,1229,1233],{"type":31,"tagName":279,"properties":1197,"children":1198},{"style":789},[1199],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1201,"children":1202},{"style":345},[1203],{"type":27,"value":1204}," lows",{"type":31,"tagName":279,"properties":1206,"children":1207},{"style":789},[1208],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1210,"children":1211},{"style":789},[1212],{"type":27,"value":1156},{"type":31,"tagName":279,"properties":1214,"children":1215},{"style":323},[1216],{"type":27,"value":1161},{"type":31,"tagName":279,"properties":1218,"children":1219},{"style":317},[1220],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":1222,"children":1223},{"style":323},[1224],{"type":27,"value":1171},{"type":31,"tagName":279,"properties":1226,"children":1227},{"style":317},[1228],{"type":27,"value":1176},{"type":31,"tagName":279,"properties":1230,"children":1231},{"style":345},[1232],{"type":27,"value":1181},{"type":31,"tagName":279,"properties":1234,"children":1235},{"style":317},[1236],{"type":27,"value":1237},");",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1240,"children":1241},{"class":281},[1242,1246,1251,1255,1259,1263,1267,1271,1275,1279],{"type":31,"tagName":279,"properties":1243,"children":1244},{"style":789},[1245],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1247,"children":1248},{"style":345},[1249],{"type":27,"value":1250}," cvds",{"type":31,"tagName":279,"properties":1252,"children":1253},{"style":789},[1254],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1256,"children":1257},{"style":789},[1258],{"type":27,"value":1156},{"type":31,"tagName":279,"properties":1260,"children":1261},{"style":323},[1262],{"type":27,"value":1161},{"type":31,"tagName":279,"properties":1264,"children":1265},{"style":317},[1266],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":1268,"children":1269},{"style":323},[1270],{"type":27,"value":1171},{"type":31,"tagName":279,"properties":1272,"children":1273},{"style":317},[1274],{"type":27,"value":1176},{"type":31,"tagName":279,"properties":1276,"children":1277},{"style":345},[1278],{"type":27,"value":1181},{"type":31,"tagName":279,"properties":1280,"children":1281},{"style":317},[1282],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":1285,"children":1286},{"class":281},[1287,1291,1296,1300,1304,1308,1312,1316,1320,1324],{"type":31,"tagName":279,"properties":1288,"children":1289},{"style":789},[1290],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1292,"children":1293},{"style":345},[1294],{"type":27,"value":1295}," times",{"type":31,"tagName":279,"properties":1297,"children":1298},{"style":789},[1299],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1301,"children":1302},{"style":789},[1303],{"type":27,"value":1156},{"type":31,"tagName":279,"properties":1305,"children":1306},{"style":323},[1307],{"type":27,"value":1161},{"type":31,"tagName":279,"properties":1309,"children":1310},{"style":317},[1311],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":1313,"children":1314},{"style":323},[1315],{"type":27,"value":1171},{"type":31,"tagName":279,"properties":1317,"children":1318},{"style":317},[1319],{"type":27,"value":1176},{"type":31,"tagName":279,"properties":1321,"children":1322},{"style":345},[1323],{"type":27,"value":1181},{"type":31,"tagName":279,"properties":1325,"children":1326},{"style":317},[1327],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":1330,"children":1331},{"class":281},[1332,1336,1341,1345,1349,1353,1357,1361,1365,1370,1374],{"type":31,"tagName":279,"properties":1333,"children":1334},{"style":789},[1335],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1337,"children":1338},{"style":345},[1339],{"type":27,"value":1340}," points",{"type":31,"tagName":279,"properties":1342,"children":1343},{"style":789},[1344],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1346,"children":1347},{"style":789},[1348],{"type":27,"value":1156},{"type":31,"tagName":279,"properties":1350,"children":1351},{"style":323},[1352],{"type":27,"value":1161},{"type":31,"tagName":279,"properties":1354,"children":1355},{"style":317},[1356],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":1358,"children":1359},{"style":323},[1360],{"type":27,"value":1171},{"type":31,"tagName":279,"properties":1362,"children":1363},{"style":317},[1364],{"type":27,"value":1176},{"type":31,"tagName":279,"properties":1366,"children":1367},{"style":345},[1368],{"type":27,"value":1369},"4",{"type":31,"tagName":279,"properties":1371,"children":1372},{"style":317},[1373],{"type":27,"value":1186},{"type":31,"tagName":279,"properties":1375,"children":1376},{"style":285},[1377],{"type":27,"value":1378},"// x0, y0, x1, y1 for the pane link",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1381,"children":1382},{"class":281},[1383,1387,1392,1397,1402,1407,1412,1417],{"type":31,"tagName":279,"properties":1384,"children":1385},{"style":789},[1386],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1388,"children":1389},{"style":345},[1390],{"type":27,"value":1391}," lines",{"type":31,"tagName":279,"properties":1393,"children":1394},{"style":789},[1395],{"type":27,"value":1396},":",{"type":31,"tagName":279,"properties":1398,"children":1399},{"style":323},[1400],{"type":27,"value":1401}," LineHandle",{"type":31,"tagName":279,"properties":1403,"children":1404},{"style":317},[1405],{"type":27,"value":1406},"[] ",{"type":31,"tagName":279,"properties":1408,"children":1409},{"style":789},[1410],{"type":27,"value":1411},"=",{"type":31,"tagName":279,"properties":1413,"children":1414},{"style":317},[1415],{"type":27,"value":1416}," []; ",{"type":31,"tagName":279,"properties":1418,"children":1419},{"style":285},[1420],{"type":27,"value":1421},"// handle objects allocate once; ids are one space across kinds",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1424,"children":1425},{"class":281},[1426,1430,1435,1439,1444,1448,1452],{"type":31,"tagName":279,"properties":1427,"children":1428},{"style":789},[1429],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1431,"children":1432},{"style":345},[1433],{"type":27,"value":1434}," links",{"type":31,"tagName":279,"properties":1436,"children":1437},{"style":789},[1438],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":1440,"children":1441},{"style":323},[1442],{"type":27,"value":1443}," PolylineHandle",{"type":31,"tagName":279,"properties":1445,"children":1446},{"style":317},[1447],{"type":27,"value":1406},{"type":31,"tagName":279,"properties":1449,"children":1450},{"style":789},[1451],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":1453,"children":1454},{"style":317},[1455],{"type":27,"value":1456}," [];",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1459,"children":1460},{"class":281},[1461,1465,1470,1474,1479,1483,1487],{"type":31,"tagName":279,"properties":1462,"children":1463},{"style":789},[1464],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1466,"children":1467},{"style":345},[1468],{"type":27,"value":1469}," tags",{"type":31,"tagName":279,"properties":1471,"children":1472},{"style":789},[1473],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":1475,"children":1476},{"style":323},[1477],{"type":27,"value":1478}," LabelHandle",{"type":31,"tagName":279,"properties":1480,"children":1481},{"style":317},[1482],{"type":27,"value":1406},{"type":31,"tagName":279,"properties":1484,"children":1485},{"style":789},[1486],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":1488,"children":1489},{"style":317},[1490],{"type":27,"value":1456},{"type":27,"value":28},{"type":31,"tagName":279,"properties":1493,"children":1494},{"class":281},[1495,1500,1505,1510,1515,1519,1524,1529,1533,1537,1541,1546,1551],{"type":31,"tagName":279,"properties":1496,"children":1497},{"style":789},[1498],{"type":27,"value":1499},"for",{"type":31,"tagName":279,"properties":1501,"children":1502},{"style":317},[1503],{"type":27,"value":1504}," (",{"type":31,"tagName":279,"properties":1506,"children":1507},{"style":789},[1508],{"type":27,"value":1509},"let",{"type":31,"tagName":279,"properties":1511,"children":1512},{"style":317},[1513],{"type":27,"value":1514}," i ",{"type":31,"tagName":279,"properties":1516,"children":1517},{"style":789},[1518],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":1520,"children":1521},{"style":345},[1522],{"type":27,"value":1523}," 0",{"type":31,"tagName":279,"properties":1525,"children":1526},{"style":317},[1527],{"type":27,"value":1528},"; i ",{"type":31,"tagName":279,"properties":1530,"children":1531},{"style":789},[1532],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":1534,"children":1535},{"style":345},[1536],{"type":27,"value":1116},{"type":31,"tagName":279,"properties":1538,"children":1539},{"style":317},[1540],{"type":27,"value":1528},{"type":31,"tagName":279,"properties":1542,"children":1543},{"style":789},[1544],{"type":27,"value":1545},"+=",{"type":31,"tagName":279,"properties":1547,"children":1548},{"style":345},[1549],{"type":27,"value":1550}," 1",{"type":31,"tagName":279,"properties":1552,"children":1553},{"style":317},[1554],{"type":27,"value":1555},") {",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1558,"children":1559},{"class":281},[1560,1565,1570,1575,1579],{"type":31,"tagName":279,"properties":1561,"children":1562},{"style":317},[1563],{"type":27,"value":1564},"  lines.",{"type":31,"tagName":279,"properties":1566,"children":1567},{"style":323},[1568],{"type":27,"value":1569},"push",{"type":31,"tagName":279,"properties":1571,"children":1572},{"style":317},[1573],{"type":27,"value":1574},"(draw.",{"type":31,"tagName":279,"properties":1576,"children":1577},{"style":323},[1578],{"type":27,"value":281},{"type":31,"tagName":279,"properties":1580,"children":1581},{"style":317},[1582],{"type":27,"value":1583},"(i));",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1586,"children":1587},{"class":281},[1588,1593,1597,1601,1605,1609,1614,1619],{"type":31,"tagName":279,"properties":1589,"children":1590},{"style":317},[1591],{"type":27,"value":1592},"  links.",{"type":31,"tagName":279,"properties":1594,"children":1595},{"style":323},[1596],{"type":27,"value":1569},{"type":31,"tagName":279,"properties":1598,"children":1599},{"style":317},[1600],{"type":27,"value":1574},{"type":31,"tagName":279,"properties":1602,"children":1603},{"style":323},[1604],{"type":27,"value":986},{"type":31,"tagName":279,"properties":1606,"children":1607},{"style":317},[1608],{"type":27,"value":331},{"type":31,"tagName":279,"properties":1610,"children":1611},{"style":345},[1612],{"type":27,"value":1613},"100",{"type":31,"tagName":279,"properties":1615,"children":1616},{"style":789},[1617],{"type":27,"value":1618}," +",{"type":31,"tagName":279,"properties":1620,"children":1621},{"style":317},[1622],{"type":27,"value":1623}," i));",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1626,"children":1627},{"class":281},[1628,1633,1637,1641,1645,1649,1654,1658],{"type":31,"tagName":279,"properties":1629,"children":1630},{"style":317},[1631],{"type":27,"value":1632},"  tags.",{"type":31,"tagName":279,"properties":1634,"children":1635},{"style":323},[1636],{"type":27,"value":1569},{"type":31,"tagName":279,"properties":1638,"children":1639},{"style":317},[1640],{"type":27,"value":1574},{"type":31,"tagName":279,"properties":1642,"children":1643},{"style":323},[1644],{"type":27,"value":1036},{"type":31,"tagName":279,"properties":1646,"children":1647},{"style":317},[1648],{"type":27,"value":331},{"type":31,"tagName":279,"properties":1650,"children":1651},{"style":345},[1652],{"type":27,"value":1653},"200",{"type":31,"tagName":279,"properties":1655,"children":1656},{"style":789},[1657],{"type":27,"value":1618},{"type":31,"tagName":279,"properties":1659,"children":1660},{"style":317},[1661],{"type":27,"value":1623},{"type":27,"value":28},{"type":31,"tagName":279,"properties":1664,"children":1665},{"class":281},[1666],{"type":31,"tagName":279,"properties":1667,"children":1668},{"style":317},[1669],{"type":27,"value":1670},"}",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1673,"children":1674},{"class":281},[1675,1679,1684,1688,1693,1697,1701,1706],{"type":31,"tagName":279,"properties":1676,"children":1677},{"style":789},[1678],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1680,"children":1681},{"style":345},[1682],{"type":27,"value":1683}," notice",{"type":31,"tagName":279,"properties":1685,"children":1686},{"style":789},[1687],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1689,"children":1690},{"style":317},[1691],{"type":27,"value":1692}," draw.",{"type":31,"tagName":279,"properties":1694,"children":1695},{"style":323},[1696],{"type":27,"value":1036},{"type":31,"tagName":279,"properties":1698,"children":1699},{"style":317},[1700],{"type":27,"value":331},{"type":31,"tagName":279,"properties":1702,"children":1703},{"style":345},[1704],{"type":27,"value":1705},"300",{"type":31,"tagName":279,"properties":1707,"children":1708},{"style":317},[1709],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":1712,"children":1713},{"class":281},[1714,1718,1723,1727,1732,1736,1741,1745,1750,1754,1758,1762,1767,1771],{"type":31,"tagName":279,"properties":1715,"children":1716},{"style":789},[1717],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1719,"children":1720},{"style":345},[1721],{"type":27,"value":1722}," ORANGE",{"type":31,"tagName":279,"properties":1724,"children":1725},{"style":789},[1726],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1728,"children":1729},{"style":323},[1730],{"type":27,"value":1731}," rgba",{"type":31,"tagName":279,"properties":1733,"children":1734},{"style":317},[1735],{"type":27,"value":331},{"type":31,"tagName":279,"properties":1737,"children":1738},{"style":345},[1739],{"type":27,"value":1740},"248",{"type":31,"tagName":279,"properties":1742,"children":1743},{"style":317},[1744],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1746,"children":1747},{"style":345},[1748],{"type":27,"value":1749},"104",{"type":31,"tagName":279,"properties":1751,"children":1752},{"style":317},[1753],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1755,"children":1756},{"style":345},[1757],{"type":27,"value":271},{"type":31,"tagName":279,"properties":1759,"children":1760},{"style":317},[1761],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1763,"children":1764},{"style":345},[1765],{"type":27,"value":1766},"255",{"type":31,"tagName":279,"properties":1768,"children":1769},{"style":317},[1770],{"type":27,"value":1186},{"type":31,"tagName":279,"properties":1772,"children":1773},{"style":285},[1774],{"type":27,"value":1775},"// bearish: price up, CVD down",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1778,"children":1779},{"class":281},[1780,1784,1789,1793,1797,1801,1805,1809,1814,1818,1822,1826,1830,1834],{"type":31,"tagName":279,"properties":1781,"children":1782},{"style":789},[1783],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1785,"children":1786},{"style":345},[1787],{"type":27,"value":1788}," AMBER",{"type":31,"tagName":279,"properties":1790,"children":1791},{"style":789},[1792],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1794,"children":1795},{"style":323},[1796],{"type":27,"value":1731},{"type":31,"tagName":279,"properties":1798,"children":1799},{"style":317},[1800],{"type":27,"value":331},{"type":31,"tagName":279,"properties":1802,"children":1803},{"style":345},[1804],{"type":27,"value":1740},{"type":31,"tagName":279,"properties":1806,"children":1807},{"style":317},[1808],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1810,"children":1811},{"style":345},[1812],{"type":27,"value":1813},"192",{"type":31,"tagName":279,"properties":1815,"children":1816},{"style":317},[1817],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1819,"children":1820},{"style":345},[1821],{"type":27,"value":271},{"type":31,"tagName":279,"properties":1823,"children":1824},{"style":317},[1825],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1827,"children":1828},{"style":345},[1829],{"type":27,"value":1766},{"type":31,"tagName":279,"properties":1831,"children":1832},{"style":317},[1833],{"type":27,"value":1186},{"type":31,"tagName":279,"properties":1835,"children":1836},{"style":285},[1837],{"type":27,"value":1838},"// bullish: price down, CVD up",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1841,"children":1842},{"class":281},[1843,1847,1852,1856,1860,1864,1869,1873,1878,1882,1887,1891,1895],{"type":31,"tagName":279,"properties":1844,"children":1845},{"style":789},[1846],{"type":27,"value":1078},{"type":31,"tagName":279,"properties":1848,"children":1849},{"style":345},[1850],{"type":27,"value":1851}," SLATE",{"type":31,"tagName":279,"properties":1853,"children":1854},{"style":789},[1855],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":1857,"children":1858},{"style":323},[1859],{"type":27,"value":1731},{"type":31,"tagName":279,"properties":1861,"children":1862},{"style":317},[1863],{"type":27,"value":331},{"type":31,"tagName":279,"properties":1865,"children":1866},{"style":345},[1867],{"type":27,"value":1868},"148",{"type":31,"tagName":279,"properties":1870,"children":1871},{"style":317},[1872],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1874,"children":1875},{"style":345},[1876],{"type":27,"value":1877},"163",{"type":31,"tagName":279,"properties":1879,"children":1880},{"style":317},[1881],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1883,"children":1884},{"style":345},[1885],{"type":27,"value":1886},"184",{"type":31,"tagName":279,"properties":1888,"children":1889},{"style":317},[1890],{"type":27,"value":342},{"type":31,"tagName":279,"properties":1892,"children":1893},{"style":345},[1894],{"type":27,"value":1766},{"type":31,"tagName":279,"properties":1896,"children":1897},{"style":317},[1898],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":1901,"children":1902},{"class":281},[],{"type":27,"value":28},{"type":31,"tagName":279,"properties":1905,"children":1906},{"class":281},[1907,1911,1916,1920,1925,1929],{"type":31,"tagName":279,"properties":1908,"children":1909},{"style":789},[1910],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":1912,"children":1913},{"style":317},[1914],{"type":27,"value":1915}," swing ",{"type":31,"tagName":279,"properties":1917,"children":1918},{"style":789},[1919],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":1921,"children":1922},{"style":345},[1923],{"type":27,"value":1924}," 8",{"type":31,"tagName":279,"properties":1926,"children":1927},{"style":317},[1928],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":1930,"children":1931},{"style":285},[1932],{"type":27,"value":1933},"// settings, read in onStart()",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1936,"children":1937},{"class":281},[1938,1942,1947,1951,1956],{"type":31,"tagName":279,"properties":1939,"children":1940},{"style":789},[1941],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":1943,"children":1944},{"style":317},[1945],{"type":27,"value":1946}," resetDaily ",{"type":31,"tagName":279,"properties":1948,"children":1949},{"style":789},[1950],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":1952,"children":1953},{"style":345},[1954],{"type":27,"value":1955}," false",{"type":31,"tagName":279,"properties":1957,"children":1958},{"style":317},[1959],{"type":27,"value":1960},";",{"type":27,"value":28},{"type":31,"tagName":279,"properties":1963,"children":1964},{"class":281},[1965,1969,1974,1978,1983],{"type":31,"tagName":279,"properties":1966,"children":1967},{"style":789},[1968],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":1970,"children":1971},{"style":317},[1972],{"type":27,"value":1973}," linesKept ",{"type":31,"tagName":279,"properties":1975,"children":1976},{"style":789},[1977],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":1979,"children":1980},{"style":345},[1981],{"type":27,"value":1982}," 12",{"type":31,"tagName":279,"properties":1984,"children":1985},{"style":317},[1986],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":1989,"children":1990},{"class":281},[1991,1995,2000,2004,2008,2012],{"type":31,"tagName":279,"properties":1992,"children":1993},{"style":789},[1994],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":1996,"children":1997},{"style":317},[1998],{"type":27,"value":1999}," barCount ",{"type":31,"tagName":279,"properties":2001,"children":2002},{"style":789},[2003],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2005,"children":2006},{"style":345},[2007],{"type":27,"value":1523},{"type":31,"tagName":279,"properties":2009,"children":2010},{"style":317},[2011],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2013,"children":2014},{"style":285},[2015],{"type":27,"value":2016},"// bars seen",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2019,"children":2020},{"class":281},[2021,2025,2030,2034,2039,2043],{"type":31,"tagName":279,"properties":2022,"children":2023},{"style":789},[2024],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2026,"children":2027},{"style":317},[2028],{"type":27,"value":2029}," cvd ",{"type":31,"tagName":279,"properties":2031,"children":2032},{"style":789},[2033],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2035,"children":2036},{"style":345},[2037],{"type":27,"value":2038}," 0.0",{"type":31,"tagName":279,"properties":2040,"children":2041},{"style":317},[2042],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2044,"children":2045},{"style":285},[2046],{"type":27,"value":2047},"// the running delta",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2050,"children":2051},{"class":281},[2052,2056,2061,2065,2069,2073],{"type":31,"tagName":279,"properties":2053,"children":2054},{"style":789},[2055],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2057,"children":2058},{"style":317},[2059],{"type":27,"value":2060}," sidedVolume ",{"type":31,"tagName":279,"properties":2062,"children":2063},{"style":789},[2064],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2066,"children":2067},{"style":345},[2068],{"type":27,"value":2038},{"type":31,"tagName":279,"properties":2070,"children":2071},{"style":317},[2072],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2074,"children":2075},{"style":285},[2076],{"type":27,"value":2077},"// every sided print seen: 0 means the market has no sided trades",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2080,"children":2081},{"class":281},[2082,2086,2091,2095,2100,2105,2109],{"type":31,"tagName":279,"properties":2083,"children":2084},{"style":789},[2085],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2087,"children":2088},{"style":317},[2089],{"type":27,"value":2090}," prevDay ",{"type":31,"tagName":279,"properties":2092,"children":2093},{"style":789},[2094],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2096,"children":2097},{"style":789},[2098],{"type":27,"value":2099}," -",{"type":31,"tagName":279,"properties":2101,"children":2102},{"style":345},[2103],{"type":27,"value":2104},"1.0",{"type":31,"tagName":279,"properties":2106,"children":2107},{"style":317},[2108],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2110,"children":2111},{"style":285},[2112],{"type":27,"value":2113},"// the UTC day of the previous bar, for the daily reset",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2116,"children":2117},{"class":281},[2118,2122,2127,2131,2136,2140],{"type":31,"tagName":279,"properties":2119,"children":2120},{"style":789},[2121],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2123,"children":2124},{"style":317},[2125],{"type":27,"value":2126}," rangeAvg ",{"type":31,"tagName":279,"properties":2128,"children":2129},{"style":789},[2130],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2132,"children":2133},{"style":345},[2134],{"type":27,"value":2135}," NaN",{"type":31,"tagName":279,"properties":2137,"children":2138},{"style":317},[2139],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2141,"children":2142},{"style":285},[2143],{"type":27,"value":2144},"// a running mean of high - low: the tag's distance from the line",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2147,"children":2148},{"class":281},[2149,2153,2158,2162,2166,2170],{"type":31,"tagName":279,"properties":2150,"children":2151},{"style":789},[2152],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2154,"children":2155},{"style":317},[2156],{"type":27,"value":2157}," lastHighPrice ",{"type":31,"tagName":279,"properties":2159,"children":2160},{"style":789},[2161],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2163,"children":2164},{"style":345},[2165],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2167,"children":2168},{"style":317},[2169],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2171,"children":2172},{"style":285},[2173],{"type":27,"value":2174},"// the previous confirmed swing high and the CVD at it",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2177,"children":2178},{"class":281},[2179,2183,2188,2192,2196],{"type":31,"tagName":279,"properties":2180,"children":2181},{"style":789},[2182],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2184,"children":2185},{"style":317},[2186],{"type":27,"value":2187}," lastHighCvd ",{"type":31,"tagName":279,"properties":2189,"children":2190},{"style":789},[2191],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2193,"children":2194},{"style":345},[2195],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2197,"children":2198},{"style":317},[2199],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2202,"children":2203},{"class":281},[2204,2208,2213,2217,2221],{"type":31,"tagName":279,"properties":2205,"children":2206},{"style":789},[2207],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2209,"children":2210},{"style":317},[2211],{"type":27,"value":2212}," lastHighTime ",{"type":31,"tagName":279,"properties":2214,"children":2215},{"style":789},[2216],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2218,"children":2219},{"style":345},[2220],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2222,"children":2223},{"style":317},[2224],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2227,"children":2228},{"class":281},[2229,2233,2238,2242,2246,2250],{"type":31,"tagName":279,"properties":2230,"children":2231},{"style":789},[2232],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2234,"children":2235},{"style":317},[2236],{"type":27,"value":2237}," lastLowPrice ",{"type":31,"tagName":279,"properties":2239,"children":2240},{"style":789},[2241],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2243,"children":2244},{"style":345},[2245],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2247,"children":2248},{"style":317},[2249],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2251,"children":2252},{"style":285},[2253],{"type":27,"value":2254},"// the previous confirmed swing low and the CVD at it",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2257,"children":2258},{"class":281},[2259,2263,2268,2272,2276],{"type":31,"tagName":279,"properties":2260,"children":2261},{"style":789},[2262],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2264,"children":2265},{"style":317},[2266],{"type":27,"value":2267}," lastLowCvd ",{"type":31,"tagName":279,"properties":2269,"children":2270},{"style":789},[2271],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2273,"children":2274},{"style":345},[2275],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2277,"children":2278},{"style":317},[2279],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2282,"children":2283},{"class":281},[2284,2288,2293,2297,2301],{"type":31,"tagName":279,"properties":2285,"children":2286},{"style":789},[2287],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2289,"children":2290},{"style":317},[2291],{"type":27,"value":2292}," lastLowTime ",{"type":31,"tagName":279,"properties":2294,"children":2295},{"style":789},[2296],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2298,"children":2299},{"style":345},[2300],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2302,"children":2303},{"style":317},[2304],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2307,"children":2308},{"class":281},[2309,2313,2318,2322,2326,2330],{"type":31,"tagName":279,"properties":2310,"children":2311},{"style":789},[2312],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2314,"children":2315},{"style":317},[2316],{"type":27,"value":2317}," divergences ",{"type":31,"tagName":279,"properties":2319,"children":2320},{"style":789},[2321],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2323,"children":2324},{"style":345},[2325],{"type":27,"value":1523},{"type":31,"tagName":279,"properties":2327,"children":2328},{"style":317},[2329],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2331,"children":2332},{"style":285},[2333],{"type":27,"value":2334},"// how many have been drawn: the ring position",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2337,"children":2338},{"class":281},[2339,2343,2348,2352,2356,2360],{"type":31,"tagName":279,"properties":2340,"children":2341},{"style":789},[2342],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2344,"children":2345},{"style":317},[2346],{"type":27,"value":2347}," swingHere ",{"type":31,"tagName":279,"properties":2349,"children":2350},{"style":789},[2351],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2353,"children":2354},{"style":345},[2355],{"type":27,"value":2038},{"type":31,"tagName":279,"properties":2357,"children":2358},{"style":317},[2359],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2361,"children":2362},{"style":285},[2363],{"type":27,"value":2364},"// this bar's results, set by testSwing()",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2367,"children":2368},{"class":281},[2369,2373,2378,2382,2386],{"type":31,"tagName":279,"properties":2370,"children":2371},{"style":789},[2372],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2374,"children":2375},{"style":317},[2376],{"type":27,"value":2377}," swingCvd ",{"type":31,"tagName":279,"properties":2379,"children":2380},{"style":789},[2381],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2383,"children":2384},{"style":345},[2385],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2387,"children":2388},{"style":317},[2389],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2392,"children":2393},{"class":281},[2394,2398,2403,2407,2411,2415],{"type":31,"tagName":279,"properties":2395,"children":2396},{"style":789},[2397],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2399,"children":2400},{"style":317},[2401],{"type":27,"value":2402}," pendingKind ",{"type":31,"tagName":279,"properties":2404,"children":2405},{"style":789},[2406],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2408,"children":2409},{"style":345},[2410],{"type":27,"value":1523},{"type":31,"tagName":279,"properties":2412,"children":2413},{"style":317},[2414],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2416,"children":2417},{"style":285},[2418],{"type":27,"value":2419},"// 0 none, -1 bearish, +1 bullish: a divergence to draw this bar",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2422,"children":2423},{"class":281},[2424,2428,2433,2437,2441,2445],{"type":31,"tagName":279,"properties":2425,"children":2426},{"style":789},[2427],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2429,"children":2430},{"style":317},[2431],{"type":27,"value":2432}," x1 ",{"type":31,"tagName":279,"properties":2434,"children":2435},{"style":789},[2436],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2438,"children":2439},{"style":345},[2440],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2442,"children":2443},{"style":317},[2444],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2446,"children":2447},{"style":285},[2448],{"type":27,"value":2449},"// the two price swings and the CVD at each",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2452,"children":2453},{"class":281},[2454,2458,2463,2467,2471],{"type":31,"tagName":279,"properties":2455,"children":2456},{"style":789},[2457],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2459,"children":2460},{"style":317},[2461],{"type":27,"value":2462}," y1 ",{"type":31,"tagName":279,"properties":2464,"children":2465},{"style":789},[2466],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2468,"children":2469},{"style":345},[2470],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2472,"children":2473},{"style":317},[2474],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2477,"children":2478},{"class":281},[2479,2483,2488,2492,2496],{"type":31,"tagName":279,"properties":2480,"children":2481},{"style":789},[2482],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2484,"children":2485},{"style":317},[2486],{"type":27,"value":2487}," x2 ",{"type":31,"tagName":279,"properties":2489,"children":2490},{"style":789},[2491],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2493,"children":2494},{"style":345},[2495],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2497,"children":2498},{"style":317},[2499],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2502,"children":2503},{"class":281},[2504,2508,2513,2517,2521],{"type":31,"tagName":279,"properties":2505,"children":2506},{"style":789},[2507],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2509,"children":2510},{"style":317},[2511],{"type":27,"value":2512}," y2 ",{"type":31,"tagName":279,"properties":2514,"children":2515},{"style":789},[2516],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2518,"children":2519},{"style":345},[2520],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2522,"children":2523},{"style":317},[2524],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2527,"children":2528},{"class":281},[2529,2533,2538,2542,2546],{"type":31,"tagName":279,"properties":2530,"children":2531},{"style":789},[2532],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2534,"children":2535},{"style":317},[2536],{"type":27,"value":2537}," c1 ",{"type":31,"tagName":279,"properties":2539,"children":2540},{"style":789},[2541],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2543,"children":2544},{"style":345},[2545],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2547,"children":2548},{"style":317},[2549],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2552,"children":2553},{"class":281},[2554,2558,2563,2567,2571],{"type":31,"tagName":279,"properties":2555,"children":2556},{"style":789},[2557],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2559,"children":2560},{"style":317},[2561],{"type":27,"value":2562}," c2 ",{"type":31,"tagName":279,"properties":2564,"children":2565},{"style":789},[2566],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2568,"children":2569},{"style":345},[2570],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2572,"children":2573},{"style":317},[2574],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2577,"children":2578},{"class":281},[],{"type":27,"value":28},{"type":31,"tagName":279,"properties":2581,"children":2582},{"class":281},[2583],{"type":31,"tagName":279,"properties":2584,"children":2585},{"style":285},[2586],{"type":27,"value":2587},"// testSwing() tests the bar `swing` bars back for a swing, then the swing against the previous one of its kind for a divergence.",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2590,"children":2591},{"class":281},[2592,2597,2602,2607,2611,2616],{"type":31,"tagName":279,"properties":2593,"children":2594},{"style":789},[2595],{"type":27,"value":2596},"function",{"type":31,"tagName":279,"properties":2598,"children":2599},{"style":323},[2600],{"type":27,"value":2601}," testSwing",{"type":31,"tagName":279,"properties":2603,"children":2604},{"style":317},[2605],{"type":27,"value":2606},"()",{"type":31,"tagName":279,"properties":2608,"children":2609},{"style":789},[2610],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":2612,"children":2613},{"style":345},[2614],{"type":27,"value":2615}," void",{"type":31,"tagName":279,"properties":2617,"children":2618},{"style":317},[2619],{"type":27,"value":2620}," {",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2623,"children":2624},{"class":281},[2625,2630,2634,2638],{"type":31,"tagName":279,"properties":2626,"children":2627},{"style":317},[2628],{"type":27,"value":2629},"  swingHere ",{"type":31,"tagName":279,"properties":2631,"children":2632},{"style":789},[2633],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2635,"children":2636},{"style":345},[2637],{"type":27,"value":2038},{"type":31,"tagName":279,"properties":2639,"children":2640},{"style":317},[2641],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2644,"children":2645},{"class":281},[2646,2651,2655,2659],{"type":31,"tagName":279,"properties":2647,"children":2648},{"style":317},[2649],{"type":27,"value":2650},"  swingCvd ",{"type":31,"tagName":279,"properties":2652,"children":2653},{"style":789},[2654],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2656,"children":2657},{"style":345},[2658],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":2660,"children":2661},{"style":317},[2662],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2665,"children":2666},{"class":281},[2667,2672,2676,2680],{"type":31,"tagName":279,"properties":2668,"children":2669},{"style":317},[2670],{"type":27,"value":2671},"  pendingKind ",{"type":31,"tagName":279,"properties":2673,"children":2674},{"style":789},[2675],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2677,"children":2678},{"style":345},[2679],{"type":27,"value":1523},{"type":31,"tagName":279,"properties":2681,"children":2682},{"style":317},[2683],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2686,"children":2687},{"class":281},[2688,2693,2698,2702,2707,2712,2716,2721,2725,2730,2735,2739],{"type":31,"tagName":279,"properties":2689,"children":2690},{"style":789},[2691],{"type":27,"value":2692},"  if",{"type":31,"tagName":279,"properties":2694,"children":2695},{"style":317},[2696],{"type":27,"value":2697}," (barCount ",{"type":31,"tagName":279,"properties":2699,"children":2700},{"style":789},[2701],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":2703,"children":2704},{"style":345},[2705],{"type":27,"value":2706}," 2",{"type":31,"tagName":279,"properties":2708,"children":2709},{"style":789},[2710],{"type":27,"value":2711}," *",{"type":31,"tagName":279,"properties":2713,"children":2714},{"style":317},[2715],{"type":27,"value":1915},{"type":31,"tagName":279,"properties":2717,"children":2718},{"style":789},[2719],{"type":27,"value":2720},"+",{"type":31,"tagName":279,"properties":2722,"children":2723},{"style":345},[2724],{"type":27,"value":1550},{"type":31,"tagName":279,"properties":2726,"children":2727},{"style":317},[2728],{"type":27,"value":2729},") ",{"type":31,"tagName":279,"properties":2731,"children":2732},{"style":789},[2733],{"type":27,"value":2734},"return",{"type":31,"tagName":279,"properties":2736,"children":2737},{"style":317},[2738],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":2740,"children":2741},{"style":285},[2742],{"type":27,"value":2743},"// not enough bars on both sides yet",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2746,"children":2747},{"class":281},[2748,2753,2758,2762,2766,2770,2774,2778,2783],{"type":31,"tagName":279,"properties":2749,"children":2750},{"style":789},[2751],{"type":27,"value":2752},"  const",{"type":31,"tagName":279,"properties":2754,"children":2755},{"style":345},[2756],{"type":27,"value":2757}," center",{"type":31,"tagName":279,"properties":2759,"children":2760},{"style":789},[2761],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":2763,"children":2764},{"style":317},[2765],{"type":27,"value":1999},{"type":31,"tagName":279,"properties":2767,"children":2768},{"style":789},[2769],{"type":27,"value":792},{"type":31,"tagName":279,"properties":2771,"children":2772},{"style":345},[2773],{"type":27,"value":1550},{"type":31,"tagName":279,"properties":2775,"children":2776},{"style":789},[2777],{"type":27,"value":2099},{"type":31,"tagName":279,"properties":2779,"children":2780},{"style":317},[2781],{"type":27,"value":2782}," swing; ",{"type":31,"tagName":279,"properties":2784,"children":2785},{"style":285},[2786],{"type":27,"value":2787},"// the bar under test, `swing` bars back",{"type":27,"value":28},{"type":31,"tagName":279,"properties":2790,"children":2791},{"class":281},[2792,2796,2801,2805,2810,2815,2819],{"type":31,"tagName":279,"properties":2793,"children":2794},{"style":789},[2795],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":2797,"children":2798},{"style":345},[2799],{"type":27,"value":2800}," c",{"type":31,"tagName":279,"properties":2802,"children":2803},{"style":789},[2804],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":2806,"children":2807},{"style":317},[2808],{"type":27,"value":2809}," center ",{"type":31,"tagName":279,"properties":2811,"children":2812},{"style":789},[2813],{"type":27,"value":2814},"%",{"type":31,"tagName":279,"properties":2816,"children":2817},{"style":345},[2818],{"type":27,"value":1083},{"type":31,"tagName":279,"properties":2820,"children":2821},{"style":317},[2822],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2825,"children":2826},{"class":281},[2827,2832,2837,2841,2846],{"type":31,"tagName":279,"properties":2828,"children":2829},{"style":789},[2830],{"type":27,"value":2831},"  let",{"type":31,"tagName":279,"properties":2833,"children":2834},{"style":317},[2835],{"type":27,"value":2836}," isHigh ",{"type":31,"tagName":279,"properties":2838,"children":2839},{"style":789},[2840],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2842,"children":2843},{"style":345},[2844],{"type":27,"value":2845}," true",{"type":31,"tagName":279,"properties":2847,"children":2848},{"style":317},[2849],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2852,"children":2853},{"class":281},[2854,2858,2863,2867,2871],{"type":31,"tagName":279,"properties":2855,"children":2856},{"style":789},[2857],{"type":27,"value":2831},{"type":31,"tagName":279,"properties":2859,"children":2860},{"style":317},[2861],{"type":27,"value":2862}," isLow ",{"type":31,"tagName":279,"properties":2864,"children":2865},{"style":789},[2866],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2868,"children":2869},{"style":345},[2870],{"type":27,"value":2845},{"type":31,"tagName":279,"properties":2872,"children":2873},{"style":317},[2874],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2877,"children":2878},{"class":281},[2879,2884,2888,2892,2897,2901,2905,2910,2915,2920,2924,2928],{"type":31,"tagName":279,"properties":2880,"children":2881},{"style":789},[2882],{"type":27,"value":2883},"  for",{"type":31,"tagName":279,"properties":2885,"children":2886},{"style":317},[2887],{"type":27,"value":1504},{"type":31,"tagName":279,"properties":2889,"children":2890},{"style":789},[2891],{"type":27,"value":1509},{"type":31,"tagName":279,"properties":2893,"children":2894},{"style":317},[2895],{"type":27,"value":2896}," k ",{"type":31,"tagName":279,"properties":2898,"children":2899},{"style":789},[2900],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":2902,"children":2903},{"style":345},[2904],{"type":27,"value":1550},{"type":31,"tagName":279,"properties":2906,"children":2907},{"style":317},[2908],{"type":27,"value":2909},"; k ",{"type":31,"tagName":279,"properties":2911,"children":2912},{"style":789},[2913],{"type":27,"value":2914},"\u003C=",{"type":31,"tagName":279,"properties":2916,"children":2917},{"style":317},[2918],{"type":27,"value":2919}," swing; k ",{"type":31,"tagName":279,"properties":2921,"children":2922},{"style":789},[2923],{"type":27,"value":1545},{"type":31,"tagName":279,"properties":2925,"children":2926},{"style":345},[2927],{"type":27,"value":1550},{"type":31,"tagName":279,"properties":2929,"children":2930},{"style":317},[2931],{"type":27,"value":1555},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2934,"children":2935},{"class":281},[2936,2941,2946,2950,2955,2959,2964,2968,2972],{"type":31,"tagName":279,"properties":2937,"children":2938},{"style":789},[2939],{"type":27,"value":2940},"    const",{"type":31,"tagName":279,"properties":2942,"children":2943},{"style":345},[2944],{"type":27,"value":2945}," leftSlot",{"type":31,"tagName":279,"properties":2947,"children":2948},{"style":789},[2949],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":2951,"children":2952},{"style":317},[2953],{"type":27,"value":2954}," (center ",{"type":31,"tagName":279,"properties":2956,"children":2957},{"style":789},[2958],{"type":27,"value":792},{"type":31,"tagName":279,"properties":2960,"children":2961},{"style":317},[2962],{"type":27,"value":2963}," k) ",{"type":31,"tagName":279,"properties":2965,"children":2966},{"style":789},[2967],{"type":27,"value":2814},{"type":31,"tagName":279,"properties":2969,"children":2970},{"style":345},[2971],{"type":27,"value":1083},{"type":31,"tagName":279,"properties":2973,"children":2974},{"style":317},[2975],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":2978,"children":2979},{"class":281},[2980,2984,2989,2993,2997,3001,3005,3009,3013],{"type":31,"tagName":279,"properties":2981,"children":2982},{"style":789},[2983],{"type":27,"value":2940},{"type":31,"tagName":279,"properties":2985,"children":2986},{"style":345},[2987],{"type":27,"value":2988}," rightSlot",{"type":31,"tagName":279,"properties":2990,"children":2991},{"style":789},[2992],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":2994,"children":2995},{"style":317},[2996],{"type":27,"value":2954},{"type":31,"tagName":279,"properties":2998,"children":2999},{"style":789},[3000],{"type":27,"value":2720},{"type":31,"tagName":279,"properties":3002,"children":3003},{"style":317},[3004],{"type":27,"value":2963},{"type":31,"tagName":279,"properties":3006,"children":3007},{"style":789},[3008],{"type":27,"value":2814},{"type":31,"tagName":279,"properties":3010,"children":3011},{"style":345},[3012],{"type":27,"value":1083},{"type":31,"tagName":279,"properties":3014,"children":3015},{"style":317},[3016],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3019,"children":3020},{"class":281},[3021,3026,3030,3035,3040,3045,3050,3055,3060,3064,3069,3074,3078,3082,3086],{"type":31,"tagName":279,"properties":3022,"children":3023},{"style":789},[3024],{"type":27,"value":3025},"    if",{"type":31,"tagName":279,"properties":3027,"children":3028},{"style":317},[3029],{"type":27,"value":1504},{"type":31,"tagName":279,"properties":3031,"children":3032},{"style":789},[3033],{"type":27,"value":3034},"!",{"type":31,"tagName":279,"properties":3036,"children":3037},{"style":317},[3038],{"type":27,"value":3039},"(highs[c] ",{"type":31,"tagName":279,"properties":3041,"children":3042},{"style":789},[3043],{"type":27,"value":3044},">",{"type":31,"tagName":279,"properties":3046,"children":3047},{"style":317},[3048],{"type":27,"value":3049}," highs[leftSlot]) ",{"type":31,"tagName":279,"properties":3051,"children":3052},{"style":789},[3053],{"type":27,"value":3054},"||",{"type":31,"tagName":279,"properties":3056,"children":3057},{"style":789},[3058],{"type":27,"value":3059}," !",{"type":31,"tagName":279,"properties":3061,"children":3062},{"style":317},[3063],{"type":27,"value":3039},{"type":31,"tagName":279,"properties":3065,"children":3066},{"style":789},[3067],{"type":27,"value":3068},">=",{"type":31,"tagName":279,"properties":3070,"children":3071},{"style":317},[3072],{"type":27,"value":3073}," highs[rightSlot])) isHigh ",{"type":31,"tagName":279,"properties":3075,"children":3076},{"style":789},[3077],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3079,"children":3080},{"style":345},[3081],{"type":27,"value":1955},{"type":31,"tagName":279,"properties":3083,"children":3084},{"style":317},[3085],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":3087,"children":3088},{"style":285},[3089],{"type":27,"value":3090},"// above every bar before it, at or above every bar after it (a flat top counts once, on its first bar)",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3093,"children":3094},{"class":281},[3095,3099,3103,3107,3112,3116,3121,3125,3129,3133,3137,3142,3146,3150,3154],{"type":31,"tagName":279,"properties":3096,"children":3097},{"style":789},[3098],{"type":27,"value":3025},{"type":31,"tagName":279,"properties":3100,"children":3101},{"style":317},[3102],{"type":27,"value":1504},{"type":31,"tagName":279,"properties":3104,"children":3105},{"style":789},[3106],{"type":27,"value":3034},{"type":31,"tagName":279,"properties":3108,"children":3109},{"style":317},[3110],{"type":27,"value":3111},"(lows[c] ",{"type":31,"tagName":279,"properties":3113,"children":3114},{"style":789},[3115],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":3117,"children":3118},{"style":317},[3119],{"type":27,"value":3120}," lows[leftSlot]) ",{"type":31,"tagName":279,"properties":3122,"children":3123},{"style":789},[3124],{"type":27,"value":3054},{"type":31,"tagName":279,"properties":3126,"children":3127},{"style":789},[3128],{"type":27,"value":3059},{"type":31,"tagName":279,"properties":3130,"children":3131},{"style":317},[3132],{"type":27,"value":3111},{"type":31,"tagName":279,"properties":3134,"children":3135},{"style":789},[3136],{"type":27,"value":2914},{"type":31,"tagName":279,"properties":3138,"children":3139},{"style":317},[3140],{"type":27,"value":3141}," lows[rightSlot])) isLow ",{"type":31,"tagName":279,"properties":3143,"children":3144},{"style":789},[3145],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3147,"children":3148},{"style":345},[3149],{"type":27,"value":1955},{"type":31,"tagName":279,"properties":3151,"children":3152},{"style":317},[3153],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":3155,"children":3156},{"style":285},[3157],{"type":27,"value":3158},"// the mirror for a swing low",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3161,"children":3162},{"class":281},[3163],{"type":31,"tagName":279,"properties":3164,"children":3165},{"style":317},[3166],{"type":27,"value":3167},"  }",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3170,"children":3171},{"class":281},[3172,3176,3180,3184,3189,3194,3198,3203,3207],{"type":31,"tagName":279,"properties":3173,"children":3174},{"style":789},[3175],{"type":27,"value":2692},{"type":31,"tagName":279,"properties":3177,"children":3178},{"style":317},[3179],{"type":27,"value":1504},{"type":31,"tagName":279,"properties":3181,"children":3182},{"style":789},[3183],{"type":27,"value":3034},{"type":31,"tagName":279,"properties":3185,"children":3186},{"style":317},[3187],{"type":27,"value":3188},"isHigh ",{"type":31,"tagName":279,"properties":3190,"children":3191},{"style":789},[3192],{"type":27,"value":3193},"&&",{"type":31,"tagName":279,"properties":3195,"children":3196},{"style":789},[3197],{"type":27,"value":3059},{"type":31,"tagName":279,"properties":3199,"children":3200},{"style":317},[3201],{"type":27,"value":3202},"isLow) ",{"type":31,"tagName":279,"properties":3204,"children":3205},{"style":789},[3206],{"type":27,"value":2734},{"type":31,"tagName":279,"properties":3208,"children":3209},{"style":317},[3210],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3213,"children":3214},{"class":281},[3215,3219,3223,3228],{"type":31,"tagName":279,"properties":3216,"children":3217},{"style":317},[3218],{"type":27,"value":2629},{"type":31,"tagName":279,"properties":3220,"children":3221},{"style":789},[3222],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3224,"children":3225},{"style":345},[3226],{"type":27,"value":3227}," 1.0",{"type":31,"tagName":279,"properties":3229,"children":3230},{"style":317},[3231],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3234,"children":3235},{"class":281},[3236,3240,3244],{"type":31,"tagName":279,"properties":3237,"children":3238},{"style":317},[3239],{"type":27,"value":2650},{"type":31,"tagName":279,"properties":3241,"children":3242},{"style":789},[3243],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3245,"children":3246},{"style":317},[3247],{"type":27,"value":3248}," cvds[c];",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3251,"children":3252},{"class":281},[3253,3257],{"type":31,"tagName":279,"properties":3254,"children":3255},{"style":789},[3256],{"type":27,"value":2692},{"type":31,"tagName":279,"properties":3258,"children":3259},{"style":317},[3260],{"type":27,"value":3261}," (isHigh) {",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3264,"children":3265},{"class":281},[3266,3270,3274,3278,3283,3288,3292,3297,3301,3305,3309,3314,3318,3323],{"type":31,"tagName":279,"properties":3267,"children":3268},{"style":789},[3269],{"type":27,"value":3025},{"type":31,"tagName":279,"properties":3271,"children":3272},{"style":317},[3273],{"type":27,"value":1504},{"type":31,"tagName":279,"properties":3275,"children":3276},{"style":789},[3277],{"type":27,"value":3034},{"type":31,"tagName":279,"properties":3279,"children":3280},{"style":323},[3281],{"type":27,"value":3282},"isNaN",{"type":31,"tagName":279,"properties":3284,"children":3285},{"style":317},[3286],{"type":27,"value":3287},"(lastHighPrice) ",{"type":31,"tagName":279,"properties":3289,"children":3290},{"style":789},[3291],{"type":27,"value":3193},{"type":31,"tagName":279,"properties":3293,"children":3294},{"style":317},[3295],{"type":27,"value":3296}," highs[c] ",{"type":31,"tagName":279,"properties":3298,"children":3299},{"style":789},[3300],{"type":27,"value":3044},{"type":31,"tagName":279,"properties":3302,"children":3303},{"style":317},[3304],{"type":27,"value":2157},{"type":31,"tagName":279,"properties":3306,"children":3307},{"style":789},[3308],{"type":27,"value":3193},{"type":31,"tagName":279,"properties":3310,"children":3311},{"style":317},[3312],{"type":27,"value":3313}," cvds[c] ",{"type":31,"tagName":279,"properties":3315,"children":3316},{"style":789},[3317],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":3319,"children":3320},{"style":317},[3321],{"type":27,"value":3322}," lastHighCvd) { ",{"type":31,"tagName":279,"properties":3324,"children":3325},{"style":285},[3326],{"type":27,"value":3327},"// higher high in price, lower high in CVD",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3330,"children":3331},{"class":281},[3332,3337,3341,3345,3349],{"type":31,"tagName":279,"properties":3333,"children":3334},{"style":317},[3335],{"type":27,"value":3336},"      pendingKind ",{"type":31,"tagName":279,"properties":3338,"children":3339},{"style":789},[3340],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3342,"children":3343},{"style":789},[3344],{"type":27,"value":2099},{"type":31,"tagName":279,"properties":3346,"children":3347},{"style":345},[3348],{"type":27,"value":492},{"type":31,"tagName":279,"properties":3350,"children":3351},{"style":317},[3352],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3355,"children":3356},{"class":281},[3357,3362,3366],{"type":31,"tagName":279,"properties":3358,"children":3359},{"style":317},[3360],{"type":27,"value":3361},"      x1 ",{"type":31,"tagName":279,"properties":3363,"children":3364},{"style":789},[3365],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3367,"children":3368},{"style":317},[3369],{"type":27,"value":3370}," lastHighTime;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3373,"children":3374},{"class":281},[3375,3380,3384],{"type":31,"tagName":279,"properties":3376,"children":3377},{"style":317},[3378],{"type":27,"value":3379},"      y1 ",{"type":31,"tagName":279,"properties":3381,"children":3382},{"style":789},[3383],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3385,"children":3386},{"style":317},[3387],{"type":27,"value":3388}," lastHighPrice;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3391,"children":3392},{"class":281},[3393,3398,3402],{"type":31,"tagName":279,"properties":3394,"children":3395},{"style":317},[3396],{"type":27,"value":3397},"      c1 ",{"type":31,"tagName":279,"properties":3399,"children":3400},{"style":789},[3401],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3403,"children":3404},{"style":317},[3405],{"type":27,"value":3406}," lastHighCvd;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3409,"children":3410},{"class":281},[3411,3416,3420],{"type":31,"tagName":279,"properties":3412,"children":3413},{"style":317},[3414],{"type":27,"value":3415},"      x2 ",{"type":31,"tagName":279,"properties":3417,"children":3418},{"style":789},[3419],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3421,"children":3422},{"style":317},[3423],{"type":27,"value":3424}," times[c];",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3427,"children":3428},{"class":281},[3429,3434,3438],{"type":31,"tagName":279,"properties":3430,"children":3431},{"style":317},[3432],{"type":27,"value":3433},"      y2 ",{"type":31,"tagName":279,"properties":3435,"children":3436},{"style":789},[3437],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3439,"children":3440},{"style":317},[3441],{"type":27,"value":3442}," highs[c];",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3445,"children":3446},{"class":281},[3447,3452,3456],{"type":31,"tagName":279,"properties":3448,"children":3449},{"style":317},[3450],{"type":27,"value":3451},"      c2 ",{"type":31,"tagName":279,"properties":3453,"children":3454},{"style":789},[3455],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3457,"children":3458},{"style":317},[3459],{"type":27,"value":3248},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3462,"children":3463},{"class":281},[3464],{"type":31,"tagName":279,"properties":3465,"children":3466},{"style":317},[3467],{"type":27,"value":3468},"    }",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3471,"children":3472},{"class":281},[3473,3478,3482],{"type":31,"tagName":279,"properties":3474,"children":3475},{"style":317},[3476],{"type":27,"value":3477},"    lastHighPrice ",{"type":31,"tagName":279,"properties":3479,"children":3480},{"style":789},[3481],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3483,"children":3484},{"style":317},[3485],{"type":27,"value":3442},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3488,"children":3489},{"class":281},[3490,3495,3499],{"type":31,"tagName":279,"properties":3491,"children":3492},{"style":317},[3493],{"type":27,"value":3494},"    lastHighCvd ",{"type":31,"tagName":279,"properties":3496,"children":3497},{"style":789},[3498],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3500,"children":3501},{"style":317},[3502],{"type":27,"value":3248},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3505,"children":3506},{"class":281},[3507,3512,3516],{"type":31,"tagName":279,"properties":3508,"children":3509},{"style":317},[3510],{"type":27,"value":3511},"    lastHighTime ",{"type":31,"tagName":279,"properties":3513,"children":3514},{"style":789},[3515],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3517,"children":3518},{"style":317},[3519],{"type":27,"value":3424},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3522,"children":3523},{"class":281},[3524],{"type":31,"tagName":279,"properties":3525,"children":3526},{"style":317},[3527],{"type":27,"value":3167},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3530,"children":3531},{"class":281},[3532,3536],{"type":31,"tagName":279,"properties":3533,"children":3534},{"style":789},[3535],{"type":27,"value":2692},{"type":31,"tagName":279,"properties":3537,"children":3538},{"style":317},[3539],{"type":27,"value":3540}," (isLow) {",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3543,"children":3544},{"class":281},[3545,3549,3553,3557,3561,3566,3570,3575,3579,3583,3587,3591,3595,3600],{"type":31,"tagName":279,"properties":3546,"children":3547},{"style":789},[3548],{"type":27,"value":3025},{"type":31,"tagName":279,"properties":3550,"children":3551},{"style":317},[3552],{"type":27,"value":1504},{"type":31,"tagName":279,"properties":3554,"children":3555},{"style":789},[3556],{"type":27,"value":3034},{"type":31,"tagName":279,"properties":3558,"children":3559},{"style":323},[3560],{"type":27,"value":3282},{"type":31,"tagName":279,"properties":3562,"children":3563},{"style":317},[3564],{"type":27,"value":3565},"(lastLowPrice) ",{"type":31,"tagName":279,"properties":3567,"children":3568},{"style":789},[3569],{"type":27,"value":3193},{"type":31,"tagName":279,"properties":3571,"children":3572},{"style":317},[3573],{"type":27,"value":3574}," lows[c] ",{"type":31,"tagName":279,"properties":3576,"children":3577},{"style":789},[3578],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":3580,"children":3581},{"style":317},[3582],{"type":27,"value":2237},{"type":31,"tagName":279,"properties":3584,"children":3585},{"style":789},[3586],{"type":27,"value":3193},{"type":31,"tagName":279,"properties":3588,"children":3589},{"style":317},[3590],{"type":27,"value":3313},{"type":31,"tagName":279,"properties":3592,"children":3593},{"style":789},[3594],{"type":27,"value":3044},{"type":31,"tagName":279,"properties":3596,"children":3597},{"style":317},[3598],{"type":27,"value":3599}," lastLowCvd) { ",{"type":31,"tagName":279,"properties":3601,"children":3602},{"style":285},[3603],{"type":27,"value":3604},"// lower low in price, higher low in CVD",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3607,"children":3608},{"class":281},[3609,3613,3617,3621],{"type":31,"tagName":279,"properties":3610,"children":3611},{"style":317},[3612],{"type":27,"value":3336},{"type":31,"tagName":279,"properties":3614,"children":3615},{"style":789},[3616],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3618,"children":3619},{"style":345},[3620],{"type":27,"value":1550},{"type":31,"tagName":279,"properties":3622,"children":3623},{"style":317},[3624],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3627,"children":3628},{"class":281},[3629,3633,3637],{"type":31,"tagName":279,"properties":3630,"children":3631},{"style":317},[3632],{"type":27,"value":3361},{"type":31,"tagName":279,"properties":3634,"children":3635},{"style":789},[3636],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3638,"children":3639},{"style":317},[3640],{"type":27,"value":3641}," lastLowTime;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3644,"children":3645},{"class":281},[3646,3650,3654],{"type":31,"tagName":279,"properties":3647,"children":3648},{"style":317},[3649],{"type":27,"value":3379},{"type":31,"tagName":279,"properties":3651,"children":3652},{"style":789},[3653],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3655,"children":3656},{"style":317},[3657],{"type":27,"value":3658}," lastLowPrice;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3661,"children":3662},{"class":281},[3663,3667,3671],{"type":31,"tagName":279,"properties":3664,"children":3665},{"style":317},[3666],{"type":27,"value":3397},{"type":31,"tagName":279,"properties":3668,"children":3669},{"style":789},[3670],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3672,"children":3673},{"style":317},[3674],{"type":27,"value":3675}," lastLowCvd;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3678,"children":3679},{"class":281},[3680,3684,3688],{"type":31,"tagName":279,"properties":3681,"children":3682},{"style":317},[3683],{"type":27,"value":3415},{"type":31,"tagName":279,"properties":3685,"children":3686},{"style":789},[3687],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3689,"children":3690},{"style":317},[3691],{"type":27,"value":3424},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3694,"children":3695},{"class":281},[3696,3700,3704],{"type":31,"tagName":279,"properties":3697,"children":3698},{"style":317},[3699],{"type":27,"value":3433},{"type":31,"tagName":279,"properties":3701,"children":3702},{"style":789},[3703],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3705,"children":3706},{"style":317},[3707],{"type":27,"value":3708}," lows[c];",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3711,"children":3712},{"class":281},[3713,3717,3721],{"type":31,"tagName":279,"properties":3714,"children":3715},{"style":317},[3716],{"type":27,"value":3451},{"type":31,"tagName":279,"properties":3718,"children":3719},{"style":789},[3720],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3722,"children":3723},{"style":317},[3724],{"type":27,"value":3248},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3727,"children":3728},{"class":281},[3729],{"type":31,"tagName":279,"properties":3730,"children":3731},{"style":317},[3732],{"type":27,"value":3468},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3735,"children":3736},{"class":281},[3737,3742,3746],{"type":31,"tagName":279,"properties":3738,"children":3739},{"style":317},[3740],{"type":27,"value":3741},"    lastLowPrice ",{"type":31,"tagName":279,"properties":3743,"children":3744},{"style":789},[3745],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3747,"children":3748},{"style":317},[3749],{"type":27,"value":3708},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3752,"children":3753},{"class":281},[3754,3759,3763],{"type":31,"tagName":279,"properties":3755,"children":3756},{"style":317},[3757],{"type":27,"value":3758},"    lastLowCvd ",{"type":31,"tagName":279,"properties":3760,"children":3761},{"style":789},[3762],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3764,"children":3765},{"style":317},[3766],{"type":27,"value":3248},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3769,"children":3770},{"class":281},[3771,3776,3780],{"type":31,"tagName":279,"properties":3772,"children":3773},{"style":317},[3774],{"type":27,"value":3775},"    lastLowTime ",{"type":31,"tagName":279,"properties":3777,"children":3778},{"style":789},[3779],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3781,"children":3782},{"style":317},[3783],{"type":27,"value":3424},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3786,"children":3787},{"class":281},[3788],{"type":31,"tagName":279,"properties":3789,"children":3790},{"style":317},[3791],{"type":27,"value":3167},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3794,"children":3795},{"class":281},[3796],{"type":31,"tagName":279,"properties":3797,"children":3798},{"style":317},[3799],{"type":27,"value":1670},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3802,"children":3803},{"class":281},[],{"type":27,"value":28},{"type":31,"tagName":279,"properties":3806,"children":3807},{"class":281},[3808,3812,3817,3821,3825,3829],{"type":31,"tagName":279,"properties":3809,"children":3810},{"style":789},[3811],{"type":27,"value":2596},{"type":31,"tagName":279,"properties":3813,"children":3814},{"style":323},[3815],{"type":27,"value":3816}," onStart",{"type":31,"tagName":279,"properties":3818,"children":3819},{"style":317},[3820],{"type":27,"value":2606},{"type":31,"tagName":279,"properties":3822,"children":3823},{"style":789},[3824],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":3826,"children":3827},{"style":345},[3828],{"type":27,"value":2615},{"type":31,"tagName":279,"properties":3830,"children":3831},{"style":317},[3832],{"type":27,"value":2620},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3835,"children":3836},{"class":281},[3837,3842,3846,3851,3855,3860],{"type":31,"tagName":279,"properties":3838,"children":3839},{"style":317},[3840],{"type":27,"value":3841},"  swing ",{"type":31,"tagName":279,"properties":3843,"children":3844},{"style":789},[3845],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3847,"children":3848},{"style":323},[3849],{"type":27,"value":3850}," i32",{"type":31,"tagName":279,"properties":3852,"children":3853},{"style":317},[3854],{"type":27,"value":331},{"type":31,"tagName":279,"properties":3856,"children":3857},{"style":323},[3858],{"type":27,"value":3859},"p_swing",{"type":31,"tagName":279,"properties":3861,"children":3862},{"style":317},[3863],{"type":27,"value":3864},"());",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3867,"children":3868},{"class":281},[3869,3874,3878,3883],{"type":31,"tagName":279,"properties":3870,"children":3871},{"style":317},[3872],{"type":27,"value":3873},"  resetDaily ",{"type":31,"tagName":279,"properties":3875,"children":3876},{"style":789},[3877],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3879,"children":3880},{"style":323},[3881],{"type":27,"value":3882}," pb_cvd_reset",{"type":31,"tagName":279,"properties":3884,"children":3885},{"style":317},[3886],{"type":27,"value":3887},"();",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3890,"children":3891},{"class":281},[3892,3897,3901,3905,3909,3914],{"type":31,"tagName":279,"properties":3893,"children":3894},{"style":317},[3895],{"type":27,"value":3896},"  linesKept ",{"type":31,"tagName":279,"properties":3898,"children":3899},{"style":789},[3900],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":3902,"children":3903},{"style":323},[3904],{"type":27,"value":3850},{"type":31,"tagName":279,"properties":3906,"children":3907},{"style":317},[3908],{"type":27,"value":331},{"type":31,"tagName":279,"properties":3910,"children":3911},{"style":323},[3912],{"type":27,"value":3913},"p_lines_kept",{"type":31,"tagName":279,"properties":3915,"children":3916},{"style":317},[3917],{"type":27,"value":3864},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3920,"children":3921},{"class":281},[3922],{"type":31,"tagName":279,"properties":3923,"children":3924},{"style":317},[3925],{"type":27,"value":1670},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3928,"children":3929},{"class":281},[],{"type":27,"value":28},{"type":31,"tagName":279,"properties":3932,"children":3933},{"class":281},[3934],{"type":31,"tagName":279,"properties":3935,"children":3936},{"style":285},[3937],{"type":27,"value":3938},"// onBar() runs once per bar: fold the bar into CVD and the rings, test for a swing, write the outputs on every bar, and",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3941,"children":3942},{"class":281},[3943],{"type":31,"tagName":279,"properties":3944,"children":3945},{"style":285},[3946],{"type":27,"value":3947},"// draw a divergence on the bar that confirms it.",{"type":27,"value":28},{"type":31,"tagName":279,"properties":3950,"children":3951},{"class":281},[3952,3956,3961,3965,3969,3973],{"type":31,"tagName":279,"properties":3953,"children":3954},{"style":789},[3955],{"type":27,"value":2596},{"type":31,"tagName":279,"properties":3957,"children":3958},{"style":323},[3959],{"type":27,"value":3960}," onBar",{"type":31,"tagName":279,"properties":3962,"children":3963},{"style":317},[3964],{"type":27,"value":2606},{"type":31,"tagName":279,"properties":3966,"children":3967},{"style":789},[3968],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":3970,"children":3971},{"style":345},[3972],{"type":27,"value":2615},{"type":31,"tagName":279,"properties":3974,"children":3975},{"style":317},[3976],{"type":27,"value":2620},{"type":27,"value":28},{"type":31,"tagName":279,"properties":3979,"children":3980},{"class":281},[3981,3985,3990,3994,3999,4004],{"type":31,"tagName":279,"properties":3982,"children":3983},{"style":789},[3984],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":3986,"children":3987},{"style":345},[3988],{"type":27,"value":3989}," high",{"type":31,"tagName":279,"properties":3991,"children":3992},{"style":789},[3993],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":3995,"children":3996},{"style":317},[3997],{"type":27,"value":3998}," bar.",{"type":31,"tagName":279,"properties":4000,"children":4001},{"style":323},[4002],{"type":27,"value":4003},"high",{"type":31,"tagName":279,"properties":4005,"children":4006},{"style":317},[4007],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4010,"children":4011},{"class":281},[4012,4016,4021,4025,4029,4034],{"type":31,"tagName":279,"properties":4013,"children":4014},{"style":789},[4015],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":4017,"children":4018},{"style":345},[4019],{"type":27,"value":4020}," low",{"type":31,"tagName":279,"properties":4022,"children":4023},{"style":789},[4024],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4026,"children":4027},{"style":317},[4028],{"type":27,"value":3998},{"type":31,"tagName":279,"properties":4030,"children":4031},{"style":323},[4032],{"type":27,"value":4033},"low",{"type":31,"tagName":279,"properties":4035,"children":4036},{"style":317},[4037],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4040,"children":4041},{"class":281},[4042,4046,4051,4055,4059,4064],{"type":31,"tagName":279,"properties":4043,"children":4044},{"style":789},[4045],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":4047,"children":4048},{"style":345},[4049],{"type":27,"value":4050}," barTime",{"type":31,"tagName":279,"properties":4052,"children":4053},{"style":789},[4054],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4056,"children":4057},{"style":317},[4058],{"type":27,"value":3998},{"type":31,"tagName":279,"properties":4060,"children":4061},{"style":323},[4062],{"type":27,"value":4063},"time",{"type":31,"tagName":279,"properties":4065,"children":4066},{"style":317},[4067],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4070,"children":4071},{"class":281},[4072,4076,4081,4085,4090],{"type":31,"tagName":279,"properties":4073,"children":4074},{"style":789},[4075],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":4077,"children":4078},{"style":345},[4079],{"type":27,"value":4080}," buy",{"type":31,"tagName":279,"properties":4082,"children":4083},{"style":789},[4084],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4086,"children":4087},{"style":323},[4088],{"type":27,"value":4089}," in_buy",{"type":31,"tagName":279,"properties":4091,"children":4092},{"style":317},[4093],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4096,"children":4097},{"class":281},[4098,4102,4107,4111,4116],{"type":31,"tagName":279,"properties":4099,"children":4100},{"style":789},[4101],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":4103,"children":4104},{"style":345},[4105],{"type":27,"value":4106}," sell",{"type":31,"tagName":279,"properties":4108,"children":4109},{"style":789},[4110],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4112,"children":4113},{"style":323},[4114],{"type":27,"value":4115}," in_sell",{"type":31,"tagName":279,"properties":4117,"children":4118},{"style":317},[4119],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4122,"children":4123},{"class":281},[4124,4128],{"type":31,"tagName":279,"properties":4125,"children":4126},{"style":789},[4127],{"type":27,"value":2692},{"type":31,"tagName":279,"properties":4129,"children":4130},{"style":317},[4131],{"type":27,"value":4132}," (resetDaily) {",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4135,"children":4136},{"class":281},[4137,4141,4146,4150,4155,4160,4165,4170,4175],{"type":31,"tagName":279,"properties":4138,"children":4139},{"style":789},[4140],{"type":27,"value":2940},{"type":31,"tagName":279,"properties":4142,"children":4143},{"style":345},[4144],{"type":27,"value":4145}," day",{"type":31,"tagName":279,"properties":4147,"children":4148},{"style":789},[4149],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4151,"children":4152},{"style":317},[4153],{"type":27,"value":4154}," Math.",{"type":31,"tagName":279,"properties":4156,"children":4157},{"style":323},[4158],{"type":27,"value":4159},"floor",{"type":31,"tagName":279,"properties":4161,"children":4162},{"style":317},[4163],{"type":27,"value":4164},"(barTime ",{"type":31,"tagName":279,"properties":4166,"children":4167},{"style":789},[4168],{"type":27,"value":4169},"/",{"type":31,"tagName":279,"properties":4171,"children":4172},{"style":345},[4173],{"type":27,"value":4174}," 86400.0",{"type":31,"tagName":279,"properties":4176,"children":4177},{"style":317},[4178],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4181,"children":4182},{"class":281},[4183,4187,4192,4197,4202,4206,4210],{"type":31,"tagName":279,"properties":4184,"children":4185},{"style":789},[4186],{"type":27,"value":3025},{"type":31,"tagName":279,"properties":4188,"children":4189},{"style":317},[4190],{"type":27,"value":4191}," (day ",{"type":31,"tagName":279,"properties":4193,"children":4194},{"style":789},[4195],{"type":27,"value":4196},"!=",{"type":31,"tagName":279,"properties":4198,"children":4199},{"style":317},[4200],{"type":27,"value":4201}," prevDay) cvd ",{"type":31,"tagName":279,"properties":4203,"children":4204},{"style":789},[4205],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4207,"children":4208},{"style":345},[4209],{"type":27,"value":2038},{"type":31,"tagName":279,"properties":4211,"children":4212},{"style":317},[4213],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4216,"children":4217},{"class":281},[4218,4223,4227],{"type":31,"tagName":279,"properties":4219,"children":4220},{"style":317},[4221],{"type":27,"value":4222},"    prevDay ",{"type":31,"tagName":279,"properties":4224,"children":4225},{"style":789},[4226],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4228,"children":4229},{"style":317},[4230],{"type":27,"value":4231}," day;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4234,"children":4235},{"class":281},[4236],{"type":31,"tagName":279,"properties":4237,"children":4238},{"style":317},[4239],{"type":27,"value":3167},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4242,"children":4243},{"class":281},[4244,4249,4253,4258,4262],{"type":31,"tagName":279,"properties":4245,"children":4246},{"style":317},[4247],{"type":27,"value":4248},"  cvd ",{"type":31,"tagName":279,"properties":4250,"children":4251},{"style":789},[4252],{"type":27,"value":1545},{"type":31,"tagName":279,"properties":4254,"children":4255},{"style":317},[4256],{"type":27,"value":4257}," buy ",{"type":31,"tagName":279,"properties":4259,"children":4260},{"style":789},[4261],{"type":27,"value":792},{"type":31,"tagName":279,"properties":4263,"children":4264},{"style":317},[4265],{"type":27,"value":4266}," sell;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4269,"children":4270},{"class":281},[4271,4276,4280,4284,4288],{"type":31,"tagName":279,"properties":4272,"children":4273},{"style":317},[4274],{"type":27,"value":4275},"  sidedVolume ",{"type":31,"tagName":279,"properties":4277,"children":4278},{"style":789},[4279],{"type":27,"value":1545},{"type":31,"tagName":279,"properties":4281,"children":4282},{"style":317},[4283],{"type":27,"value":4257},{"type":31,"tagName":279,"properties":4285,"children":4286},{"style":789},[4287],{"type":27,"value":2720},{"type":31,"tagName":279,"properties":4289,"children":4290},{"style":317},[4291],{"type":27,"value":4266},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4294,"children":4295},{"class":281},[4296,4300,4305,4309,4314,4318],{"type":31,"tagName":279,"properties":4297,"children":4298},{"style":789},[4299],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":4301,"children":4302},{"style":345},[4303],{"type":27,"value":4304}," range",{"type":31,"tagName":279,"properties":4306,"children":4307},{"style":789},[4308],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4310,"children":4311},{"style":317},[4312],{"type":27,"value":4313}," high ",{"type":31,"tagName":279,"properties":4315,"children":4316},{"style":789},[4317],{"type":27,"value":792},{"type":31,"tagName":279,"properties":4319,"children":4320},{"style":317},[4321],{"type":27,"value":4322}," low;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4325,"children":4326},{"class":281},[4327,4332,4336,4341,4346,4351,4356,4360,4364,4368,4373,4377,4382,4387,4392],{"type":31,"tagName":279,"properties":4328,"children":4329},{"style":317},[4330],{"type":27,"value":4331},"  rangeAvg ",{"type":31,"tagName":279,"properties":4333,"children":4334},{"style":789},[4335],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4337,"children":4338},{"style":323},[4339],{"type":27,"value":4340}," isNaN",{"type":31,"tagName":279,"properties":4342,"children":4343},{"style":317},[4344],{"type":27,"value":4345},"(rangeAvg) ",{"type":31,"tagName":279,"properties":4347,"children":4348},{"style":789},[4349],{"type":27,"value":4350},"?",{"type":31,"tagName":279,"properties":4352,"children":4353},{"style":317},[4354],{"type":27,"value":4355}," range ",{"type":31,"tagName":279,"properties":4357,"children":4358},{"style":789},[4359],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":4361,"children":4362},{"style":317},[4363],{"type":27,"value":2126},{"type":31,"tagName":279,"properties":4365,"children":4366},{"style":789},[4367],{"type":27,"value":2720},{"type":31,"tagName":279,"properties":4369,"children":4370},{"style":317},[4371],{"type":27,"value":4372}," (range ",{"type":31,"tagName":279,"properties":4374,"children":4375},{"style":789},[4376],{"type":27,"value":792},{"type":31,"tagName":279,"properties":4378,"children":4379},{"style":317},[4380],{"type":27,"value":4381}," rangeAvg) ",{"type":31,"tagName":279,"properties":4383,"children":4384},{"style":789},[4385],{"type":27,"value":4386},"*",{"type":31,"tagName":279,"properties":4388,"children":4389},{"style":345},[4390],{"type":27,"value":4391}," 0.1",{"type":31,"tagName":279,"properties":4393,"children":4394},{"style":317},[4395],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4398,"children":4399},{"class":281},[4400,4404,4409,4413,4417,4421,4425],{"type":31,"tagName":279,"properties":4401,"children":4402},{"style":789},[4403],{"type":27,"value":2752},{"type":31,"tagName":279,"properties":4405,"children":4406},{"style":345},[4407],{"type":27,"value":4408}," slot",{"type":31,"tagName":279,"properties":4410,"children":4411},{"style":789},[4412],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4414,"children":4415},{"style":317},[4416],{"type":27,"value":1999},{"type":31,"tagName":279,"properties":4418,"children":4419},{"style":789},[4420],{"type":27,"value":2814},{"type":31,"tagName":279,"properties":4422,"children":4423},{"style":345},[4424],{"type":27,"value":1083},{"type":31,"tagName":279,"properties":4426,"children":4427},{"style":317},[4428],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4431,"children":4432},{"class":281},[4433,4438,4442],{"type":31,"tagName":279,"properties":4434,"children":4435},{"style":317},[4436],{"type":27,"value":4437},"  highs[slot] ",{"type":31,"tagName":279,"properties":4439,"children":4440},{"style":789},[4441],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4443,"children":4444},{"style":317},[4445],{"type":27,"value":4446}," high;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4449,"children":4450},{"class":281},[4451,4456,4460],{"type":31,"tagName":279,"properties":4452,"children":4453},{"style":317},[4454],{"type":27,"value":4455},"  lows[slot] ",{"type":31,"tagName":279,"properties":4457,"children":4458},{"style":789},[4459],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4461,"children":4462},{"style":317},[4463],{"type":27,"value":4322},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4466,"children":4467},{"class":281},[4468,4473,4477],{"type":31,"tagName":279,"properties":4469,"children":4470},{"style":317},[4471],{"type":27,"value":4472},"  cvds[slot] ",{"type":31,"tagName":279,"properties":4474,"children":4475},{"style":789},[4476],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4478,"children":4479},{"style":317},[4480],{"type":27,"value":4481}," cvd;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4484,"children":4485},{"class":281},[4486,4491,4495],{"type":31,"tagName":279,"properties":4487,"children":4488},{"style":317},[4489],{"type":27,"value":4490},"  times[slot] ",{"type":31,"tagName":279,"properties":4492,"children":4493},{"style":789},[4494],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4496,"children":4497},{"style":317},[4498],{"type":27,"value":4499}," barTime;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4502,"children":4503},{"class":281},[4504,4509,4513,4517],{"type":31,"tagName":279,"properties":4505,"children":4506},{"style":317},[4507],{"type":27,"value":4508},"  barCount ",{"type":31,"tagName":279,"properties":4510,"children":4511},{"style":789},[4512],{"type":27,"value":1545},{"type":31,"tagName":279,"properties":4514,"children":4515},{"style":345},[4516],{"type":27,"value":1550},{"type":31,"tagName":279,"properties":4518,"children":4519},{"style":317},[4520],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4523,"children":4524},{"class":281},[4525,4530],{"type":31,"tagName":279,"properties":4526,"children":4527},{"style":323},[4528],{"type":27,"value":4529},"  testSwing",{"type":31,"tagName":279,"properties":4531,"children":4532},{"style":317},[4533],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4536,"children":4537},{"class":281},[4538,4543],{"type":31,"tagName":279,"properties":4539,"children":4540},{"style":323},[4541],{"type":27,"value":4542},"  out_cvd",{"type":31,"tagName":279,"properties":4544,"children":4545},{"style":317},[4546],{"type":27,"value":4547},"(cvd);",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4550,"children":4551},{"class":281},[4552,4557],{"type":31,"tagName":279,"properties":4553,"children":4554},{"style":323},[4555],{"type":27,"value":4556},"  out_swing_here",{"type":31,"tagName":279,"properties":4558,"children":4559},{"style":317},[4560],{"type":27,"value":4561},"(swingHere);",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4564,"children":4565},{"class":281},[4566,4571,4576,4580,4584,4589,4593,4597,4601,4605],{"type":31,"tagName":279,"properties":4567,"children":4568},{"style":323},[4569],{"type":27,"value":4570},"  out_cvd_swing",{"type":31,"tagName":279,"properties":4572,"children":4573},{"style":317},[4574],{"type":27,"value":4575},"(sidedVolume ",{"type":31,"tagName":279,"properties":4577,"children":4578},{"style":789},[4579],{"type":27,"value":3044},{"type":31,"tagName":279,"properties":4581,"children":4582},{"style":345},[4583],{"type":27,"value":2038},{"type":31,"tagName":279,"properties":4585,"children":4586},{"style":789},[4587],{"type":27,"value":4588}," ?",{"type":31,"tagName":279,"properties":4590,"children":4591},{"style":317},[4592],{"type":27,"value":2377},{"type":31,"tagName":279,"properties":4594,"children":4595},{"style":789},[4596],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":4598,"children":4599},{"style":345},[4600],{"type":27,"value":2135},{"type":31,"tagName":279,"properties":4602,"children":4603},{"style":317},[4604],{"type":27,"value":1186},{"type":31,"tagName":279,"properties":4606,"children":4607},{"style":285},[4608],{"type":27,"value":4609},"// no dots on a market with no sided trades: the pane holds a flat zero line and the words",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4612,"children":4613},{"class":281},[4614,4619,4623,4627],{"type":31,"tagName":279,"properties":4615,"children":4616},{"style":323},[4617],{"type":27,"value":4618},"  out_divergence",{"type":31,"tagName":279,"properties":4620,"children":4621},{"style":317},[4622],{"type":27,"value":331},{"type":31,"tagName":279,"properties":4624,"children":4625},{"style":323},[4626],{"type":27,"value":1171},{"type":31,"tagName":279,"properties":4628,"children":4629},{"style":317},[4630],{"type":27,"value":4631},"(pendingKind));",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4634,"children":4635},{"class":281},[4636,4640,4645,4649,4653],{"type":31,"tagName":279,"properties":4637,"children":4638},{"style":789},[4639],{"type":27,"value":2692},{"type":31,"tagName":279,"properties":4641,"children":4642},{"style":317},[4643],{"type":27,"value":4644}," (pendingKind ",{"type":31,"tagName":279,"properties":4646,"children":4647},{"style":789},[4648],{"type":27,"value":4196},{"type":31,"tagName":279,"properties":4650,"children":4651},{"style":345},[4652],{"type":27,"value":1523},{"type":31,"tagName":279,"properties":4654,"children":4655},{"style":317},[4656],{"type":27,"value":1555},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4659,"children":4660},{"class":281},[4661,4665,4670,4674,4678,4682,4687],{"type":31,"tagName":279,"properties":4662,"children":4663},{"style":789},[4664],{"type":27,"value":2940},{"type":31,"tagName":279,"properties":4666,"children":4667},{"style":345},[4668],{"type":27,"value":4669}," k",{"type":31,"tagName":279,"properties":4671,"children":4672},{"style":789},[4673],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4675,"children":4676},{"style":317},[4677],{"type":27,"value":2317},{"type":31,"tagName":279,"properties":4679,"children":4680},{"style":789},[4681],{"type":27,"value":2814},{"type":31,"tagName":279,"properties":4683,"children":4684},{"style":317},[4685],{"type":27,"value":4686}," linesKept; ",{"type":31,"tagName":279,"properties":4688,"children":4689},{"style":285},[4690],{"type":27,"value":4691},"// the ring position: the oldest line, link and tag are reused",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4694,"children":4695},{"class":281},[4696,4701,4705,4709],{"type":31,"tagName":279,"properties":4697,"children":4698},{"style":317},[4699],{"type":27,"value":4700},"    divergences ",{"type":31,"tagName":279,"properties":4702,"children":4703},{"style":789},[4704],{"type":27,"value":1545},{"type":31,"tagName":279,"properties":4706,"children":4707},{"style":345},[4708],{"type":27,"value":1550},{"type":31,"tagName":279,"properties":4710,"children":4711},{"style":317},[4712],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4715,"children":4716},{"class":281},[4717,4721,4726,4730,4734,4738,4742,4746,4750,4755,4759],{"type":31,"tagName":279,"properties":4718,"children":4719},{"style":789},[4720],{"type":27,"value":2940},{"type":31,"tagName":279,"properties":4722,"children":4723},{"style":345},[4724],{"type":27,"value":4725}," tone",{"type":31,"tagName":279,"properties":4727,"children":4728},{"style":789},[4729],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4731,"children":4732},{"style":317},[4733],{"type":27,"value":2402},{"type":31,"tagName":279,"properties":4735,"children":4736},{"style":789},[4737],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":4739,"children":4740},{"style":345},[4741],{"type":27,"value":1523},{"type":31,"tagName":279,"properties":4743,"children":4744},{"style":789},[4745],{"type":27,"value":4588},{"type":31,"tagName":279,"properties":4747,"children":4748},{"style":345},[4749],{"type":27,"value":1722},{"type":31,"tagName":279,"properties":4751,"children":4752},{"style":789},[4753],{"type":27,"value":4754}," :",{"type":31,"tagName":279,"properties":4756,"children":4757},{"style":345},[4758],{"type":27,"value":1788},{"type":31,"tagName":279,"properties":4760,"children":4761},{"style":317},[4762],{"type":27,"value":1960},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4765,"children":4766},{"class":281},[4767,4772,4777,4782,4787],{"type":31,"tagName":279,"properties":4768,"children":4769},{"style":317},[4770],{"type":27,"value":4771},"    lines[k].",{"type":31,"tagName":279,"properties":4773,"children":4774},{"style":323},[4775],{"type":27,"value":4776},"set",{"type":31,"tagName":279,"properties":4778,"children":4779},{"style":317},[4780],{"type":27,"value":4781},"(x1, y1, x2, y2).",{"type":31,"tagName":279,"properties":4783,"children":4784},{"style":323},[4785],{"type":27,"value":4786},"color",{"type":31,"tagName":279,"properties":4788,"children":4789},{"style":317},[4790],{"type":27,"value":4791},"(tone);",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4794,"children":4795},{"class":281},[4796,4801,4805,4810,4814],{"type":31,"tagName":279,"properties":4797,"children":4798},{"style":317},[4799],{"type":27,"value":4800},"    points[",{"type":31,"tagName":279,"properties":4802,"children":4803},{"style":345},[4804],{"type":27,"value":271},{"type":31,"tagName":279,"properties":4806,"children":4807},{"style":317},[4808],{"type":27,"value":4809},"] ",{"type":31,"tagName":279,"properties":4811,"children":4812},{"style":789},[4813],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4815,"children":4816},{"style":317},[4817],{"type":27,"value":4818}," x1;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4821,"children":4822},{"class":281},[4823,4827,4831,4835,4839],{"type":31,"tagName":279,"properties":4824,"children":4825},{"style":317},[4826],{"type":27,"value":4800},{"type":31,"tagName":279,"properties":4828,"children":4829},{"style":345},[4830],{"type":27,"value":492},{"type":31,"tagName":279,"properties":4832,"children":4833},{"style":317},[4834],{"type":27,"value":4809},{"type":31,"tagName":279,"properties":4836,"children":4837},{"style":789},[4838],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4840,"children":4841},{"style":317},[4842],{"type":27,"value":4843}," c1;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4846,"children":4847},{"class":281},[4848,4852,4856,4860,4864],{"type":31,"tagName":279,"properties":4849,"children":4850},{"style":317},[4851],{"type":27,"value":4800},{"type":31,"tagName":279,"properties":4853,"children":4854},{"style":345},[4855],{"type":27,"value":706},{"type":31,"tagName":279,"properties":4857,"children":4858},{"style":317},[4859],{"type":27,"value":4809},{"type":31,"tagName":279,"properties":4861,"children":4862},{"style":789},[4863],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4865,"children":4866},{"style":317},[4867],{"type":27,"value":4868}," x2;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4871,"children":4872},{"class":281},[4873,4877,4881,4885,4889],{"type":31,"tagName":279,"properties":4874,"children":4875},{"style":317},[4876],{"type":27,"value":4800},{"type":31,"tagName":279,"properties":4878,"children":4879},{"style":345},[4880],{"type":27,"value":358},{"type":31,"tagName":279,"properties":4882,"children":4883},{"style":317},[4884],{"type":27,"value":4809},{"type":31,"tagName":279,"properties":4886,"children":4887},{"style":789},[4888],{"type":27,"value":1411},{"type":31,"tagName":279,"properties":4890,"children":4891},{"style":317},[4892],{"type":27,"value":4893}," c2;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4896,"children":4897},{"class":281},[4898,4903,4908,4913,4917,4922,4926],{"type":31,"tagName":279,"properties":4899,"children":4900},{"style":317},[4901],{"type":27,"value":4902},"    links[k].",{"type":31,"tagName":279,"properties":4904,"children":4905},{"style":323},[4906],{"type":27,"value":4907},"setPoints",{"type":31,"tagName":279,"properties":4909,"children":4910},{"style":317},[4911],{"type":27,"value":4912},"(points, ",{"type":31,"tagName":279,"properties":4914,"children":4915},{"style":345},[4916],{"type":27,"value":706},{"type":31,"tagName":279,"properties":4918,"children":4919},{"style":317},[4920],{"type":27,"value":4921},").",{"type":31,"tagName":279,"properties":4923,"children":4924},{"style":323},[4925],{"type":27,"value":4786},{"type":31,"tagName":279,"properties":4927,"children":4928},{"style":317},[4929],{"type":27,"value":4791},{"type":27,"value":28},{"type":31,"tagName":279,"properties":4932,"children":4933},{"class":281},[4934,4938,4943,4947,4951,4955,4959,4963,4967,4971,4975,4979,4984,4988],{"type":31,"tagName":279,"properties":4935,"children":4936},{"style":789},[4937],{"type":27,"value":2940},{"type":31,"tagName":279,"properties":4939,"children":4940},{"style":345},[4941],{"type":27,"value":4942}," offset",{"type":31,"tagName":279,"properties":4944,"children":4945},{"style":789},[4946],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":4948,"children":4949},{"style":317},[4950],{"type":27,"value":1504},{"type":31,"tagName":279,"properties":4952,"children":4953},{"style":323},[4954],{"type":27,"value":3282},{"type":31,"tagName":279,"properties":4956,"children":4957},{"style":317},[4958],{"type":27,"value":4345},{"type":31,"tagName":279,"properties":4960,"children":4961},{"style":789},[4962],{"type":27,"value":4350},{"type":31,"tagName":279,"properties":4964,"children":4965},{"style":345},[4966],{"type":27,"value":2038},{"type":31,"tagName":279,"properties":4968,"children":4969},{"style":789},[4970],{"type":27,"value":4754},{"type":31,"tagName":279,"properties":4972,"children":4973},{"style":317},[4974],{"type":27,"value":4381},{"type":31,"tagName":279,"properties":4976,"children":4977},{"style":789},[4978],{"type":27,"value":4386},{"type":31,"tagName":279,"properties":4980,"children":4981},{"style":345},[4982],{"type":27,"value":4983}," 0.6",{"type":31,"tagName":279,"properties":4985,"children":4986},{"style":317},[4987],{"type":27,"value":1098},{"type":31,"tagName":279,"properties":4989,"children":4990},{"style":285},[4991],{"type":27,"value":4992},"// the tag sits just outside the line, on the swing side",{"type":27,"value":28},{"type":31,"tagName":279,"properties":4995,"children":4996},{"class":281},[4997,5001,5006,5010,5014,5018,5022,5026,5030,5035,5040,5044,5049,5053,5057,5062,5066,5070],{"type":31,"tagName":279,"properties":4998,"children":4999},{"style":789},[5000],{"type":27,"value":2940},{"type":31,"tagName":279,"properties":5002,"children":5003},{"style":345},[5004],{"type":27,"value":5005}," tagY",{"type":31,"tagName":279,"properties":5007,"children":5008},{"style":789},[5009],{"type":27,"value":1088},{"type":31,"tagName":279,"properties":5011,"children":5012},{"style":317},[5013],{"type":27,"value":2402},{"type":31,"tagName":279,"properties":5015,"children":5016},{"style":789},[5017],{"type":27,"value":1166},{"type":31,"tagName":279,"properties":5019,"children":5020},{"style":345},[5021],{"type":27,"value":1523},{"type":31,"tagName":279,"properties":5023,"children":5024},{"style":789},[5025],{"type":27,"value":4588},{"type":31,"tagName":279,"properties":5027,"children":5028},{"style":317},[5029],{"type":27,"value":4154},{"type":31,"tagName":279,"properties":5031,"children":5032},{"style":323},[5033],{"type":27,"value":5034},"max",{"type":31,"tagName":279,"properties":5036,"children":5037},{"style":317},[5038],{"type":27,"value":5039},"(y1, y2) ",{"type":31,"tagName":279,"properties":5041,"children":5042},{"style":789},[5043],{"type":27,"value":2720},{"type":31,"tagName":279,"properties":5045,"children":5046},{"style":317},[5047],{"type":27,"value":5048}," offset ",{"type":31,"tagName":279,"properties":5050,"children":5051},{"style":789},[5052],{"type":27,"value":1396},{"type":31,"tagName":279,"properties":5054,"children":5055},{"style":317},[5056],{"type":27,"value":4154},{"type":31,"tagName":279,"properties":5058,"children":5059},{"style":323},[5060],{"type":27,"value":5061},"min",{"type":31,"tagName":279,"properties":5063,"children":5064},{"style":317},[5065],{"type":27,"value":5039},{"type":31,"tagName":279,"properties":5067,"children":5068},{"style":789},[5069],{"type":27,"value":792},{"type":31,"tagName":279,"properties":5071,"children":5072},{"style":317},[5073],{"type":27,"value":5074}," offset;",{"type":27,"value":28},{"type":31,"tagName":279,"properties":5077,"children":5078},{"class":281},[5079,5084],{"type":31,"tagName":279,"properties":5080,"children":5081},{"style":323},[5082],{"type":27,"value":5083},"    sb_clear",{"type":31,"tagName":279,"properties":5085,"children":5086},{"style":317},[5087],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5090,"children":5091},{"class":281},[5092,5097,5101,5106],{"type":31,"tagName":279,"properties":5093,"children":5094},{"style":323},[5095],{"type":27,"value":5096},"    sb_text",{"type":31,"tagName":279,"properties":5098,"children":5099},{"style":317},[5100],{"type":27,"value":331},{"type":31,"tagName":279,"properties":5102,"children":5103},{"style":334},[5104],{"type":27,"value":5105},"\"div\"",{"type":31,"tagName":279,"properties":5107,"children":5108},{"style":317},[5109],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5112,"children":5113},{"class":281},[5114,5119,5123,5128,5132,5137,5141,5146,5151,5155],{"type":31,"tagName":279,"properties":5115,"children":5116},{"style":317},[5117],{"type":27,"value":5118},"    tags[k].",{"type":31,"tagName":279,"properties":5120,"children":5121},{"style":323},[5122],{"type":27,"value":4776},{"type":31,"tagName":279,"properties":5124,"children":5125},{"style":317},[5126],{"type":27,"value":5127},"((x1 ",{"type":31,"tagName":279,"properties":5129,"children":5130},{"style":789},[5131],{"type":27,"value":2720},{"type":31,"tagName":279,"properties":5133,"children":5134},{"style":317},[5135],{"type":27,"value":5136}," x2) ",{"type":31,"tagName":279,"properties":5138,"children":5139},{"style":789},[5140],{"type":27,"value":4386},{"type":31,"tagName":279,"properties":5142,"children":5143},{"style":345},[5144],{"type":27,"value":5145}," 0.5",{"type":31,"tagName":279,"properties":5147,"children":5148},{"style":317},[5149],{"type":27,"value":5150},", tagY).",{"type":31,"tagName":279,"properties":5152,"children":5153},{"style":323},[5154],{"type":27,"value":27},{"type":31,"tagName":279,"properties":5156,"children":5157},{"style":317},[5158],{"type":27,"value":5159},"(str_text_sb);",{"type":27,"value":28},{"type":31,"tagName":279,"properties":5162,"children":5163},{"class":281},[5164,5168,5172],{"type":31,"tagName":279,"properties":5165,"children":5166},{"style":317},[5167],{"type":27,"value":5118},{"type":31,"tagName":279,"properties":5169,"children":5170},{"style":323},[5171],{"type":27,"value":4786},{"type":31,"tagName":279,"properties":5173,"children":5174},{"style":317},[5175],{"type":27,"value":4791},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5178,"children":5179},{"class":281},[5180],{"type":31,"tagName":279,"properties":5181,"children":5182},{"style":317},[5183],{"type":27,"value":3167},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5186,"children":5187},{"class":281},[5188,5192,5197,5202,5207,5211,5215,5219,5223,5228],{"type":31,"tagName":279,"properties":5189,"children":5190},{"style":789},[5191],{"type":27,"value":2692},{"type":31,"tagName":279,"properties":5193,"children":5194},{"style":317},[5195],{"type":27,"value":5196}," (bar.",{"type":31,"tagName":279,"properties":5198,"children":5199},{"style":323},[5200],{"type":27,"value":5201},"isLast",{"type":31,"tagName":279,"properties":5203,"children":5204},{"style":317},[5205],{"type":27,"value":5206},"() ",{"type":31,"tagName":279,"properties":5208,"children":5209},{"style":789},[5210],{"type":27,"value":3193},{"type":31,"tagName":279,"properties":5212,"children":5213},{"style":317},[5214],{"type":27,"value":2060},{"type":31,"tagName":279,"properties":5216,"children":5217},{"style":789},[5218],{"type":27,"value":2914},{"type":31,"tagName":279,"properties":5220,"children":5221},{"style":345},[5222],{"type":27,"value":2038},{"type":31,"tagName":279,"properties":5224,"children":5225},{"style":317},[5226],{"type":27,"value":5227},") { ",{"type":31,"tagName":279,"properties":5229,"children":5230},{"style":285},[5231],{"type":27,"value":5232},"// the market served no sided prints at all: say so once, top right",{"type":27,"value":28},{"type":31,"tagName":279,"properties":5235,"children":5236},{"class":281},[5237,5241],{"type":31,"tagName":279,"properties":5238,"children":5239},{"style":323},[5240],{"type":27,"value":5083},{"type":31,"tagName":279,"properties":5242,"children":5243},{"style":317},[5244],{"type":27,"value":3887},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5247,"children":5248},{"class":281},[5249,5253,5257,5262],{"type":31,"tagName":279,"properties":5250,"children":5251},{"style":323},[5252],{"type":27,"value":5096},{"type":31,"tagName":279,"properties":5254,"children":5255},{"style":317},[5256],{"type":27,"value":331},{"type":31,"tagName":279,"properties":5258,"children":5259},{"style":334},[5260],{"type":27,"value":5261},"\"No sided trades on this market\"",{"type":31,"tagName":279,"properties":5263,"children":5264},{"style":317},[5265],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5268,"children":5269},{"class":281},[5270,5275,5279,5283,5288,5292,5297,5301,5305],{"type":31,"tagName":279,"properties":5271,"children":5272},{"style":317},[5273],{"type":27,"value":5274},"    notice.",{"type":31,"tagName":279,"properties":5276,"children":5277},{"style":323},[5278],{"type":27,"value":4776},{"type":31,"tagName":279,"properties":5280,"children":5281},{"style":317},[5282],{"type":27,"value":331},{"type":31,"tagName":279,"properties":5284,"children":5285},{"style":345},[5286],{"type":27,"value":5287},"16",{"type":31,"tagName":279,"properties":5289,"children":5290},{"style":317},[5291],{"type":27,"value":342},{"type":31,"tagName":279,"properties":5293,"children":5294},{"style":345},[5295],{"type":27,"value":5296},"14",{"type":31,"tagName":279,"properties":5298,"children":5299},{"style":317},[5300],{"type":27,"value":4921},{"type":31,"tagName":279,"properties":5302,"children":5303},{"style":323},[5304],{"type":27,"value":27},{"type":31,"tagName":279,"properties":5306,"children":5307},{"style":317},[5308],{"type":27,"value":5159},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5311,"children":5312},{"class":281},[5313,5317,5322,5326,5331,5335,5340,5344,5349,5353,5357,5361,5366],{"type":31,"tagName":279,"properties":5314,"children":5315},{"style":317},[5316],{"type":27,"value":5274},{"type":31,"tagName":279,"properties":5318,"children":5319},{"style":323},[5320],{"type":27,"value":5321},"anchor",{"type":31,"tagName":279,"properties":5323,"children":5324},{"style":317},[5325],{"type":27,"value":331},{"type":31,"tagName":279,"properties":5327,"children":5328},{"style":345},[5329],{"type":27,"value":5330},"ANCHOR_TOP_RIGHT",{"type":31,"tagName":279,"properties":5332,"children":5333},{"style":317},[5334],{"type":27,"value":4921},{"type":31,"tagName":279,"properties":5336,"children":5337},{"style":323},[5338],{"type":27,"value":5339},"align",{"type":31,"tagName":279,"properties":5341,"children":5342},{"style":317},[5343],{"type":27,"value":331},{"type":31,"tagName":279,"properties":5345,"children":5346},{"style":345},[5347],{"type":27,"value":5348},"ALIGN_RIGHT",{"type":31,"tagName":279,"properties":5350,"children":5351},{"style":317},[5352],{"type":27,"value":4921},{"type":31,"tagName":279,"properties":5354,"children":5355},{"style":323},[5356],{"type":27,"value":4786},{"type":31,"tagName":279,"properties":5358,"children":5359},{"style":317},[5360],{"type":27,"value":331},{"type":31,"tagName":279,"properties":5362,"children":5363},{"style":345},[5364],{"type":27,"value":5365},"SLATE",{"type":31,"tagName":279,"properties":5367,"children":5368},{"style":317},[5369],{"type":27,"value":1237},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5372,"children":5373},{"class":281},[5374],{"type":31,"tagName":279,"properties":5375,"children":5376},{"style":317},[5377],{"type":27,"value":3167},{"type":27,"value":28},{"type":31,"tagName":279,"properties":5380,"children":5381},{"class":281},[5382],{"type":31,"tagName":279,"properties":5383,"children":5384},{"style":317},[5385],{"type":27,"value":1670},{"type":27,"value":28},{"type":31,"tagName":246,"properties":5388,"children":5389,"position":5399},{},[5390],{"type":27,"value":5391,"position":5392},"How it works",{"start":5393,"end":5396},{"line":5394,"column":254,"offset":5395},188,9827,{"line":5394,"column":5397,"offset":5398},16,9839,{"start":5400,"end":5402},{"line":5394,"column":21,"offset":5401},9824,{"line":5394,"column":5397,"offset":5398},{"type":27,"value":28},{"type":31,"tagName":32,"properties":5405,"children":5406,"position":5550},{},[5407,5425,5432,5444,5451,5464,5471,5483,5490,5503,5510,5523,5530,5543],{"type":31,"tagName":193,"properties":5408,"children":5409,"position":5420},{},[5410],{"type":27,"value":5411,"position":5412},"CVD is a running sum.",{"start":5413,"end":5417},{"line":5414,"column":5415,"offset":5416},190,3,9843,{"line":5414,"column":5418,"offset":5419},24,9864,{"start":5421,"end":5423},{"line":5414,"column":21,"offset":5422},9841,{"line":5414,"column":78,"offset":5424},9866,{"type":27,"value":5426,"position":5427}," ",{"start":5428,"end":5429},{"line":5414,"column":78,"offset":5424},{"line":5414,"column":5430,"offset":5431},27,9867,{"type":31,"tagName":81,"properties":5433,"children":5434,"position":5441},{},[5435],{"type":27,"value":5436,"position":5437},"input(\"buy\", trades.volume, { side: \"BUY\", missing: \"zero\" })",{"start":5438,"end":5439},{"line":5414,"column":5430,"offset":5431},{"line":5414,"column":46,"offset":5440},9930,{"start":5442,"end":5443},{"line":5414,"column":5430,"offset":5431},{"line":5414,"column":46,"offset":5440},{"type":27,"value":5445,"position":5446}," and its SELL twin deliver the bar's aggressive volume per side (a bar with no prints counts as zero); their difference summed bar after bar is ",{"start":5447,"end":5448},{"line":5414,"column":46,"offset":5440},{"line":5414,"column":5449,"offset":5450},234,10074,{"type":31,"tagName":81,"properties":5452,"children":5453,"position":5461},{},[5454],{"type":27,"value":5455,"position":5456},"cvd",{"start":5457,"end":5458},{"line":5414,"column":5449,"offset":5450},{"line":5414,"column":5459,"offset":5460},239,10079,{"start":5462,"end":5463},{"line":5414,"column":5449,"offset":5450},{"line":5414,"column":5459,"offset":5460},{"type":27,"value":5465,"position":5466},", a line in the lower pane labelled CVD. ",{"start":5467,"end":5468},{"line":5414,"column":5459,"offset":5460},{"line":5414,"column":5469,"offset":5470},280,10120,{"type":31,"tagName":81,"properties":5472,"children":5473,"position":5480},{},[5474],{"type":27,"value":85,"position":5475},{"start":5476,"end":5477},{"line":5414,"column":5469,"offset":5470},{"line":5414,"column":5478,"offset":5479},295,10135,{"start":5481,"end":5482},{"line":5414,"column":5469,"offset":5470},{"line":5414,"column":5478,"offset":5479},{"type":27,"value":5484,"position":5485}," reads the base asset, so the sum is in coins: ",{"start":5486,"end":5487},{"line":5414,"column":5478,"offset":5479},{"line":5414,"column":5488,"offset":5489},342,10182,{"type":31,"tagName":81,"properties":5491,"children":5492,"position":5500},{},[5493],{"type":27,"value":5494,"position":5495},"format: \"si\"",{"start":5496,"end":5497},{"line":5414,"column":5488,"offset":5489},{"line":5414,"column":5498,"offset":5499},356,10196,{"start":5501,"end":5502},{"line":5414,"column":5488,"offset":5489},{"line":5414,"column":5498,"offset":5499},{"type":27,"value":5504,"position":5505}," with ",{"start":5506,"end":5507},{"line":5414,"column":5498,"offset":5499},{"line":5414,"column":5508,"offset":5509},362,10202,{"type":31,"tagName":81,"properties":5511,"children":5512,"position":5520},{},[5513],{"type":27,"value":5514,"position":5515},"unit: \" coins\"",{"start":5516,"end":5517},{"line":5414,"column":5508,"offset":5509},{"line":5414,"column":5518,"offset":5519},378,10218,{"start":5521,"end":5522},{"line":5414,"column":5508,"offset":5509},{"line":5414,"column":5518,"offset":5519},{"type":27,"value":5524,"position":5525}," prints it in the legend as \"CVD -17.6K coins\". ",{"start":5526,"end":5527},{"line":5414,"column":5518,"offset":5519},{"line":5414,"column":5528,"offset":5529},426,10266,{"type":31,"tagName":81,"properties":5531,"children":5532,"position":5540},{},[5533],{"type":27,"value":5534,"position":5535},"cvd_reset",{"start":5536,"end":5537},{"line":5414,"column":5528,"offset":5529},{"line":5414,"column":5538,"offset":5539},437,10277,{"start":5541,"end":5542},{"line":5414,"column":5528,"offset":5529},{"line":5414,"column":5538,"offset":5539},{"type":27,"value":5544,"position":5545}," (off) runs it from the first loaded bar; on, it restarts at every UTC midnight.",{"start":5546,"end":5547},{"line":5414,"column":5538,"offset":5539},{"line":5414,"column":5548,"offset":5549},517,10357,{"start":5551,"end":5552},{"line":5414,"column":21,"offset":5422},{"line":5414,"column":5548,"offset":5549},{"type":27,"value":28},{"type":31,"tagName":32,"properties":5555,"children":5556,"position":5718},{},[5557,5575,5580,5593,5600,5612,5619,5632,5639,5652,5659,5672,5679,5691,5698,5711],{"type":31,"tagName":193,"properties":5558,"children":5559,"position":5569},{},[5560],{"type":27,"value":5561,"position":5562},"Swings confirm late.",{"start":5563,"end":5566},{"line":5564,"column":5415,"offset":5565},192,10361,{"line":5564,"column":5567,"offset":5568},23,10381,{"start":5570,"end":5572},{"line":5564,"column":21,"offset":5571},10359,{"line":5564,"column":5573,"offset":5574},25,10383,{"type":27,"value":5426,"position":5576},{"start":5577,"end":5578},{"line":5564,"column":5573,"offset":5574},{"line":5564,"column":78,"offset":5579},10384,{"type":31,"tagName":81,"properties":5581,"children":5582,"position":5590},{},[5583],{"type":27,"value":5584,"position":5585},"swing",{"start":5586,"end":5587},{"line":5564,"column":78,"offset":5579},{"line":5564,"column":5588,"offset":5589},33,10391,{"start":5591,"end":5592},{"line":5564,"column":78,"offset":5579},{"line":5564,"column":5588,"offset":5589},{"type":27,"value":5594,"position":5595}," (8, 3 to 30) is the number of bars on each side a swing must beat, so a swing is confirmed ",{"start":5596,"end":5597},{"line":5564,"column":5588,"offset":5589},{"line":5564,"column":5598,"offset":5599},125,10483,{"type":31,"tagName":81,"properties":5601,"children":5602,"position":5609},{},[5603],{"type":27,"value":5584,"position":5604},{"start":5605,"end":5606},{"line":5564,"column":5598,"offset":5599},{"line":5564,"column":5607,"offset":5608},132,10490,{"start":5610,"end":5611},{"line":5564,"column":5598,"offset":5599},{"line":5564,"column":5607,"offset":5608},{"type":27,"value":5613,"position":5614}," bars after itself. A swing must beat every bar before it and at least match every bar after it, so a flat top on an odds chart counts once, on its first bar. ",{"start":5615,"end":5616},{"line":5564,"column":5607,"offset":5608},{"line":5564,"column":5617,"offset":5618},291,10649,{"type":31,"tagName":81,"properties":5620,"children":5621,"position":5629},{},[5622],{"type":27,"value":5623,"position":5624},"swing_here",{"start":5625,"end":5626},{"line":5564,"column":5617,"offset":5618},{"line":5564,"column":5627,"offset":5628},303,10661,{"start":5630,"end":5631},{"line":5564,"column":5617,"offset":5618},{"line":5564,"column":5627,"offset":5628},{"type":27,"value":5633,"position":5634}," is 1 on a confirming bar and gates the ",{"start":5635,"end":5636},{"line":5564,"column":5627,"offset":5628},{"line":5564,"column":5637,"offset":5638},343,10701,{"type":31,"tagName":81,"properties":5640,"children":5641,"position":5649},{},[5642],{"type":27,"value":5643,"position":5644},"cvd_swing",{"start":5645,"end":5646},{"line":5564,"column":5637,"offset":5638},{"line":5564,"column":5647,"offset":5648},354,10712,{"start":5650,"end":5651},{"line":5564,"column":5637,"offset":5638},{"line":5564,"column":5647,"offset":5648},{"type":27,"value":5653,"position":5654}," dot, which ",{"start":5655,"end":5656},{"line":5564,"column":5647,"offset":5648},{"line":5564,"column":5657,"offset":5658},366,10724,{"type":31,"tagName":81,"properties":5660,"children":5661,"position":5669},{},[5662],{"type":27,"value":5663,"position":5664},"displacement_bars_by: { param: \"swing\", scale: -1 }",{"start":5665,"end":5666},{"line":5564,"column":5657,"offset":5658},{"line":5564,"column":5667,"offset":5668},419,10777,{"start":5670,"end":5671},{"line":5564,"column":5657,"offset":5658},{"line":5564,"column":5667,"offset":5668},{"type":27,"value":5673,"position":5674}," draws back on the swing bar itself, ",{"start":5675,"end":5676},{"line":5564,"column":5667,"offset":5668},{"line":5564,"column":5677,"offset":5678},456,10814,{"type":31,"tagName":81,"properties":5680,"children":5681,"position":5688},{},[5682],{"type":27,"value":5584,"position":5683},{"start":5684,"end":5685},{"line":5564,"column":5677,"offset":5678},{"line":5564,"column":5686,"offset":5687},463,10821,{"start":5689,"end":5690},{"line":5564,"column":5677,"offset":5678},{"line":5564,"column":5686,"offset":5687},{"type":27,"value":5692,"position":5693}," bars before the confirming bar at whatever strength is set (",{"start":5694,"end":5695},{"line":5564,"column":5686,"offset":5687},{"line":5564,"column":5696,"offset":5697},524,10882,{"type":31,"tagName":81,"properties":5699,"children":5700,"position":5708},{},[5701],{"type":27,"value":5702,"position":5703},"displacement_bars: -8",{"start":5704,"end":5705},{"line":5564,"column":5696,"offset":5697},{"line":5564,"column":5706,"offset":5707},547,10905,{"start":5709,"end":5710},{"line":5564,"column":5696,"offset":5697},{"line":5564,"column":5706,"offset":5707},{"type":27,"value":5712,"position":5713},", the default's shift, stays for a host that reads only the literal).",{"start":5714,"end":5715},{"line":5564,"column":5706,"offset":5707},{"line":5564,"column":5716,"offset":5717},616,10974,{"start":5719,"end":5720},{"line":5564,"column":21,"offset":5571},{"line":5564,"column":5716,"offset":5717},{"type":27,"value":28},{"type":31,"tagName":32,"properties":5723,"children":5724,"position":5809},{},[5725,5743,5750,5763,5769,5782,5789,5802],{"type":31,"tagName":193,"properties":5726,"children":5727,"position":5737},{},[5728],{"type":27,"value":5729,"position":5730},"A divergence is two swings that disagree.",{"start":5731,"end":5734},{"line":5732,"column":5415,"offset":5733},194,10978,{"line":5732,"column":5735,"offset":5736},44,11019,{"start":5738,"end":5740},{"line":5732,"column":21,"offset":5739},10976,{"line":5732,"column":5741,"offset":5742},46,11021,{"type":27,"value":5744,"position":5745}," A higher price high against a lower CVD high is bearish (-1), a lower price low against a higher CVD low is bullish (+1); ",{"start":5746,"end":5747},{"line":5732,"column":5741,"offset":5742},{"line":5732,"column":5748,"offset":5749},169,11144,{"type":31,"tagName":81,"properties":5751,"children":5752,"position":5760},{},[5753],{"type":27,"value":5754,"position":5755},"divergence",{"start":5756,"end":5757},{"line":5732,"column":5748,"offset":5749},{"line":5732,"column":5758,"offset":5759},181,11156,{"start":5761,"end":5762},{"line":5732,"column":5748,"offset":5749},{"line":5732,"column":5758,"offset":5759},{"type":27,"value":5764,"position":5765}," carries the sign on the confirming bar and 0 elsewhere, a data-only signal the editor's Console prompt reads and a declared alert can fire on. On that bar a line handle joins the two price swings (x from ",{"start":5766,"end":5767},{"line":5732,"column":5758,"offset":5759},{"line":5732,"column":203,"offset":5768},11361,{"type":31,"tagName":81,"properties":5770,"children":5771,"position":5779},{},[5772],{"type":27,"value":5773,"position":5774},"bar.time()",{"start":5775,"end":5776},{"line":5732,"column":203,"offset":5768},{"line":5732,"column":5777,"offset":5778},398,11373,{"start":5780,"end":5781},{"line":5732,"column":203,"offset":5768},{"line":5732,"column":5777,"offset":5778},{"type":27,"value":5783,"position":5784},"), a dashed polyline handle joins the two CVD swings in the pane, and a label handle writes \"div\" beside the price line through the one bounded slot. ",{"start":5785,"end":5786},{"line":5732,"column":5777,"offset":5778},{"line":5732,"column":5787,"offset":5788},548,11523,{"type":31,"tagName":81,"properties":5790,"children":5791,"position":5799},{},[5792],{"type":27,"value":5793,"position":5794},"lines_kept",{"start":5795,"end":5796},{"line":5732,"column":5787,"offset":5788},{"line":5732,"column":5797,"offset":5798},560,11535,{"start":5800,"end":5801},{"line":5732,"column":5787,"offset":5788},{"line":5732,"column":5797,"offset":5798},{"type":27,"value":5803,"position":5804}," (12, 1 to 60) lines stay on the chart; the oldest is recycled.",{"start":5805,"end":5806},{"line":5732,"column":5797,"offset":5798},{"line":5732,"column":5807,"offset":5808},623,11598,{"start":5810,"end":5811},{"line":5732,"column":21,"offset":5739},{"line":5732,"column":5807,"offset":5808},{"type":27,"value":28},{"type":31,"tagName":246,"properties":5814,"children":5815,"position":5825},{},[5816],{"type":27,"value":5817,"position":5818},"Where it runs",{"start":5819,"end":5822},{"line":5820,"column":254,"offset":5821},196,11603,{"line":5820,"column":5823,"offset":5824},17,11616,{"start":5826,"end":5828},{"line":5820,"column":21,"offset":5827},11600,{"line":5820,"column":5823,"offset":5824},{"type":27,"value":28},{"type":31,"tagName":32,"properties":5831,"children":5832,"position":5842},{},[5833],{"type":27,"value":5834,"position":5835},"Markets with sided trades: crypto perps and spot, prediction markets. A market where one side does all the trading (CVD climbing the whole window) shows swings and no divergence, which is the honest reading.",{"start":5836,"end":5839},{"line":5837,"column":21,"offset":5838},198,11618,{"line":5837,"column":5840,"offset":5841},208,11825,{"start":5843,"end":5844},{"line":5837,"column":21,"offset":5838},{"line":5837,"column":5840,"offset":5841},{"type":27,"value":28},{"type":31,"tagName":246,"properties":5847,"children":5848,"position":5857},{},[5849],{"type":27,"value":5850,"position":5851},"When data is missing",{"start":5852,"end":5855},{"line":5853,"column":254,"offset":5854},200,11830,{"line":5853,"column":5418,"offset":5856},11850,{"start":5858,"end":5860},{"line":5853,"column":21,"offset":5859},11827,{"line":5853,"column":5418,"offset":5856},{"type":27,"value":28},{"type":31,"tagName":32,"properties":5863,"children":5864,"position":5873},{},[5865],{"type":27,"value":5866,"position":5867},"On a market with no sided trades (FX, stocks) CVD stays flat at zero, no swing is dotted, and one slate line of words sits at the top right of the chart: \"No sided trades on this market\".",{"start":5868,"end":5871},{"line":5869,"column":21,"offset":5870},202,11852,{"line":5869,"column":5394,"offset":5872},12039,{"start":5874,"end":5875},{"line":5869,"column":21,"offset":5870},{"line":5869,"column":5394,"offset":5872},{"type":27,"value":28},{"type":31,"tagName":246,"properties":5878,"children":5879,"position":5888},{},[5880],{"type":27,"value":5881,"position":5882},"Customize it",{"start":5883,"end":5886},{"line":5884,"column":254,"offset":5885},204,12044,{"line":5884,"column":5397,"offset":5887},12056,{"start":5889,"end":5891},{"line":5884,"column":21,"offset":5890},12041,{"line":5884,"column":5397,"offset":5887},{"type":27,"value":28},{"type":31,"tagName":5894,"properties":5895,"children":5896,"position":6239},"ul",{},[5897,5898,5950,5951,6000,6001,6127,6128,6238],{"type":27,"value":28},{"type":31,"tagName":5899,"properties":5900,"children":5901,"position":5946},"li",{},[5902,5920,5927,5939],{"type":31,"tagName":193,"properties":5903,"children":5904,"position":5914},{},[5905],{"type":27,"value":5906,"position":5907},"Faster swings.",{"start":5908,"end":5911},{"line":5909,"column":43,"offset":5910},206,12062,{"line":5909,"column":5912,"offset":5913},19,12076,{"start":5915,"end":5917},{"line":5909,"column":5415,"offset":5916},12060,{"line":5909,"column":5918,"offset":5919},21,12078,{"type":27,"value":5921,"position":5922}," Lower ",{"start":5923,"end":5924},{"line":5909,"column":5918,"offset":5919},{"line":5909,"column":5925,"offset":5926},28,12085,{"type":31,"tagName":81,"properties":5928,"children":5929,"position":5936},{},[5930],{"type":27,"value":5584,"position":5931},{"start":5932,"end":5933},{"line":5909,"column":5925,"offset":5926},{"line":5909,"column":5934,"offset":5935},35,12092,{"start":5937,"end":5938},{"line":5909,"column":5925,"offset":5926},{"line":5909,"column":5934,"offset":5935},{"type":27,"value":5940,"position":5941},"; more swings confirm and more pairs qualify.",{"start":5942,"end":5943},{"line":5909,"column":5934,"offset":5935},{"line":5909,"column":5944,"offset":5945},80,12137,{"start":5947,"end":5949},{"line":5909,"column":21,"offset":5948},12058,{"line":5909,"column":5944,"offset":5945},{"type":27,"value":28},{"type":31,"tagName":5899,"properties":5952,"children":5953,"position":5996},{},[5954,5970,5977,5989],{"type":31,"tagName":193,"properties":5955,"children":5956,"position":5965},{},[5957],{"type":27,"value":5958,"position":5959},"A session CVD.",{"start":5960,"end":5963},{"line":5961,"column":43,"offset":5962},207,12142,{"line":5961,"column":5912,"offset":5964},12156,{"start":5966,"end":5968},{"line":5961,"column":5415,"offset":5967},12140,{"line":5961,"column":5918,"offset":5969},12158,{"type":27,"value":5971,"position":5972}," Switch ",{"start":5973,"end":5974},{"line":5961,"column":5918,"offset":5969},{"line":5961,"column":5975,"offset":5976},29,12166,{"type":31,"tagName":81,"properties":5978,"children":5979,"position":5986},{},[5980],{"type":27,"value":5534,"position":5981},{"start":5982,"end":5983},{"line":5961,"column":5975,"offset":5976},{"line":5961,"column":5984,"offset":5985},40,12177,{"start":5987,"end":5988},{"line":5961,"column":5975,"offset":5976},{"line":5961,"column":5984,"offset":5985},{"type":27,"value":5990,"position":5991}," on to restart the sum at every UTC midnight.",{"start":5992,"end":5993},{"line":5961,"column":5984,"offset":5985},{"line":5961,"column":5994,"offset":5995},85,12222,{"start":5997,"end":5999},{"line":5961,"column":21,"offset":5998},12138,{"line":5961,"column":5994,"offset":5995},{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6002,"children":6003,"position":6123},{},[6004,6021,6028,6041,6047,6059,6065,6078,6085,6097,6104,6116],{"type":31,"tagName":193,"properties":6005,"children":6006,"position":6015},{},[6007],{"type":27,"value":6008,"position":6009},"Dollars instead of coins.",{"start":6010,"end":6012},{"line":5840,"column":43,"offset":6011},12227,{"line":5840,"column":6013,"offset":6014},30,12252,{"start":6016,"end":6018},{"line":5840,"column":5415,"offset":6017},12225,{"line":5840,"column":6019,"offset":6020},32,12254,{"type":27,"value":6022,"position":6023}," Add ",{"start":6024,"end":6025},{"line":5840,"column":6019,"offset":6020},{"line":5840,"column":6026,"offset":6027},37,12259,{"type":31,"tagName":81,"properties":6029,"children":6030,"position":6038},{},[6031],{"type":27,"value":6032,"position":6033},"currency: \"USD\"",{"start":6034,"end":6035},{"line":5840,"column":6026,"offset":6027},{"line":5840,"column":6036,"offset":6037},54,12276,{"start":6039,"end":6040},{"line":5840,"column":6026,"offset":6027},{"line":5840,"column":6036,"offset":6037},{"type":27,"value":6042,"position":6043}," to both ",{"start":6044,"end":6045},{"line":5840,"column":6036,"offset":6037},{"line":5840,"column":113,"offset":6046},12285,{"type":31,"tagName":81,"properties":6048,"children":6049,"position":6056},{},[6050],{"type":27,"value":85,"position":6051},{"start":6052,"end":6053},{"line":5840,"column":113,"offset":6046},{"line":5840,"column":6054,"offset":6055},78,12300,{"start":6057,"end":6058},{"line":5840,"column":113,"offset":6046},{"line":5840,"column":6054,"offset":6055},{"type":27,"value":6060,"position":6061}," inputs and declare ",{"start":6062,"end":6063},{"line":5840,"column":6054,"offset":6055},{"line":5840,"column":118,"offset":6064},12320,{"type":31,"tagName":81,"properties":6066,"children":6067,"position":6075},{},[6068],{"type":27,"value":6069,"position":6070},"format: \"usd\"",{"start":6071,"end":6072},{"line":5840,"column":118,"offset":6064},{"line":5840,"column":6073,"offset":6074},113,12335,{"start":6076,"end":6077},{"line":5840,"column":118,"offset":6064},{"line":5840,"column":6073,"offset":6074},{"type":27,"value":6079,"position":6080}," without the unit on ",{"start":6081,"end":6082},{"line":5840,"column":6073,"offset":6074},{"line":5840,"column":6083,"offset":6084},134,12356,{"type":31,"tagName":81,"properties":6086,"children":6087,"position":6094},{},[6088],{"type":27,"value":5455,"position":6089},{"start":6090,"end":6091},{"line":5840,"column":6083,"offset":6084},{"line":5840,"column":6092,"offset":6093},139,12361,{"start":6095,"end":6096},{"line":5840,"column":6083,"offset":6084},{"line":5840,"column":6092,"offset":6093},{"type":27,"value":6098,"position":6099}," and ",{"start":6100,"end":6101},{"line":5840,"column":6092,"offset":6093},{"line":5840,"column":6102,"offset":6103},144,12366,{"type":31,"tagName":81,"properties":6105,"children":6106,"position":6113},{},[6107],{"type":27,"value":5643,"position":6108},{"start":6109,"end":6110},{"line":5840,"column":6102,"offset":6103},{"line":5840,"column":6111,"offset":6112},155,12377,{"start":6114,"end":6115},{"line":5840,"column":6102,"offset":6103},{"line":5840,"column":6111,"offset":6112},{"type":27,"value":6117,"position":6118},": the sum is then each trade's notional, as the native Cumulative Volume Delta reads by default.",{"start":6119,"end":6120},{"line":5840,"column":6111,"offset":6112},{"line":5840,"column":6121,"offset":6122},251,12473,{"start":6124,"end":6126},{"line":5840,"column":21,"offset":6125},12223,{"line":5840,"column":6121,"offset":6122},{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6129,"children":6130,"position":6234},{},[6131,6147,6153,6165,6172,6184,6191,6203,6210,6228],{"type":31,"tagName":193,"properties":6132,"children":6133,"position":6142},{},[6134],{"type":27,"value":6135,"position":6136},"Alert on a divergence.",{"start":6137,"end":6140},{"line":6138,"column":43,"offset":6139},209,12478,{"line":6138,"column":5430,"offset":6141},12500,{"start":6143,"end":6145},{"line":6138,"column":5415,"offset":6144},12476,{"line":6138,"column":5975,"offset":6146},12502,{"type":27,"value":6148,"position":6149}," Bind ",{"start":6150,"end":6151},{"line":6138,"column":5975,"offset":6146},{"line":6138,"column":5934,"offset":6152},12508,{"type":31,"tagName":81,"properties":6154,"children":6155,"position":6162},{},[6156],{"type":27,"value":5754,"position":6157},{"start":6158,"end":6159},{"line":6138,"column":5934,"offset":6152},{"line":6138,"column":6160,"offset":6161},47,12520,{"start":6163,"end":6164},{"line":6138,"column":5934,"offset":6152},{"line":6138,"column":6160,"offset":6161},{"type":27,"value":6166,"position":6167}," to a ",{"start":6168,"end":6169},{"line":6138,"column":6160,"offset":6161},{"line":6138,"column":6170,"offset":6171},53,12526,{"type":31,"tagName":81,"properties":6173,"children":6174,"position":6181},{},[6175],{"type":27,"value":1078,"position":6176},{"start":6177,"end":6178},{"line":6138,"column":6170,"offset":6171},{"line":6138,"column":6179,"offset":6180},60,12533,{"start":6182,"end":6183},{"line":6138,"column":6170,"offset":6171},{"line":6138,"column":6179,"offset":6180},{"type":27,"value":6185,"position":6186}," and declare ",{"start":6187,"end":6188},{"line":6138,"column":6179,"offset":6180},{"line":6138,"column":6189,"offset":6190},73,12546,{"type":31,"tagName":81,"properties":6192,"children":6193,"position":6200},{},[6194],{"type":27,"value":6195,"position":6196},"alert(\"cvd_divergence\", { when: ... })",{"start":6197,"end":6198},{"line":6138,"column":6189,"offset":6190},{"line":6138,"column":6073,"offset":6199},12586,{"start":6201,"end":6202},{"line":6138,"column":6189,"offset":6190},{"line":6138,"column":6073,"offset":6199},{"type":27,"value":6204,"position":6205},": it fires on the bar a divergence confirms, since the output turns from 0 to -1 or +1 there. Once the indicator is published and on a chart, the signal is in the chart's alert dialog (",{"start":6206,"end":6207},{"line":6138,"column":6073,"offset":6199},{"line":6138,"column":6208,"offset":6209},298,12771,{"type":31,"tagName":102,"properties":6211,"children":6213,"position":6223},{"href":6212},"../functions/alerts.md",[6214],{"type":27,"value":6215,"position":6216},"Alerts",{"start":6217,"end":6220},{"line":6138,"column":6218,"offset":6219},299,12772,{"line":6138,"column":6221,"offset":6222},305,12778,{"start":6224,"end":6225},{"line":6138,"column":6208,"offset":6209},{"line":6138,"column":6226,"offset":6227},330,12803,{"type":27,"value":4921,"position":6229},{"start":6230,"end":6231},{"line":6138,"column":6226,"offset":6227},{"line":6138,"column":6232,"offset":6233},332,12805,{"start":6235,"end":6237},{"line":6138,"column":21,"offset":6236},12474,{"line":6138,"column":6232,"offset":6233},{"type":27,"value":28},{"start":6240,"end":6241},{"line":5909,"column":21,"offset":5948},{"line":6138,"column":6232,"offset":6233},{"type":27,"value":28},{"type":31,"tagName":246,"properties":6244,"children":6245,"position":6255},{},[6246],{"type":27,"value":6247,"position":6248},"Run it",{"start":6249,"end":6252},{"line":6250,"column":254,"offset":6251},211,12810,{"line":6250,"column":6253,"offset":6254},10,12816,{"start":6256,"end":6258},{"line":6250,"column":21,"offset":6257},12807,{"line":6250,"column":6253,"offset":6254},{"type":27,"value":28},{"type":31,"tagName":6261,"properties":6262,"children":6263,"position":6421},"ol",{},[6264,6265,6346,6347,6384,6385,6420],{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6266,"children":6267,"position":6342},{},[6268,6276,6291,6298,6313,6320,6335],{"type":27,"value":6269,"position":6270},"In the editor's Explorer, press the ",{"start":6271,"end":6274},{"line":6272,"column":254,"offset":6273},213,12821,{"line":6272,"column":5984,"offset":6275},12857,{"type":31,"tagName":193,"properties":6277,"children":6278,"position":6287},{},[6279],{"type":27,"value":6280,"position":6281},"Templates",{"start":6282,"end":6285},{"line":6272,"column":6283,"offset":6284},42,12859,{"line":6272,"column":110,"offset":6286},12868,{"start":6288,"end":6289},{"line":6272,"column":5984,"offset":6275},{"line":6272,"column":6170,"offset":6290},12870,{"type":27,"value":6292,"position":6293}," icon (\"Browse starter templates\") and pick ",{"start":6294,"end":6295},{"line":6272,"column":6170,"offset":6290},{"line":6272,"column":6296,"offset":6297},97,12914,{"type":31,"tagName":193,"properties":6299,"children":6300,"position":6308},{},[6301],{"type":27,"value":197,"position":6302},{"start":6303,"end":6306},{"line":6272,"column":6304,"offset":6305},99,12916,{"line":6272,"column":6073,"offset":6307},12930,{"start":6309,"end":6310},{"line":6272,"column":6296,"offset":6297},{"line":6272,"column":6311,"offset":6312},115,12932,{"type":27,"value":6314,"position":6315}," under ",{"start":6316,"end":6317},{"line":6272,"column":6311,"offset":6312},{"line":6272,"column":6318,"offset":6319},122,12939,{"type":31,"tagName":193,"properties":6321,"children":6322,"position":6330},{},[6323],{"type":27,"value":221,"position":6324},{"start":6325,"end":6328},{"line":6272,"column":6326,"offset":6327},124,12941,{"line":6272,"column":6083,"offset":6329},12951,{"start":6331,"end":6332},{"line":6272,"column":6318,"offset":6319},{"line":6272,"column":6333,"offset":6334},136,12953,{"type":27,"value":6336,"position":6337},".",{"start":6338,"end":6339},{"line":6272,"column":6333,"offset":6334},{"line":6272,"column":6340,"offset":6341},137,12954,{"start":6343,"end":6345},{"line":6272,"column":21,"offset":6344},12818,{"line":6272,"column":6340,"offset":6341},{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6348,"children":6349,"position":6380},{},[6350,6358,6374],{"type":27,"value":6351,"position":6352},"Press ",{"start":6353,"end":6356},{"line":6354,"column":254,"offset":6355},214,12958,{"line":6354,"column":6253,"offset":6357},12964,{"type":31,"tagName":193,"properties":6359,"children":6360,"position":6370},{},[6361],{"type":27,"value":6362,"position":6363},"Run",{"start":6364,"end":6367},{"line":6354,"column":6365,"offset":6366},12,12966,{"line":6354,"column":6368,"offset":6369},15,12969,{"start":6371,"end":6372},{"line":6354,"column":6253,"offset":6357},{"line":6354,"column":5823,"offset":6373},12971,{"type":27,"value":6375,"position":6376}," on a crypto perp or spot market: CVD draws in its own pane, and the evidence lines appear where a divergence confirmed.",{"start":6377,"end":6378},{"line":6354,"column":5823,"offset":6373},{"line":6354,"column":6340,"offset":6379},13091,{"start":6381,"end":6383},{"line":6354,"column":21,"offset":6382},12955,{"line":6354,"column":6340,"offset":6379},{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6386,"children":6387,"position":6416},{},[6388,6396,6409],{"type":27,"value":6389,"position":6390},"At the editor's Console prompt, type ",{"start":6391,"end":6394},{"line":6392,"column":254,"offset":6393},215,13095,{"line":6392,"column":89,"offset":6395},13132,{"type":31,"tagName":81,"properties":6397,"children":6398,"position":6406},{},[6399],{"type":27,"value":6400,"position":6401},"last 60 divergence",{"start":6402,"end":6403},{"line":6392,"column":89,"offset":6395},{"line":6392,"column":6404,"offset":6405},61,13152,{"start":6407,"end":6408},{"line":6392,"column":89,"offset":6395},{"line":6392,"column":6404,"offset":6405},{"type":27,"value":6410,"position":6411}," to read the sign on each of the last 60 bars.",{"start":6412,"end":6413},{"line":6392,"column":6404,"offset":6405},{"line":6392,"column":6414,"offset":6415},107,13198,{"start":6417,"end":6419},{"line":6392,"column":21,"offset":6418},13092,{"line":6392,"column":6414,"offset":6415},{"type":27,"value":28},{"start":6422,"end":6423},{"line":6272,"column":21,"offset":6344},{"line":6392,"column":6414,"offset":6415},{"type":27,"value":28},{"type":31,"tagName":246,"properties":6426,"children":6427,"position":6436},{},[6428],{"type":27,"value":6429,"position":6430},"Concepts used",{"start":6431,"end":6434},{"line":6432,"column":254,"offset":6433},217,13203,{"line":6432,"column":5823,"offset":6435},13216,{"start":6437,"end":6439},{"line":6432,"column":21,"offset":6438},13200,{"line":6432,"column":5823,"offset":6435},{"type":27,"value":28},{"type":31,"tagName":5894,"properties":6442,"children":6443,"position":6607},{},[6444,6445,6513,6514,6543,6544,6606],{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6446,"children":6447,"position":6509},{},[6448,6463,6469,6482,6489,6502],{"type":31,"tagName":102,"properties":6449,"children":6450,"position":6458},{"href":104},[6451],{"type":27,"value":107,"position":6452},{"start":6453,"end":6456},{"line":6454,"column":254,"offset":6455},219,13221,{"line":6454,"column":5397,"offset":6457},13233,{"start":6459,"end":6461},{"line":6454,"column":5415,"offset":6460},13220,{"line":6454,"column":110,"offset":6462},13268,{"type":27,"value":6464,"position":6465}," for the ",{"start":6466,"end":6467},{"line":6454,"column":110,"offset":6462},{"line":6454,"column":6179,"offset":6468},13277,{"type":31,"tagName":81,"properties":6470,"children":6471,"position":6479},{},[6472],{"type":27,"value":6473,"position":6474},"trades",{"start":6475,"end":6476},{"line":6454,"column":6179,"offset":6468},{"line":6454,"column":6477,"offset":6478},68,13285,{"start":6480,"end":6481},{"line":6454,"column":6179,"offset":6468},{"line":6454,"column":6477,"offset":6478},{"type":27,"value":6483,"position":6484}," source, its sides and the ",{"start":6485,"end":6486},{"line":6454,"column":6477,"offset":6478},{"line":6454,"column":6487,"offset":6488},95,13312,{"type":31,"tagName":81,"properties":6490,"children":6491,"position":6499},{},[6492],{"type":27,"value":6493,"position":6494},"missing",{"start":6495,"end":6496},{"line":6454,"column":6487,"offset":6488},{"line":6454,"column":6497,"offset":6498},104,13321,{"start":6500,"end":6501},{"line":6454,"column":6487,"offset":6488},{"line":6454,"column":6497,"offset":6498},{"type":27,"value":6503,"position":6504}," policy",{"start":6505,"end":6506},{"line":6454,"column":6497,"offset":6498},{"line":6454,"column":6507,"offset":6508},111,13328,{"start":6510,"end":6512},{"line":6454,"column":21,"offset":6511},13218,{"line":6454,"column":6507,"offset":6508},{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6515,"children":6516,"position":6539},{},[6517,6533],{"type":31,"tagName":102,"properties":6518,"children":6519,"position":6527},{"href":149},[6520],{"type":27,"value":152,"position":6521},{"start":6522,"end":6525},{"line":6523,"column":254,"offset":6524},220,13332,{"line":6523,"column":5912,"offset":6526},13347,{"start":6528,"end":6530},{"line":6523,"column":5415,"offset":6529},13331,{"line":6523,"column":6531,"offset":6532},56,13384,{"type":27,"value":6534,"position":6535}," for line, polyline and label handles and the lower-pane placement",{"start":6536,"end":6537},{"line":6523,"column":6531,"offset":6532},{"line":6523,"column":6318,"offset":6538},13450,{"start":6540,"end":6542},{"line":6523,"column":21,"offset":6541},13329,{"line":6523,"column":6318,"offset":6538},{"type":27,"value":28},{"type":31,"tagName":5899,"properties":6545,"children":6546,"position":6602},{},[6547,6564,6570,6582,6589],{"type":31,"tagName":102,"properties":6548,"children":6550,"position":6559},{"href":6549},"../presentation/plotting.md",[6551],{"type":27,"value":6552,"position":6553},"Plotting",{"start":6554,"end":6557},{"line":6555,"column":254,"offset":6556},221,13454,{"line":6555,"column":6365,"offset":6558},13462,{"start":6560,"end":6562},{"line":6555,"column":5415,"offset":6561},13453,{"line":6555,"column":6283,"offset":6563},13492,{"type":27,"value":6565,"position":6566}," for ",{"start":6567,"end":6568},{"line":6555,"column":6283,"offset":6563},{"line":6555,"column":6160,"offset":6569},13497,{"type":31,"tagName":81,"properties":6571,"children":6572,"position":6579},{},[6573],{"type":27,"value":6574,"position":6575},"shape_where",{"start":6576,"end":6577},{"line":6555,"column":6160,"offset":6569},{"line":6555,"column":6179,"offset":6578},13510,{"start":6580,"end":6581},{"line":6555,"column":6160,"offset":6569},{"line":6555,"column":6179,"offset":6578},{"type":27,"value":6583,"position":6584}," gates and ",{"start":6585,"end":6586},{"line":6555,"column":6179,"offset":6578},{"line":6555,"column":6587,"offset":6588},71,13521,{"type":31,"tagName":81,"properties":6590,"children":6591,"position":6599},{},[6592],{"type":27,"value":6593,"position":6594},"displacement_bars_by",{"start":6595,"end":6596},{"line":6555,"column":6587,"offset":6588},{"line":6555,"column":6597,"offset":6598},93,13543,{"start":6600,"end":6601},{"line":6555,"column":6587,"offset":6588},{"line":6555,"column":6597,"offset":6598},{"start":6603,"end":6605},{"line":6555,"column":21,"offset":6604},13451,{"line":6555,"column":6597,"offset":6598},{"type":27,"value":28},{"start":6608,"end":6609},{"line":6454,"column":21,"offset":6511},{"line":6555,"column":6597,"offset":6598},{"quirksMode":6611},false,{"start":6613,"end":6614},{"line":21,"column":21,"offset":22},{"line":6615,"column":21,"offset":6616},222,13544,1791265154838]