backtest-kit 6.16.0 → 7.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 +5 -3
- package/build/index.cjs +26 -22
- package/build/index.mjs +26 -22
- package/package.json +2 -2
- package/types.d.ts +9 -9
package/README.md
CHANGED
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
Build reliable trading systems: backtest on historical data, deploy live bots with recovery, and optimize strategies using LLMs like Ollama.
|
|
15
15
|
|
|
16
|
-
📚 **[API Reference](https://backtest-kit.github.io/documents/example_02_first_backtest.html)** | 🌟 **[Quick Start](https://github.com/tripolskypetr/backtest-kit/tree/master/demo)** | **📰 [Article](https://backtest-kit.github.io/documents/
|
|
16
|
+
📚 **[API Reference](https://backtest-kit.github.io/documents/example_02_first_backtest.html)** | 🌟 **[Quick Start](https://github.com/tripolskypetr/backtest-kit/tree/master/demo)** | **📰 [Article](https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html)**
|
|
17
17
|
|
|
18
18
|
## 🚀 Quick Start
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
> **New to backtest-kit?** The fastest way to get a real, production-ready setup is to clone the [reference implementation](https://github.com/tripolskypetr/backtest-kit/tree/master/example) — a fully working news-sentiment AI trading system with LLM forecasting, multi-timeframe data, and a documented February 2026 backtest. Start there instead of from scratch.
|
|
21
|
+
|
|
22
|
+
### 🎯 The Casual Way: CLI Init
|
|
21
23
|
|
|
22
24
|
> **Minimal scaffold — all boilerplate stays inside `@backtest-kit/cli`:**
|
|
23
25
|
|
|
@@ -44,7 +46,7 @@ Sidekick generates a project where the exchange adapter, frame definitions, risk
|
|
|
44
46
|
|
|
45
47
|
### 📦 Manual Installation
|
|
46
48
|
|
|
47
|
-
> **Want to see the code?** 👉 [Demo app](https://github.com/tripolskypetr/backtest-kit/tree/master/
|
|
49
|
+
> **Want to see the code?** 👉 [Demo app](https://github.com/tripolskypetr/backtest-kit/tree/master/example) 👈
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
52
|
npm install backtest-kit ccxt ollama uuid
|
package/build/index.cjs
CHANGED
|
@@ -936,7 +936,6 @@ const INTERVAL_MINUTES$9 = {
|
|
|
936
936
|
"6h": 360,
|
|
937
937
|
"8h": 480,
|
|
938
938
|
"1d": 1440,
|
|
939
|
-
"1w": 10080,
|
|
940
939
|
};
|
|
941
940
|
const MS_PER_MINUTE$7 = 60000;
|
|
942
941
|
const PERSIST_SIGNAL_UTILS_METHOD_NAME_USE_PERSIST_SIGNAL_ADAPTER = "PersistSignalUtils.usePersistSignalAdapter";
|
|
@@ -3116,7 +3115,6 @@ const INTERVAL_MINUTES$8 = {
|
|
|
3116
3115
|
"6h": 360,
|
|
3117
3116
|
"8h": 480,
|
|
3118
3117
|
"1d": 1440,
|
|
3119
|
-
"1w": 10080,
|
|
3120
3118
|
};
|
|
3121
3119
|
/**
|
|
3122
3120
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -12039,8 +12037,6 @@ const INTERVAL_MINUTES$6 = {
|
|
|
12039
12037
|
"8h": 480,
|
|
12040
12038
|
"12h": 720,
|
|
12041
12039
|
"1d": 1440,
|
|
12042
|
-
"1w": 10080,
|
|
12043
|
-
"1M": 43200,
|
|
12044
12040
|
};
|
|
12045
12041
|
/**
|
|
12046
12042
|
* Wrapper to call onTimeframe callback with error handling.
|
|
@@ -12106,7 +12102,7 @@ const GET_TIMEFRAME_FN = async (symbol, self) => {
|
|
|
12106
12102
|
* Features:
|
|
12107
12103
|
* - Generates timestamp arrays for backtest iteration
|
|
12108
12104
|
* - Singleshot caching prevents redundant generation
|
|
12109
|
-
* - Configurable interval spacing (1m to
|
|
12105
|
+
* - Configurable interval spacing (1m to 1d)
|
|
12110
12106
|
* - Callback support for validation and logging
|
|
12111
12107
|
*
|
|
12112
12108
|
* Used by BacktestLogicPrivateService to iterate through historical periods.
|
|
@@ -12460,7 +12456,6 @@ const INTERVAL_MINUTES$5 = {
|
|
|
12460
12456
|
"6h": 360,
|
|
12461
12457
|
"8h": 480,
|
|
12462
12458
|
"1d": 1440,
|
|
12463
|
-
"1w": 10080,
|
|
12464
12459
|
};
|
|
12465
12460
|
/**
|
|
12466
12461
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -17832,7 +17827,6 @@ const INTERVAL_MINUTES$4 = {
|
|
|
17832
17827
|
"6h": 360,
|
|
17833
17828
|
"8h": 480,
|
|
17834
17829
|
"1d": 1440,
|
|
17835
|
-
"1w": 10080,
|
|
17836
17830
|
};
|
|
17837
17831
|
const createEmitter = functoolsKit.memoize(([interval]) => `${interval}`, (interval) => {
|
|
17838
17832
|
const tickSubject = new functoolsKit.Subject();
|
|
@@ -33045,7 +33039,6 @@ const INTERVAL_MINUTES$3 = {
|
|
|
33045
33039
|
"6h": 360,
|
|
33046
33040
|
"8h": 480,
|
|
33047
33041
|
"1d": 1440,
|
|
33048
|
-
"1w": 10080,
|
|
33049
33042
|
};
|
|
33050
33043
|
/**
|
|
33051
33044
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -33796,7 +33789,6 @@ const INTERVAL_MINUTES$2 = {
|
|
|
33796
33789
|
"6h": 360,
|
|
33797
33790
|
"8h": 480,
|
|
33798
33791
|
"1d": 1440,
|
|
33799
|
-
"1w": 10080,
|
|
33800
33792
|
};
|
|
33801
33793
|
const ALIGN_TO_INTERVAL_FN = (timestamp, intervalMinutes) => {
|
|
33802
33794
|
const intervalMs = intervalMinutes * MS_PER_MINUTE$2;
|
|
@@ -45419,7 +45411,7 @@ function addExchangeSchema(exchangeSchema) {
|
|
|
45419
45411
|
*
|
|
45420
45412
|
* @param frameSchema - Frame configuration object
|
|
45421
45413
|
* @param frameSchema.frameName - Unique frame identifier
|
|
45422
|
-
* @param frameSchema.interval - Timeframe interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d"
|
|
45414
|
+
* @param frameSchema.interval - Timeframe interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d")
|
|
45423
45415
|
* @param frameSchema.startDate - Start date for timeframe generation
|
|
45424
45416
|
* @param frameSchema.endDate - End date for timeframe generation
|
|
45425
45417
|
* @param frameSchema.callbacks - Optional callback for timeframe events
|
|
@@ -46713,17 +46705,31 @@ class RecentAdapter {
|
|
|
46713
46705
|
* @returns Whole minutes since the latest signal was created, or null if no signal found
|
|
46714
46706
|
* @throws Error if RecentAdapter is not enabled
|
|
46715
46707
|
*/
|
|
46716
|
-
this.getMinutesSinceLatestSignalCreated = async (
|
|
46708
|
+
this.getMinutesSinceLatestSignalCreated = async (symbol, context) => {
|
|
46717
46709
|
backtest.loggerService.info(RECENT_ADAPTER_METHOD_NAME_GET_MINUTES_SINCE_LATEST_SIGNAL, {
|
|
46718
46710
|
symbol,
|
|
46719
46711
|
context,
|
|
46720
|
-
timestamp,
|
|
46721
46712
|
});
|
|
46722
|
-
|
|
46723
|
-
|
|
46724
|
-
return null;
|
|
46713
|
+
if (!this.enable.hasValue()) {
|
|
46714
|
+
throw new Error("RecentAdapter is not enabled. Call enable() first.");
|
|
46725
46715
|
}
|
|
46726
|
-
|
|
46716
|
+
if (await RecentBacktest.getLatestSignal(symbol, context.strategyName, context.exchangeName, context.frameName, true)) {
|
|
46717
|
+
const timestamp = await backtest.timeMetaService.getTimestamp(symbol, context, true);
|
|
46718
|
+
const signal = await this.getLatestSignal(symbol, context);
|
|
46719
|
+
if (!signal) {
|
|
46720
|
+
return null;
|
|
46721
|
+
}
|
|
46722
|
+
return Math.floor((timestamp - signal.timestamp) / (1000 * 60));
|
|
46723
|
+
}
|
|
46724
|
+
if (await RecentLive.getLatestSignal(symbol, context.strategyName, context.exchangeName, context.frameName, false)) {
|
|
46725
|
+
const timestamp = await backtest.timeMetaService.getTimestamp(symbol, context, false);
|
|
46726
|
+
const signal = await this.getLatestSignal(symbol, context);
|
|
46727
|
+
if (!signal) {
|
|
46728
|
+
return null;
|
|
46729
|
+
}
|
|
46730
|
+
return Math.floor((timestamp - signal.timestamp) / (1000 * 60));
|
|
46731
|
+
}
|
|
46732
|
+
return null;
|
|
46727
46733
|
};
|
|
46728
46734
|
}
|
|
46729
46735
|
}
|
|
@@ -46801,14 +46807,14 @@ async function getLatestSignal(symbol) {
|
|
|
46801
46807
|
* ```typescript
|
|
46802
46808
|
* import { getMinutesSinceLatestSignalCreated } from "backtest-kit";
|
|
46803
46809
|
*
|
|
46804
|
-
* const minutes = await getMinutesSinceLatestSignalCreated("BTCUSDT"
|
|
46810
|
+
* const minutes = await getMinutesSinceLatestSignalCreated("BTCUSDT");
|
|
46805
46811
|
* if (minutes !== null && minutes < 24 * 60) {
|
|
46806
46812
|
* return; // cooldown — skip new signal for 24 hours after last signal
|
|
46807
46813
|
* }
|
|
46808
46814
|
* ```
|
|
46809
46815
|
*/
|
|
46810
|
-
async function getMinutesSinceLatestSignalCreated(symbol
|
|
46811
|
-
backtest.loggerService.info(GET_MINUTES_SINCE_LATEST_SIGNAL_CREATED_METHOD_NAME, { symbol
|
|
46816
|
+
async function getMinutesSinceLatestSignalCreated(symbol) {
|
|
46817
|
+
backtest.loggerService.info(GET_MINUTES_SINCE_LATEST_SIGNAL_CREATED_METHOD_NAME, { symbol });
|
|
46812
46818
|
if (!ExecutionContextService.hasContext()) {
|
|
46813
46819
|
throw new Error("getMinutesSinceLatestSignalCreated requires an execution context");
|
|
46814
46820
|
}
|
|
@@ -46816,7 +46822,7 @@ async function getMinutesSinceLatestSignalCreated(symbol, timestamp) {
|
|
|
46816
46822
|
throw new Error("getMinutesSinceLatestSignalCreated requires a method context");
|
|
46817
46823
|
}
|
|
46818
46824
|
const { exchangeName, frameName, strategyName } = backtest.methodContextService.context;
|
|
46819
|
-
return await Recent.getMinutesSinceLatestSignalCreated(
|
|
46825
|
+
return await Recent.getMinutesSinceLatestSignalCreated(symbol, { exchangeName, frameName, strategyName });
|
|
46820
46826
|
}
|
|
46821
46827
|
|
|
46822
46828
|
const DEFAULT_BM25_K1 = 1.5;
|
|
@@ -56700,7 +56706,6 @@ const INTERVAL_MINUTES$1 = {
|
|
|
56700
56706
|
"6h": 360,
|
|
56701
56707
|
"8h": 480,
|
|
56702
56708
|
"1d": 1440,
|
|
56703
|
-
"1w": 10080,
|
|
56704
56709
|
};
|
|
56705
56710
|
/**
|
|
56706
56711
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -57335,7 +57340,6 @@ const INTERVAL_MINUTES = {
|
|
|
57335
57340
|
"6h": 360,
|
|
57336
57341
|
"8h": 480,
|
|
57337
57342
|
"1d": 1440,
|
|
57338
|
-
"1w": 10080,
|
|
57339
57343
|
};
|
|
57340
57344
|
/**
|
|
57341
57345
|
* Aligns timestamp down to the nearest interval boundary.
|
package/build/index.mjs
CHANGED
|
@@ -916,7 +916,6 @@ const INTERVAL_MINUTES$9 = {
|
|
|
916
916
|
"6h": 360,
|
|
917
917
|
"8h": 480,
|
|
918
918
|
"1d": 1440,
|
|
919
|
-
"1w": 10080,
|
|
920
919
|
};
|
|
921
920
|
const MS_PER_MINUTE$7 = 60000;
|
|
922
921
|
const PERSIST_SIGNAL_UTILS_METHOD_NAME_USE_PERSIST_SIGNAL_ADAPTER = "PersistSignalUtils.usePersistSignalAdapter";
|
|
@@ -3096,7 +3095,6 @@ const INTERVAL_MINUTES$8 = {
|
|
|
3096
3095
|
"6h": 360,
|
|
3097
3096
|
"8h": 480,
|
|
3098
3097
|
"1d": 1440,
|
|
3099
|
-
"1w": 10080,
|
|
3100
3098
|
};
|
|
3101
3099
|
/**
|
|
3102
3100
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -12019,8 +12017,6 @@ const INTERVAL_MINUTES$6 = {
|
|
|
12019
12017
|
"8h": 480,
|
|
12020
12018
|
"12h": 720,
|
|
12021
12019
|
"1d": 1440,
|
|
12022
|
-
"1w": 10080,
|
|
12023
|
-
"1M": 43200,
|
|
12024
12020
|
};
|
|
12025
12021
|
/**
|
|
12026
12022
|
* Wrapper to call onTimeframe callback with error handling.
|
|
@@ -12086,7 +12082,7 @@ const GET_TIMEFRAME_FN = async (symbol, self) => {
|
|
|
12086
12082
|
* Features:
|
|
12087
12083
|
* - Generates timestamp arrays for backtest iteration
|
|
12088
12084
|
* - Singleshot caching prevents redundant generation
|
|
12089
|
-
* - Configurable interval spacing (1m to
|
|
12085
|
+
* - Configurable interval spacing (1m to 1d)
|
|
12090
12086
|
* - Callback support for validation and logging
|
|
12091
12087
|
*
|
|
12092
12088
|
* Used by BacktestLogicPrivateService to iterate through historical periods.
|
|
@@ -12440,7 +12436,6 @@ const INTERVAL_MINUTES$5 = {
|
|
|
12440
12436
|
"6h": 360,
|
|
12441
12437
|
"8h": 480,
|
|
12442
12438
|
"1d": 1440,
|
|
12443
|
-
"1w": 10080,
|
|
12444
12439
|
};
|
|
12445
12440
|
/**
|
|
12446
12441
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -17812,7 +17807,6 @@ const INTERVAL_MINUTES$4 = {
|
|
|
17812
17807
|
"6h": 360,
|
|
17813
17808
|
"8h": 480,
|
|
17814
17809
|
"1d": 1440,
|
|
17815
|
-
"1w": 10080,
|
|
17816
17810
|
};
|
|
17817
17811
|
const createEmitter = memoize(([interval]) => `${interval}`, (interval) => {
|
|
17818
17812
|
const tickSubject = new Subject();
|
|
@@ -33025,7 +33019,6 @@ const INTERVAL_MINUTES$3 = {
|
|
|
33025
33019
|
"6h": 360,
|
|
33026
33020
|
"8h": 480,
|
|
33027
33021
|
"1d": 1440,
|
|
33028
|
-
"1w": 10080,
|
|
33029
33022
|
};
|
|
33030
33023
|
/**
|
|
33031
33024
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -33776,7 +33769,6 @@ const INTERVAL_MINUTES$2 = {
|
|
|
33776
33769
|
"6h": 360,
|
|
33777
33770
|
"8h": 480,
|
|
33778
33771
|
"1d": 1440,
|
|
33779
|
-
"1w": 10080,
|
|
33780
33772
|
};
|
|
33781
33773
|
const ALIGN_TO_INTERVAL_FN = (timestamp, intervalMinutes) => {
|
|
33782
33774
|
const intervalMs = intervalMinutes * MS_PER_MINUTE$2;
|
|
@@ -45399,7 +45391,7 @@ function addExchangeSchema(exchangeSchema) {
|
|
|
45399
45391
|
*
|
|
45400
45392
|
* @param frameSchema - Frame configuration object
|
|
45401
45393
|
* @param frameSchema.frameName - Unique frame identifier
|
|
45402
|
-
* @param frameSchema.interval - Timeframe interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d"
|
|
45394
|
+
* @param frameSchema.interval - Timeframe interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d")
|
|
45403
45395
|
* @param frameSchema.startDate - Start date for timeframe generation
|
|
45404
45396
|
* @param frameSchema.endDate - End date for timeframe generation
|
|
45405
45397
|
* @param frameSchema.callbacks - Optional callback for timeframe events
|
|
@@ -46693,17 +46685,31 @@ class RecentAdapter {
|
|
|
46693
46685
|
* @returns Whole minutes since the latest signal was created, or null if no signal found
|
|
46694
46686
|
* @throws Error if RecentAdapter is not enabled
|
|
46695
46687
|
*/
|
|
46696
|
-
this.getMinutesSinceLatestSignalCreated = async (
|
|
46688
|
+
this.getMinutesSinceLatestSignalCreated = async (symbol, context) => {
|
|
46697
46689
|
backtest.loggerService.info(RECENT_ADAPTER_METHOD_NAME_GET_MINUTES_SINCE_LATEST_SIGNAL, {
|
|
46698
46690
|
symbol,
|
|
46699
46691
|
context,
|
|
46700
|
-
timestamp,
|
|
46701
46692
|
});
|
|
46702
|
-
|
|
46703
|
-
|
|
46704
|
-
return null;
|
|
46693
|
+
if (!this.enable.hasValue()) {
|
|
46694
|
+
throw new Error("RecentAdapter is not enabled. Call enable() first.");
|
|
46705
46695
|
}
|
|
46706
|
-
|
|
46696
|
+
if (await RecentBacktest.getLatestSignal(symbol, context.strategyName, context.exchangeName, context.frameName, true)) {
|
|
46697
|
+
const timestamp = await backtest.timeMetaService.getTimestamp(symbol, context, true);
|
|
46698
|
+
const signal = await this.getLatestSignal(symbol, context);
|
|
46699
|
+
if (!signal) {
|
|
46700
|
+
return null;
|
|
46701
|
+
}
|
|
46702
|
+
return Math.floor((timestamp - signal.timestamp) / (1000 * 60));
|
|
46703
|
+
}
|
|
46704
|
+
if (await RecentLive.getLatestSignal(symbol, context.strategyName, context.exchangeName, context.frameName, false)) {
|
|
46705
|
+
const timestamp = await backtest.timeMetaService.getTimestamp(symbol, context, false);
|
|
46706
|
+
const signal = await this.getLatestSignal(symbol, context);
|
|
46707
|
+
if (!signal) {
|
|
46708
|
+
return null;
|
|
46709
|
+
}
|
|
46710
|
+
return Math.floor((timestamp - signal.timestamp) / (1000 * 60));
|
|
46711
|
+
}
|
|
46712
|
+
return null;
|
|
46707
46713
|
};
|
|
46708
46714
|
}
|
|
46709
46715
|
}
|
|
@@ -46781,14 +46787,14 @@ async function getLatestSignal(symbol) {
|
|
|
46781
46787
|
* ```typescript
|
|
46782
46788
|
* import { getMinutesSinceLatestSignalCreated } from "backtest-kit";
|
|
46783
46789
|
*
|
|
46784
|
-
* const minutes = await getMinutesSinceLatestSignalCreated("BTCUSDT"
|
|
46790
|
+
* const minutes = await getMinutesSinceLatestSignalCreated("BTCUSDT");
|
|
46785
46791
|
* if (minutes !== null && minutes < 24 * 60) {
|
|
46786
46792
|
* return; // cooldown — skip new signal for 24 hours after last signal
|
|
46787
46793
|
* }
|
|
46788
46794
|
* ```
|
|
46789
46795
|
*/
|
|
46790
|
-
async function getMinutesSinceLatestSignalCreated(symbol
|
|
46791
|
-
backtest.loggerService.info(GET_MINUTES_SINCE_LATEST_SIGNAL_CREATED_METHOD_NAME, { symbol
|
|
46796
|
+
async function getMinutesSinceLatestSignalCreated(symbol) {
|
|
46797
|
+
backtest.loggerService.info(GET_MINUTES_SINCE_LATEST_SIGNAL_CREATED_METHOD_NAME, { symbol });
|
|
46792
46798
|
if (!ExecutionContextService.hasContext()) {
|
|
46793
46799
|
throw new Error("getMinutesSinceLatestSignalCreated requires an execution context");
|
|
46794
46800
|
}
|
|
@@ -46796,7 +46802,7 @@ async function getMinutesSinceLatestSignalCreated(symbol, timestamp) {
|
|
|
46796
46802
|
throw new Error("getMinutesSinceLatestSignalCreated requires a method context");
|
|
46797
46803
|
}
|
|
46798
46804
|
const { exchangeName, frameName, strategyName } = backtest.methodContextService.context;
|
|
46799
|
-
return await Recent.getMinutesSinceLatestSignalCreated(
|
|
46805
|
+
return await Recent.getMinutesSinceLatestSignalCreated(symbol, { exchangeName, frameName, strategyName });
|
|
46800
46806
|
}
|
|
46801
46807
|
|
|
46802
46808
|
const DEFAULT_BM25_K1 = 1.5;
|
|
@@ -56680,7 +56686,6 @@ const INTERVAL_MINUTES$1 = {
|
|
|
56680
56686
|
"6h": 360,
|
|
56681
56687
|
"8h": 480,
|
|
56682
56688
|
"1d": 1440,
|
|
56683
|
-
"1w": 10080,
|
|
56684
56689
|
};
|
|
56685
56690
|
/**
|
|
56686
56691
|
* Aligns timestamp down to the nearest interval boundary.
|
|
@@ -57315,7 +57320,6 @@ const INTERVAL_MINUTES = {
|
|
|
57315
57320
|
"6h": 360,
|
|
57316
57321
|
"8h": 480,
|
|
57317
57322
|
"1d": 1440,
|
|
57318
|
-
"1w": 10080,
|
|
57319
57323
|
};
|
|
57320
57324
|
/**
|
|
57321
57325
|
* Aligns timestamp down to the nearest interval boundary.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "backtest-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "A TypeScript library for trading system backtest",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"url": "http://paypal.me/tripolskypetr"
|
|
13
13
|
},
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"homepage": "https://backtest-kit.github.io/documents/
|
|
15
|
+
"homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
|
|
16
16
|
"keywords": [
|
|
17
17
|
"backtesting",
|
|
18
18
|
"backtest",
|
package/types.d.ts
CHANGED
|
@@ -63,9 +63,9 @@ type TExecutionContextService = InstanceType<typeof ExecutionContextService>;
|
|
|
63
63
|
*
|
|
64
64
|
* Minutes: 1m, 3m, 5m, 15m, 30m
|
|
65
65
|
* Hours: 1h, 2h, 4h, 6h, 8h, 12h
|
|
66
|
-
* Days: 1d
|
|
66
|
+
* Days: 1d
|
|
67
67
|
*/
|
|
68
|
-
type FrameInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d"
|
|
68
|
+
type FrameInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d";
|
|
69
69
|
/**
|
|
70
70
|
* Frame parameters passed to ClientFrame constructor.
|
|
71
71
|
* Extends IFrameSchema with logger instance for internal logging.
|
|
@@ -3909,7 +3909,7 @@ interface ILogger {
|
|
|
3909
3909
|
/**
|
|
3910
3910
|
* Candle time interval for fetching historical data.
|
|
3911
3911
|
*/
|
|
3912
|
-
type CandleInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "1d"
|
|
3912
|
+
type CandleInterval = "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "1d";
|
|
3913
3913
|
/** Numeric type that can be undefined (used for optional numeric values) */
|
|
3914
3914
|
type Num = number | undefined;
|
|
3915
3915
|
interface IPublicCandleData {
|
|
@@ -6792,7 +6792,7 @@ declare function addExchangeSchema(exchangeSchema: IExchangeSchema): void;
|
|
|
6792
6792
|
*
|
|
6793
6793
|
* @param frameSchema - Frame configuration object
|
|
6794
6794
|
* @param frameSchema.frameName - Unique frame identifier
|
|
6795
|
-
* @param frameSchema.interval - Timeframe interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d"
|
|
6795
|
+
* @param frameSchema.interval - Timeframe interval ("1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "8h" | "12h" | "1d")
|
|
6796
6796
|
* @param frameSchema.startDate - Start date for timeframe generation
|
|
6797
6797
|
* @param frameSchema.endDate - End date for timeframe generation
|
|
6798
6798
|
* @param frameSchema.callbacks - Optional callback for timeframe events
|
|
@@ -9284,13 +9284,13 @@ declare function getLatestSignal(symbol: string): Promise<IPublicSignalRow | nul
|
|
|
9284
9284
|
* ```typescript
|
|
9285
9285
|
* import { getMinutesSinceLatestSignalCreated } from "backtest-kit";
|
|
9286
9286
|
*
|
|
9287
|
-
* const minutes = await getMinutesSinceLatestSignalCreated("BTCUSDT"
|
|
9287
|
+
* const minutes = await getMinutesSinceLatestSignalCreated("BTCUSDT");
|
|
9288
9288
|
* if (minutes !== null && minutes < 24 * 60) {
|
|
9289
9289
|
* return; // cooldown — skip new signal for 24 hours after last signal
|
|
9290
9290
|
* }
|
|
9291
9291
|
* ```
|
|
9292
9292
|
*/
|
|
9293
|
-
declare function getMinutesSinceLatestSignalCreated(symbol: string
|
|
9293
|
+
declare function getMinutesSinceLatestSignalCreated(symbol: string): Promise<number | null>;
|
|
9294
9294
|
|
|
9295
9295
|
/**
|
|
9296
9296
|
* Writes a value to memory scoped to the current signal.
|
|
@@ -20976,7 +20976,7 @@ declare class RecentAdapter {
|
|
|
20976
20976
|
* @returns Whole minutes since the latest signal was created, or null if no signal found
|
|
20977
20977
|
* @throws Error if RecentAdapter is not enabled
|
|
20978
20978
|
*/
|
|
20979
|
-
getMinutesSinceLatestSignalCreated: (
|
|
20979
|
+
getMinutesSinceLatestSignalCreated: (symbol: string, context: {
|
|
20980
20980
|
strategyName: StrategyName;
|
|
20981
20981
|
exchangeName: ExchangeName;
|
|
20982
20982
|
frameName: FrameName;
|
|
@@ -27643,7 +27643,7 @@ declare class StrategyConnectionService implements TStrategy$1 {
|
|
|
27643
27643
|
* Features:
|
|
27644
27644
|
* - Generates timestamp arrays for backtest iteration
|
|
27645
27645
|
* - Singleshot caching prevents redundant generation
|
|
27646
|
-
* - Configurable interval spacing (1m to
|
|
27646
|
+
* - Configurable interval spacing (1m to 1d)
|
|
27647
27647
|
* - Callback support for validation and logging
|
|
27648
27648
|
*
|
|
27649
27649
|
* Used by BacktestLogicPrivateService to iterate through historical periods.
|
|
@@ -32436,4 +32436,4 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
32436
32436
|
remainingCostBasis: number;
|
|
32437
32437
|
};
|
|
32438
32438
|
|
|
32439
|
-
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, type MemoryData, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistCandleAdapter, PersistIntervalAdapter, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRecentAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TRecentUtilsCtor, type TReportBase, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getRawCandles, getRiskSchema, getScheduledSignal, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };
|
|
32439
|
+
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, Breakeven, type BreakevenAvailableNotification, type BreakevenCommit, type BreakevenCommitNotification, type BreakevenContract, type BreakevenData, type BreakevenEvent, type BreakevenStatisticsModel, Broker, type BrokerAverageBuyPayload, BrokerBase, type BrokerBreakevenPayload, type BrokerPartialLossPayload, type BrokerPartialProfitPayload, type BrokerSignalClosePayload, type BrokerSignalOpenPayload, type BrokerTrailingStopPayload, type BrokerTrailingTakePayload, Cache, type CancelScheduledCommit, type CancelScheduledCommitNotification, type CandleData, type CandleInterval, type ClosePendingCommit, type ClosePendingCommitNotification, type ColumnConfig, type ColumnModel, Constant, type CriticalErrorNotification, type DoneContract, Dump, type EntityId, Exchange, ExecutionContextService, type FrameInterval, type GlobalConfig, Heat, type HeatmapStatisticsModel, HighestProfit, type HighestProfitContract, type HighestProfitEvent, type HighestProfitStatisticsModel, type IActionSchema, type IActivateScheduledCommitRow, type IAggregatedTradeData, type IBidData, type IBreakevenCommitRow, type IBroker, type ICandleData, type ICommitRow, type IDumpContext, type IDumpInstance, type IExchangeSchema, type IFrameSchema, type IHeatmapRow, type ILog, type ILogEntry, type ILogger, type IMarkdownDumpOptions, type IMemoryInstance, type INotificationUtils, type IOrderBookData, type IPartialLossCommitRow, type IPartialProfitCommitRow, type IPersistBase, type IPositionSizeATRParams, type IPositionSizeFixedPercentageParams, type IPositionSizeKellyParams, type IPublicAction, type IPublicCandleData, type IPublicSignalRow, type IRecentUtils, type IReportDumpOptions, type IRiskActivePosition, type IRiskCheckArgs, type IRiskSchema, type IRiskSignalRow, type IRiskValidation, type IRiskValidationFn, type IRiskValidationPayload, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISignalDto, type ISignalIntervalDto, type ISignalRow, type ISizingCalculateParams, type ISizingCalculateParamsATR, type ISizingCalculateParamsFixedPercentage, type ISizingCalculateParamsKelly, type ISizingParams, type ISizingParamsATR, type ISizingParamsFixedPercentage, type ISizingParamsKelly, type ISizingSchema, type ISizingSchemaATR, type ISizingSchemaFixedPercentage, type ISizingSchemaKelly, type IStorageSignalRow, type IStorageUtils, type IStrategyPnL, type IStrategyResult, type IStrategySchema, type IStrategyTickResult, type IStrategyTickResultActive, type IStrategyTickResultCancelled, type IStrategyTickResultClosed, type IStrategyTickResultIdle, type IStrategyTickResultOpened, type IStrategyTickResultScheduled, type IStrategyTickResultWaiting, type ITrailingStopCommitRow, type ITrailingTakeCommitRow, type IWalkerResults, type IWalkerSchema, type IWalkerStrategyResult, type IdlePingContract, type InfoErrorNotification, Interval, type IntervalData, Live, type LiveStatisticsModel, Log, type LogData, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, type MemoryData, type MessageModel, type MessageRole, type MessageToolCall, MethodContextService, type MetricStats, Notification, NotificationBacktest, type NotificationData, NotificationLive, type NotificationModel, Partial$1 as Partial, type PartialData, type PartialEvent, type PartialLossAvailableNotification, type PartialLossCommit, type PartialLossCommitNotification, type PartialLossContract, type PartialProfitAvailableNotification, type PartialProfitCommit, type PartialProfitCommitNotification, type PartialProfitContract, type PartialStatisticsModel, Performance, type PerformanceContract, type PerformanceMetricType, type PerformanceStatisticsModel, PersistBase, PersistBreakevenAdapter, PersistCandleAdapter, PersistIntervalAdapter, PersistLogAdapter, PersistMeasureAdapter, PersistMemoryAdapter, PersistNotificationAdapter, PersistPartialAdapter, PersistRecentAdapter, PersistRiskAdapter, PersistScheduleAdapter, PersistSignalAdapter, PersistStorageAdapter, Position, PositionSize, type ProgressBacktestContract, type ProgressWalkerContract, Recent, RecentBacktest, type RecentData, RecentLive, Reflect, Report, ReportBase, type ReportName, ReportWriter, Risk, type RiskContract, type RiskData, type RiskEvent, type RiskRejectionNotification, type RiskStatisticsModel, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, type SignalCancelledNotification, type SignalCloseContract, type SignalClosedNotification, type SignalData, type SignalInfoContract, type SignalInfoNotification, type SignalInterval, type SignalOpenContract, type SignalOpenedNotification, type SignalScheduledNotification, type SignalSyncCloseNotification, type SignalSyncContract, type SignalSyncOpenNotification, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TRecentUtilsCtor, type TReportBase, type TStorageUtilsCtor, type TickEvent, type TrailingStopCommit, type TrailingStopCommitNotification, type TrailingTakeCommit, type TrailingTakeCommitNotification, type ValidationErrorNotification, Walker, type WalkerCompleteContract, type WalkerContract, type WalkerMetric, type SignalData$1 as WalkerSignalData, type WalkerStatisticsModel, addActionSchema, addExchangeSchema, addFrameSchema, addRiskSchema, addSizingSchema, addStrategySchema, addWalkerSchema, alignToInterval, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getColumns, getConfig, getContext, getDate, getDefaultColumns, getDefaultConfig, getEffectivePriceOpen, getExchangeSchema, getFrameSchema, getLatestSignal, getMaxDrawdownDistancePnlCost, getMaxDrawdownDistancePnlPercentage, getMinutesSinceLatestSignalCreated, getMode, getNextCandles, getOrderBook, getPendingSignal, getPositionActiveMinutes, getPositionCountdownMinutes, getPositionDrawdownMinutes, getPositionEffectivePrice, getPositionEntries, getPositionEntryOverlap, getPositionEstimateMinutes, getPositionHighestMaxDrawdownPnlCost, getPositionHighestMaxDrawdownPnlPercentage, getPositionHighestPnlCost, getPositionHighestPnlPercentage, getPositionHighestProfitBreakeven, getPositionHighestProfitDistancePnlCost, getPositionHighestProfitDistancePnlPercentage, getPositionHighestProfitMinutes, getPositionHighestProfitPrice, getPositionHighestProfitTimestamp, getPositionInvestedCost, getPositionInvestedCount, getPositionLevels, getPositionMaxDrawdownMinutes, getPositionMaxDrawdownPnlCost, getPositionMaxDrawdownPnlPercentage, getPositionMaxDrawdownPrice, getPositionMaxDrawdownTimestamp, getPositionPartialOverlap, getPositionPartials, getPositionPnlCost, getPositionPnlPercent, getPositionWaitingMinutes, getRawCandles, getRiskSchema, getScheduledSignal, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenBacktestProgress, listenBreakevenAvailable, listenBreakevenAvailableOnce, listenDoneBacktest, listenDoneBacktestOnce, listenDoneLive, listenDoneLiveOnce, listenDoneWalker, listenDoneWalkerOnce, listenError, listenExit, listenHighestProfit, listenHighestProfitOnce, listenIdlePing, listenIdlePingOnce, listenMaxDrawdown, listenMaxDrawdownOnce, listenPartialLossAvailable, listenPartialLossAvailableOnce, listenPartialProfitAvailable, listenPartialProfitAvailableOnce, listenPerformance, listenRisk, listenRiskOnce, listenSchedulePing, listenSchedulePingOnce, listenSignal, listenSignalBacktest, listenSignalBacktestOnce, listenSignalLive, listenSignalLiveOnce, listenSignalNotify, listenSignalNotifyOnce, listenSignalOnce, listenStrategyCommit, listenStrategyCommitOnce, listenSync, listenSyncOnce, listenValidation, listenWalker, listenWalkerComplete, listenWalkerOnce, listenWalkerProgress, overrideActionSchema, overrideExchangeSchema, overrideFrameSchema, overrideRiskSchema, overrideSizingSchema, overrideStrategySchema, overrideWalkerSchema, parseArgs, percentDiff, percentToCloseCost, percentValue, readMemory, removeMemory, roundTicks, runInMockContext, searchMemory, set, setColumns, setConfig, setLogger, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, warmCandles, writeMemory };
|