backtest-kit 12.7.0 → 13.0.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 -21
- package/README.md +1997 -1997
- package/build/index.cjs +14824 -14171
- package/build/index.mjs +14823 -14173
- package/package.json +86 -86
- package/types.d.ts +245 -5
package/package.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "backtest-kit",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "A TypeScript library for trading system backtest",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Petr Tripolsky",
|
|
7
|
-
"email": "tripolskypetr@gmail.com",
|
|
8
|
-
"url": "https://github.com/tripolskypetr"
|
|
9
|
-
},
|
|
10
|
-
"funding": {
|
|
11
|
-
"type": "individual",
|
|
12
|
-
"url": "http://paypal.me/tripolskypetr"
|
|
13
|
-
},
|
|
14
|
-
"license": "MIT",
|
|
15
|
-
"homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
|
|
16
|
-
"keywords": [
|
|
17
|
-
"backtesting",
|
|
18
|
-
"backtest",
|
|
19
|
-
"finance",
|
|
20
|
-
"trading",
|
|
21
|
-
"candles",
|
|
22
|
-
"indicators",
|
|
23
|
-
"multi value",
|
|
24
|
-
"multi symbol",
|
|
25
|
-
"framework"
|
|
26
|
-
],
|
|
27
|
-
"files": [
|
|
28
|
-
"build",
|
|
29
|
-
"types.d.ts",
|
|
30
|
-
"README.md"
|
|
31
|
-
],
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "https://github.com/tripolskypetr/backtest-kit",
|
|
35
|
-
"documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
|
|
36
|
-
},
|
|
37
|
-
"bugs": {
|
|
38
|
-
"url": "https://github.com/tripolskypetr/backtest-kit/issues"
|
|
39
|
-
},
|
|
40
|
-
"scripts": {
|
|
41
|
-
"build": "rollup -c",
|
|
42
|
-
"test": "npm run build && node ./test/index.mjs",
|
|
43
|
-
"build:docs": "rimraf docs && mkdir docs && node ./scripts/dts-docs.cjs ./types.d.ts ./docs",
|
|
44
|
-
"docs:gpt": "npm run build && node ./tools/gpt-docs/index.mjs",
|
|
45
|
-
"docs:uml": "npm run build && node ./scripts/uml.mjs",
|
|
46
|
-
"docs:www": "rimraf docs/wwwroot && node ./tools/typedoc-packages-docs/index.mjs && typedoc && node ./tools/typedoc-yandex-metrica/index.mjs",
|
|
47
|
-
"repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
|
|
48
|
-
},
|
|
49
|
-
"main": "build/index.cjs",
|
|
50
|
-
"module": "build/index.mjs",
|
|
51
|
-
"source": "src/index.ts",
|
|
52
|
-
"types": "./types.d.ts",
|
|
53
|
-
"exports": {
|
|
54
|
-
"require": "./build/index.cjs",
|
|
55
|
-
"types": "./types.d.ts",
|
|
56
|
-
"import": "./build/index.mjs",
|
|
57
|
-
"default": "./build/index.cjs"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@rollup/plugin-typescript": "11.1.6",
|
|
61
|
-
"@types/node": "22.9.0",
|
|
62
|
-
"glob": "11.0.1",
|
|
63
|
-
"plantuml": "0.0.2",
|
|
64
|
-
"rimraf": "6.0.1",
|
|
65
|
-
"rollup": "3.29.5",
|
|
66
|
-
"rollup-plugin-dts": "6.1.1",
|
|
67
|
-
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
68
|
-
"ts-morph": "27.0.2",
|
|
69
|
-
"tslib": "2.7.0",
|
|
70
|
-
"typedoc": "0.27.9",
|
|
71
|
-
"worker-testbed": "2.0.0"
|
|
72
|
-
},
|
|
73
|
-
"peerDependencies": {
|
|
74
|
-
"typescript": "^5.0.0"
|
|
75
|
-
},
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"di-kit": "^1.1.1",
|
|
78
|
-
"di-scoped": "^1.0.21",
|
|
79
|
-
"di-singleton": "^1.0.5",
|
|
80
|
-
"functools-kit": "^2.3.0",
|
|
81
|
-
"get-moment-stamp": "^2.0.0"
|
|
82
|
-
},
|
|
83
|
-
"publishConfig": {
|
|
84
|
-
"access": "public"
|
|
85
|
-
}
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "backtest-kit",
|
|
3
|
+
"version": "13.0.0",
|
|
4
|
+
"description": "A TypeScript library for trading system backtest",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Petr Tripolsky",
|
|
7
|
+
"email": "tripolskypetr@gmail.com",
|
|
8
|
+
"url": "https://github.com/tripolskypetr"
|
|
9
|
+
},
|
|
10
|
+
"funding": {
|
|
11
|
+
"type": "individual",
|
|
12
|
+
"url": "http://paypal.me/tripolskypetr"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
|
|
16
|
+
"keywords": [
|
|
17
|
+
"backtesting",
|
|
18
|
+
"backtest",
|
|
19
|
+
"finance",
|
|
20
|
+
"trading",
|
|
21
|
+
"candles",
|
|
22
|
+
"indicators",
|
|
23
|
+
"multi value",
|
|
24
|
+
"multi symbol",
|
|
25
|
+
"framework"
|
|
26
|
+
],
|
|
27
|
+
"files": [
|
|
28
|
+
"build",
|
|
29
|
+
"types.d.ts",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/tripolskypetr/backtest-kit",
|
|
35
|
+
"documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
|
|
36
|
+
},
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/tripolskypetr/backtest-kit/issues"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "rollup -c",
|
|
42
|
+
"test": "npm run build && node ./test/index.mjs",
|
|
43
|
+
"build:docs": "rimraf docs && mkdir docs && node ./scripts/dts-docs.cjs ./types.d.ts ./docs",
|
|
44
|
+
"docs:gpt": "npm run build && node ./tools/gpt-docs/index.mjs",
|
|
45
|
+
"docs:uml": "npm run build && node ./scripts/uml.mjs",
|
|
46
|
+
"docs:www": "rimraf docs/wwwroot && node ./tools/typedoc-packages-docs/index.mjs && typedoc && node ./tools/typedoc-yandex-metrica/index.mjs",
|
|
47
|
+
"repl": "dotenv -e .env -- npm run build && node -e \"import('./scripts/repl.mjs')\" --interactive"
|
|
48
|
+
},
|
|
49
|
+
"main": "build/index.cjs",
|
|
50
|
+
"module": "build/index.mjs",
|
|
51
|
+
"source": "src/index.ts",
|
|
52
|
+
"types": "./types.d.ts",
|
|
53
|
+
"exports": {
|
|
54
|
+
"require": "./build/index.cjs",
|
|
55
|
+
"types": "./types.d.ts",
|
|
56
|
+
"import": "./build/index.mjs",
|
|
57
|
+
"default": "./build/index.cjs"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@rollup/plugin-typescript": "11.1.6",
|
|
61
|
+
"@types/node": "22.9.0",
|
|
62
|
+
"glob": "11.0.1",
|
|
63
|
+
"plantuml": "0.0.2",
|
|
64
|
+
"rimraf": "6.0.1",
|
|
65
|
+
"rollup": "3.29.5",
|
|
66
|
+
"rollup-plugin-dts": "6.1.1",
|
|
67
|
+
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
68
|
+
"ts-morph": "27.0.2",
|
|
69
|
+
"tslib": "2.7.0",
|
|
70
|
+
"typedoc": "0.27.9",
|
|
71
|
+
"worker-testbed": "2.0.0"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"typescript": "^5.0.0"
|
|
75
|
+
},
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"di-kit": "^1.1.1",
|
|
78
|
+
"di-scoped": "^1.0.21",
|
|
79
|
+
"di-singleton": "^1.0.5",
|
|
80
|
+
"functools-kit": "^2.3.0",
|
|
81
|
+
"get-moment-stamp": "^2.0.0"
|
|
82
|
+
},
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"access": "public"
|
|
85
|
+
}
|
|
86
|
+
}
|
package/types.d.ts
CHANGED
|
@@ -2686,6 +2686,8 @@ interface IStorageSignalRowBase extends IPublicSignalRow {
|
|
|
2686
2686
|
interface IStorageSignalRowOpened extends IStorageSignalRowBase {
|
|
2687
2687
|
/** Current status of the signal */
|
|
2688
2688
|
status: "opened";
|
|
2689
|
+
/** VWAP price at signal open (mirrors IStrategyTickResultOpened.currentPrice) */
|
|
2690
|
+
currentPrice: number;
|
|
2689
2691
|
}
|
|
2690
2692
|
/**
|
|
2691
2693
|
* Storage signal row for scheduled status.
|
|
@@ -2693,6 +2695,8 @@ interface IStorageSignalRowOpened extends IStorageSignalRowBase {
|
|
|
2693
2695
|
interface IStorageSignalRowScheduled extends IStorageSignalRowBase {
|
|
2694
2696
|
/** Current status of the signal */
|
|
2695
2697
|
status: "scheduled";
|
|
2698
|
+
/** VWAP price when the scheduled signal was created (mirrors IStrategyTickResultScheduled.currentPrice) */
|
|
2699
|
+
currentPrice: number;
|
|
2696
2700
|
}
|
|
2697
2701
|
/**
|
|
2698
2702
|
* Storage signal row for closed status.
|
|
@@ -2703,6 +2707,12 @@ interface IStorageSignalRowClosed extends IStorageSignalRowBase {
|
|
|
2703
2707
|
status: "closed";
|
|
2704
2708
|
/** Profit and loss value for the signal when closed */
|
|
2705
2709
|
pnl: IStrategyPnL;
|
|
2710
|
+
/** Final VWAP price at close (mirrors IStrategyTickResultClosed.currentPrice) */
|
|
2711
|
+
currentPrice: number;
|
|
2712
|
+
/** Why the signal closed (mirrors IStrategyTickResultClosed.closeReason) */
|
|
2713
|
+
closeReason: StrategyCloseReason;
|
|
2714
|
+
/** Unix timestamp in milliseconds when the signal closed (mirrors IStrategyTickResultClosed.closeTimestamp) */
|
|
2715
|
+
closeTimestamp: number;
|
|
2706
2716
|
}
|
|
2707
2717
|
/**
|
|
2708
2718
|
* Storage signal row for cancelled status.
|
|
@@ -2745,6 +2755,26 @@ interface IScheduledSignalCancelRow extends IScheduledSignalRow {
|
|
|
2745
2755
|
/** Note from user payload (only for user-initiated cancellations) */
|
|
2746
2756
|
cancelNote?: string;
|
|
2747
2757
|
}
|
|
2758
|
+
/**
|
|
2759
|
+
* Signal row with close ID.
|
|
2760
|
+
* Extends ISignalRow to include optional closeId for user-initiated closes.
|
|
2761
|
+
*/
|
|
2762
|
+
interface ISignalCloseRow extends ISignalRow {
|
|
2763
|
+
/** Close ID (only for user-initiated closes) */
|
|
2764
|
+
closeId?: string;
|
|
2765
|
+
/** Note from user payload (only for user-initiated closes) */
|
|
2766
|
+
closeNote?: string;
|
|
2767
|
+
}
|
|
2768
|
+
/**
|
|
2769
|
+
* Scheduled signal row with activation ID.
|
|
2770
|
+
* Extends IScheduledSignalRow to include optional activateId for user-initiated activations.
|
|
2771
|
+
*/
|
|
2772
|
+
interface IScheduledSignalActivateRow extends IScheduledSignalRow {
|
|
2773
|
+
/** Activation ID (only for user-initiated activations) */
|
|
2774
|
+
activateId?: string;
|
|
2775
|
+
/** Note from user payload (only for user-initiated activations) */
|
|
2776
|
+
activateNote?: string;
|
|
2777
|
+
}
|
|
2748
2778
|
/**
|
|
2749
2779
|
* Base interface for queued commit events.
|
|
2750
2780
|
* Used to defer commit emission until proper execution context is available.
|
|
@@ -14086,6 +14116,190 @@ declare class PersistScheduleUtils {
|
|
|
14086
14116
|
* ```
|
|
14087
14117
|
*/
|
|
14088
14118
|
declare const PersistScheduleAdapter: PersistScheduleUtils;
|
|
14119
|
+
/**
|
|
14120
|
+
* Type for persisted deferred strategy state.
|
|
14121
|
+
* Snapshot of the in-flight commit queue and deferred user actions that have not yet
|
|
14122
|
+
* been forwarded to the broker. Restored on waitForInit after a live crash so the
|
|
14123
|
+
* pending broker operations are not silently lost.
|
|
14124
|
+
*/
|
|
14125
|
+
type StrategyData = {
|
|
14126
|
+
/** Queued commit events (average-buy / partial-* / trailing-* / breakeven) not yet drained */
|
|
14127
|
+
commitQueue: ICommitRow[];
|
|
14128
|
+
/** Deferred user-initiated close (closePending), or null if none pending */
|
|
14129
|
+
closedSignal: ISignalCloseRow | null;
|
|
14130
|
+
/** Deferred user-initiated scheduled cancel (cancelScheduled), or null if none pending */
|
|
14131
|
+
cancelledSignal: IScheduledSignalCancelRow | null;
|
|
14132
|
+
/** Deferred user-initiated scheduled activate (activateScheduled), or null if none pending */
|
|
14133
|
+
activatedSignal: IScheduledSignalActivateRow | null;
|
|
14134
|
+
};
|
|
14135
|
+
/**
|
|
14136
|
+
* Per-context deferred strategy state persistence instance interface.
|
|
14137
|
+
* Scoped to a specific (symbol, strategyName, exchangeName) triple.
|
|
14138
|
+
*
|
|
14139
|
+
* Custom adapters should implement this interface to override the default
|
|
14140
|
+
* file-based deferred strategy state persistence behavior.
|
|
14141
|
+
*/
|
|
14142
|
+
interface IPersistStrategyInstance {
|
|
14143
|
+
/**
|
|
14144
|
+
* Initialize storage for this strategy state context.
|
|
14145
|
+
*
|
|
14146
|
+
* @param initial - Whether this is the first initialization
|
|
14147
|
+
* @returns Promise that resolves when initialization is complete
|
|
14148
|
+
*/
|
|
14149
|
+
waitForInit(initial: boolean): Promise<void>;
|
|
14150
|
+
/**
|
|
14151
|
+
* Read persisted deferred strategy state for this context.
|
|
14152
|
+
*
|
|
14153
|
+
* @returns Promise resolving to strategy state snapshot or null if none persisted
|
|
14154
|
+
*/
|
|
14155
|
+
readStrategyData(): Promise<StrategyData | null>;
|
|
14156
|
+
/**
|
|
14157
|
+
* Write deferred strategy state for this context (null to clear).
|
|
14158
|
+
*
|
|
14159
|
+
* @param row - Strategy state snapshot to persist, or null to clear
|
|
14160
|
+
* @returns Promise that resolves when write is complete
|
|
14161
|
+
*/
|
|
14162
|
+
writeStrategyData(row: StrategyData | null): Promise<void>;
|
|
14163
|
+
}
|
|
14164
|
+
/**
|
|
14165
|
+
* Default file-based implementation of IPersistStrategyInstance.
|
|
14166
|
+
*
|
|
14167
|
+
* Features:
|
|
14168
|
+
* - Wraps PersistBase for atomic JSON writes
|
|
14169
|
+
* - Uses fixed entity ID "strategy" within a per-context PersistBase
|
|
14170
|
+
* - Crash-safe via atomic writes
|
|
14171
|
+
*
|
|
14172
|
+
* @example
|
|
14173
|
+
* ```typescript
|
|
14174
|
+
* const instance = new PersistStrategyInstance("BTCUSDT", "my-strategy", "binance");
|
|
14175
|
+
* await instance.waitForInit(true);
|
|
14176
|
+
* await instance.writeStrategyData(snapshot);
|
|
14177
|
+
* const restored = await instance.readStrategyData();
|
|
14178
|
+
* ```
|
|
14179
|
+
*/
|
|
14180
|
+
declare class PersistStrategyInstance implements IPersistStrategyInstance {
|
|
14181
|
+
readonly symbol: string;
|
|
14182
|
+
readonly strategyName: StrategyName;
|
|
14183
|
+
readonly exchangeName: ExchangeName;
|
|
14184
|
+
/** Fixed entity key for storing the strategy state snapshot */
|
|
14185
|
+
private static readonly STORAGE_KEY;
|
|
14186
|
+
/** Underlying file-based storage scoped to this context */
|
|
14187
|
+
private readonly _storage;
|
|
14188
|
+
/**
|
|
14189
|
+
* Creates new deferred strategy state persistence instance.
|
|
14190
|
+
*
|
|
14191
|
+
* @param symbol - Trading pair symbol
|
|
14192
|
+
* @param strategyName - Strategy identifier
|
|
14193
|
+
* @param exchangeName - Exchange identifier
|
|
14194
|
+
*/
|
|
14195
|
+
constructor(symbol: string, strategyName: StrategyName, exchangeName: ExchangeName);
|
|
14196
|
+
/**
|
|
14197
|
+
* Initializes the underlying PersistBase storage.
|
|
14198
|
+
*
|
|
14199
|
+
* @param initial - Whether this is the first initialization
|
|
14200
|
+
* @returns Promise that resolves when initialization is complete
|
|
14201
|
+
*/
|
|
14202
|
+
waitForInit(initial: boolean): Promise<void>;
|
|
14203
|
+
/**
|
|
14204
|
+
* Reads the persisted strategy state snapshot using the fixed STORAGE_KEY.
|
|
14205
|
+
*
|
|
14206
|
+
* @returns Promise resolving to strategy state snapshot or null if not found
|
|
14207
|
+
*/
|
|
14208
|
+
readStrategyData(): Promise<StrategyData | null>;
|
|
14209
|
+
/**
|
|
14210
|
+
* Writes the strategy state snapshot (or null to clear) using the fixed STORAGE_KEY.
|
|
14211
|
+
*
|
|
14212
|
+
* @param row - Strategy state snapshot to persist, or null to clear
|
|
14213
|
+
* @returns Promise that resolves when write is complete
|
|
14214
|
+
*/
|
|
14215
|
+
writeStrategyData(row: StrategyData | null): Promise<void>;
|
|
14216
|
+
}
|
|
14217
|
+
/**
|
|
14218
|
+
* Constructor type for IPersistStrategyInstance.
|
|
14219
|
+
* Used by PersistStrategyUtils.usePersistStrategyAdapter() to register custom adapters.
|
|
14220
|
+
*/
|
|
14221
|
+
type TPersistStrategyInstanceCtor = new (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName) => IPersistStrategyInstance;
|
|
14222
|
+
/**
|
|
14223
|
+
* Utility class for managing deferred strategy state persistence.
|
|
14224
|
+
*
|
|
14225
|
+
* Features:
|
|
14226
|
+
* - Memoized storage instances per strategy
|
|
14227
|
+
* - Custom adapter support
|
|
14228
|
+
* - Atomic read/write operations for the deferred state snapshot
|
|
14229
|
+
* - Crash-safe in-flight broker operation state management
|
|
14230
|
+
*
|
|
14231
|
+
* Used by ClientStrategy for live mode persistence of the commit queue and deferred
|
|
14232
|
+
* user actions (_commitQueue, _closedSignal, _cancelledSignal, _activatedSignal).
|
|
14233
|
+
*/
|
|
14234
|
+
declare class PersistStrategyUtils {
|
|
14235
|
+
/**
|
|
14236
|
+
* Constructor used to create per-context strategy state instances.
|
|
14237
|
+
* Replaceable via usePersistStrategyAdapter() / useJson() / useDummy().
|
|
14238
|
+
*/
|
|
14239
|
+
private PersistStrategyInstanceCtor;
|
|
14240
|
+
/**
|
|
14241
|
+
* Memoized factory creating one IPersistStrategyInstance per (symbol, strategy, exchange) triple.
|
|
14242
|
+
*/
|
|
14243
|
+
private getStrategyStorage;
|
|
14244
|
+
/**
|
|
14245
|
+
* Registers a custom IPersistStrategyInstance constructor.
|
|
14246
|
+
* Clears the memoization cache so subsequent calls use the new adapter.
|
|
14247
|
+
*
|
|
14248
|
+
* @param Ctor - Custom IPersistStrategyInstance constructor
|
|
14249
|
+
*/
|
|
14250
|
+
usePersistStrategyAdapter(Ctor: TPersistStrategyInstanceCtor): void;
|
|
14251
|
+
/**
|
|
14252
|
+
* Reads persisted deferred strategy state for the given context.
|
|
14253
|
+
* Lazily initializes the instance on first access.
|
|
14254
|
+
*
|
|
14255
|
+
* @param symbol - Trading pair symbol
|
|
14256
|
+
* @param strategyName - Strategy identifier
|
|
14257
|
+
* @param exchangeName - Exchange identifier
|
|
14258
|
+
* @returns Promise resolving to strategy state snapshot or null if none persisted
|
|
14259
|
+
*/
|
|
14260
|
+
readStrategyData: (symbol: string, strategyName: StrategyName, exchangeName: ExchangeName) => Promise<StrategyData | null>;
|
|
14261
|
+
/**
|
|
14262
|
+
* Writes deferred strategy state (or null to clear) for the given context.
|
|
14263
|
+
* Lazily initializes the instance on first access.
|
|
14264
|
+
*
|
|
14265
|
+
* @param strategyRow - Strategy state snapshot to persist, or null to clear
|
|
14266
|
+
* @param symbol - Trading pair symbol
|
|
14267
|
+
* @param strategyName - Strategy identifier
|
|
14268
|
+
* @param exchangeName - Exchange identifier
|
|
14269
|
+
* @returns Promise that resolves when write is complete
|
|
14270
|
+
*/
|
|
14271
|
+
writeStrategyData: (strategyRow: StrategyData | null, symbol: string, strategyName: StrategyName, exchangeName: ExchangeName) => Promise<void>;
|
|
14272
|
+
/**
|
|
14273
|
+
* Clears the memoized instance cache.
|
|
14274
|
+
* Call when process.cwd() changes between strategy iterations.
|
|
14275
|
+
*/
|
|
14276
|
+
clear(): void;
|
|
14277
|
+
/**
|
|
14278
|
+
* Switches to the default file-based PersistStrategyInstance.
|
|
14279
|
+
*/
|
|
14280
|
+
useJson(): void;
|
|
14281
|
+
/**
|
|
14282
|
+
* Switches to PersistStrategyDummyInstance (all operations are no-ops).
|
|
14283
|
+
*/
|
|
14284
|
+
useDummy(): void;
|
|
14285
|
+
}
|
|
14286
|
+
/**
|
|
14287
|
+
* Global singleton instance of PersistStrategyUtils.
|
|
14288
|
+
* Used by ClientStrategy for deferred strategy state persistence.
|
|
14289
|
+
*
|
|
14290
|
+
* @example
|
|
14291
|
+
* ```typescript
|
|
14292
|
+
* // Custom adapter
|
|
14293
|
+
* PersistStrategyAdapter.usePersistStrategyAdapter(RedisPersist);
|
|
14294
|
+
*
|
|
14295
|
+
* // Read strategy state
|
|
14296
|
+
* const state = await PersistStrategyAdapter.readStrategyData("BTCUSDT", "my-strategy", "binance");
|
|
14297
|
+
*
|
|
14298
|
+
* // Write strategy state
|
|
14299
|
+
* await PersistStrategyAdapter.writeStrategyData(state, "BTCUSDT", "my-strategy", "binance");
|
|
14300
|
+
* ```
|
|
14301
|
+
*/
|
|
14302
|
+
declare const PersistStrategyAdapter: PersistStrategyUtils;
|
|
14089
14303
|
/**
|
|
14090
14304
|
* Type for persisted partial data.
|
|
14091
14305
|
* Stores profit and loss levels as arrays for JSON serialization.
|
|
@@ -29807,6 +30021,21 @@ declare const percentToCloseCost: (percentToClose: number, investedCost: number)
|
|
|
29807
30021
|
*/
|
|
29808
30022
|
declare const validateSignal: (signal: ISignalDto, currentPrice: number) => boolean;
|
|
29809
30023
|
|
|
30024
|
+
/**
|
|
30025
|
+
* Validates that all candles have valid OHLCV data without anomalies.
|
|
30026
|
+
*
|
|
30027
|
+
* Guards the candle cache against corrupt adapter output before it is persisted:
|
|
30028
|
+
* - Rejects non-finite values (NaN / Infinity / -Infinity), which JSON would
|
|
30029
|
+
* silently serialize to null and break VWAP on the next read.
|
|
30030
|
+
* - Rejects zero / negative prices and negative volume.
|
|
30031
|
+
* - Detects incomplete candles from exchange APIs (abnormally low prices, e.g.
|
|
30032
|
+
* 0.1 instead of 100,000) by comparing against a reference price.
|
|
30033
|
+
*
|
|
30034
|
+
* @param candles - Array of candle data to validate
|
|
30035
|
+
* @throws Error if any candle has anomalous OHLCV values
|
|
30036
|
+
*/
|
|
30037
|
+
declare const validateCandles: (candles: ICandleData[]) => void;
|
|
30038
|
+
|
|
29810
30039
|
/**
|
|
29811
30040
|
* Validates the common fields of ISignalDto that apply to both pending and scheduled signals.
|
|
29812
30041
|
*
|
|
@@ -37326,12 +37555,23 @@ declare const getTotalClosed: (signal: Signal) => {
|
|
|
37326
37555
|
};
|
|
37327
37556
|
|
|
37328
37557
|
/**
|
|
37329
|
-
* Derives the number of decimal places to show for a price based on
|
|
37330
|
-
* magnitude
|
|
37331
|
-
*
|
|
37558
|
+
* Derives the number of decimal places to show for a price based on its
|
|
37559
|
+
* magnitude — a display heuristic for reports, NOT exchange tick-size precision.
|
|
37560
|
+
*
|
|
37561
|
+
* The scale steps in even increments (2, 4, 6, 8): cheaper coins (most of
|
|
37562
|
+
* Binance's catalogue) get more decimals, one step of two per decimal order:
|
|
37563
|
+
*
|
|
37564
|
+
* - 1 and up -> 2 (e.g. 10.00, 100.00, BTC 50000.00)
|
|
37565
|
+
* - 0.1 .. 0.99 -> 4 (e.g. 0.5000)
|
|
37566
|
+
* - 0.01 .. 0.099-> 6 (e.g. 0.050000)
|
|
37567
|
+
* - below 0.01 -> 8 (e.g. 0.00001234)
|
|
37568
|
+
*
|
|
37569
|
+
* For real order placement use the symbol's PRICE_FILTER.tickSize from
|
|
37570
|
+
* exchangeInfo instead — magnitude is only an approximation of it.
|
|
37571
|
+
*
|
|
37332
37572
|
* @param value - The price to derive the decimal scale for
|
|
37333
|
-
* @returns The number of digits after the decimal point
|
|
37573
|
+
* @returns The number of digits after the decimal point (always even, 2..8)
|
|
37334
37574
|
*/
|
|
37335
37575
|
declare const getPriceScale: (value: number) => number;
|
|
37336
37576
|
|
|
37337
|
-
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AfterEndContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, type BeforeStartContract, 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, type CommitPayload, Constant, type CriticalErrorNotification, Cron, type CronCallback, type CronEntry, type CronHandle, 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 IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, 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 IRuntimeInfo, type IRuntimeRange, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, 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 IStateInstance, 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, Lookup, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, 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, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, 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, type RuntimeData, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, 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, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, 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, beginContext, beginTime, cacheCandles, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, 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, getPriceScale, getRawCandles, getRiskSchema, getRuntimeInfo, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenAfterEnd, listenAfterEndOnce, listenBacktestProgress, listenBeforeStart, listenBeforeStartOnce, 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, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toPlainString, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|
|
37577
|
+
export { ActionBase, type ActivateScheduledCommit, type ActivateScheduledCommitNotification, type ActivePingContract, type AfterEndContract, type AverageBuyCommit, type AverageBuyCommitNotification, Backtest, type BacktestStatisticsModel, type BeforeStartContract, 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, type CommitPayload, Constant, type CriticalErrorNotification, Cron, type CronCallback, type CronEntry, type CronHandle, 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 IPersistBreakevenInstance, type IPersistCandleInstance, type IPersistIntervalInstance, type IPersistLogInstance, type IPersistMeasureInstance, type IPersistMemoryInstance, type IPersistNotificationInstance, type IPersistPartialInstance, type IPersistRecentInstance, type IPersistRiskInstance, type IPersistScheduleInstance, type IPersistSessionInstance, type IPersistSignalInstance, type IPersistStateInstance, type IPersistStorageInstance, type IPersistStrategyInstance, 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 IRuntimeInfo, type IRuntimeRange, type IScheduledSignalCancelRow, type IScheduledSignalRow, type ISessionInstance, 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 IStateInstance, 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, Lookup, Markdown, MarkdownFileBase, MarkdownFolderBase, type MarkdownName, MarkdownWriter, MaxDrawdown, type MaxDrawdownContract, type MaxDrawdownEvent, type MaxDrawdownStatisticsModel, type MeasureData, Memory, MemoryBacktest, MemoryBacktestAdapter, type MemoryData, MemoryLive, MemoryLiveAdapter, 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, PersistBreakevenInstance, PersistCandleAdapter, PersistCandleInstance, PersistIntervalAdapter, PersistIntervalInstance, PersistLogAdapter, PersistLogInstance, PersistMeasureAdapter, PersistMeasureInstance, PersistMemoryAdapter, PersistMemoryInstance, PersistNotificationAdapter, PersistNotificationInstance, PersistPartialAdapter, PersistPartialInstance, PersistRecentAdapter, PersistRecentInstance, PersistRiskAdapter, PersistRiskInstance, PersistScheduleAdapter, PersistScheduleInstance, PersistSessionAdapter, PersistSessionInstance, PersistSignalAdapter, PersistSignalInstance, PersistStateAdapter, PersistStateInstance, PersistStorageAdapter, PersistStorageInstance, PersistStrategyAdapter, PersistStrategyInstance, 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, type RuntimeData, Schedule, type ScheduleData, type SchedulePingContract, type ScheduleStatisticsModel, type ScheduledEvent, Session, SessionBacktest, type SessionData, SessionLive, 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, State, StateBacktest, StateBacktestAdapter, type StateData, StateLive, StateLiveAdapter, Storage, StorageBacktest, type StorageData, StorageLive, Strategy, type StrategyActionType, type StrategyCancelReason, type StrategyCloseReason, type StrategyCommitContract, type StrategyData, type StrategyEvent, type StrategyStatisticsModel, Sync, type SyncEvent, type SyncStatisticsModel, System, type TBrokerCtor, type TDumpInstanceCtor, type TLogCtor, type TMarkdownBase, type TMemoryInstanceCtor, type TNotificationUtilsCtor, type TPersistBase, type TPersistBaseCtor, type TPersistBreakevenInstanceCtor, type TPersistCandleInstanceCtor, type TPersistIntervalInstanceCtor, type TPersistLogInstanceCtor, type TPersistMeasureInstanceCtor, type TPersistMemoryInstanceCtor, type TPersistNotificationInstanceCtor, type TPersistPartialInstanceCtor, type TPersistRecentInstanceCtor, type TPersistRiskInstanceCtor, type TPersistScheduleInstanceCtor, type TPersistSessionInstanceCtor, type TPersistSignalInstanceCtor, type TPersistStateInstanceCtor, type TPersistStorageInstanceCtor, type TPersistStrategyInstanceCtor, type TRecentUtilsCtor, type TReportBase, type TSessionInstanceCtor, type TStateInstanceCtor, 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, beginContext, beginTime, cacheCandles, checkCandles, commitActivateScheduled, commitAverageBuy, commitBreakeven, commitCancelScheduled, commitClosePending, commitPartialLoss, commitPartialLossCost, commitPartialProfit, commitPartialProfitCost, commitSignalNotify, commitTrailingStop, commitTrailingStopCost, commitTrailingTake, commitTrailingTakeCost, createSignalState, dumpAgentAnswer, dumpError, dumpJson, dumpRecord, dumpTable, dumpText, emitters, formatPrice, formatQuantity, get, getActionSchema, getAggregatedTrades, getAveragePrice, getBacktestTimeframe, getBreakeven, getCandles, getClosePrice, 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, getPriceScale, getRawCandles, getRiskSchema, getRuntimeInfo, getScheduledSignal, getSessionData, getSignalState, getSizingSchema, getStrategySchema, getSymbol, getTimestamp, getTotalClosed, getTotalCostClosed, getTotalPercentClosed, getWalkerSchema, hasNoPendingSignal, hasNoScheduledSignal, hasTradeContext, intervalStepMs, investedCostToPercent, backtest as lib, listExchangeSchema, listFrameSchema, listMemory, listRiskSchema, listSizingSchema, listStrategySchema, listWalkerSchema, listenActivePing, listenActivePingOnce, listenAfterEnd, listenAfterEndOnce, listenBacktestProgress, listenBeforeStart, listenBeforeStartOnce, 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, setSessionData, setSignalState, shutdown, slPercentShiftToPrice, slPriceToPercentShift, stopStrategy, toPlainString, toProfitLossDto, tpPercentShiftToPrice, tpPriceToPercentShift, validate, validateCandles, validateCommonSignal, validatePendingSignal, validateScheduledSignal, validateSignal, waitForCandle, waitForReady, warmCandles, writeMemory };
|