@backtest-kit/signals 0.1.2 → 3.0.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/README.md +3 -1
- package/build/index.cjs +9 -2
- package/build/index.mjs +9 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
<img src="https://github.com/tripolskypetr/backtest-kit/raw/refs/heads/master/assets/chronos.svg" height="45px" align="right">
|
|
2
|
+
|
|
1
3
|
# 📊 @backtest-kit/signals
|
|
2
4
|
|
|
3
5
|
> Technical analysis and trading signal generation library for AI-powered trading systems. Computes 50+ indicators across 4 timeframes and generates markdown reports for LLM consumption.
|
|
4
6
|
|
|
5
|
-

|
|
6
8
|
|
|
7
9
|
[](https://deepwiki.com/tripolskypetr/backtest-kit)
|
|
8
10
|
[](https://npmjs.org/package/@backtest-kit/signals)
|
package/build/index.cjs
CHANGED
|
@@ -4514,8 +4514,6 @@ const signal = {
|
|
|
4514
4514
|
};
|
|
4515
4515
|
// Initialize DI container
|
|
4516
4516
|
init();
|
|
4517
|
-
// Attach to global for debugging (non-production)
|
|
4518
|
-
Object.assign(globalThis, { signal });
|
|
4519
4517
|
|
|
4520
4518
|
/**
|
|
4521
4519
|
* Candle history report generation functions for multi-timeframe analysis.
|
|
@@ -4538,6 +4536,7 @@ Object.assign(globalThis, { signal });
|
|
|
4538
4536
|
*/
|
|
4539
4537
|
const fetchHourHistory = backtestKit.Cache.fn(signal.hourCandleHistoryService.getReport, {
|
|
4540
4538
|
interval: "30m",
|
|
4539
|
+
key: ([symbol]) => `${symbol}`,
|
|
4541
4540
|
});
|
|
4542
4541
|
/**
|
|
4543
4542
|
* Cached function to fetch 30-minute candle history report.
|
|
@@ -4545,6 +4544,7 @@ const fetchHourHistory = backtestKit.Cache.fn(signal.hourCandleHistoryService.ge
|
|
|
4545
4544
|
*/
|
|
4546
4545
|
const fetchThirtyMinuteHistory = backtestKit.Cache.fn(signal.thirtyMinuteCandleHistoryService.getReport, {
|
|
4547
4546
|
interval: "15m",
|
|
4547
|
+
key: ([symbol]) => `${symbol}`,
|
|
4548
4548
|
});
|
|
4549
4549
|
/**
|
|
4550
4550
|
* Cached function to fetch 15-minute candle history report.
|
|
@@ -4552,6 +4552,7 @@ const fetchThirtyMinuteHistory = backtestKit.Cache.fn(signal.thirtyMinuteCandleH
|
|
|
4552
4552
|
*/
|
|
4553
4553
|
const fetchFifteenMinuteHistory = backtestKit.Cache.fn(signal.fifteenMinuteCandleHistoryService.getReport, {
|
|
4554
4554
|
interval: "5m",
|
|
4555
|
+
key: ([symbol]) => `${symbol}`,
|
|
4555
4556
|
});
|
|
4556
4557
|
/**
|
|
4557
4558
|
* Cached function to fetch 1-minute candle history report.
|
|
@@ -4559,6 +4560,7 @@ const fetchFifteenMinuteHistory = backtestKit.Cache.fn(signal.fifteenMinuteCandl
|
|
|
4559
4560
|
*/
|
|
4560
4561
|
const fetchOneMinuteHistory = backtestKit.Cache.fn(signal.oneMinuteCandleHistoryService.getReport, {
|
|
4561
4562
|
interval: "1m",
|
|
4563
|
+
key: ([symbol]) => `${symbol}`,
|
|
4562
4564
|
});
|
|
4563
4565
|
/**
|
|
4564
4566
|
* Commits 1-hour candle history report to history container.
|
|
@@ -4714,6 +4716,7 @@ const commitOneMinuteHistory = functoolsKit.trycatch(async (symbol, history) =>
|
|
|
4714
4716
|
*/
|
|
4715
4717
|
const fetchMicroTermMath = backtestKit.Cache.fn(signal.microTermMathService.getReport, {
|
|
4716
4718
|
interval: "1m",
|
|
4719
|
+
key: ([symbol]) => `${symbol}`,
|
|
4717
4720
|
});
|
|
4718
4721
|
/**
|
|
4719
4722
|
* Cached function to fetch ShortTerm (15-minute) technical analysis report.
|
|
@@ -4721,6 +4724,7 @@ const fetchMicroTermMath = backtestKit.Cache.fn(signal.microTermMathService.getR
|
|
|
4721
4724
|
*/
|
|
4722
4725
|
const fetchShortTermMath = backtestKit.Cache.fn(signal.shortTermMathService.getReport, {
|
|
4723
4726
|
interval: "5m",
|
|
4727
|
+
key: ([symbol]) => `${symbol}`,
|
|
4724
4728
|
});
|
|
4725
4729
|
/**
|
|
4726
4730
|
* Cached function to fetch SwingTerm (30-minute) technical analysis report.
|
|
@@ -4728,6 +4732,7 @@ const fetchShortTermMath = backtestKit.Cache.fn(signal.shortTermMathService.getR
|
|
|
4728
4732
|
*/
|
|
4729
4733
|
const fetchSwingTermMath = backtestKit.Cache.fn(signal.swingTermMathService.getReport, {
|
|
4730
4734
|
interval: "15m",
|
|
4735
|
+
key: ([symbol]) => `${symbol}`,
|
|
4731
4736
|
});
|
|
4732
4737
|
/**
|
|
4733
4738
|
* Cached function to fetch LongTerm (1-hour) technical analysis report.
|
|
@@ -4735,6 +4740,7 @@ const fetchSwingTermMath = backtestKit.Cache.fn(signal.swingTermMathService.getR
|
|
|
4735
4740
|
*/
|
|
4736
4741
|
const fetchLongTermMath = backtestKit.Cache.fn(signal.longTermMathService.getReport, {
|
|
4737
4742
|
interval: "30m",
|
|
4743
|
+
key: ([symbol]) => `${symbol}`,
|
|
4738
4744
|
});
|
|
4739
4745
|
/**
|
|
4740
4746
|
* Commits MicroTerm (1-minute) technical analysis report to history container.
|
|
@@ -4917,6 +4923,7 @@ const commitSwingTermMath = functoolsKit.trycatch(async (symbol, history) => {
|
|
|
4917
4923
|
*/
|
|
4918
4924
|
const fetchBookData = backtestKit.Cache.fn(signal.bookDataMathService.getReport, {
|
|
4919
4925
|
interval: "5m",
|
|
4926
|
+
key: ([symbol]) => `${symbol}`,
|
|
4920
4927
|
});
|
|
4921
4928
|
/**
|
|
4922
4929
|
* Commits order book analysis report to history container.
|
package/build/index.mjs
CHANGED
|
@@ -4512,8 +4512,6 @@ const signal = {
|
|
|
4512
4512
|
};
|
|
4513
4513
|
// Initialize DI container
|
|
4514
4514
|
init();
|
|
4515
|
-
// Attach to global for debugging (non-production)
|
|
4516
|
-
Object.assign(globalThis, { signal });
|
|
4517
4515
|
|
|
4518
4516
|
/**
|
|
4519
4517
|
* Candle history report generation functions for multi-timeframe analysis.
|
|
@@ -4536,6 +4534,7 @@ Object.assign(globalThis, { signal });
|
|
|
4536
4534
|
*/
|
|
4537
4535
|
const fetchHourHistory = Cache.fn(signal.hourCandleHistoryService.getReport, {
|
|
4538
4536
|
interval: "30m",
|
|
4537
|
+
key: ([symbol]) => `${symbol}`,
|
|
4539
4538
|
});
|
|
4540
4539
|
/**
|
|
4541
4540
|
* Cached function to fetch 30-minute candle history report.
|
|
@@ -4543,6 +4542,7 @@ const fetchHourHistory = Cache.fn(signal.hourCandleHistoryService.getReport, {
|
|
|
4543
4542
|
*/
|
|
4544
4543
|
const fetchThirtyMinuteHistory = Cache.fn(signal.thirtyMinuteCandleHistoryService.getReport, {
|
|
4545
4544
|
interval: "15m",
|
|
4545
|
+
key: ([symbol]) => `${symbol}`,
|
|
4546
4546
|
});
|
|
4547
4547
|
/**
|
|
4548
4548
|
* Cached function to fetch 15-minute candle history report.
|
|
@@ -4550,6 +4550,7 @@ const fetchThirtyMinuteHistory = Cache.fn(signal.thirtyMinuteCandleHistoryServic
|
|
|
4550
4550
|
*/
|
|
4551
4551
|
const fetchFifteenMinuteHistory = Cache.fn(signal.fifteenMinuteCandleHistoryService.getReport, {
|
|
4552
4552
|
interval: "5m",
|
|
4553
|
+
key: ([symbol]) => `${symbol}`,
|
|
4553
4554
|
});
|
|
4554
4555
|
/**
|
|
4555
4556
|
* Cached function to fetch 1-minute candle history report.
|
|
@@ -4557,6 +4558,7 @@ const fetchFifteenMinuteHistory = Cache.fn(signal.fifteenMinuteCandleHistoryServ
|
|
|
4557
4558
|
*/
|
|
4558
4559
|
const fetchOneMinuteHistory = Cache.fn(signal.oneMinuteCandleHistoryService.getReport, {
|
|
4559
4560
|
interval: "1m",
|
|
4561
|
+
key: ([symbol]) => `${symbol}`,
|
|
4560
4562
|
});
|
|
4561
4563
|
/**
|
|
4562
4564
|
* Commits 1-hour candle history report to history container.
|
|
@@ -4712,6 +4714,7 @@ const commitOneMinuteHistory = trycatch(async (symbol, history) => {
|
|
|
4712
4714
|
*/
|
|
4713
4715
|
const fetchMicroTermMath = Cache.fn(signal.microTermMathService.getReport, {
|
|
4714
4716
|
interval: "1m",
|
|
4717
|
+
key: ([symbol]) => `${symbol}`,
|
|
4715
4718
|
});
|
|
4716
4719
|
/**
|
|
4717
4720
|
* Cached function to fetch ShortTerm (15-minute) technical analysis report.
|
|
@@ -4719,6 +4722,7 @@ const fetchMicroTermMath = Cache.fn(signal.microTermMathService.getReport, {
|
|
|
4719
4722
|
*/
|
|
4720
4723
|
const fetchShortTermMath = Cache.fn(signal.shortTermMathService.getReport, {
|
|
4721
4724
|
interval: "5m",
|
|
4725
|
+
key: ([symbol]) => `${symbol}`,
|
|
4722
4726
|
});
|
|
4723
4727
|
/**
|
|
4724
4728
|
* Cached function to fetch SwingTerm (30-minute) technical analysis report.
|
|
@@ -4726,6 +4730,7 @@ const fetchShortTermMath = Cache.fn(signal.shortTermMathService.getReport, {
|
|
|
4726
4730
|
*/
|
|
4727
4731
|
const fetchSwingTermMath = Cache.fn(signal.swingTermMathService.getReport, {
|
|
4728
4732
|
interval: "15m",
|
|
4733
|
+
key: ([symbol]) => `${symbol}`,
|
|
4729
4734
|
});
|
|
4730
4735
|
/**
|
|
4731
4736
|
* Cached function to fetch LongTerm (1-hour) technical analysis report.
|
|
@@ -4733,6 +4738,7 @@ const fetchSwingTermMath = Cache.fn(signal.swingTermMathService.getReport, {
|
|
|
4733
4738
|
*/
|
|
4734
4739
|
const fetchLongTermMath = Cache.fn(signal.longTermMathService.getReport, {
|
|
4735
4740
|
interval: "30m",
|
|
4741
|
+
key: ([symbol]) => `${symbol}`,
|
|
4736
4742
|
});
|
|
4737
4743
|
/**
|
|
4738
4744
|
* Commits MicroTerm (1-minute) technical analysis report to history container.
|
|
@@ -4915,6 +4921,7 @@ const commitSwingTermMath = trycatch(async (symbol, history) => {
|
|
|
4915
4921
|
*/
|
|
4916
4922
|
const fetchBookData = Cache.fn(signal.bookDataMathService.getReport, {
|
|
4917
4923
|
interval: "5m",
|
|
4924
|
+
key: ([symbol]) => `${symbol}`,
|
|
4918
4925
|
});
|
|
4919
4926
|
/**
|
|
4920
4927
|
* Commits order book analysis report to history container.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/signals",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Technical analysis and trading signal generation library for AI-powered trading systems. Computes 50+ indicators across 4 timeframes and generates markdown reports for LLM consumption.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"worker-testbed": "1.0.12"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"backtest-kit": "^
|
|
72
|
+
"backtest-kit": "^3.0.7",
|
|
73
73
|
"typescript": "^5.0.0"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|