@tradejs/strategy-trend-follow 3.0.2 → 3.0.3-beta.7

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 CHANGED
@@ -57,3 +57,7 @@ image passes. The current verified beta is promoted to one stable `latest`
57
57
  release by the weekly automation; production never consumes prereleases.
58
58
 
59
59
  Keywords: ai, claude, codex.
60
+
61
+ ## Runtime host contract
62
+
63
+ All `@tradejs/*` runtime packages are peer dependencies. The consuming TradeJS Project owns their exact installed versions and package manifest, so this package never loads a hidden nested engine, types package, indicator package, or Strategy Kit. Repository builds use matching dev dependencies only.
package/dist/index.cjs CHANGED
@@ -29,7 +29,7 @@ __export(index_exports, {
29
29
  trendFollowManifest: () => trendFollowManifest
30
30
  });
31
31
  module.exports = __toCommonJS(index_exports);
32
- var import_config4 = require("@tradejs/core/config");
32
+ var import_config5 = require("@tradejs/core/config");
33
33
 
34
34
  // src/TrendFollow/config.ts
35
35
  var import_constants = require("@tradejs/core/constants");
@@ -100,6 +100,9 @@ var config = {
100
100
  }
101
101
  };
102
102
 
103
+ // src/TrendFollow/strategy.ts
104
+ var import_config3 = require("@tradejs/strategy-kit/config");
105
+
103
106
  // src/TrendFollow/core.ts
104
107
  var import_math = require("@tradejs/core/math");
105
108
 
@@ -1288,6 +1291,10 @@ var trendFollowManifest = {
1288
1291
  // src/TrendFollow/strategy.ts
1289
1292
  var TrendFollowStrategyDefinition = {
1290
1293
  defaults: config,
1294
+ parseConfig: (0, import_config3.createStrategyConfigParser)({
1295
+ strategyName: "TrendFollow",
1296
+ defaults: config
1297
+ }),
1291
1298
  createCore: createTrendFollowCore,
1292
1299
  manifest: trendFollowManifest
1293
1300
  };
@@ -1300,7 +1307,7 @@ var defaultConfigs = {
1300
1307
  TrendFollow: config
1301
1308
  };
1302
1309
  var getBuiltInStrategyDefaultConfig = (strategyName) => defaultConfigs[strategyName];
1303
- var index_default = (0, import_config4.defineStrategyPlugin)({ strategyEntries });
1310
+ var index_default = (0, import_config5.defineStrategyPlugin)({ strategyEntries });
1304
1311
  // Annotate the CommonJS export names for ESM import in node:
1305
1312
  0 && (module.exports = {
1306
1313
  TrendFollowStrategyDefinition,
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
- import { StrategyConfig, Interval, BacktestPriceMode, Direction, StrategyRegistryEntry, StrategyManifest, StrategyAiAdapter } from '@tradejs/types';
1
+ import { ValidatedStrategyRegistryEntry } from '@tradejs/strategy-kit/config';
2
+ import { StrategyConfig, Interval, BacktestPriceMode, Direction, StrategyManifest, StrategyAiAdapter } from '@tradejs/types';
2
3
 
3
4
  interface TrendFollowSideConfig {
4
5
  enable: boolean;
@@ -77,17 +78,17 @@ type TrendFollowConfig = StrategyConfig & Omit<typeof config, "BACKTEST_PRICE_MO
77
78
  SHORT: TrendFollowSideConfig;
78
79
  };
79
80
 
80
- declare const TrendFollowStrategyDefinition: StrategyRegistryEntry<TrendFollowConfig>;
81
+ declare const TrendFollowStrategyDefinition: ValidatedStrategyRegistryEntry<TrendFollowConfig>;
81
82
 
82
83
  declare const trendFollowManifest: StrategyManifest;
83
84
 
84
85
  declare const trendFollowAiAdapter: StrategyAiAdapter;
85
86
 
86
- declare const strategyEntries: StrategyRegistryEntry[];
87
+ declare const strategyEntries: ValidatedStrategyRegistryEntry<any>[];
87
88
  declare const getBuiltInStrategyDefaultConfig: (strategyName: string) => StrategyConfig | undefined;
88
89
 
89
90
  declare const _default: {
90
- strategyEntries: StrategyRegistryEntry<any>[];
91
+ strategyEntries: ValidatedStrategyRegistryEntry<any>[];
91
92
  };
92
93
 
93
94
  export { TrendFollowStrategyDefinition, _default as default, getBuiltInStrategyDefaultConfig, strategyEntries, trendFollowAiAdapter, config as trendFollowDefaultConfig, trendFollowManifest };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { StrategyConfig, Interval, BacktestPriceMode, Direction, StrategyRegistryEntry, StrategyManifest, StrategyAiAdapter } from '@tradejs/types';
1
+ import { ValidatedStrategyRegistryEntry } from '@tradejs/strategy-kit/config';
2
+ import { StrategyConfig, Interval, BacktestPriceMode, Direction, StrategyManifest, StrategyAiAdapter } from '@tradejs/types';
2
3
 
3
4
  interface TrendFollowSideConfig {
4
5
  enable: boolean;
@@ -77,17 +78,17 @@ type TrendFollowConfig = StrategyConfig & Omit<typeof config, "BACKTEST_PRICE_MO
77
78
  SHORT: TrendFollowSideConfig;
78
79
  };
79
80
 
80
- declare const TrendFollowStrategyDefinition: StrategyRegistryEntry<TrendFollowConfig>;
81
+ declare const TrendFollowStrategyDefinition: ValidatedStrategyRegistryEntry<TrendFollowConfig>;
81
82
 
82
83
  declare const trendFollowManifest: StrategyManifest;
83
84
 
84
85
  declare const trendFollowAiAdapter: StrategyAiAdapter;
85
86
 
86
- declare const strategyEntries: StrategyRegistryEntry[];
87
+ declare const strategyEntries: ValidatedStrategyRegistryEntry<any>[];
87
88
  declare const getBuiltInStrategyDefaultConfig: (strategyName: string) => StrategyConfig | undefined;
88
89
 
89
90
  declare const _default: {
90
- strategyEntries: StrategyRegistryEntry<any>[];
91
+ strategyEntries: ValidatedStrategyRegistryEntry<any>[];
91
92
  };
92
93
 
93
94
  export { TrendFollowStrategyDefinition, _default as default, getBuiltInStrategyDefaultConfig, strategyEntries, trendFollowAiAdapter, config as trendFollowDefaultConfig, trendFollowManifest };
package/dist/index.js CHANGED
@@ -70,6 +70,9 @@ var config = {
70
70
  }
71
71
  };
72
72
 
73
+ // src/TrendFollow/strategy.ts
74
+ import { createStrategyConfigParser } from "@tradejs/strategy-kit/config";
75
+
73
76
  // src/TrendFollow/core.ts
74
77
  import { round } from "@tradejs/core/math";
75
78
 
@@ -1264,6 +1267,10 @@ var trendFollowManifest = {
1264
1267
  // src/TrendFollow/strategy.ts
1265
1268
  var TrendFollowStrategyDefinition = {
1266
1269
  defaults: config,
1270
+ parseConfig: createStrategyConfigParser({
1271
+ strategyName: "TrendFollow",
1272
+ defaults: config
1273
+ }),
1267
1274
  createCore: createTrendFollowCore,
1268
1275
  manifest: trendFollowManifest
1269
1276
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/strategy-trend-follow",
3
- "version": "3.0.2",
3
+ "version": "3.0.3-beta.7",
4
4
  "description": "ATR trailing-trend strategy using pivot structure, optional breakout and benchmark filters, and trail or opposite-signal exits for TradeJS.",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@4.13.0",
@@ -13,6 +13,10 @@
13
13
  "strategy",
14
14
  "plugin",
15
15
  "backtesting",
16
+ "crypto",
17
+ "bybit",
18
+ "binance",
19
+ "coinbase",
16
20
  "ai",
17
21
  "claude",
18
22
  "codex"
@@ -40,12 +44,10 @@
40
44
  }
41
45
  },
42
46
  "sideEffects": false,
43
- "dependencies": {
44
- "@tradejs/core": "^3.0.1",
45
- "@tradejs/strategy-kit": "^3.0.0",
46
- "@tradejs/types": "^3.0.1"
47
- },
48
47
  "devDependencies": {
48
+ "@tradejs/core": "^3.0.1",
49
+ "@tradejs/strategy-kit": "^3.0.1",
50
+ "@tradejs/types": "^3.0.1",
49
51
  "@types/jest": "^29.5.14",
50
52
  "jest": "^29.7.0",
51
53
  "prettier": "^3.6.2",
@@ -65,5 +67,10 @@
65
67
  "provenance": true
66
68
  },
67
69
  "license": "BUSL-1.1",
68
- "author": "aleksnick (https://github.com/aleksnick)"
70
+ "author": "aleksnick (https://github.com/aleksnick)",
71
+ "peerDependencies": {
72
+ "@tradejs/core": "^3.0.1",
73
+ "@tradejs/strategy-kit": "^3.0.1",
74
+ "@tradejs/types": "^3.0.1"
75
+ }
69
76
  }