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