lightweight-charts-indicators 0.16.8 → 0.16.10
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/AGENTS.md +41 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +6 -4
- package/skills/lightweight-charts-indicators/SKILL.md +111 -0
- package/skills/lightweight-charts-indicators/examples/atr-channel.ts +135 -0
- package/skills/lightweight-charts-indicators/examples/call-indicator.ts +85 -0
- package/skills/lightweight-charts-indicators/examples/smoothed-williams-r.ts +85 -0
- package/skills/lightweight-charts-indicators/examples/trend-ema.ts +78 -0
- package/skills/lightweight-charts-indicators/references/adding-an-indicator.md +124 -0
- package/skills/lightweight-charts-indicators/references/catalogue-and-calling.md +161 -0
- package/skills/lightweight-charts-indicators/references/testing.md +73 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Technical indicators for lightweight-charts, built on `oakscriptjs`. To find, call, draw, add or test an indicator,
|
|
4
|
+
read the skill first: [skills/lightweight-charts-indicators/SKILL.md](skills/lightweight-charts-indicators/SKILL.md).
|
|
5
|
+
|
|
6
|
+
## Layout
|
|
7
|
+
|
|
8
|
+
| Path | Content |
|
|
9
|
+
|---|---|
|
|
10
|
+
| `src/index.ts` | Public entry: named exports of every module and `indicatorRegistry` (split in `registryPart*` arrays) |
|
|
11
|
+
| `src/standard/` | Built-in indicators (one module each) |
|
|
12
|
+
| `src/community/` | Ports of community scripts (file name = registry id) |
|
|
13
|
+
| `src/candlestick-port/` | Candlestick patterns and their runner |
|
|
14
|
+
| `src/render/` | `IndicatorRenderer` (`lightweight-charts-indicators/render`) |
|
|
15
|
+
| `src/chart-context.ts`, `src/other-symbol.ts`, `src/alert-states.ts`, ... | Shared helpers (`lightweight-charts-indicators/helpers`) |
|
|
16
|
+
| `src/style-outputs*.ts`, `src/reference-names.ts`, `src/value-formats.ts` | Generated tables: do not edit by hand |
|
|
17
|
+
| `docs/INDICATOR_INVENTORY*.md` | Catalogue |
|
|
18
|
+
| `tests/unit/` | Unit suite (seeded bars, no network) |
|
|
19
|
+
| `tests/reference-regression/`, `tests/regression/` | Reference suites (local or private data) |
|
|
20
|
+
| `skills/lightweight-charts-indicators/` | Agent guide and its tested examples (shipped in the package) |
|
|
21
|
+
| `example/` | Demo page (`npm run dev:example`) |
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm ci # install
|
|
27
|
+
npm run typecheck # tsc on src/ and on the skill examples
|
|
28
|
+
npm test # unit suite
|
|
29
|
+
npm run build # dist/ (esm, cjs, render, helpers, types, sources)
|
|
30
|
+
npm run test:reference # reference regression (needs tests/reference-regression/data/)
|
|
31
|
+
npm run test:pinesuite # reference CSV comparison (needs PINESUITE_TOKEN)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Conventions
|
|
35
|
+
|
|
36
|
+
- An indicator module exports `defaultInputs`, `inputConfig`, `plotConfig`, `metadata`, `calculate` and one module
|
|
37
|
+
object; it is registered in `src/index.ts` with a unique kebab-case id and `overlay` equal to `metadata.overlay`.
|
|
38
|
+
- `calculate(bars, inputs?, chart?)` is pure and returns one point per bar for every declared plot (`NaN` = no value).
|
|
39
|
+
- Ports follow their original script; a deliberate difference is commented in the code.
|
|
40
|
+
- Every new indicator gets a unit test; typecheck, tests and build pass before a commit.
|
|
41
|
+
- Do not bump `version` (in `package.json` and `src/index.ts`) or tag outside a release: a `v*` tag publishes.
|
package/dist/index.cjs
CHANGED
|
@@ -346686,4 +346686,4 @@ var withAlertConditions = (e) => {
|
|
|
346686
346686
|
};
|
|
346687
346687
|
};
|
|
346688
346688
|
var indicatorRegistry = [...registryPart1, ...registryPart11, ...registryPart2, ...registryPart3, ...registryPart4, ...registryPart5, ...registryPart6, ...registryPart7, ...registryPart8, ...registryPart9, ...registryPart10].map(withReferenceNames).map(withValueFormat).map(withStyleOutputs).map(withAlertConditions);
|
|
346689
|
-
var version = "0.16.
|
|
346689
|
+
var version = "0.16.10";
|
package/dist/index.d.ts
CHANGED
|
@@ -3393,5 +3393,5 @@ export type { ChartContext, VisibleRange, SymbolRequest, SymbolInfo } from './ch
|
|
|
3393
3393
|
export { MissingSymbolDataError, symbolBarsOf } from './chart-context';
|
|
3394
3394
|
export { mintickOf, timezoneOf, tickeridOf, tickerOf, symbolTypeOf, currencyOf, basecurrencyOf, rootOf, foregroundColorOf, backgroundColorOf, lastBarConfirmedOf, nowOf, visibleRangeOf, } from './chart-context';
|
|
3395
3395
|
export { securityOther, securityOtherValues, securityLowerTf, otherSymbolChart, spreadSymbols, spreadBars, spreadOptions, type OtherSymbolOptions, type OtherSymbolChart, type SymbolCalendar, } from './other-symbol';
|
|
3396
|
-
export declare const version = "0.16.
|
|
3396
|
+
export declare const version = "0.16.10";
|
|
3397
3397
|
//# sourceMappingURL=index.d.ts.map
|