lightweight-charts-indicators 0.1.0
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/LICENSE +21 -0
- package/README.md +271 -0
- package/dist/adr.d.ts +57 -0
- package/dist/adr.d.ts.map +1 -0
- package/dist/adx.d.ts +34 -0
- package/dist/adx.d.ts.map +1 -0
- package/dist/alma.d.ts +61 -0
- package/dist/alma.d.ts.map +1 -0
- package/dist/aroon.d.ts +34 -0
- package/dist/aroon.d.ts.map +1 -0
- package/dist/atr.d.ts +59 -0
- package/dist/atr.d.ts.map +1 -0
- package/dist/awesome-oscillator.d.ts +34 -0
- package/dist/awesome-oscillator.d.ts.map +1 -0
- package/dist/bb-bandwidth.d.ts +41 -0
- package/dist/bb-bandwidth.d.ts.map +1 -0
- package/dist/bb-percent-b.d.ts +37 -0
- package/dist/bb-percent-b.d.ts.map +1 -0
- package/dist/bb.d.ts +65 -0
- package/dist/bb.d.ts.map +1 -0
- package/dist/bbtrend.d.ts +36 -0
- package/dist/bbtrend.d.ts.map +1 -0
- package/dist/bop.d.ts +57 -0
- package/dist/bop.d.ts.map +1 -0
- package/dist/bull-bear-power.d.ts +32 -0
- package/dist/bull-bear-power.d.ts.map +1 -0
- package/dist/cci.d.ts +33 -0
- package/dist/cci.d.ts.map +1 -0
- package/dist/chaikin-mf.d.ts +33 -0
- package/dist/chaikin-mf.d.ts.map +1 -0
- package/dist/chaikin-oscillator.d.ts +37 -0
- package/dist/chaikin-oscillator.d.ts.map +1 -0
- package/dist/chande-kroll-stop.d.ts +47 -0
- package/dist/chande-kroll-stop.d.ts.map +1 -0
- package/dist/chande-mo.d.ts +32 -0
- package/dist/chande-mo.d.ts.map +1 -0
- package/dist/choppiness.d.ts +34 -0
- package/dist/choppiness.d.ts.map +1 -0
- package/dist/coppock-curve.d.ts +37 -0
- package/dist/coppock-curve.d.ts.map +1 -0
- package/dist/dema.d.ts +33 -0
- package/dist/dema.d.ts.map +1 -0
- package/dist/dmi.d.ts +49 -0
- package/dist/dmi.d.ts.map +1 -0
- package/dist/donchian.d.ts +60 -0
- package/dist/donchian.d.ts.map +1 -0
- package/dist/dpo.d.ts +34 -0
- package/dist/dpo.d.ts.map +1 -0
- package/dist/ease-of-movement.d.ts +35 -0
- package/dist/ease-of-movement.d.ts.map +1 -0
- package/dist/elder-force.d.ts +33 -0
- package/dist/elder-force.d.ts.map +1 -0
- package/dist/ema.d.ts +33 -0
- package/dist/ema.d.ts.map +1 -0
- package/dist/envelope.d.ts +38 -0
- package/dist/envelope.d.ts.map +1 -0
- package/dist/fisher-transform.d.ts +44 -0
- package/dist/fisher-transform.d.ts.map +1 -0
- package/dist/historical-volatility.d.ts +36 -0
- package/dist/historical-volatility.d.ts.map +1 -0
- package/dist/hma.d.ts +32 -0
- package/dist/hma.d.ts.map +1 -0
- package/dist/ichimoku.d.ts +64 -0
- package/dist/ichimoku.d.ts.map +1 -0
- package/dist/index.cjs +5532 -0
- package/dist/index.d.ts +207 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +5511 -0
- package/dist/keltner.d.ts +68 -0
- package/dist/keltner.d.ts.map +1 -0
- package/dist/klinger.d.ts +46 -0
- package/dist/klinger.d.ts.map +1 -0
- package/dist/lsma.d.ts +33 -0
- package/dist/lsma.d.ts.map +1 -0
- package/dist/ma-cross.d.ts +34 -0
- package/dist/ma-cross.d.ts.map +1 -0
- package/dist/ma-ribbon.d.ts +63 -0
- package/dist/ma-ribbon.d.ts.map +1 -0
- package/dist/macd.d.ts +34 -0
- package/dist/macd.d.ts.map +1 -0
- package/dist/mass-index.d.ts +31 -0
- package/dist/mass-index.d.ts.map +1 -0
- package/dist/mcginley-dynamic.d.ts +32 -0
- package/dist/mcginley-dynamic.d.ts.map +1 -0
- package/dist/median.d.ts +35 -0
- package/dist/median.d.ts.map +1 -0
- package/dist/mfi.d.ts +32 -0
- package/dist/mfi.d.ts.map +1 -0
- package/dist/momentum.d.ts +32 -0
- package/dist/momentum.d.ts.map +1 -0
- package/dist/obv.d.ts +30 -0
- package/dist/obv.d.ts.map +1 -0
- package/dist/parabolic-sar.d.ts +62 -0
- package/dist/parabolic-sar.d.ts.map +1 -0
- package/dist/price-oscillator.d.ts +40 -0
- package/dist/price-oscillator.d.ts.map +1 -0
- package/dist/pvt.d.ts +30 -0
- package/dist/pvt.d.ts.map +1 -0
- package/dist/rma.d.ts +33 -0
- package/dist/rma.d.ts.map +1 -0
- package/dist/roc.d.ts +32 -0
- package/dist/roc.d.ts.map +1 -0
- package/dist/rsi.d.ts +32 -0
- package/dist/rsi.d.ts.map +1 -0
- package/dist/rvi.d.ts +32 -0
- package/dist/rvi.d.ts.map +1 -0
- package/dist/sma.d.ts +61 -0
- package/dist/sma.d.ts.map +1 -0
- package/dist/smi-ergodic-oscillator.d.ts +36 -0
- package/dist/smi-ergodic-oscillator.d.ts.map +1 -0
- package/dist/smi-ergodic.d.ts +37 -0
- package/dist/smi-ergodic.d.ts.map +1 -0
- package/dist/smma.d.ts +32 -0
- package/dist/smma.d.ts.map +1 -0
- package/dist/stdev.d.ts +31 -0
- package/dist/stdev.d.ts.map +1 -0
- package/dist/stoch-rsi.d.ts +38 -0
- package/dist/stoch-rsi.d.ts.map +1 -0
- package/dist/stoch.d.ts +33 -0
- package/dist/stoch.d.ts.map +1 -0
- package/dist/supertrend.d.ts +60 -0
- package/dist/supertrend.d.ts.map +1 -0
- package/dist/tema.d.ts +33 -0
- package/dist/tema.d.ts.map +1 -0
- package/dist/trend-strength.d.ts +34 -0
- package/dist/trend-strength.d.ts.map +1 -0
- package/dist/trix.d.ts +43 -0
- package/dist/trix.d.ts.map +1 -0
- package/dist/tsi.d.ts +36 -0
- package/dist/tsi.d.ts.map +1 -0
- package/dist/ultimate-oscillator.d.ts +48 -0
- package/dist/ultimate-oscillator.d.ts.map +1 -0
- package/dist/volume-oscillator.d.ts +34 -0
- package/dist/volume-oscillator.d.ts.map +1 -0
- package/dist/vortex.d.ts +32 -0
- package/dist/vortex.d.ts.map +1 -0
- package/dist/vwma.d.ts +32 -0
- package/dist/vwma.d.ts.map +1 -0
- package/dist/williams-alligator.d.ts +44 -0
- package/dist/williams-alligator.d.ts.map +1 -0
- package/dist/williams-r.d.ts +33 -0
- package/dist/williams-r.d.ts.map +1 -0
- package/dist/wma.d.ts +32 -0
- package/dist/wma.d.ts.map +1 -0
- package/dist/woodies-cci.d.ts +35 -0
- package/dist/woodies-cci.d.ts.map +1 -0
- package/dist/zigzag.d.ts +73 -0
- package/dist/zigzag.d.ts.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keltner Channels (KC) Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* Volatility-based envelope set above and below an exponential moving average.
|
|
6
|
+
* Uses ATR (Average True Range) to set channel distance.
|
|
7
|
+
*/
|
|
8
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
|
|
9
|
+
/**
|
|
10
|
+
* Keltner Channels indicator input parameters
|
|
11
|
+
*/
|
|
12
|
+
export interface KeltnerInputs {
|
|
13
|
+
/** EMA period length */
|
|
14
|
+
length: number;
|
|
15
|
+
/** ATR multiplier */
|
|
16
|
+
mult: number;
|
|
17
|
+
/** Price source */
|
|
18
|
+
src: SourceType;
|
|
19
|
+
/** Use exponential MA (true) or simple MA (false) */
|
|
20
|
+
useEMA: boolean;
|
|
21
|
+
/** Bands style: ATR, True Range, or Range */
|
|
22
|
+
bandsStyle: 'Average True Range' | 'True Range' | 'Range';
|
|
23
|
+
/** ATR period length */
|
|
24
|
+
atrLength: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Default input values matching TradingView defaults
|
|
28
|
+
*/
|
|
29
|
+
export declare const defaultInputs: KeltnerInputs;
|
|
30
|
+
/**
|
|
31
|
+
* Input configuration for UI
|
|
32
|
+
*/
|
|
33
|
+
export declare const inputConfig: InputConfig[];
|
|
34
|
+
/**
|
|
35
|
+
* Plot configuration - order matches CSV: Upper, Basis, Lower
|
|
36
|
+
*/
|
|
37
|
+
export declare const plotConfig: PlotConfig[];
|
|
38
|
+
/**
|
|
39
|
+
* Indicator metadata
|
|
40
|
+
*/
|
|
41
|
+
export declare const metadata: {
|
|
42
|
+
title: string;
|
|
43
|
+
shortTitle: string;
|
|
44
|
+
overlay: boolean;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Calculate Keltner Channels indicator
|
|
48
|
+
*
|
|
49
|
+
* @param bars - OHLCV bar data
|
|
50
|
+
* @param inputs - Indicator parameters (optional, uses defaults)
|
|
51
|
+
* @returns Indicator result with plot data
|
|
52
|
+
*/
|
|
53
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<KeltnerInputs>): IndicatorResult;
|
|
54
|
+
/**
|
|
55
|
+
* Keltner Channels indicator module
|
|
56
|
+
*/
|
|
57
|
+
export declare const KeltnerChannels: {
|
|
58
|
+
calculate: typeof calculate;
|
|
59
|
+
metadata: {
|
|
60
|
+
title: string;
|
|
61
|
+
shortTitle: string;
|
|
62
|
+
overlay: boolean;
|
|
63
|
+
};
|
|
64
|
+
defaultInputs: KeltnerInputs;
|
|
65
|
+
inputConfig: InputConfig[];
|
|
66
|
+
plotConfig: PlotConfig[];
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=keltner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keltner.d.ts","sourceRoot":"","sources":["../src/keltner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA+B,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9I;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,GAAG,EAAE,UAAU,CAAC;IAChB,qDAAqD;IACrD,MAAM,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,UAAU,EAAE,oBAAoB,GAAG,YAAY,GAAG,OAAO,CAAC;IAC1D,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,aAO3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,EAOpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,UAAU,EAIlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,eAAe,CA0D3F;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;CAM3B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Klinger Oscillator Indicator
|
|
3
|
+
*
|
|
4
|
+
* Volume-based oscillator that measures long-term money flow trends.
|
|
5
|
+
* Uses the difference between two EMAs of signed volume.
|
|
6
|
+
*
|
|
7
|
+
* Based on TradingView's Klinger Oscillator indicator.
|
|
8
|
+
*/
|
|
9
|
+
import { type Bar, type IndicatorResult, type InputConfig, type PlotConfig } from 'oakscriptjs';
|
|
10
|
+
export interface KlingerInputs {
|
|
11
|
+
/** Fast EMA period */
|
|
12
|
+
fastLength: number;
|
|
13
|
+
/** Slow EMA period */
|
|
14
|
+
slowLength: number;
|
|
15
|
+
/** Signal line period */
|
|
16
|
+
signalLength: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const defaultInputs: KlingerInputs;
|
|
19
|
+
export declare const inputConfig: InputConfig[];
|
|
20
|
+
export declare const plotConfig: PlotConfig[];
|
|
21
|
+
export declare const metadata: {
|
|
22
|
+
title: string;
|
|
23
|
+
shortTitle: string;
|
|
24
|
+
overlay: boolean;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Calculate Klinger Oscillator
|
|
28
|
+
*
|
|
29
|
+
* Algorithm from PineScript:
|
|
30
|
+
* sv = ta.change(hlc3) >= 0 ? volume : -volume
|
|
31
|
+
* kvo = ta.ema(sv, 34) - ta.ema(sv, 55)
|
|
32
|
+
* sig = ta.ema(kvo, 13)
|
|
33
|
+
*/
|
|
34
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<KlingerInputs>): IndicatorResult;
|
|
35
|
+
export declare const KlingerOscillator: {
|
|
36
|
+
calculate: typeof calculate;
|
|
37
|
+
metadata: {
|
|
38
|
+
title: string;
|
|
39
|
+
shortTitle: string;
|
|
40
|
+
overlay: boolean;
|
|
41
|
+
};
|
|
42
|
+
defaultInputs: KlingerInputs;
|
|
43
|
+
inputConfig: InputConfig[];
|
|
44
|
+
plotConfig: PlotConfig[];
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=klinger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"klinger.d.ts","sourceRoot":"","sources":["../src/klinger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAc,KAAK,GAAG,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,aAAa;IAC5B,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,aAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAIpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAGlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,eAAe,CAmE3F;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;CAM7B,CAAC"}
|
package/dist/lsma.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Least Squares Moving Average (LSMA) Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* Uses linear regression to fit a line through recent prices.
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
|
|
8
|
+
export interface LSMAInputs {
|
|
9
|
+
length: number;
|
|
10
|
+
src: SourceType;
|
|
11
|
+
offset: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const defaultInputs: LSMAInputs;
|
|
14
|
+
export declare const inputConfig: InputConfig[];
|
|
15
|
+
export declare const plotConfig: PlotConfig[];
|
|
16
|
+
export declare const metadata: {
|
|
17
|
+
title: string;
|
|
18
|
+
shortTitle: string;
|
|
19
|
+
overlay: boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<LSMAInputs>): IndicatorResult;
|
|
22
|
+
export declare const LSMA: {
|
|
23
|
+
calculate: typeof calculate;
|
|
24
|
+
metadata: {
|
|
25
|
+
title: string;
|
|
26
|
+
shortTitle: string;
|
|
27
|
+
overlay: boolean;
|
|
28
|
+
};
|
|
29
|
+
defaultInputs: LSMAInputs;
|
|
30
|
+
inputConfig: InputConfig[];
|
|
31
|
+
plotConfig: PlotConfig[];
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=lsma.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lsma.d.ts","sourceRoot":"","sources":["../src/lsma.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAuB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtI,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,UAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAIpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,UAAU,CAAM,GAAG,eAAe,CAgBxF;AAED,eAAO,MAAM,IAAI;;;;;;;;;;CAAkE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MA Cross Indicator
|
|
3
|
+
*
|
|
4
|
+
* Shows two moving averages and their crossover signals.
|
|
5
|
+
* Uses SMA by default.
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
|
|
8
|
+
export interface MACrossInputs {
|
|
9
|
+
/** Short MA period */
|
|
10
|
+
shortLength: number;
|
|
11
|
+
/** Long MA period */
|
|
12
|
+
longLength: number;
|
|
13
|
+
}
|
|
14
|
+
export declare const defaultInputs: MACrossInputs;
|
|
15
|
+
export declare const inputConfig: InputConfig[];
|
|
16
|
+
export declare const plotConfig: PlotConfig[];
|
|
17
|
+
export declare const metadata: {
|
|
18
|
+
title: string;
|
|
19
|
+
shortTitle: string;
|
|
20
|
+
overlay: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<MACrossInputs>): IndicatorResult;
|
|
23
|
+
export declare const MACross: {
|
|
24
|
+
calculate: typeof calculate;
|
|
25
|
+
metadata: {
|
|
26
|
+
title: string;
|
|
27
|
+
shortTitle: string;
|
|
28
|
+
overlay: boolean;
|
|
29
|
+
};
|
|
30
|
+
defaultInputs: MACrossInputs;
|
|
31
|
+
inputConfig: InputConfig[];
|
|
32
|
+
plotConfig: PlotConfig[];
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=ma-cross.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ma-cross.d.ts","sourceRoot":"","sources":["../src/ma-cross.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,aAAa;IAC5B,sBAAsB;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,aAG3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAGpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAGlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,aAAa,CAAM,GAAG,eAAe,CAiC3F;AAED,eAAO,MAAM,OAAO;;;;;;;;;;CAMnB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moving Average Ribbon Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* Displays up to 4 moving averages to visualize trend direction and momentum.
|
|
6
|
+
* Based on TradingView's official MA Ribbon indicator.
|
|
7
|
+
*/
|
|
8
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
|
|
9
|
+
export interface MARibbonInputs {
|
|
10
|
+
/** Show MA 1 */
|
|
11
|
+
showMa1: boolean;
|
|
12
|
+
/** MA 1 type */
|
|
13
|
+
ma1Type: 'SMA' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA';
|
|
14
|
+
/** MA 1 source */
|
|
15
|
+
ma1Source: SourceType;
|
|
16
|
+
/** MA 1 length */
|
|
17
|
+
ma1Length: number;
|
|
18
|
+
/** Show MA 2 */
|
|
19
|
+
showMa2: boolean;
|
|
20
|
+
/** MA 2 type */
|
|
21
|
+
ma2Type: 'SMA' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA';
|
|
22
|
+
/** MA 2 source */
|
|
23
|
+
ma2Source: SourceType;
|
|
24
|
+
/** MA 2 length */
|
|
25
|
+
ma2Length: number;
|
|
26
|
+
/** Show MA 3 */
|
|
27
|
+
showMa3: boolean;
|
|
28
|
+
/** MA 3 type */
|
|
29
|
+
ma3Type: 'SMA' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA';
|
|
30
|
+
/** MA 3 source */
|
|
31
|
+
ma3Source: SourceType;
|
|
32
|
+
/** MA 3 length */
|
|
33
|
+
ma3Length: number;
|
|
34
|
+
/** Show MA 4 */
|
|
35
|
+
showMa4: boolean;
|
|
36
|
+
/** MA 4 type */
|
|
37
|
+
ma4Type: 'SMA' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA';
|
|
38
|
+
/** MA 4 source */
|
|
39
|
+
ma4Source: SourceType;
|
|
40
|
+
/** MA 4 length */
|
|
41
|
+
ma4Length: number;
|
|
42
|
+
}
|
|
43
|
+
export declare const defaultInputs: MARibbonInputs;
|
|
44
|
+
export declare const inputConfig: InputConfig[];
|
|
45
|
+
export declare const plotConfig: PlotConfig[];
|
|
46
|
+
export declare const metadata: {
|
|
47
|
+
title: string;
|
|
48
|
+
shortTitle: string;
|
|
49
|
+
overlay: boolean;
|
|
50
|
+
};
|
|
51
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<MARibbonInputs>): IndicatorResult;
|
|
52
|
+
export declare const MARibbon: {
|
|
53
|
+
calculate: typeof calculate;
|
|
54
|
+
metadata: {
|
|
55
|
+
title: string;
|
|
56
|
+
shortTitle: string;
|
|
57
|
+
overlay: boolean;
|
|
58
|
+
};
|
|
59
|
+
defaultInputs: MARibbonInputs;
|
|
60
|
+
inputConfig: InputConfig[];
|
|
61
|
+
plotConfig: PlotConfig[];
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=ma-ribbon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ma-ribbon.d.ts","sourceRoot":"","sources":["../src/ma-ribbon.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA+B,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9I,MAAM,WAAW,cAAc;IAC7B,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB;IAChB,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;IACvD,kBAAkB;IAClB,SAAS,EAAE,UAAU,CAAC;IACtB,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB;IAChB,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;IACvD,kBAAkB;IAClB,SAAS,EAAE,UAAU,CAAC;IACtB,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB;IAChB,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;IACvD,kBAAkB;IAClB,SAAS,EAAE,UAAU,CAAC;IACtB,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,gBAAgB;IAChB,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;IACvD,kBAAkB;IAClB,SAAS,EAAE,UAAU,CAAC;IACtB,kBAAkB;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,EAAE,cAiB3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAiBpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAKlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AA6BF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,eAAe,CA0C5F;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;CAMpB,CAAC"}
|
package/dist/macd.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moving Average Convergence Divergence (MACD) Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* Trend-following momentum indicator showing relationship between two EMAs.
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
|
|
8
|
+
export interface MACDInputs {
|
|
9
|
+
fastLength: number;
|
|
10
|
+
slowLength: number;
|
|
11
|
+
signalLength: number;
|
|
12
|
+
src: SourceType;
|
|
13
|
+
}
|
|
14
|
+
export declare const defaultInputs: MACDInputs;
|
|
15
|
+
export declare const inputConfig: InputConfig[];
|
|
16
|
+
export declare const plotConfig: PlotConfig[];
|
|
17
|
+
export declare const metadata: {
|
|
18
|
+
title: string;
|
|
19
|
+
shortTitle: string;
|
|
20
|
+
overlay: boolean;
|
|
21
|
+
};
|
|
22
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<MACDInputs>): IndicatorResult;
|
|
23
|
+
export declare const MACD: {
|
|
24
|
+
calculate: typeof calculate;
|
|
25
|
+
metadata: {
|
|
26
|
+
title: string;
|
|
27
|
+
shortTitle: string;
|
|
28
|
+
overlay: boolean;
|
|
29
|
+
};
|
|
30
|
+
defaultInputs: MACDInputs;
|
|
31
|
+
inputConfig: InputConfig[];
|
|
32
|
+
plotConfig: PlotConfig[];
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=macd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"macd.d.ts","sourceRoot":"","sources":["../src/macd.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAuB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtI,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,UAK3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAKpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAIlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,UAAU,CAAM,GAAG,eAAe,CAsCxF;AAED,eAAO,MAAM,IAAI;;;;;;;;;;CAAkE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mass Index Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* Identifies trend reversals by examining range between high and low.
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
|
|
8
|
+
export interface MassIndexInputs {
|
|
9
|
+
length: number;
|
|
10
|
+
}
|
|
11
|
+
export declare const defaultInputs: MassIndexInputs;
|
|
12
|
+
export declare const inputConfig: InputConfig[];
|
|
13
|
+
export declare const plotConfig: PlotConfig[];
|
|
14
|
+
export declare const metadata: {
|
|
15
|
+
title: string;
|
|
16
|
+
shortTitle: string;
|
|
17
|
+
overlay: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<MassIndexInputs>): IndicatorResult;
|
|
20
|
+
export declare const MassIndex: {
|
|
21
|
+
calculate: typeof calculate;
|
|
22
|
+
metadata: {
|
|
23
|
+
title: string;
|
|
24
|
+
shortTitle: string;
|
|
25
|
+
overlay: boolean;
|
|
26
|
+
};
|
|
27
|
+
defaultInputs: MassIndexInputs;
|
|
28
|
+
inputConfig: InputConfig[];
|
|
29
|
+
plotConfig: PlotConfig[];
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=mass-index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mass-index.d.ts","sourceRoot":"","sources":["../src/mass-index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,eAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAEpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CA0C7F;AAED,eAAO,MAAM,SAAS;;;;;;;;;;CAAkE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* McGinley Dynamic Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* An adaptive moving average that adjusts to market speed.
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
|
|
8
|
+
export interface McGinleyDynamicInputs {
|
|
9
|
+
length: number;
|
|
10
|
+
src: SourceType;
|
|
11
|
+
}
|
|
12
|
+
export declare const defaultInputs: McGinleyDynamicInputs;
|
|
13
|
+
export declare const inputConfig: InputConfig[];
|
|
14
|
+
export declare const plotConfig: PlotConfig[];
|
|
15
|
+
export declare const metadata: {
|
|
16
|
+
title: string;
|
|
17
|
+
shortTitle: string;
|
|
18
|
+
overlay: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<McGinleyDynamicInputs>): IndicatorResult;
|
|
21
|
+
export declare const McGinleyDynamic: {
|
|
22
|
+
calculate: typeof calculate;
|
|
23
|
+
metadata: {
|
|
24
|
+
title: string;
|
|
25
|
+
shortTitle: string;
|
|
26
|
+
overlay: boolean;
|
|
27
|
+
};
|
|
28
|
+
defaultInputs: McGinleyDynamicInputs;
|
|
29
|
+
inputConfig: InputConfig[];
|
|
30
|
+
plotConfig: PlotConfig[];
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=mcginley-dynamic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcginley-dynamic.d.ts","sourceRoot":"","sources":["../src/mcginley-dynamic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAElI,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,qBAG3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAGpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,qBAAqB,CAAM,GAAG,eAAe,CA+BnG;AAED,eAAO,MAAM,eAAe;;;;;;;;;;CAAkE,CAAC"}
|
package/dist/median.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Median Indicator
|
|
3
|
+
*
|
|
4
|
+
* Shows the median price with ATR-based bands and EMA.
|
|
5
|
+
*/
|
|
6
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
|
|
7
|
+
export interface MedianInputs {
|
|
8
|
+
/** Median calculation length */
|
|
9
|
+
length: number;
|
|
10
|
+
/** ATR length */
|
|
11
|
+
atrLength: number;
|
|
12
|
+
/** ATR multiplier for bands */
|
|
13
|
+
atrMult: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const defaultInputs: MedianInputs;
|
|
16
|
+
export declare const inputConfig: InputConfig[];
|
|
17
|
+
export declare const plotConfig: PlotConfig[];
|
|
18
|
+
export declare const metadata: {
|
|
19
|
+
title: string;
|
|
20
|
+
shortTitle: string;
|
|
21
|
+
overlay: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<MedianInputs>): IndicatorResult;
|
|
24
|
+
export declare const Median: {
|
|
25
|
+
calculate: typeof calculate;
|
|
26
|
+
metadata: {
|
|
27
|
+
title: string;
|
|
28
|
+
shortTitle: string;
|
|
29
|
+
overlay: boolean;
|
|
30
|
+
};
|
|
31
|
+
defaultInputs: MedianInputs;
|
|
32
|
+
inputConfig: InputConfig[];
|
|
33
|
+
plotConfig: PlotConfig[];
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=median.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"median.d.ts","sourceRoot":"","sources":["../src/median.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,YAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAIpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAKlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAYF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GAAG,eAAe,CAyE1F;AAED,eAAO,MAAM,MAAM;;;;;;;;;;CAMlB,CAAC"}
|
package/dist/mfi.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Money Flow Index (MFI) Indicator
|
|
3
|
+
*
|
|
4
|
+
* Volume-weighted RSI that measures buying and selling pressure.
|
|
5
|
+
* Range: 0 to 100
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
|
|
8
|
+
export interface MFIInputs {
|
|
9
|
+
/** Period length */
|
|
10
|
+
length: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const defaultInputs: MFIInputs;
|
|
13
|
+
export declare const inputConfig: InputConfig[];
|
|
14
|
+
export declare const plotConfig: PlotConfig[];
|
|
15
|
+
export declare const metadata: {
|
|
16
|
+
title: string;
|
|
17
|
+
shortTitle: string;
|
|
18
|
+
overlay: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<MFIInputs>): IndicatorResult;
|
|
21
|
+
export declare const MFI: {
|
|
22
|
+
calculate: typeof calculate;
|
|
23
|
+
metadata: {
|
|
24
|
+
title: string;
|
|
25
|
+
shortTitle: string;
|
|
26
|
+
overlay: boolean;
|
|
27
|
+
};
|
|
28
|
+
defaultInputs: MFIInputs;
|
|
29
|
+
inputConfig: InputConfig[];
|
|
30
|
+
plotConfig: PlotConfig[];
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=mfi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mfi.d.ts","sourceRoot":"","sources":["../src/mfi.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAEhG,MAAM,WAAW,SAAS;IACxB,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,SAE3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAEpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,SAAS,CAAM,GAAG,eAAe,CAuDvF;AAED,eAAO,MAAM,GAAG;;;;;;;;;;CAMf,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Momentum Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* Measures the rate of change of price over a specified period.
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
|
|
8
|
+
export interface MomentumInputs {
|
|
9
|
+
length: number;
|
|
10
|
+
src: SourceType;
|
|
11
|
+
}
|
|
12
|
+
export declare const defaultInputs: MomentumInputs;
|
|
13
|
+
export declare const inputConfig: InputConfig[];
|
|
14
|
+
export declare const plotConfig: PlotConfig[];
|
|
15
|
+
export declare const metadata: {
|
|
16
|
+
title: string;
|
|
17
|
+
shortTitle: string;
|
|
18
|
+
overlay: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<MomentumInputs>): IndicatorResult;
|
|
21
|
+
export declare const Momentum: {
|
|
22
|
+
calculate: typeof calculate;
|
|
23
|
+
metadata: {
|
|
24
|
+
title: string;
|
|
25
|
+
shortTitle: string;
|
|
26
|
+
overlay: boolean;
|
|
27
|
+
};
|
|
28
|
+
defaultInputs: MomentumInputs;
|
|
29
|
+
inputConfig: InputConfig[];
|
|
30
|
+
plotConfig: PlotConfig[];
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=momentum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"momentum.d.ts","sourceRoot":"","sources":["../src/momentum.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAuB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtI,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,cAG3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAGpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,eAAe,CAc5F;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;CAAkE,CAAC"}
|
package/dist/obv.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* On Balance Volume (OBV) Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* Cumulative volume indicator that adds volume on up days and subtracts on down days.
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
|
|
8
|
+
export interface OBVInputs {
|
|
9
|
+
}
|
|
10
|
+
export declare const defaultInputs: OBVInputs;
|
|
11
|
+
export declare const inputConfig: InputConfig[];
|
|
12
|
+
export declare const plotConfig: PlotConfig[];
|
|
13
|
+
export declare const metadata: {
|
|
14
|
+
title: string;
|
|
15
|
+
shortTitle: string;
|
|
16
|
+
overlay: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<OBVInputs>): IndicatorResult;
|
|
19
|
+
export declare const OBV: {
|
|
20
|
+
calculate: typeof calculate;
|
|
21
|
+
metadata: {
|
|
22
|
+
title: string;
|
|
23
|
+
shortTitle: string;
|
|
24
|
+
overlay: boolean;
|
|
25
|
+
};
|
|
26
|
+
defaultInputs: OBVInputs;
|
|
27
|
+
inputConfig: InputConfig[];
|
|
28
|
+
plotConfig: PlotConfig[];
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=obv.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"obv.d.ts","sourceRoot":"","sources":["../src/obv.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAExG,MAAM,WAAW,SAAS;CAEzB;AAED,eAAO,MAAM,aAAa,EAAE,SAAc,CAAC;AAE3C,eAAO,MAAM,WAAW,EAAE,WAAW,EAAO,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,SAAS,CAAM,GAAG,eAAe,CAsCvF;AAED,eAAO,MAAM,GAAG;;;;;;;;;;CAAkE,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parabolic SAR Indicator
|
|
3
|
+
*
|
|
4
|
+
* Hand-optimized implementation using oakscriptjs.
|
|
5
|
+
* A trend-following indicator that provides potential entry and exit points.
|
|
6
|
+
* SAR stands for "Stop and Reverse".
|
|
7
|
+
*/
|
|
8
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
|
|
9
|
+
/**
|
|
10
|
+
* Parabolic SAR indicator input parameters
|
|
11
|
+
*/
|
|
12
|
+
export interface ParabolicSARInputs {
|
|
13
|
+
/** Acceleration Factor start value */
|
|
14
|
+
start: number;
|
|
15
|
+
/** Acceleration Factor increment */
|
|
16
|
+
increment: number;
|
|
17
|
+
/** Acceleration Factor maximum */
|
|
18
|
+
maximum: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Default input values matching TradingView defaults
|
|
22
|
+
*/
|
|
23
|
+
export declare const defaultInputs: ParabolicSARInputs;
|
|
24
|
+
/**
|
|
25
|
+
* Input configuration for UI
|
|
26
|
+
*/
|
|
27
|
+
export declare const inputConfig: InputConfig[];
|
|
28
|
+
/**
|
|
29
|
+
* Plot configuration - single output: ParabolicSAR
|
|
30
|
+
*/
|
|
31
|
+
export declare const plotConfig: PlotConfig[];
|
|
32
|
+
/**
|
|
33
|
+
* Indicator metadata
|
|
34
|
+
*/
|
|
35
|
+
export declare const metadata: {
|
|
36
|
+
title: string;
|
|
37
|
+
shortTitle: string;
|
|
38
|
+
overlay: boolean;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Calculate Parabolic SAR indicator
|
|
42
|
+
*
|
|
43
|
+
* @param bars - OHLCV bar data
|
|
44
|
+
* @param inputs - Indicator parameters (optional, uses defaults)
|
|
45
|
+
* @returns Indicator result with plot data
|
|
46
|
+
*/
|
|
47
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<ParabolicSARInputs>): IndicatorResult;
|
|
48
|
+
/**
|
|
49
|
+
* Parabolic SAR indicator module
|
|
50
|
+
*/
|
|
51
|
+
export declare const ParabolicSAR: {
|
|
52
|
+
calculate: typeof calculate;
|
|
53
|
+
metadata: {
|
|
54
|
+
title: string;
|
|
55
|
+
shortTitle: string;
|
|
56
|
+
overlay: boolean;
|
|
57
|
+
};
|
|
58
|
+
defaultInputs: ParabolicSARInputs;
|
|
59
|
+
inputConfig: InputConfig[];
|
|
60
|
+
plotConfig: PlotConfig[];
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=parabolic-sar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parabolic-sar.d.ts","sourceRoot":"","sources":["../src/parabolic-sar.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAM,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAEpG;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,kBAI3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,EAIpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,kBAAkB,CAAM,GAAG,eAAe,CAuBhG;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;CAMxB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Price Oscillator (PPO) Indicator
|
|
3
|
+
*
|
|
4
|
+
* Similar to MACD but expressed as a percentage.
|
|
5
|
+
* PPO = ((Short MA - Long MA) / Long MA) * 100
|
|
6
|
+
*/
|
|
7
|
+
import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
|
|
8
|
+
export interface PriceOscillatorInputs {
|
|
9
|
+
/** Short MA length */
|
|
10
|
+
shortLength: number;
|
|
11
|
+
/** Long MA length */
|
|
12
|
+
longLength: number;
|
|
13
|
+
/** Signal line length */
|
|
14
|
+
signalLength: number;
|
|
15
|
+
/** Price source */
|
|
16
|
+
src: SourceType;
|
|
17
|
+
/** Use exponential MA */
|
|
18
|
+
exponential: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const defaultInputs: PriceOscillatorInputs;
|
|
21
|
+
export declare const inputConfig: InputConfig[];
|
|
22
|
+
export declare const plotConfig: PlotConfig[];
|
|
23
|
+
export declare const metadata: {
|
|
24
|
+
title: string;
|
|
25
|
+
shortTitle: string;
|
|
26
|
+
overlay: boolean;
|
|
27
|
+
};
|
|
28
|
+
export declare function calculate(bars: Bar[], inputs?: Partial<PriceOscillatorInputs>): IndicatorResult;
|
|
29
|
+
export declare const PriceOscillator: {
|
|
30
|
+
calculate: typeof calculate;
|
|
31
|
+
metadata: {
|
|
32
|
+
title: string;
|
|
33
|
+
shortTitle: string;
|
|
34
|
+
overlay: boolean;
|
|
35
|
+
};
|
|
36
|
+
defaultInputs: PriceOscillatorInputs;
|
|
37
|
+
inputConfig: InputConfig[];
|
|
38
|
+
plotConfig: PlotConfig[];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=price-oscillator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price-oscillator.d.ts","sourceRoot":"","sources":["../src/price-oscillator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA+B,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9I,MAAM,WAAW,qBAAqB;IACpC,sBAAsB;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB;IACnB,GAAG,EAAE,UAAU,CAAC;IAChB,yBAAyB;IACzB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,qBAM3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAMpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAIlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,qBAAqB,CAAM,GAAG,eAAe,CA2DnG;AAED,eAAO,MAAM,eAAe;;;;;;;;;;CAM3B,CAAC"}
|