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.
Files changed (149) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +271 -0
  3. package/dist/adr.d.ts +57 -0
  4. package/dist/adr.d.ts.map +1 -0
  5. package/dist/adx.d.ts +34 -0
  6. package/dist/adx.d.ts.map +1 -0
  7. package/dist/alma.d.ts +61 -0
  8. package/dist/alma.d.ts.map +1 -0
  9. package/dist/aroon.d.ts +34 -0
  10. package/dist/aroon.d.ts.map +1 -0
  11. package/dist/atr.d.ts +59 -0
  12. package/dist/atr.d.ts.map +1 -0
  13. package/dist/awesome-oscillator.d.ts +34 -0
  14. package/dist/awesome-oscillator.d.ts.map +1 -0
  15. package/dist/bb-bandwidth.d.ts +41 -0
  16. package/dist/bb-bandwidth.d.ts.map +1 -0
  17. package/dist/bb-percent-b.d.ts +37 -0
  18. package/dist/bb-percent-b.d.ts.map +1 -0
  19. package/dist/bb.d.ts +65 -0
  20. package/dist/bb.d.ts.map +1 -0
  21. package/dist/bbtrend.d.ts +36 -0
  22. package/dist/bbtrend.d.ts.map +1 -0
  23. package/dist/bop.d.ts +57 -0
  24. package/dist/bop.d.ts.map +1 -0
  25. package/dist/bull-bear-power.d.ts +32 -0
  26. package/dist/bull-bear-power.d.ts.map +1 -0
  27. package/dist/cci.d.ts +33 -0
  28. package/dist/cci.d.ts.map +1 -0
  29. package/dist/chaikin-mf.d.ts +33 -0
  30. package/dist/chaikin-mf.d.ts.map +1 -0
  31. package/dist/chaikin-oscillator.d.ts +37 -0
  32. package/dist/chaikin-oscillator.d.ts.map +1 -0
  33. package/dist/chande-kroll-stop.d.ts +47 -0
  34. package/dist/chande-kroll-stop.d.ts.map +1 -0
  35. package/dist/chande-mo.d.ts +32 -0
  36. package/dist/chande-mo.d.ts.map +1 -0
  37. package/dist/choppiness.d.ts +34 -0
  38. package/dist/choppiness.d.ts.map +1 -0
  39. package/dist/coppock-curve.d.ts +37 -0
  40. package/dist/coppock-curve.d.ts.map +1 -0
  41. package/dist/dema.d.ts +33 -0
  42. package/dist/dema.d.ts.map +1 -0
  43. package/dist/dmi.d.ts +49 -0
  44. package/dist/dmi.d.ts.map +1 -0
  45. package/dist/donchian.d.ts +60 -0
  46. package/dist/donchian.d.ts.map +1 -0
  47. package/dist/dpo.d.ts +34 -0
  48. package/dist/dpo.d.ts.map +1 -0
  49. package/dist/ease-of-movement.d.ts +35 -0
  50. package/dist/ease-of-movement.d.ts.map +1 -0
  51. package/dist/elder-force.d.ts +33 -0
  52. package/dist/elder-force.d.ts.map +1 -0
  53. package/dist/ema.d.ts +33 -0
  54. package/dist/ema.d.ts.map +1 -0
  55. package/dist/envelope.d.ts +38 -0
  56. package/dist/envelope.d.ts.map +1 -0
  57. package/dist/fisher-transform.d.ts +44 -0
  58. package/dist/fisher-transform.d.ts.map +1 -0
  59. package/dist/historical-volatility.d.ts +36 -0
  60. package/dist/historical-volatility.d.ts.map +1 -0
  61. package/dist/hma.d.ts +32 -0
  62. package/dist/hma.d.ts.map +1 -0
  63. package/dist/ichimoku.d.ts +64 -0
  64. package/dist/ichimoku.d.ts.map +1 -0
  65. package/dist/index.cjs +5532 -0
  66. package/dist/index.d.ts +207 -0
  67. package/dist/index.d.ts.map +1 -0
  68. package/dist/index.mjs +5511 -0
  69. package/dist/keltner.d.ts +68 -0
  70. package/dist/keltner.d.ts.map +1 -0
  71. package/dist/klinger.d.ts +46 -0
  72. package/dist/klinger.d.ts.map +1 -0
  73. package/dist/lsma.d.ts +33 -0
  74. package/dist/lsma.d.ts.map +1 -0
  75. package/dist/ma-cross.d.ts +34 -0
  76. package/dist/ma-cross.d.ts.map +1 -0
  77. package/dist/ma-ribbon.d.ts +63 -0
  78. package/dist/ma-ribbon.d.ts.map +1 -0
  79. package/dist/macd.d.ts +34 -0
  80. package/dist/macd.d.ts.map +1 -0
  81. package/dist/mass-index.d.ts +31 -0
  82. package/dist/mass-index.d.ts.map +1 -0
  83. package/dist/mcginley-dynamic.d.ts +32 -0
  84. package/dist/mcginley-dynamic.d.ts.map +1 -0
  85. package/dist/median.d.ts +35 -0
  86. package/dist/median.d.ts.map +1 -0
  87. package/dist/mfi.d.ts +32 -0
  88. package/dist/mfi.d.ts.map +1 -0
  89. package/dist/momentum.d.ts +32 -0
  90. package/dist/momentum.d.ts.map +1 -0
  91. package/dist/obv.d.ts +30 -0
  92. package/dist/obv.d.ts.map +1 -0
  93. package/dist/parabolic-sar.d.ts +62 -0
  94. package/dist/parabolic-sar.d.ts.map +1 -0
  95. package/dist/price-oscillator.d.ts +40 -0
  96. package/dist/price-oscillator.d.ts.map +1 -0
  97. package/dist/pvt.d.ts +30 -0
  98. package/dist/pvt.d.ts.map +1 -0
  99. package/dist/rma.d.ts +33 -0
  100. package/dist/rma.d.ts.map +1 -0
  101. package/dist/roc.d.ts +32 -0
  102. package/dist/roc.d.ts.map +1 -0
  103. package/dist/rsi.d.ts +32 -0
  104. package/dist/rsi.d.ts.map +1 -0
  105. package/dist/rvi.d.ts +32 -0
  106. package/dist/rvi.d.ts.map +1 -0
  107. package/dist/sma.d.ts +61 -0
  108. package/dist/sma.d.ts.map +1 -0
  109. package/dist/smi-ergodic-oscillator.d.ts +36 -0
  110. package/dist/smi-ergodic-oscillator.d.ts.map +1 -0
  111. package/dist/smi-ergodic.d.ts +37 -0
  112. package/dist/smi-ergodic.d.ts.map +1 -0
  113. package/dist/smma.d.ts +32 -0
  114. package/dist/smma.d.ts.map +1 -0
  115. package/dist/stdev.d.ts +31 -0
  116. package/dist/stdev.d.ts.map +1 -0
  117. package/dist/stoch-rsi.d.ts +38 -0
  118. package/dist/stoch-rsi.d.ts.map +1 -0
  119. package/dist/stoch.d.ts +33 -0
  120. package/dist/stoch.d.ts.map +1 -0
  121. package/dist/supertrend.d.ts +60 -0
  122. package/dist/supertrend.d.ts.map +1 -0
  123. package/dist/tema.d.ts +33 -0
  124. package/dist/tema.d.ts.map +1 -0
  125. package/dist/trend-strength.d.ts +34 -0
  126. package/dist/trend-strength.d.ts.map +1 -0
  127. package/dist/trix.d.ts +43 -0
  128. package/dist/trix.d.ts.map +1 -0
  129. package/dist/tsi.d.ts +36 -0
  130. package/dist/tsi.d.ts.map +1 -0
  131. package/dist/ultimate-oscillator.d.ts +48 -0
  132. package/dist/ultimate-oscillator.d.ts.map +1 -0
  133. package/dist/volume-oscillator.d.ts +34 -0
  134. package/dist/volume-oscillator.d.ts.map +1 -0
  135. package/dist/vortex.d.ts +32 -0
  136. package/dist/vortex.d.ts.map +1 -0
  137. package/dist/vwma.d.ts +32 -0
  138. package/dist/vwma.d.ts.map +1 -0
  139. package/dist/williams-alligator.d.ts +44 -0
  140. package/dist/williams-alligator.d.ts.map +1 -0
  141. package/dist/williams-r.d.ts +33 -0
  142. package/dist/williams-r.d.ts.map +1 -0
  143. package/dist/wma.d.ts +32 -0
  144. package/dist/wma.d.ts.map +1 -0
  145. package/dist/woodies-cci.d.ts +35 -0
  146. package/dist/woodies-cci.d.ts.map +1 -0
  147. package/dist/zigzag.d.ts +73 -0
  148. package/dist/zigzag.d.ts.map +1 -0
  149. package/package.json +65 -0
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Bollinger Bands %B Indicator
3
+ *
4
+ * Shows where price is relative to the Bollinger Bands.
5
+ * %B = (Price - Lower Band) / (Upper Band - Lower Band)
6
+ * Values above 1 = price above upper band, below 0 = price below lower band
7
+ */
8
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
9
+ export interface BBPercentBInputs {
10
+ /** Period length */
11
+ length: number;
12
+ /** Price source */
13
+ src: SourceType;
14
+ /** Standard deviation multiplier */
15
+ mult: number;
16
+ }
17
+ export declare const defaultInputs: BBPercentBInputs;
18
+ export declare const inputConfig: InputConfig[];
19
+ export declare const plotConfig: PlotConfig[];
20
+ export declare const metadata: {
21
+ title: string;
22
+ shortTitle: string;
23
+ overlay: boolean;
24
+ };
25
+ export declare function calculate(bars: Bar[], inputs?: Partial<BBPercentBInputs>): IndicatorResult;
26
+ export declare const BBPercentB: {
27
+ calculate: typeof calculate;
28
+ metadata: {
29
+ title: string;
30
+ shortTitle: string;
31
+ overlay: boolean;
32
+ };
33
+ defaultInputs: BBPercentBInputs;
34
+ inputConfig: InputConfig[];
35
+ plotConfig: PlotConfig[];
36
+ };
37
+ //# sourceMappingURL=bb-percent-b.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bb-percent-b.d.ts","sourceRoot":"","sources":["../src/bb-percent-b.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAuB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtI,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB;IACnB,GAAG,EAAE,UAAU,CAAC;IAChB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,aAAa,EAAE,gBAI3B,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,gBAAgB,CAAM,GAAG,eAAe,CA2C9F;AAED,eAAO,MAAM,UAAU;;;;;;;;;;CAMtB,CAAC"}
package/dist/bb.d.ts ADDED
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Bollinger Bands (BB) Indicator
3
+ *
4
+ * Hand-optimized implementation using oakscriptjs.
5
+ * Volatility bands placed above and below a moving average, using standard deviation.
6
+ */
7
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
8
+ /**
9
+ * BB indicator input parameters
10
+ */
11
+ export interface BBInputs {
12
+ /** Period length */
13
+ length: number;
14
+ /** Moving average type for basis */
15
+ maType: 'SMA' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA';
16
+ /** Price source */
17
+ src: SourceType;
18
+ /** Standard deviation multiplier */
19
+ mult: number;
20
+ /** Plot offset */
21
+ offset: number;
22
+ }
23
+ /**
24
+ * Default input values
25
+ */
26
+ export declare const defaultInputs: BBInputs;
27
+ /**
28
+ * Input configuration for UI
29
+ */
30
+ export declare const inputConfig: InputConfig[];
31
+ /**
32
+ * Plot configuration
33
+ */
34
+ export declare const plotConfig: PlotConfig[];
35
+ /**
36
+ * Indicator metadata
37
+ */
38
+ export declare const metadata: {
39
+ title: string;
40
+ shortTitle: string;
41
+ overlay: boolean;
42
+ };
43
+ /**
44
+ * Calculate BB indicator
45
+ *
46
+ * @param bars - OHLCV bar data
47
+ * @param inputs - Indicator parameters (optional, uses defaults)
48
+ * @returns Indicator result with plot data
49
+ */
50
+ export declare function calculate(bars: Bar[], inputs?: Partial<BBInputs>): IndicatorResult;
51
+ /**
52
+ * BB indicator module
53
+ */
54
+ export declare const BollingerBands: {
55
+ calculate: typeof calculate;
56
+ metadata: {
57
+ title: string;
58
+ shortTitle: string;
59
+ overlay: boolean;
60
+ };
61
+ defaultInputs: BBInputs;
62
+ inputConfig: InputConfig[];
63
+ plotConfig: PlotConfig[];
64
+ };
65
+ //# sourceMappingURL=bb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bb.d.ts","sourceRoot":"","sources":["../src/bb.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;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC;IACtD,mBAAmB;IACnB,GAAG,EAAE,UAAU,CAAC;IAChB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,QAM3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,EAMpC,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,QAAQ,CAAM,GAAG,eAAe,CA+DtF;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;CAM1B,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * BBTrend Indicator
3
+ *
4
+ * Uses the difference between short and long Bollinger Bands
5
+ * to identify trend direction and strength.
6
+ */
7
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
8
+ export interface BBTrendInputs {
9
+ /** Short Bollinger Band length */
10
+ shortLength: number;
11
+ /** Long Bollinger Band length */
12
+ longLength: number;
13
+ /** Standard deviation multiplier */
14
+ stdDev: number;
15
+ }
16
+ export declare const defaultInputs: BBTrendInputs;
17
+ export declare const inputConfig: InputConfig[];
18
+ export declare const plotConfig: PlotConfig[];
19
+ export declare const metadata: {
20
+ title: string;
21
+ shortTitle: string;
22
+ overlay: boolean;
23
+ };
24
+ export declare function calculate(bars: Bar[], inputs?: Partial<BBTrendInputs>): IndicatorResult;
25
+ export declare const BBTrend: {
26
+ calculate: typeof calculate;
27
+ metadata: {
28
+ title: string;
29
+ shortTitle: string;
30
+ overlay: boolean;
31
+ };
32
+ defaultInputs: BBTrendInputs;
33
+ inputConfig: InputConfig[];
34
+ plotConfig: PlotConfig[];
35
+ };
36
+ //# sourceMappingURL=bbtrend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bbtrend.d.ts","sourceRoot":"","sources":["../src/bbtrend.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,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,aAI3B,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,aAAa,CAAM,GAAG,eAAe,CAiD3F;AAED,eAAO,MAAM,OAAO;;;;;;;;;;CAMnB,CAAC"}
package/dist/bop.d.ts ADDED
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Balance of Power (BOP) Indicator
3
+ *
4
+ * Hand-optimized implementation using oakscriptjs.
5
+ * Measures the strength of buyers vs sellers by comparing close-open to high-low range.
6
+ */
7
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
8
+ /**
9
+ * BOP indicator input parameters (none required)
10
+ */
11
+ export interface BOPInputs {
12
+ }
13
+ /**
14
+ * Default input values
15
+ */
16
+ export declare const defaultInputs: BOPInputs;
17
+ /**
18
+ * Input configuration for UI
19
+ */
20
+ export declare const inputConfig: InputConfig[];
21
+ /**
22
+ * Plot configuration
23
+ */
24
+ export declare const plotConfig: PlotConfig[];
25
+ /**
26
+ * Indicator metadata
27
+ */
28
+ export declare const metadata: {
29
+ title: string;
30
+ shortTitle: string;
31
+ overlay: boolean;
32
+ };
33
+ /**
34
+ * Calculate BOP indicator
35
+ *
36
+ * Formula: (close - open) / (high - low)
37
+ *
38
+ * @param bars - OHLCV bar data
39
+ * @param inputs - Indicator parameters (optional, none for BOP)
40
+ * @returns Indicator result with plot data
41
+ */
42
+ export declare function calculate(bars: Bar[], inputs?: Partial<BOPInputs>): IndicatorResult;
43
+ /**
44
+ * BOP indicator module
45
+ */
46
+ export declare const BOP: {
47
+ calculate: typeof calculate;
48
+ metadata: {
49
+ title: string;
50
+ shortTitle: string;
51
+ overlay: boolean;
52
+ };
53
+ defaultInputs: BOPInputs;
54
+ inputConfig: InputConfig[];
55
+ plotConfig: PlotConfig[];
56
+ };
57
+ //# sourceMappingURL=bop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bop.d.ts","sourceRoot":"","sources":["../src/bop.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAU,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAExG;;GAEG;AACH,MAAM,WAAW,SAAS;CAEzB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,SAAc,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,WAAW,EAAO,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,UAAU,EAElC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,SAAS,CAAM,GAAG,eAAe,CA0BvF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;CAMf,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Bull Bear Power Indicator
3
+ *
4
+ * Measures the strength of buyers (bulls) and sellers (bears)
5
+ * relative to an exponential moving average.
6
+ */
7
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
8
+ export interface BullBearPowerInputs {
9
+ /** EMA period length */
10
+ length: number;
11
+ }
12
+ export declare const defaultInputs: BullBearPowerInputs;
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<BullBearPowerInputs>): IndicatorResult;
21
+ export declare const BullBearPower: {
22
+ calculate: typeof calculate;
23
+ metadata: {
24
+ title: string;
25
+ shortTitle: string;
26
+ overlay: boolean;
27
+ };
28
+ defaultInputs: BullBearPowerInputs;
29
+ inputConfig: InputConfig[];
30
+ plotConfig: PlotConfig[];
31
+ };
32
+ //# sourceMappingURL=bull-bear-power.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bull-bear-power.d.ts","sourceRoot":"","sources":["../src/bull-bear-power.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,mBAAmB;IAClC,wBAAwB;IACxB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,mBAE3B,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,mBAAmB,CAAM,GAAG,eAAe,CAgCjG;AAED,eAAO,MAAM,aAAa;;;;;;;;;;CAMzB,CAAC"}
package/dist/cci.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Commodity Channel Index (CCI) Indicator
3
+ *
4
+ * Hand-optimized implementation using oakscriptjs.
5
+ * Measures the variation of a security's price from its statistical mean.
6
+ * High values show the price is unusually high compared to average, low values show it's unusually low.
7
+ */
8
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
9
+ export interface CCIInputs {
10
+ length: number;
11
+ src: SourceType;
12
+ }
13
+ export declare const defaultInputs: CCIInputs;
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<CCIInputs>): IndicatorResult;
22
+ export declare const CCI: {
23
+ calculate: typeof calculate;
24
+ metadata: {
25
+ title: string;
26
+ shortTitle: string;
27
+ overlay: boolean;
28
+ };
29
+ defaultInputs: CCIInputs;
30
+ inputConfig: InputConfig[];
31
+ plotConfig: PlotConfig[];
32
+ };
33
+ //# sourceMappingURL=cci.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cci.d.ts","sourceRoot":"","sources":["../src/cci.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAuB,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtI,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,UAAU,CAAC;CACjB;AAED,eAAO,MAAM,aAAa,EAAE,SAG3B,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,SAAS,CAAM,GAAG,eAAe,CAcvF;AAED,eAAO,MAAM,GAAG;;;;;;;;;;CAAkE,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Chaikin Money Flow (CMF) Indicator
3
+ *
4
+ * Measures the amount of Money Flow Volume over a specific period.
5
+ * CMF = Sum(Money Flow Volume, n) / Sum(Volume, n)
6
+ * where Money Flow Volume = ((Close - Low) - (High - Close)) / (High - Low) * Volume
7
+ */
8
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
9
+ export interface ChaikinMFInputs {
10
+ /** Period length */
11
+ length: number;
12
+ }
13
+ export declare const defaultInputs: ChaikinMFInputs;
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<ChaikinMFInputs>): IndicatorResult;
22
+ export declare const ChaikinMF: {
23
+ calculate: typeof calculate;
24
+ metadata: {
25
+ title: string;
26
+ shortTitle: string;
27
+ overlay: boolean;
28
+ };
29
+ defaultInputs: ChaikinMFInputs;
30
+ inputConfig: InputConfig[];
31
+ plotConfig: PlotConfig[];
32
+ };
33
+ //# sourceMappingURL=chaikin-mf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chaikin-mf.d.ts","sourceRoot":"","sources":["../src/chaikin-mf.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAEhG,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,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,CA2D7F;AAED,eAAO,MAAM,SAAS;;;;;;;;;;CAMrB,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Chaikin Oscillator
3
+ *
4
+ * Measures the momentum of the Accumulation/Distribution line.
5
+ * Chaikin Oscillator = EMA(AD, fast) - EMA(AD, slow)
6
+ *
7
+ * AD = cumulative sum of: clv * volume
8
+ * where clv = ((close - low) - (high - close)) / (high - low)
9
+ */
10
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
11
+ export interface ChaikinOscillatorInputs {
12
+ /** Fast EMA length */
13
+ fast: number;
14
+ /** Slow EMA length */
15
+ slow: number;
16
+ }
17
+ export declare const defaultInputs: ChaikinOscillatorInputs;
18
+ export declare const inputConfig: InputConfig[];
19
+ export declare const plotConfig: PlotConfig[];
20
+ export declare const metadata: {
21
+ title: string;
22
+ shortTitle: string;
23
+ overlay: boolean;
24
+ };
25
+ export declare function calculate(bars: Bar[], inputs?: Partial<ChaikinOscillatorInputs>): IndicatorResult;
26
+ export declare const ChaikinOscillator: {
27
+ calculate: typeof calculate;
28
+ metadata: {
29
+ title: string;
30
+ shortTitle: string;
31
+ overlay: boolean;
32
+ };
33
+ defaultInputs: ChaikinOscillatorInputs;
34
+ inputConfig: InputConfig[];
35
+ plotConfig: PlotConfig[];
36
+ };
37
+ //# sourceMappingURL=chaikin-oscillator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chaikin-oscillator.d.ts","sourceRoot":"","sources":["../src/chaikin-oscillator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,uBAAuB;IACtC,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,aAAa,EAAE,uBAG3B,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,uBAAuB,CAAM,GAAG,eAAe,CAiErG;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;CAM7B,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Chande Kroll Stop Indicator
3
+ *
4
+ * ATR-based trailing stop system that identifies potential stop levels
5
+ * for both long and short positions.
6
+ *
7
+ * Based on TradingView's Chande Kroll Stop indicator.
8
+ */
9
+ import { type Bar, type IndicatorResult, type InputConfig, type PlotConfig } from 'oakscriptjs';
10
+ export interface ChandeKrollStopInputs {
11
+ /** ATR period length */
12
+ atrLength: number;
13
+ /** ATR multiplier */
14
+ atrCoeff: number;
15
+ /** Stop smoothing length */
16
+ stopLength: number;
17
+ }
18
+ export declare const defaultInputs: ChandeKrollStopInputs;
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 Chande Kroll Stop
28
+ *
29
+ * Algorithm from PineScript:
30
+ * first_high_stop = ta.highest(high, p) - x * ta.atr(p)
31
+ * first_low_stop = ta.lowest(low, p) + x * ta.atr(p)
32
+ * stop_short = ta.highest(first_high_stop, q)
33
+ * stop_long = ta.lowest(first_low_stop, q)
34
+ */
35
+ export declare function calculate(bars: Bar[], inputs?: Partial<ChandeKrollStopInputs>): IndicatorResult;
36
+ export declare const ChandeKrollStop: {
37
+ calculate: typeof calculate;
38
+ metadata: {
39
+ title: string;
40
+ shortTitle: string;
41
+ overlay: boolean;
42
+ };
43
+ defaultInputs: ChandeKrollStopInputs;
44
+ inputConfig: InputConfig[];
45
+ plotConfig: PlotConfig[];
46
+ };
47
+ //# sourceMappingURL=chande-kroll-stop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chande-kroll-stop.d.ts","sourceRoot":"","sources":["../src/chande-kroll-stop.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,qBAAqB;IACpC,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,EAAE,qBAI3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAIpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAGlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,qBAAqB,CAAM,GAAG,eAAe,CA+DnG;AAED,eAAO,MAAM,eAAe;;;;;;;;;;CAM3B,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Chande Momentum Oscillator (CMO) Indicator
3
+ *
4
+ * Measures momentum on both up and down days.
5
+ * Range: -100 to +100
6
+ */
7
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
8
+ export interface ChandeMOInputs {
9
+ /** Period length */
10
+ length: number;
11
+ }
12
+ export declare const defaultInputs: ChandeMOInputs;
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<ChandeMOInputs>): IndicatorResult;
21
+ export declare const ChandeMO: {
22
+ calculate: typeof calculate;
23
+ metadata: {
24
+ title: string;
25
+ shortTitle: string;
26
+ overlay: boolean;
27
+ };
28
+ defaultInputs: ChandeMOInputs;
29
+ inputConfig: InputConfig[];
30
+ plotConfig: PlotConfig[];
31
+ };
32
+ //# sourceMappingURL=chande-mo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chande-mo.d.ts","sourceRoot":"","sources":["../src/chande-mo.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,cAAc;IAC7B,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,cAE3B,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,cAAc,CAAM,GAAG,eAAe,CAsD5F;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;CAMpB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Choppiness Index Indicator
3
+ *
4
+ * Measures market choppiness vs trending.
5
+ * High values (>61.8) indicate choppy/ranging markets.
6
+ * Low values (<38.2) indicate trending markets.
7
+ * CI = 100 * log10(sum(ATR, n) / (highest - lowest)) / log10(n)
8
+ */
9
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
10
+ export interface ChoppinessInputs {
11
+ /** Period length */
12
+ length: number;
13
+ }
14
+ export declare const defaultInputs: ChoppinessInputs;
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<ChoppinessInputs>): IndicatorResult;
23
+ export declare const Choppiness: {
24
+ calculate: typeof calculate;
25
+ metadata: {
26
+ title: string;
27
+ shortTitle: string;
28
+ overlay: boolean;
29
+ };
30
+ defaultInputs: ChoppinessInputs;
31
+ inputConfig: InputConfig[];
32
+ plotConfig: PlotConfig[];
33
+ };
34
+ //# sourceMappingURL=choppiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"choppiness.d.ts","sourceRoot":"","sources":["../src/choppiness.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,aAAa,EAAE,gBAE3B,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,gBAAgB,CAAM,GAAG,eAAe,CA6D9F;AAED,eAAO,MAAM,UAAU;;;;;;;;;;CAMtB,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Coppock Curve Indicator
3
+ *
4
+ * Long-term momentum indicator calculated as a weighted moving average
5
+ * of the sum of two rate of change periods.
6
+ * Coppock = WMA(ROC(long) + ROC(short), wmaLength)
7
+ */
8
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar } from 'oakscriptjs';
9
+ export interface CoppockCurveInputs {
10
+ /** WMA smoothing length */
11
+ wmaLength: number;
12
+ /** Long ROC period */
13
+ longRocLength: number;
14
+ /** Short ROC period */
15
+ shortRocLength: number;
16
+ }
17
+ export declare const defaultInputs: CoppockCurveInputs;
18
+ export declare const inputConfig: InputConfig[];
19
+ export declare const plotConfig: PlotConfig[];
20
+ export declare const metadata: {
21
+ title: string;
22
+ shortTitle: string;
23
+ overlay: boolean;
24
+ };
25
+ export declare function calculate(bars: Bar[], inputs?: Partial<CoppockCurveInputs>): IndicatorResult;
26
+ export declare const CoppockCurve: {
27
+ calculate: typeof calculate;
28
+ metadata: {
29
+ title: string;
30
+ shortTitle: string;
31
+ overlay: boolean;
32
+ };
33
+ defaultInputs: CoppockCurveInputs;
34
+ inputConfig: InputConfig[];
35
+ plotConfig: PlotConfig[];
36
+ };
37
+ //# sourceMappingURL=coppock-curve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coppock-curve.d.ts","sourceRoot":"","sources":["../src/coppock-curve.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAc,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,GAAG,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,EAAE,kBAI3B,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,kBAAkB,CAAM,GAAG,eAAe,CA4ChG;AAED,eAAO,MAAM,YAAY;;;;;;;;;;CAMxB,CAAC"}
package/dist/dema.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Double Exponential Moving Average (DEMA) Indicator
3
+ *
4
+ * Hand-optimized implementation using oakscriptjs.
5
+ * Reduces lag by applying EMA twice: DEMA = 2*EMA - EMA(EMA)
6
+ */
7
+ import { type IndicatorResult, type InputConfig, type PlotConfig, type Bar, type SourceType } from 'oakscriptjs';
8
+ export interface DEMAInputs {
9
+ length: number;
10
+ src: SourceType;
11
+ offset: number;
12
+ }
13
+ export declare const defaultInputs: DEMAInputs;
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<DEMAInputs>): IndicatorResult;
22
+ export declare const DEMA: {
23
+ calculate: typeof calculate;
24
+ metadata: {
25
+ title: string;
26
+ shortTitle: string;
27
+ overlay: boolean;
28
+ };
29
+ defaultInputs: DEMAInputs;
30
+ inputConfig: InputConfig[];
31
+ plotConfig: PlotConfig[];
32
+ };
33
+ //# sourceMappingURL=dema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dema.d.ts","sourceRoot":"","sources":["../src/dema.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,CAkBxF;AAED,eAAO,MAAM,IAAI;;;;;;;;;;CAAkE,CAAC"}
package/dist/dmi.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Directional Movement Index (DMI) Indicator
3
+ *
4
+ * Shows trend direction and strength using +DI, -DI, and ADX lines.
5
+ *
6
+ * Based on TradingView's DMI indicator.
7
+ */
8
+ import { type Bar, type IndicatorResult, type InputConfig, type PlotConfig } from 'oakscriptjs';
9
+ export interface DMIInputs {
10
+ /** ADX Smoothing length */
11
+ adxSmoothing: number;
12
+ /** DI Length */
13
+ diLength: number;
14
+ }
15
+ export declare const defaultInputs: DMIInputs;
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
+ /**
24
+ * Calculate DMI
25
+ *
26
+ * Algorithm from PineScript:
27
+ * up = ta.change(high)
28
+ * down = -ta.change(low)
29
+ * plusDM = na(up) ? na : (up > down and up > 0 ? up : 0)
30
+ * minusDM = na(down) ? na : (down > up and down > 0 ? down : 0)
31
+ * trur = ta.rma(ta.tr, len)
32
+ * plus = fixnan(100 * ta.rma(plusDM, len) / trur)
33
+ * minus = fixnan(100 * ta.rma(minusDM, len) / trur)
34
+ * sum = plus + minus
35
+ * adx = 100 * ta.rma(math.abs(plus - minus) / (sum == 0 ? 1 : sum), lensig)
36
+ */
37
+ export declare function calculate(bars: Bar[], inputs?: Partial<DMIInputs>): IndicatorResult;
38
+ export declare const DMI: {
39
+ calculate: typeof calculate;
40
+ metadata: {
41
+ title: string;
42
+ shortTitle: string;
43
+ overlay: boolean;
44
+ };
45
+ defaultInputs: DMIInputs;
46
+ inputConfig: InputConfig[];
47
+ plotConfig: PlotConfig[];
48
+ };
49
+ //# sourceMappingURL=dmi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dmi.d.ts","sourceRoot":"","sources":["../src/dmi.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAc,KAAK,GAAG,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5G,MAAM,WAAW,SAAS;IACxB,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,SAG3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAAW,EAGpC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,EAIlC,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAIpB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,MAAM,GAAE,OAAO,CAAC,SAAS,CAAM,GAAG,eAAe,CAqHvF;AAED,eAAO,MAAM,GAAG;;;;;;;;;;CAMf,CAAC"}