E14: remove hardcoded local paths from the docs
Indicators-Overview.md referenced the absolute author-machine paths
D:\Coding\Wickra\crates\... and D:\Coding\Wickra\bindings\... in its
"Source-of-truth files" section, and seven trend-indicator pages had
Node examples that did require('D:/Coding/Wickra/bindings/node').
Replace the overview paths with repo-relative GitHub links and change
the Node examples to require('wickra'), the published npm package name
a reader would actually use. No D:/Coding path remains anywhere in docs.
This commit is contained in:
@@ -179,12 +179,13 @@ what each indicator actually computes.
|
||||
## Source-of-truth files
|
||||
|
||||
Every claim above can be checked against the source in
|
||||
`D:\Coding\Wickra\crates\wickra-core\src\indicators\` — one file per
|
||||
indicator. The Rust unit tests inside each module are the ground truth
|
||||
for sample values. Python defaults (the `period = 14` etc. in tables
|
||||
above) come from the `#[pyo3(signature = …)]` attributes in
|
||||
`D:\Coding\Wickra\bindings\python\src\lib.rs`; indicators not listed
|
||||
with a Python default require an explicit `period` argument.
|
||||
[`crates/wickra-core/src/indicators/`](https://github.com/kingchenc/wickra/tree/main/crates/wickra-core/src/indicators)
|
||||
— one file per indicator. The Rust unit tests inside each module are the
|
||||
ground truth for sample values. Python defaults (the `period = 14` etc. in
|
||||
tables above) come from the `#[pyo3(signature = …)]` attributes in
|
||||
[`bindings/python/src/lib.rs`](https://github.com/kingchenc/wickra/blob/main/bindings/python/src/lib.rs);
|
||||
indicators not listed with a Python default require an explicit `period`
|
||||
argument.
|
||||
|
||||
## See also
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ warmup_period = 9
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
const ta = require('D:/Coding/Wickra/bindings/node');
|
||||
const ta = require('wickra');
|
||||
const dema = new ta.DEMA(5);
|
||||
const prices = Array.from({ length: 20 }, (_, i) => i + 1);
|
||||
console.log(dema.batch(prices));
|
||||
|
||||
@@ -140,7 +140,7 @@ warmup_period: 3
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
const ta = require('D:/Coding/Wickra/bindings/node');
|
||||
const ta = require('wickra');
|
||||
const ema = new ta.EMA(3);
|
||||
for (const x of [1, 2, 3, 10]) {
|
||||
console.log(x, '->', ema.update(x));
|
||||
|
||||
@@ -177,7 +177,7 @@ warmup_period (reported) = 11
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
const ta = require('D:/Coding/Wickra/bindings/node');
|
||||
const ta = require('wickra');
|
||||
const hma = new ta.HMA(9);
|
||||
const prices = Array.from({ length: 20 }, (_, i) => i + 1);
|
||||
console.log(hma.batch(prices));
|
||||
|
||||
@@ -169,7 +169,7 @@ warmup_period = 11
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
const ta = require('D:/Coding/Wickra/bindings/node');
|
||||
const ta = require('wickra');
|
||||
const kama = new ta.KAMA(10, 2, 30); // no default constructor; pass the triple
|
||||
const prices = Array.from({ length: 20 }, (_, i) => i + 1);
|
||||
console.log(kama.batch(prices));
|
||||
|
||||
@@ -127,7 +127,7 @@ array.
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
const ta = require('D:/Coding/Wickra/bindings/node');
|
||||
const ta = require('wickra');
|
||||
const sma = new ta.SMA(3);
|
||||
console.log(sma.batch([2, 4, 6, 8, 10]));
|
||||
console.log('warmupPeriod:', sma.warmupPeriod());
|
||||
|
||||
@@ -138,7 +138,7 @@ warmup_period = 13
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
const ta = require('D:/Coding/Wickra/bindings/node');
|
||||
const ta = require('wickra');
|
||||
const tema = new ta.TEMA(5);
|
||||
const prices = Array.from({ length: 20 }, (_, i) => i + 1);
|
||||
console.log(tema.batch(prices));
|
||||
|
||||
@@ -132,7 +132,7 @@ warmup_period = 4
|
||||
### Node
|
||||
|
||||
```javascript
|
||||
const ta = require('D:/Coding/Wickra/bindings/node');
|
||||
const ta = require('wickra');
|
||||
const wma = new ta.WMA(4);
|
||||
console.log(wma.batch([1, 2, 3, 4]));
|
||||
console.log('warmupPeriod:', wma.warmupPeriod());
|
||||
|
||||
Reference in New Issue
Block a user