@tradejs/node 2.0.13 → 2.0.14
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/dist/ai.js +1 -1
- package/dist/ai.mjs +1 -1
- package/dist/backtest.js +580 -14
- package/dist/backtest.mjs +18 -3
- package/dist/{chunk-PD25CABK.mjs → chunk-DPHKRDD5.mjs} +1 -1
- package/dist/{chunk-76TEMQKX.mjs → chunk-FEQR4XGR.mjs} +576 -9
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/strategies.d.mts +50 -1
- package/dist/strategies.d.ts +50 -1
- package/dist/strategies.js +633 -37
- package/dist/strategies.mjs +45 -4
- package/package.json +4 -4
package/dist/backtest.mjs
CHANGED
|
@@ -6,11 +6,12 @@ import {
|
|
|
6
6
|
buildMlPayload,
|
|
7
7
|
enrichSignalWithBinanceMarketContext,
|
|
8
8
|
enrichSignalWithCoinMarketCapContext,
|
|
9
|
-
enrichSignalWithDerivativesContext
|
|
10
|
-
|
|
9
|
+
enrichSignalWithDerivativesContext,
|
|
10
|
+
enrichSignalWithHyperliquidWhaleContext
|
|
11
|
+
} from "./chunk-FEQR4XGR.mjs";
|
|
11
12
|
import {
|
|
12
13
|
buildAiPayload
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DPHKRDD5.mjs";
|
|
14
15
|
import {
|
|
15
16
|
getStrategyCreator
|
|
16
17
|
} from "./chunk-QVSMINLG.mjs";
|
|
@@ -2086,6 +2087,13 @@ var testing = async ({
|
|
|
2086
2087
|
env: "BACKTEST"
|
|
2087
2088
|
})
|
|
2088
2089
|
);
|
|
2090
|
+
await withTimeout(
|
|
2091
|
+
"hyperliquid whale context",
|
|
2092
|
+
enrichSignalWithHyperliquidWhaleContext({
|
|
2093
|
+
signal,
|
|
2094
|
+
env: "BACKTEST"
|
|
2095
|
+
})
|
|
2096
|
+
);
|
|
2089
2097
|
}
|
|
2090
2098
|
if (ml && signal && typeof signal !== "string" && signal.signalId) {
|
|
2091
2099
|
const payload = buildMlPayload({
|
|
@@ -2511,6 +2519,13 @@ var testingGroupInSharedCandleLoop = async (tests) => {
|
|
|
2511
2519
|
env: "BACKTEST"
|
|
2512
2520
|
})
|
|
2513
2521
|
);
|
|
2522
|
+
await withTimeout(
|
|
2523
|
+
"hyperliquid whale context",
|
|
2524
|
+
enrichSignalWithHyperliquidWhaleContext({
|
|
2525
|
+
signal,
|
|
2526
|
+
env: "BACKTEST"
|
|
2527
|
+
})
|
|
2528
|
+
);
|
|
2514
2529
|
}
|
|
2515
2530
|
if (test.ml && signal && typeof signal !== "string" && signal.signalId) {
|
|
2516
2531
|
const payload = buildMlPayload({
|
|
@@ -843,7 +843,7 @@ Input payload structure:
|
|
|
843
843
|
\u2022 \`baseContext.raw\`: current MA, ATR, BB, OBV, price stats, levels, BTC correlation.
|
|
844
844
|
\u2022 \`baseContext.regime\`: derived trend / volatility / momentum / session regime fields.
|
|
845
845
|
\u2022 \`baseContext.structure\`: local range position, breakout freshness/quality, level-touch counts, rejection wick context.
|
|
846
|
-
\u2022 \`baseContext.participation\`: volume/turnover participation, effort-vs-result context,
|
|
846
|
+
\u2022 \`baseContext.participation\`: volume/turnover participation, effort-vs-result context, Binance aggTrades, and fingerprinted Hyperliquid whale-flow when available.
|
|
847
847
|
\u2022 \`baseContext.relative\`: BTC/ETH relative-strength, benchmark MA bias context, Binance alt-basket breadth, and CoinMarketCap historical global/exchange/index context when available.
|
|
848
848
|
\u2022 \`baseContext.derivatives\`: Coinalyze-aligned derivatives summary when available.
|
|
849
849
|
\u2022 \`baseContext.mtf\`: compact multi-timeframe summary plus only the latest few candles for each timeframe.
|