oakscriptjs 0.10.1 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/array/index.d.ts +8 -2
- package/dist/cjs/array/index.d.ts.map +1 -1
- package/dist/cjs/array/index.js +2 -1
- package/dist/cjs/array/index.js.map +2 -2
- package/dist/cjs/box/index.d.ts.map +1 -1
- package/dist/cjs/box/index.js +7 -1
- package/dist/cjs/box/index.js.map +2 -2
- package/dist/cjs/callsite/index.d.ts +73 -32
- package/dist/cjs/callsite/index.d.ts.map +1 -1
- package/dist/cjs/callsite/index.js +69 -65
- package/dist/cjs/callsite/index.js.map +2 -2
- package/dist/cjs/drawing/registry.d.ts +84 -0
- package/dist/cjs/drawing/registry.d.ts.map +1 -1
- package/dist/cjs/drawing/registry.js +153 -6
- package/dist/cjs/drawing/registry.js.map +2 -2
- package/dist/cjs/index.d.ts +8 -2
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +33 -1
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/input.d.ts +9 -1
- package/dist/cjs/input.d.ts.map +1 -1
- package/dist/cjs/input.js +16 -0
- package/dist/cjs/input.js.map +2 -2
- package/dist/cjs/label/index.d.ts.map +1 -1
- package/dist/cjs/label/index.js +3 -0
- package/dist/cjs/label/index.js.map +2 -2
- package/dist/cjs/line/index.d.ts +10 -27
- package/dist/cjs/line/index.d.ts.map +1 -1
- package/dist/cjs/line/index.js +11 -22
- package/dist/cjs/line/index.js.map +2 -2
- package/dist/cjs/linefill/index.d.ts +3 -0
- package/dist/cjs/linefill/index.d.ts.map +1 -1
- package/dist/cjs/linefill/index.js +15 -1
- package/dist/cjs/linefill/index.js.map +3 -3
- package/dist/cjs/math/index.d.ts.map +1 -1
- package/dist/cjs/math/index.js +2 -0
- package/dist/cjs/math/index.js.map +2 -2
- package/dist/cjs/polyline/index.d.ts.map +1 -1
- package/dist/cjs/polyline/index.js +3 -0
- package/dist/cjs/polyline/index.js.map +2 -2
- package/dist/cjs/runtime/adapters/SimpleInputAdapter.js +1 -1
- package/dist/cjs/runtime/adapters/SimpleInputAdapter.js.map +2 -2
- package/dist/cjs/runtime/index.d.ts +1 -1
- package/dist/cjs/runtime/index.d.ts.map +1 -1
- package/dist/cjs/runtime/index.js +1 -0
- package/dist/cjs/runtime/index.js.map +2 -2
- package/dist/cjs/runtime/inputs.d.ts +9 -0
- package/dist/cjs/runtime/inputs.d.ts.map +1 -1
- package/dist/cjs/runtime/inputs.js +8 -0
- package/dist/cjs/runtime/inputs.js.map +2 -2
- package/dist/cjs/runtime/types.d.ts +1 -1
- package/dist/cjs/runtime/types.d.ts.map +1 -1
- package/dist/cjs/runtime/types.js.map +1 -1
- package/dist/cjs/script/index.d.ts +91 -21
- package/dist/cjs/script/index.d.ts.map +1 -1
- package/dist/cjs/script/index.js +207 -19
- package/dist/cjs/script/index.js.map +3 -3
- package/dist/cjs/security/other.d.ts +92 -0
- package/dist/cjs/security/other.d.ts.map +1 -0
- package/dist/cjs/security/other.js +164 -0
- package/dist/cjs/security/other.js.map +7 -0
- package/dist/cjs/session/bars.d.ts +24 -1
- package/dist/cjs/session/bars.d.ts.map +1 -1
- package/dist/cjs/session/bars.js +56 -7
- package/dist/cjs/session/bars.js.map +3 -3
- package/dist/cjs/session/calendar.d.ts +13 -2
- package/dist/cjs/session/calendar.d.ts.map +1 -1
- package/dist/cjs/session/calendar.js +39 -9
- package/dist/cjs/session/calendar.js.map +2 -2
- package/dist/cjs/session/context.d.ts +76 -0
- package/dist/cjs/session/context.d.ts.map +1 -0
- package/dist/cjs/session/context.js +114 -0
- package/dist/cjs/session/context.js.map +7 -0
- package/dist/cjs/str/floatingdecimal.d.ts +31 -0
- package/dist/cjs/str/floatingdecimal.d.ts.map +1 -0
- package/dist/cjs/str/floatingdecimal.js +298 -0
- package/dist/cjs/str/floatingdecimal.js.map +7 -0
- package/dist/cjs/str/index.d.ts +4 -1
- package/dist/cjs/str/index.d.ts.map +1 -1
- package/dist/cjs/str/index.js +2 -1
- package/dist/cjs/str/index.js.map +2 -2
- package/dist/cjs/str/numberformat.d.ts +7 -3
- package/dist/cjs/str/numberformat.d.ts.map +1 -1
- package/dist/cjs/str/numberformat.js +4 -3
- package/dist/cjs/str/numberformat.js.map +2 -2
- package/dist/cjs/ta/index.d.ts +67 -34
- package/dist/cjs/ta/index.d.ts.map +1 -1
- package/dist/cjs/ta/index.js +202 -145
- package/dist/cjs/ta/index.js.map +2 -2
- package/dist/cjs/ta/limits.d.ts +35 -0
- package/dist/cjs/ta/limits.d.ts.map +1 -0
- package/dist/cjs/ta/limits.js +64 -0
- package/dist/cjs/ta/limits.js.map +7 -0
- package/dist/cjs/ta/running-sum.d.ts +0 -16
- package/dist/cjs/ta/running-sum.d.ts.map +1 -1
- package/dist/cjs/ta/running-sum.js +2 -0
- package/dist/cjs/ta/running-sum.js.map +2 -2
- package/dist/cjs/ta-series.d.ts +8 -8
- package/dist/cjs/ta-series.d.ts.map +1 -1
- package/dist/cjs/ta-series.js +10 -8
- package/dist/cjs/ta-series.js.map +2 -2
- package/dist/cjs/table/index.d.ts +3 -1
- package/dist/cjs/table/index.d.ts.map +1 -1
- package/dist/cjs/table/index.js +1 -0
- package/dist/cjs/table/index.js.map +3 -3
- package/dist/cjs/time/index.d.ts +5 -2
- package/dist/cjs/time/index.d.ts.map +1 -1
- package/dist/cjs/time/index.js +2 -2
- package/dist/cjs/time/index.js.map +2 -2
- package/dist/cjs/time/session.d.ts +26 -1
- package/dist/cjs/time/session.d.ts.map +1 -1
- package/dist/cjs/time/session.js +94 -12
- package/dist/cjs/time/session.js.map +3 -3
- package/dist/cjs/time/timezone.d.ts +6 -1
- package/dist/cjs/time/timezone.d.ts.map +1 -1
- package/dist/cjs/time/timezone.js +2 -2
- package/dist/cjs/time/timezone.js.map +2 -2
- package/dist/cjs/types/metadata.d.ts +28 -4
- package/dist/cjs/types/metadata.d.ts.map +1 -1
- package/dist/cjs/types/metadata.js.map +1 -1
- package/dist/esm/array/index.d.ts +8 -2
- package/dist/esm/array/index.d.ts.map +1 -1
- package/dist/esm/array/index.js +12 -3
- package/dist/esm/array/index.js.map +1 -1
- package/dist/esm/box/index.d.ts.map +1 -1
- package/dist/esm/box/index.js +8 -2
- package/dist/esm/box/index.js.map +1 -1
- package/dist/esm/callsite/index.d.ts +73 -32
- package/dist/esm/callsite/index.d.ts.map +1 -1
- package/dist/esm/callsite/index.js +143 -106
- package/dist/esm/callsite/index.js.map +1 -1
- package/dist/esm/drawing/registry.d.ts +84 -0
- package/dist/esm/drawing/registry.d.ts.map +1 -1
- package/dist/esm/drawing/registry.js +260 -6
- package/dist/esm/drawing/registry.js.map +1 -1
- package/dist/esm/index.d.ts +8 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +13 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/input.d.ts +9 -1
- package/dist/esm/input.d.ts.map +1 -1
- package/dist/esm/input.js +16 -0
- package/dist/esm/input.js.map +1 -1
- package/dist/esm/label/index.d.ts.map +1 -1
- package/dist/esm/label/index.js +4 -1
- package/dist/esm/label/index.js.map +1 -1
- package/dist/esm/line/index.d.ts +10 -27
- package/dist/esm/line/index.d.ts.map +1 -1
- package/dist/esm/line/index.js +22 -60
- package/dist/esm/line/index.js.map +1 -1
- package/dist/esm/linefill/index.d.ts +3 -0
- package/dist/esm/linefill/index.d.ts.map +1 -1
- package/dist/esm/linefill/index.js +20 -1
- package/dist/esm/linefill/index.js.map +1 -1
- package/dist/esm/math/index.d.ts.map +1 -1
- package/dist/esm/math/index.js +3 -0
- package/dist/esm/math/index.js.map +1 -1
- package/dist/esm/polyline/index.d.ts.map +1 -1
- package/dist/esm/polyline/index.js +5 -1
- package/dist/esm/polyline/index.js.map +1 -1
- package/dist/esm/runtime/adapters/SimpleInputAdapter.js +1 -1
- package/dist/esm/runtime/adapters/SimpleInputAdapter.js.map +1 -1
- package/dist/esm/runtime/index.d.ts +1 -1
- package/dist/esm/runtime/index.d.ts.map +1 -1
- package/dist/esm/runtime/index.js +1 -1
- package/dist/esm/runtime/index.js.map +1 -1
- package/dist/esm/runtime/inputs.d.ts +9 -0
- package/dist/esm/runtime/inputs.d.ts.map +1 -1
- package/dist/esm/runtime/inputs.js +15 -0
- package/dist/esm/runtime/inputs.js.map +1 -1
- package/dist/esm/runtime/types.d.ts +1 -1
- package/dist/esm/runtime/types.d.ts.map +1 -1
- package/dist/esm/script/index.d.ts +91 -21
- package/dist/esm/script/index.d.ts.map +1 -1
- package/dist/esm/script/index.js +259 -28
- package/dist/esm/script/index.js.map +1 -1
- package/dist/esm/security/other.d.ts +92 -0
- package/dist/esm/security/other.d.ts.map +1 -0
- package/dist/esm/security/other.js +211 -0
- package/dist/esm/security/other.js.map +1 -0
- package/dist/esm/session/bars.d.ts +24 -1
- package/dist/esm/session/bars.d.ts.map +1 -1
- package/dist/esm/session/bars.js +75 -6
- package/dist/esm/session/bars.js.map +1 -1
- package/dist/esm/session/calendar.d.ts +13 -2
- package/dist/esm/session/calendar.d.ts.map +1 -1
- package/dist/esm/session/calendar.js +54 -10
- package/dist/esm/session/calendar.js.map +1 -1
- package/dist/esm/session/context.d.ts +76 -0
- package/dist/esm/session/context.d.ts.map +1 -0
- package/dist/esm/session/context.js +124 -0
- package/dist/esm/session/context.js.map +1 -0
- package/dist/esm/str/floatingdecimal.d.ts +31 -0
- package/dist/esm/str/floatingdecimal.d.ts.map +1 -0
- package/dist/esm/str/floatingdecimal.js +272 -0
- package/dist/esm/str/floatingdecimal.js.map +1 -0
- package/dist/esm/str/index.d.ts +4 -1
- package/dist/esm/str/index.d.ts.map +1 -1
- package/dist/esm/str/index.js +9 -2
- package/dist/esm/str/index.js.map +1 -1
- package/dist/esm/str/numberformat.d.ts +7 -3
- package/dist/esm/str/numberformat.d.ts.map +1 -1
- package/dist/esm/str/numberformat.js +11 -5
- package/dist/esm/str/numberformat.js.map +1 -1
- package/dist/esm/ta/index.d.ts +67 -34
- package/dist/esm/ta/index.d.ts.map +1 -1
- package/dist/esm/ta/index.js +284 -240
- package/dist/esm/ta/index.js.map +1 -1
- package/dist/esm/ta/limits.d.ts +35 -0
- package/dist/esm/ta/limits.d.ts.map +1 -0
- package/dist/esm/ta/limits.js +67 -0
- package/dist/esm/ta/limits.js.map +1 -0
- package/dist/esm/ta/running-sum.d.ts +0 -16
- package/dist/esm/ta/running-sum.d.ts.map +1 -1
- package/dist/esm/ta/running-sum.js +2 -0
- package/dist/esm/ta/running-sum.js.map +1 -1
- package/dist/esm/ta-series.d.ts +8 -8
- package/dist/esm/ta-series.d.ts.map +1 -1
- package/dist/esm/ta-series.js +11 -8
- package/dist/esm/ta-series.js.map +1 -1
- package/dist/esm/table/index.d.ts +3 -1
- package/dist/esm/table/index.d.ts.map +1 -1
- package/dist/esm/table/index.js +6 -1
- package/dist/esm/table/index.js.map +1 -1
- package/dist/esm/time/index.d.ts +5 -2
- package/dist/esm/time/index.d.ts.map +1 -1
- package/dist/esm/time/index.js +6 -3
- package/dist/esm/time/index.js.map +1 -1
- package/dist/esm/time/session.d.ts +26 -1
- package/dist/esm/time/session.d.ts.map +1 -1
- package/dist/esm/time/session.js +141 -16
- package/dist/esm/time/session.js.map +1 -1
- package/dist/esm/time/timezone.d.ts +6 -1
- package/dist/esm/time/timezone.d.ts.map +1 -1
- package/dist/esm/time/timezone.js +8 -2
- package/dist/esm/time/timezone.js.map +1 -1
- package/dist/esm/types/metadata.d.ts +28 -4
- package/dist/esm/types/metadata.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/array/index.ts +11 -3
- package/src/box/index.ts +8 -2
- package/src/callsite/index.ts +150 -100
- package/src/drawing/registry.ts +278 -5
- package/src/index.ts +44 -1
- package/src/input.ts +18 -1
- package/src/label/index.ts +4 -1
- package/src/line/index.ts +22 -64
- package/src/linefill/index.ts +20 -1
- package/src/math/index.ts +2 -0
- package/src/polyline/index.ts +3 -1
- package/src/runtime/adapters/SimpleInputAdapter.ts +1 -1
- package/src/runtime/index.ts +1 -0
- package/src/runtime/inputs.ts +16 -0
- package/src/runtime/types.ts +1 -1
- package/src/script/index.ts +355 -34
- package/src/security/other.ts +269 -0
- package/src/session/bars.ts +70 -6
- package/src/session/calendar.ts +60 -10
- package/src/session/context.ts +162 -0
- package/src/str/floatingdecimal.ts +268 -0
- package/src/str/index.ts +8 -2
- package/src/str/numberformat.ts +13 -6
- package/src/ta/index.ts +304 -248
- package/src/ta/limits.ts +74 -0
- package/src/ta/running-sum.ts +2 -0
- package/src/ta-series.ts +19 -16
- package/src/table/index.ts +4 -1
- package/src/time/index.ts +6 -3
- package/src/time/session.ts +137 -15
- package/src/time/timezone.ts +9 -2
- package/src/types/metadata.ts +28 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/str/numberformat.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Number patterns (\"#.##\", \"#,##0.00\", \"0.00E0\", \"#.##%\", \"'#'#.##\") as PineScript formats them.\n *\n * The pattern syntax is Java's DecimalFormat: `0` required digit, `#` optional digit, `,` grouping,\n * `.` decimal point, `E0` exponent, `%` multiplies by 100, `'...'` quoted literal text.\n * PineScript rules:\n * - `str.tostring` rounds half away from zero on the shortest decimal form of the number\n * (`1.005` with \"#.##\" gives \"1.01\", `2.5` with \"#\" gives \"3\")\n * - `str.format` rounds half to even on the exact binary value (`0.25` with \"#.#\" gives \"0.2\")\n * - a negative number that rounds to zero loses its sign; \"#.00\" writes `.50` (no leading zero),\n * but \"#.##\" writes `0.5` (a pattern without any '0' shows one integer digit)\n * - with an exponent, the value is first rounded to the fraction digits (\"0.00E0\": 0.125 gives \"1.30E-1\")\n * - a pattern without digit characters (`format.price` is \"price\") formats like \"#\" after its text,\n * and keeps the sign: -0.004 gives \"-price0\"\n * - \"pos;neg\": a negative number uses the text around the digits of the negative subpattern instead of \"-\"\n * (\"#.##;(#.##)\" gives \"(3.5)\" for -3.5); the digits follow the positive subpattern, as in Java\n * - at most 16 decimals when |x| >= 1e-3 (the shortest digits of a double never have more there):\n * 0.1 with 20 '#' decimals gives \"0.1\" in both rounding modes\n */\n\nexport type Rounding = 'halfUpShortest' | 'halfEvenExact';\n\ninterface Pattern {\n prefix: string;\n suffix: string;\n /** Text around the digits of the negative subpattern (\"pos;neg\"), or null without one */\n negPrefix: string | null;\n negSuffix: string | null;\n minInt: number;\n minFrac: number;\n maxFrac: number;\n /** Digits per group, 0 without grouping */\n grouping: number;\n percent: boolean;\n /** Minimum exponent digits, or null without exponent */\n exponent: number | null;\n hasDigits: boolean;\n}\n\nconst patterns = new Map<string, Pattern>();\n\n/** Index of the first ';' outside quotes, or -1. */\nfunction subpatternSplit(pattern: string): number {\n let quoted = false;\n for (let i = 0; i < pattern.length; i++) {\n if (pattern[i] === \"'\") quoted = !quoted;\n else if (pattern[i] === ';' && !quoted) return i;\n }\n return -1;\n}\n\nfunction parsePattern(pattern: string): Pattern {\n const cached = patterns.get(pattern);\n if (cached) return cached;\n const semi = subpatternSplit(pattern);\n if (semi !== -1) {\n // only the text around the digits of the negative subpattern is used\n const neg = parsePattern(pattern.slice(semi + 1));\n const parsed = { ...parsePattern(pattern.slice(0, semi)), negPrefix: neg.prefix, negSuffix: neg.suffix };\n patterns.set(pattern, parsed);\n return parsed;\n }\n\n let prefix = '';\n let suffix = '';\n let number = '';\n let percent = false;\n let phase: 'prefix' | 'number' | 'suffix' = 'prefix';\n for (let i = 0; i < pattern.length; i++) {\n const ch = pattern[i]!;\n let literal: string;\n if (ch === \"'\") {\n const end = pattern.indexOf(\"'\", i + 1);\n if (end === i + 1) {\n literal = \"'\";\n i = end;\n } else {\n literal = pattern.slice(i + 1, end === -1 ? undefined : end);\n i = end === -1 ? pattern.length : end;\n }\n } else if (phase !== 'suffix' && ('#0,.'.includes(ch) || (phase === 'number' && ch === 'E'))) {\n phase = 'number';\n number += ch;\n continue;\n } else {\n if (ch === '%') percent = true;\n literal = ch;\n }\n if (phase === 'number') phase = 'suffix';\n if (phase === 'prefix') prefix += literal;\n else suffix += literal;\n }\n\n const [mantissa = '', exp] = number.split('E');\n const [intPart = '', fracPart = ''] = mantissa.split('.');\n const lastComma = intPart.lastIndexOf(',');\n const parsed: Pattern = {\n prefix,\n suffix,\n negPrefix: null,\n negSuffix: null,\n // as in Java, a pattern with a decimal point and no '0' at all (\"#.##\") shows one integer digit\n minInt: !mantissa.includes('0') && mantissa.includes('.') ? 1 : [...intPart].filter((c) => c === '0').length,\n minFrac: [...fracPart].filter((c) => c === '0').length,\n maxFrac: [...fracPart].filter((c) => c === '0' || c === '#').length,\n grouping: lastComma === -1 ? 0 : intPart.length - lastComma - 1,\n percent,\n exponent: exp === undefined ? null : exp.length,\n hasDigits: /[0#]/.test(mantissa),\n };\n patterns.set(pattern, parsed);\n return parsed;\n}\n\n/** Decimal digits of |x|: value = 0.d1d2d3... \u00D7 10^intLen (no leading zero digit; \"\" for 0). */\ninterface Digits {\n digits: string;\n intLen: number;\n}\n\nfunction shortestDigits(x: number): Digits {\n const m = /^(\\d+)(?:\\.(\\d+))?(?:e([+-]\\d+))?$/.exec(String(Math.abs(x)))!;\n const all = m[1]! + (m[2] ?? '');\n let intLen = m[1]!.length + Number(m[3] ?? 0);\n const lead = all.length - all.replace(/^0+/, '').length;\n intLen -= lead;\n const digits = all.slice(lead).replace(/0+$/, '');\n return { digits, intLen: digits ? intLen : 0 };\n}\n\n/** Exact decimal expansion of the double |x|. */\nfunction exactDigits(x: number): Digits {\n const abs = Math.abs(x);\n if (abs === 0) return { digits: '', intLen: 0 };\n const view = new DataView(new ArrayBuffer(8));\n view.setFloat64(0, abs);\n const bits = view.getBigUint64(0);\n const expBits = Number((bits >> 52n) & 0x7ffn);\n let mant = bits & 0xfffffffffffffn;\n const e2 = expBits === 0 ? -1074 : expBits - 1075;\n if (expBits !== 0) mant |= 1n << 52n;\n let str: string;\n let fracDigits: number;\n if (e2 >= 0) {\n str = (mant << BigInt(e2)).toString();\n fracDigits = 0;\n } else {\n str = (mant * 5n ** BigInt(-e2)).toString();\n fracDigits = -e2;\n }\n const intLen = str.length - fracDigits;\n const lead = str.length - str.replace(/^0+/, '').length;\n const digits = str.slice(lead).replace(/0+$/, '');\n return { digits, intLen: intLen - lead };\n}\n\n/** Rounds to `frac` digits after the point. */\nfunction roundDigits(d: Digits, frac: number, mode: Rounding): Digits {\n const keep = d.intLen + frac;\n if (keep >= d.digits.length) return d;\n if (keep < 0) return { digits: '', intLen: 0 };\n const first = d.digits.charCodeAt(keep) - 48;\n let up: boolean;\n if (mode === 'halfUpShortest') up = first >= 5;\n else if (first !== 5) up = first > 5;\n else if (d.digits.length > keep + 1) up = true;\n else up = keep > 0 && (d.digits.charCodeAt(keep - 1) - 48) % 2 === 1;\n let kept = d.digits.slice(0, keep);\n let intLen = d.intLen;\n if (up) {\n const n = (BigInt(kept || '0') + 1n).toString();\n if (n.length > kept.length) intLen += 1;\n kept = n;\n }\n kept = kept.replace(/0+$/, '');\n return { digits: kept, intLen: kept ? intLen : 0 };\n}\n\nfunction group(int: string, size: number): string {\n if (!size || int.length <= size) return int;\n const parts: string[] = [];\n for (let end = int.length; end > 0; end -= size) parts.unshift(int.slice(Math.max(0, end - size), end));\n return parts.join(',');\n}\n\nfunction layout(d: Digits, p: Pattern): string {\n let int = d.intLen > 0 ? d.digits.slice(0, d.intLen).padEnd(d.intLen, '0') : '';\n int = int.replace(/^0+/, '').padStart(p.minInt, '0');\n let frac = d.intLen < 0 ? '0'.repeat(-d.intLen) + d.digits : d.digits.slice(Math.max(0, d.intLen));\n frac = frac.slice(0, p.maxFrac).replace(/0+$/, '').padEnd(p.minFrac, '0');\n if (!int && !frac) int = '0';\n return group(int, p.grouping) + (frac ? '.' + frac : '');\n}\n\n/** Formats a number with a DecimalFormat pattern. */\nexport function formatNumber(value: number, pattern: string, mode: Rounding): string {\n if (Number.isNaN(value)) return 'NaN';\n const p = parsePattern(pattern);\n if (!Number.isFinite(value)) return affixes(p, value < 0, '\u221E');\n const x = p.percent ? value * 100 : value;\n const toDigits = mode === 'halfUpShortest' ? shortestDigits : exactDigits;\n\n let body: string;\n let isZero: boolean;\n if (p.exponent !== null) {\n const rounded = roundDigits(toDigits(x), p.maxFrac, mode);\n const intDigits = Math.max(p.minInt, 1);\n isZero = rounded.digits === '';\n let exponent = isZero ? 0 : rounded.intLen - intDigits;\n let mant = roundDigits({ digits: rounded.digits, intLen: isZero ? 0 : intDigits }, p.maxFrac, mode);\n if (mant.intLen > intDigits) {\n exponent += 1;\n mant = { digits: mant.digits, intLen: intDigits };\n }\n const e = String(Math.abs(exponent)).padStart(p.exponent, '0');\n body = layout(mant, p) + 'E' + (exponent < 0 ? '-' : '') + e;\n } else {\n // 16 decimals at most from 1e-3 up (the shortest digits of a double have no more there)\n const frac = !p.hasDigits ? 0 : Math.abs(x) >= 1e-3 ? Math.min(p.maxFrac, 16) : p.maxFrac;\n const rounded = roundDigits(toDigits(x), frac, mode);\n isZero = rounded.digits === '';\n body = p.hasDigits ? layout(rounded, p) : layout(rounded, { ...p, minInt: 0, maxFrac: 0, minFrac: 0 });\n }\n return affixes(p, x < 0 && (!isZero || !p.hasDigits), body);\n}\n\n/** `body` with the text of the positive pattern, or of the negative one (\"-\" + prefix without \"pos;neg\"). */\nfunction affixes(p: Pattern, negative: boolean, body: string): string {\n if (!negative) return p.prefix + body + p.suffix;\n if (p.negPrefix === null) return '-' + p.prefix + body + p.suffix;\n return p.negPrefix + body + p.negSuffix!;\n}\n\n/**\n * `[minmove, pricescale]` of a tick (PineScript `syminfo.mintick = syminfo.minmove / syminfo.pricescale`).\n * Without `pricescale` it is 10^(decimals of the tick): 0.02 is 2 / 100, 0.25 is 25 / 100. A symbol priced in\n * fractions needs its own (1/32 is 1 / 32).\n */\nexport function tickScale(mintick: number, pricescale?: number): [number, number] {\n if (pricescale === undefined) {\n const m = /^\\d+(?:\\.(\\d+))?(?:e-(\\d+))?$/.exec(String(mintick));\n pricescale = Number(`1e${m ? (m[1]?.length ?? 0) + Number(m[2] ?? 0) : 0}`);\n }\n return [Math.round(mintick * pricescale), pricescale];\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["/**\n * Number patterns (\"#.##\", \"#,##0.00\", \"0.00E0\", \"#.##%\", \"'#'#.##\") as PineScript formats them.\n *\n * The pattern syntax is Java's DecimalFormat: `0` required digit, `#` optional digit, `,` grouping,\n * `.` decimal point, `E0` exponent, `%` multiplies by 100, `'...'` quoted literal text.\n * PineScript rules:\n * - `str.tostring` with a format rounds half away from zero on the shortest decimal form of the number\n * (`1.005` with \"#.##\" gives \"1.01\", `2.5` with \"#\" gives \"3\")\n * - `str.tostring` without a format rounds the digits of the JVM's binary to decimal conversion to 10 decimals,\n * half to even, the conversion flags deciding a tie (see `floatingdecimal.ts`): 12.34500000005 gives \"12.345\"\n * (\"12.3450000001\" with the format \"#.##########\"), 1791662400001 / 900000 gives \"1990736.000001111\"\n * - `str.format` rounds half to even on the exact binary value (`0.25` with \"#.#\" gives \"0.2\")\n * - a negative number that rounds to zero loses its sign, except with \"%\" (\"#.#%\": -0.0004 gives \"-0%\");\n * \"#.00\" writes `.50` (no leading zero),\n * but \"#.##\" writes `0.5` (a pattern without any '0' shows one integer digit)\n * - with an exponent, the value is first rounded to the fraction digits (\"0.00E0\": 0.125 gives \"1.30E-1\")\n * - a pattern without digit characters (`format.price` is \"price\") formats like \"#\" after its text,\n * and keeps the sign: -0.004 gives \"-price0\"\n * - \"pos;neg\": a negative number uses the text around the digits of the negative subpattern instead of \"-\"\n * (\"#.##;(#.##)\" gives \"(3.5)\" for -3.5); the digits follow the positive subpattern, as in Java\n * - at most 16 decimals when |x| >= 1e-3 (the shortest digits of a double never have more there):\n * 0.1 with 20 '#' decimals gives \"0.1\" in both rounding modes\n */\n\nimport { javaFixedDigits } from './floatingdecimal.js';\n\nexport type Rounding = 'halfUpShortest' | 'halfUpExact' | 'halfEvenExact' | 'halfEvenConverted';\n\ninterface Pattern {\n prefix: string;\n suffix: string;\n /** Text around the digits of the negative subpattern (\"pos;neg\"), or null without one */\n negPrefix: string | null;\n negSuffix: string | null;\n minInt: number;\n minFrac: number;\n maxFrac: number;\n /** Digits per group, 0 without grouping */\n grouping: number;\n percent: boolean;\n /** Minimum exponent digits, or null without exponent */\n exponent: number | null;\n hasDigits: boolean;\n}\n\nconst patterns = new Map<string, Pattern>();\n\n/** Index of the first ';' outside quotes, or -1. */\nfunction subpatternSplit(pattern: string): number {\n let quoted = false;\n for (let i = 0; i < pattern.length; i++) {\n if (pattern[i] === \"'\") quoted = !quoted;\n else if (pattern[i] === ';' && !quoted) return i;\n }\n return -1;\n}\n\nfunction parsePattern(pattern: string): Pattern {\n const cached = patterns.get(pattern);\n if (cached) return cached;\n const semi = subpatternSplit(pattern);\n if (semi !== -1) {\n // only the text around the digits of the negative subpattern is used\n const neg = parsePattern(pattern.slice(semi + 1));\n const parsed = { ...parsePattern(pattern.slice(0, semi)), negPrefix: neg.prefix, negSuffix: neg.suffix };\n patterns.set(pattern, parsed);\n return parsed;\n }\n\n let prefix = '';\n let suffix = '';\n let number = '';\n let percent = false;\n let phase: 'prefix' | 'number' | 'suffix' = 'prefix';\n for (let i = 0; i < pattern.length; i++) {\n const ch = pattern[i]!;\n let literal: string;\n if (ch === \"'\") {\n const end = pattern.indexOf(\"'\", i + 1);\n if (end === i + 1) {\n literal = \"'\";\n i = end;\n } else {\n literal = pattern.slice(i + 1, end === -1 ? undefined : end);\n i = end === -1 ? pattern.length : end;\n }\n } else if (phase !== 'suffix' && ('#0,.'.includes(ch) || (phase === 'number' && ch === 'E'))) {\n phase = 'number';\n number += ch;\n continue;\n } else {\n if (ch === '%') percent = true;\n literal = ch;\n }\n if (phase === 'number') phase = 'suffix';\n if (phase === 'prefix') prefix += literal;\n else suffix += literal;\n }\n\n const [mantissa = '', exp] = number.split('E');\n const [intPart = '', fracPart = ''] = mantissa.split('.');\n const lastComma = intPart.lastIndexOf(',');\n const parsed: Pattern = {\n prefix,\n suffix,\n negPrefix: null,\n negSuffix: null,\n // as in Java, a pattern with a decimal point and no '0' at all (\"#.##\") shows one integer digit\n minInt: !mantissa.includes('0') && mantissa.includes('.') ? 1 : [...intPart].filter((c) => c === '0').length,\n minFrac: [...fracPart].filter((c) => c === '0').length,\n maxFrac: [...fracPart].filter((c) => c === '0' || c === '#').length,\n grouping: lastComma === -1 ? 0 : intPart.length - lastComma - 1,\n percent,\n exponent: exp === undefined ? null : exp.length,\n hasDigits: /[0#]/.test(mantissa),\n };\n patterns.set(pattern, parsed);\n return parsed;\n}\n\n/** Decimal digits of |x|: value = 0.d1d2d3... \u00D7 10^intLen (no leading zero digit; \"\" for 0). */\ninterface Digits {\n digits: string;\n intLen: number;\n}\n\nfunction shortestDigits(x: number): Digits {\n const m = /^(\\d+)(?:\\.(\\d+))?(?:e([+-]\\d+))?$/.exec(String(Math.abs(x)))!;\n const all = m[1]! + (m[2] ?? '');\n let intLen = m[1]!.length + Number(m[3] ?? 0);\n const lead = all.length - all.replace(/^0+/, '').length;\n intLen -= lead;\n const digits = all.slice(lead).replace(/0+$/, '');\n return { digits, intLen: digits ? intLen : 0 };\n}\n\n/** Exact decimal expansion of the double |x|. */\nfunction exactDigits(x: number): Digits {\n const abs = Math.abs(x);\n if (abs === 0) return { digits: '', intLen: 0 };\n const view = new DataView(new ArrayBuffer(8));\n view.setFloat64(0, abs);\n const bits = view.getBigUint64(0);\n const expBits = Number((bits >> 52n) & 0x7ffn);\n let mant = bits & 0xfffffffffffffn;\n const e2 = expBits === 0 ? -1074 : expBits - 1075;\n if (expBits !== 0) mant |= 1n << 52n;\n let str: string;\n let fracDigits: number;\n if (e2 >= 0) {\n str = (mant << BigInt(e2)).toString();\n fracDigits = 0;\n } else {\n str = (mant * 5n ** BigInt(-e2)).toString();\n fracDigits = -e2;\n }\n const intLen = str.length - fracDigits;\n const lead = str.length - str.replace(/^0+/, '').length;\n const digits = str.slice(lead).replace(/0+$/, '');\n return { digits, intLen: intLen - lead };\n}\n\n/** Rounds to `frac` digits after the point. */\nfunction roundDigits(d: Digits, frac: number, mode: Rounding): Digits {\n const keep = d.intLen + frac;\n if (keep >= d.digits.length) return d;\n if (keep < 0) return { digits: '', intLen: 0 };\n const first = d.digits.charCodeAt(keep) - 48;\n let up: boolean;\n if (mode !== 'halfEvenExact') up = first >= 5;\n else if (first !== 5) up = first > 5;\n else if (d.digits.length > keep + 1) up = true;\n else up = keep > 0 && (d.digits.charCodeAt(keep - 1) - 48) % 2 === 1;\n let kept = d.digits.slice(0, keep);\n let intLen = d.intLen;\n if (up) {\n const n = (BigInt(kept || '0') + 1n).toString();\n if (n.length > kept.length) intLen += 1;\n kept = n;\n }\n kept = kept.replace(/0+$/, '');\n return { digits: kept, intLen: kept ? intLen : 0 };\n}\n\nfunction group(int: string, size: number): string {\n if (!size || int.length <= size) return int;\n const parts: string[] = [];\n for (let end = int.length; end > 0; end -= size) parts.unshift(int.slice(Math.max(0, end - size), end));\n return parts.join(',');\n}\n\nfunction layout(d: Digits, p: Pattern): string {\n let int = d.intLen > 0 ? d.digits.slice(0, d.intLen).padEnd(d.intLen, '0') : '';\n int = int.replace(/^0+/, '').padStart(p.minInt, '0');\n let frac = d.intLen < 0 ? '0'.repeat(-d.intLen) + d.digits : d.digits.slice(Math.max(0, d.intLen));\n frac = frac.slice(0, p.maxFrac).replace(/0+$/, '').padEnd(p.minFrac, '0');\n if (!int && !frac) int = '0';\n return group(int, p.grouping) + (frac ? '.' + frac : '');\n}\n\n/** Formats a number with a DecimalFormat pattern. */\nexport function formatNumber(value: number, pattern: string, mode: Rounding): string {\n if (Number.isNaN(value)) return 'NaN';\n const p = parsePattern(pattern);\n if (!Number.isFinite(value)) return affixes(p, value < 0, '\u221E');\n const x = p.percent ? value * 100 : value;\n const toDigits = mode === 'halfUpShortest' ? shortestDigits : exactDigits;\n\n let body: string;\n let isZero: boolean;\n if (p.exponent !== null) {\n const rounded = roundDigits(toDigits(x), p.maxFrac, mode);\n const intDigits = Math.max(p.minInt, 1);\n isZero = rounded.digits === '';\n let exponent = isZero ? 0 : rounded.intLen - intDigits;\n let mant = roundDigits({ digits: rounded.digits, intLen: isZero ? 0 : intDigits }, p.maxFrac, mode);\n if (mant.intLen > intDigits) {\n exponent += 1;\n mant = { digits: mant.digits, intLen: intDigits };\n }\n const e = String(Math.abs(exponent)).padStart(p.exponent, '0');\n body = layout(mant, p) + 'E' + (exponent < 0 ? '-' : '') + e;\n } else {\n // 16 decimals at most from 1e-3 up (the shortest digits of a double have no more there)\n const frac = !p.hasDigits ? 0 : Math.abs(x) >= 1e-3 ? Math.min(p.maxFrac, 16) : p.maxFrac;\n const rounded = mode === 'halfEvenConverted' ? javaFixedDigits(x, frac) : roundDigits(toDigits(x), frac, mode);\n isZero = rounded.digits === '';\n body = p.hasDigits ? layout(rounded, p) : layout(rounded, { ...p, minInt: 0, maxFrac: 0, minFrac: 0 });\n }\n // a negative number that rounds to zero keeps its sign with a percent pattern (\"-0%\", #180)\n return affixes(p, x < 0 && (!isZero || !p.hasDigits || p.percent), body);\n}\n\n/** `body` with the text of the positive pattern, or of the negative one (\"-\" + prefix without \"pos;neg\"). */\nfunction affixes(p: Pattern, negative: boolean, body: string): string {\n if (!negative) return p.prefix + body + p.suffix;\n if (p.negPrefix === null) return '-' + p.prefix + body + p.suffix;\n return p.negPrefix + body + p.negSuffix!;\n}\n\n/**\n * `[minmove, pricescale]` of a tick (PineScript `syminfo.mintick = syminfo.minmove / syminfo.pricescale`).\n * Without `pricescale` it is 10^(decimals of the tick): 0.02 is 2 / 100, 0.25 is 25 / 100. A symbol priced in\n * fractions needs its own (1/32 is 1 / 32).\n */\nexport function tickScale(mintick: number, pricescale?: number): [number, number] {\n if (pricescale === undefined) {\n const m = /^\\d+(?:\\.(\\d+))?(?:e-(\\d+))?$/.exec(String(mintick));\n pricescale = Number(`1e${m ? (m[1]?.length ?? 0) + Number(m[2] ?? 0) :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S,QAAQ,WAAW;AAC5B,WAAO,EAAE,YAAY,OAAO,SAAS,CAAC,IAAI,OAAO,SAAS,EAAE,GAAG,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EAAE,CAAC;AAAA,EACvG;AAEA,SAAO,QAAQ,GAAG,IAAI,MAAM,CAAC,UAAU,CAAC,EAAE,aAAa,EAAE,UAAU,IAAI;AACzE;AAGA,SAAS,QAAQ,GAAY,UAAmB,MAAsB;AACpE,MAAI,CAAC,SAAU,QAAO,EAAE,SAAS,OAAO,EAAE;AAC1C,MAAI,EAAE,cAAc,KAAM,QAAO,MAAM,EAAE,SAAS,OAAO,EAAE;AAC3D,SAAO,EAAE,YAAY,OAAO,EAAE;AAChC;AAOO,SAAS,UAAU,SAAiB,YAAuC;AAChF,MAAI,eAAe,QAAW;AAC5B,UAAM,IAAI,gCAAgC,KAAK,OAAO,OAAO,CAAC;AAC9D,iBAAa,OAAO,KAAK,KAAK,EAAE,CAAC,GAAG,UAAU,KAAK,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;AAAA,EAC5E;AACA,SAAO,CAAC,KAAK,MAAM,UAAU,UAAU,GAAG,UAAU;AACtD;",
|
|
6
6
|
"names": ["parsed"]
|
|
7
7
|
}
|
package/dist/cjs/ta/index.d.ts
CHANGED
|
@@ -79,6 +79,12 @@ export declare function ema(source: Source, length: simple_int): series_float;
|
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
81
|
export declare function rsi(source: Source, length: simple_int): series_float;
|
|
82
|
+
/**
|
|
83
|
+
* PineScript v4 `rsi(x, y)` with two series (#180): `x` and `y` are the averages of the upward and downward changes,
|
|
84
|
+
* already computed. As in PineScript: 100 when `y` is within 1e-10 of zero (also with an na `x`), else 0 when `x` is,
|
|
85
|
+
* else `100 - 100 / (1 + x / y)`, na when that divides by zero (`x == -y`). Versions 5 and 6 have the length form only.
|
|
86
|
+
*/
|
|
87
|
+
export declare function rsi(x: Source, y: Source): series_float;
|
|
82
88
|
/**
|
|
83
89
|
* Moving Average Convergence Divergence - trend-following momentum indicator showing relationship
|
|
84
90
|
* between two moving averages.
|
|
@@ -328,6 +334,8 @@ export declare function rma(source: Source, length: simple_int): series_float;
|
|
|
328
334
|
* - Summed from the oldest value to the newest; as PineScript, a partial sum `s + t` with
|
|
329
335
|
* `|s + t| <= 1e-10 * max(1, |s| + |t|)` is 0 (a cancellation residue, or values below 1e-10)
|
|
330
336
|
* - More responsive to recent price changes than SMA
|
|
337
|
+
* - `length` can be an array (a length per bar, PineScript series length): each bar gives the result of its own
|
|
338
|
+
* length (`na` for a length below 1)
|
|
331
339
|
*
|
|
332
340
|
* @example
|
|
333
341
|
* ```typescript
|
|
@@ -335,7 +343,7 @@ export declare function rma(source: Source, length: simple_int): series_float;
|
|
|
335
343
|
* // WMA gives more weight to recent prices
|
|
336
344
|
* ```
|
|
337
345
|
*/
|
|
338
|
-
export declare function wma(source: Source, length: simple_int): series_float;
|
|
346
|
+
export declare function wma(source: Source, length: simple_int | ArrayLike<number>): series_float;
|
|
339
347
|
/**
|
|
340
348
|
* Highest value over the last `length` bars.
|
|
341
349
|
*
|
|
@@ -344,11 +352,15 @@ export declare function wma(source: Source, length: simple_int): series_float;
|
|
|
344
352
|
* @returns Highest value series (na on the first `length - 1` bars)
|
|
345
353
|
*
|
|
346
354
|
* @remarks
|
|
347
|
-
* As in PineScript:
|
|
348
|
-
*
|
|
355
|
+
* As in PineScript: `na` values are skipped. The result is the highest of the last `length` non-na values (of all
|
|
356
|
+
* of them when there are fewer), also on a bar whose own value is `na`; `na` before bar `length - 1` and while no
|
|
357
|
+
* value was received. A fractional length is truncated (7.5 is 7 bars).
|
|
358
|
+
* `length` can be an array (a length per bar, PineScript series length), also for `ta.lowest`, `ta.highestbars`
|
|
359
|
+
* and `ta.lowestbars`: each bar uses its own length.
|
|
360
|
+
* A length above 15,000 throws the PineScript runtime error (also `ta.lowest`, `ta.highestbars`, `ta.lowestbars`).
|
|
349
361
|
* PineScript `ta.highest(length)` (source = high) is `ta.highest(length)` in the script API.
|
|
350
362
|
*/
|
|
351
|
-
export declare function highest(source: Source, length: simple_int): series_float;
|
|
363
|
+
export declare function highest(source: Source, length: simple_int | ArrayLike<number>): series_float;
|
|
352
364
|
/**
|
|
353
365
|
* Lowest value over the last `length` bars.
|
|
354
366
|
*
|
|
@@ -357,10 +369,11 @@ export declare function highest(source: Source, length: simple_int): series_floa
|
|
|
357
369
|
* @returns Lowest value series (na on the first `length - 1` bars)
|
|
358
370
|
*
|
|
359
371
|
* @remarks
|
|
360
|
-
* As in PineScript:
|
|
361
|
-
*
|
|
372
|
+
* As in PineScript: `na` values are skipped. The result is the lowest of the last `length` non-na values (of all
|
|
373
|
+
* of them when there are fewer), also on a bar whose own value is `na`; `na` before bar `length - 1` and while no
|
|
374
|
+
* value was received.
|
|
362
375
|
*/
|
|
363
|
-
export declare function lowest(source: Source, length: simple_int): series_float;
|
|
376
|
+
export declare function lowest(source: Source, length: simple_int | ArrayLike<number>): series_float;
|
|
364
377
|
/**
|
|
365
378
|
* Cumulative Sum - returns the total sum of all elements from the beginning.
|
|
366
379
|
*
|
|
@@ -675,8 +688,8 @@ export declare function correlation(source1: Source, source2: Source, length: si
|
|
|
675
688
|
*
|
|
676
689
|
* PineScript rules:
|
|
677
690
|
* - percentrank = count(source[k] <= source, k = 1..length) * 100 / length (in this order: the PineScript bits)
|
|
678
|
-
* - a value from bar `length` on
|
|
679
|
-
*
|
|
691
|
+
* - a value from bar `length` on; an `na` value in the window counts as not `<=` the current value, and an `na`
|
|
692
|
+
* current value gives 0 (#177)
|
|
680
693
|
* - the comparison uses the 1e-10 tolerance
|
|
681
694
|
*
|
|
682
695
|
* @example
|
|
@@ -819,6 +832,8 @@ export declare function hma(source: Source, length: simple_int): series_float;
|
|
|
819
832
|
* ```
|
|
820
833
|
*/
|
|
821
834
|
export declare function sar(start: simple_float, inc: simple_float, max: simple_float, high?: Source, low?: Source, close?: Source): series_float;
|
|
835
|
+
/** A pivot length: one value, or a value per bar (PineScript series length). */
|
|
836
|
+
type PivotLength = simple_int | ArrayLike<number>;
|
|
822
837
|
/**
|
|
823
838
|
* Pivot High - detects pivot high points in the price series.
|
|
824
839
|
*
|
|
@@ -833,7 +848,10 @@ export declare function sar(start: simple_float, inc: simple_float, max: simple_
|
|
|
833
848
|
* - As in PineScript, the value appears `rightbars` bars after the pivot bar: the pivot bar
|
|
834
849
|
* index is `i - rightbars`
|
|
835
850
|
* - A pivot high may equal values on its left but must be higher than all values on its right
|
|
836
|
-
* -
|
|
851
|
+
* - `na` values are skipped: the window is the last `leftbars + rightbars + 1` non-na values, and the highest of
|
|
852
|
+
* them must be on the bar `rightbars` bars back
|
|
853
|
+
* - `leftbars` / `rightbars` can be arrays (a length per bar, PineScript series length), also for `ta.pivotlow`:
|
|
854
|
+
* each bar uses its own lengths
|
|
837
855
|
*
|
|
838
856
|
* @example
|
|
839
857
|
* ```typescript
|
|
@@ -841,7 +859,7 @@ export declare function sar(start: simple_float, inc: simple_float, max: simple_
|
|
|
841
859
|
* // pivotHighs[i] is high[i - 2] when bar i - 2 is a pivot high
|
|
842
860
|
* ```
|
|
843
861
|
*/
|
|
844
|
-
export declare function pivothigh(sourceOrLeftbars: Source | simple_int, leftbarsOrRightbars:
|
|
862
|
+
export declare function pivothigh(sourceOrLeftbars: Source | simple_int, leftbarsOrRightbars: PivotLength, rightbars?: PivotLength, high?: Source): series_float;
|
|
845
863
|
/**
|
|
846
864
|
* Pivot Low - detects pivot low points in the price series.
|
|
847
865
|
*
|
|
@@ -856,7 +874,8 @@ export declare function pivothigh(sourceOrLeftbars: Source | simple_int, leftbar
|
|
|
856
874
|
* - As in PineScript, the value appears `rightbars` bars after the pivot bar: the pivot bar
|
|
857
875
|
* index is `i - rightbars`
|
|
858
876
|
* - A pivot low may equal values on its left but must be lower than all values on its right
|
|
859
|
-
* -
|
|
877
|
+
* - `na` values are skipped: the window is the last `leftbars + rightbars + 1` non-na values, and the lowest of
|
|
878
|
+
* them must be on the bar `rightbars` bars back
|
|
860
879
|
*
|
|
861
880
|
* @example
|
|
862
881
|
* ```typescript
|
|
@@ -864,7 +883,7 @@ export declare function pivothigh(sourceOrLeftbars: Source | simple_int, leftbar
|
|
|
864
883
|
* // pivotLows[i] is low[i - 2] when bar i - 2 is a pivot low
|
|
865
884
|
* ```
|
|
866
885
|
*/
|
|
867
|
-
export declare function pivotlow(sourceOrLeftbars: Source | simple_int, leftbarsOrRightbars:
|
|
886
|
+
export declare function pivotlow(sourceOrLeftbars: Source | simple_int, leftbarsOrRightbars: PivotLength, rightbars?: PivotLength, low?: Source): series_float;
|
|
868
887
|
/**
|
|
869
888
|
* Bars Since - returns number of bars since condition was true.
|
|
870
889
|
*
|
|
@@ -1129,19 +1148,21 @@ export declare function range(source: Source, length: simple_int): series_float;
|
|
|
1129
1148
|
* -1 for the previous bar, and so on (as in PineScript, the offset is negative).
|
|
1130
1149
|
*
|
|
1131
1150
|
* @remarks
|
|
1132
|
-
* As in PineScript:
|
|
1133
|
-
*
|
|
1151
|
+
* As in PineScript: the best of the last `length` non-na values, the newest one on equal values; the offset is the
|
|
1152
|
+
* distance in bars to its bar, so it is below `-(length - 1)` when `na` values were skipped. `na` before bar
|
|
1153
|
+
* `length - 1` and while no value was received; a fractional length is truncated.
|
|
1134
1154
|
*/
|
|
1135
|
-
export declare function highestbars(source: Source, length: simple_int): series_int;
|
|
1155
|
+
export declare function highestbars(source: Source, length: simple_int | ArrayLike<number>): series_int;
|
|
1136
1156
|
/**
|
|
1137
1157
|
* Offset to the bar with the lowest value over the last `length` bars: 0 for the current bar,
|
|
1138
1158
|
* -1 for the previous bar, and so on (as in PineScript, the offset is negative).
|
|
1139
1159
|
*
|
|
1140
1160
|
* @remarks
|
|
1141
|
-
* As in PineScript:
|
|
1142
|
-
*
|
|
1161
|
+
* As in PineScript: the best of the last `length` non-na values, the newest one on equal values; the offset is the
|
|
1162
|
+
* distance in bars to its bar, so it is below `-(length - 1)` when `na` values were skipped. `na` before bar
|
|
1163
|
+
* `length - 1` and while no value was received; a fractional length is truncated.
|
|
1143
1164
|
*/
|
|
1144
|
-
export declare function lowestbars(source: Source, length: simple_int): series_int;
|
|
1165
|
+
export declare function lowestbars(source: Source, length: simple_int | ArrayLike<number>): series_int;
|
|
1145
1166
|
/**
|
|
1146
1167
|
* All-time highest value of `source` up to each bar (PineScript `ta.max(source)`).
|
|
1147
1168
|
*
|
|
@@ -1298,31 +1319,42 @@ export declare function percentile_nearest_rank(source: Source, length: simple_i
|
|
|
1298
1319
|
*/
|
|
1299
1320
|
export declare function rci(source: Source, length: simple_int): series_float;
|
|
1300
1321
|
/**
|
|
1301
|
-
* Pivot Point Levels
|
|
1322
|
+
* Pivot Point Levels (PineScript `ta.pivot_point_levels`).
|
|
1302
1323
|
*
|
|
1303
|
-
*
|
|
1304
|
-
* Returns an array containing: [P, R1, S1, R2, S2, R3, S3, R4, S4, R5, S5]
|
|
1324
|
+
* Returns 11 series: [P, R1, S1, R2, S2, R3, S3, R4, S4, R5, S5] (one value per bar in each).
|
|
1305
1325
|
*
|
|
1306
1326
|
* @param type - Calculation type: "Traditional", "Fibonacci", "Woodie", "Classic", "DM", "Camarilla"
|
|
1307
|
-
* @param anchor - Condition that
|
|
1308
|
-
* @param developing -
|
|
1309
|
-
*
|
|
1310
|
-
* @param
|
|
1311
|
-
* @param
|
|
1312
|
-
* @param
|
|
1313
|
-
* @
|
|
1327
|
+
* @param anchor - Condition that starts a new period (`timeframe.change("W")`...)
|
|
1328
|
+
* @param developing - false: the levels of the previous period, constant until the next anchor; true: the levels of
|
|
1329
|
+
* the current period so far, recalculated on each bar
|
|
1330
|
+
* @param high - High price series
|
|
1331
|
+
* @param low - Low price series
|
|
1332
|
+
* @param close - Close price series
|
|
1333
|
+
* @param open - Open price series (Woodie and DM)
|
|
1334
|
+
* @returns 11 series of levels
|
|
1314
1335
|
*
|
|
1315
1336
|
* @example
|
|
1316
1337
|
* ```typescript
|
|
1317
1338
|
* const weekChange = [false, false, false, false, true, false, ...]; // Weekly anchor
|
|
1318
|
-
* const
|
|
1319
|
-
* //
|
|
1339
|
+
* const levels = ta.pivot_point_levels("Traditional", weekChange, false, high, low, close, open);
|
|
1340
|
+
* // levels[0]![i] is P on bar i, levels[5]![i] is R3
|
|
1320
1341
|
* ```
|
|
1321
1342
|
*
|
|
1322
1343
|
* @remarks
|
|
1323
|
-
*
|
|
1324
|
-
* -
|
|
1325
|
-
*
|
|
1344
|
+
* As in PineScript (#177):
|
|
1345
|
+
* - a period runs from an anchor bar to the bar before the next anchor; the bars before the first anchor are a
|
|
1346
|
+
* period too (from bar 0). The fixed levels use the high and low of the previous period and the close of the bar
|
|
1347
|
+
* before the anchor (na with an anchor on bar 0), and are na until the first anchor; the developing levels use
|
|
1348
|
+
* the current period's high and low and the bar's close, from bar 0
|
|
1349
|
+
* - Traditional: R3 = P * 2 + (H - 2 * L), S3 = P * 2 - (2 * H - L), R4 = P * 3 + (H - 3 * L), S4 = P * 3 - (3 * H - L),
|
|
1350
|
+
* R5 = P * 4 + (H - 4 * L), S5 = P * 4 - (4 * H - L)
|
|
1351
|
+
* - Fibonacci: P +- 0.382 / 0.618 / 1 * (H - L); R4 to S5 na
|
|
1352
|
+
* - Classic: R3 / S3 = P +- 2 * (H - L), R4 / S4 = P +- 3 * (H - L); R5 / S5 na
|
|
1353
|
+
* - Woodie: P = (H + L + 2 * open of the current period) / 4, R3 = H + 2 * (P - L), S3 = L - 2 * (H - P), R4 / S4 =
|
|
1354
|
+
* R3 + (H - L) / S3 - (H - L); R5 / S5 na. `developing` true throws (RE10128)
|
|
1355
|
+
* - DM: x = H + 2 * L + C (C < open of the period), 2 * H + L + C (C > O) or H + L + 2 * C; P = x / 4,
|
|
1356
|
+
* R1 = x / 2 - L, S1 = x / 2 - H; the other levels na
|
|
1357
|
+
* - Camarilla: C +- (H - L) * 1.1 / 12, / 6, / 4, / 2 for R1 to S4, R5 = (H / L) * C, S5 = 2 * C - R5
|
|
1326
1358
|
*/
|
|
1327
1359
|
export declare function pivot_point_levels(type: series_float | string, anchor: series_bool, developing?: series_bool | boolean, high?: Source, low?: Source, close?: Source, open?: Source): series_float[];
|
|
1328
1360
|
/**
|
|
@@ -1448,4 +1480,5 @@ export declare function nvi(close: Source, volume: Source): series_float;
|
|
|
1448
1480
|
* Starts at 1.
|
|
1449
1481
|
*/
|
|
1450
1482
|
export declare function pvi(close: Source, volume: Source): series_float;
|
|
1483
|
+
export {};
|
|
1451
1484
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ta/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAO,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ta/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAO,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKnI;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,YAAY,CASxF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAwCpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,YAAY,CAAC;AACtE;;;;GAIG;AACH,wBAAgB,GAAG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