@tradejs/strategies 1.0.9 → 1.0.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/strategies",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Built-in strategy plugin catalog for the TradeJS open-source framework.",
5
5
  "keywords": [
6
6
  "tradejs",
@@ -12,7 +12,7 @@
12
12
  ],
13
13
  "repository": {
14
14
  "type": "git",
15
- "url": "git+https://github.com/tradejs-dev/tradejs.git",
15
+ "url": "https://github.com/TradeJS-Dev/TradeJS",
16
16
  "directory": "packages/strategies"
17
17
  },
18
18
  "bugs": {
@@ -32,10 +32,11 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@tradejs/core": "^1.0.9",
36
- "@tradejs/indicators": "^1.0.9",
37
- "@tradejs/node": "^1.0.9",
38
- "@tradejs/types": "^1.0.9"
35
+ "@tradejs/core": "^1.0.10",
36
+ "@tradejs/indicators": "^1.0.10",
37
+ "@tradejs/node": "^1.0.10",
38
+ "@tradejs/types": "^1.0.10",
39
+ "technicalindicators": "^3.1.0"
39
40
  },
40
41
  "devDependencies": {
41
42
  "tsup": "^8.5.1",
@@ -1,128 +0,0 @@
1
- // src/Breakout/adapters/ai.ts
2
- var breakoutAiAdapter = {};
3
-
4
- // src/Breakout/adapters/ml.ts
5
- import { mapMlRuntimeFromConfig } from "@tradejs/core/strategies";
6
- var breakoutMlAdapter = {
7
- mapEntryRuntimeFromConfig: (config2) => mapMlRuntimeFromConfig(config2)
8
- };
9
-
10
- // src/Breakout/manifest.ts
11
- var breakoutManifest = {
12
- name: "Breakout",
13
- entryRuntimeDefaults: {
14
- ai: {
15
- enabled: false
16
- },
17
- ml: {
18
- enabled: false
19
- }
20
- },
21
- aiAdapter: breakoutAiAdapter,
22
- mlAdapter: breakoutMlAdapter
23
- };
24
-
25
- // src/Breakout/config.ts
26
- var config = {
27
- ML_ENABLED: false,
28
- MA_FAST: 49,
29
- MA_MEDIUM: 49,
30
- MA_SLOW: 99,
31
- OBV_SMA: 10,
32
- ATR: 14,
33
- ATR_PCT_SHORT: 7,
34
- ATR_PCT_LONG: 30,
35
- BB: 20,
36
- BB_STD: 2,
37
- MACD_FAST: 12,
38
- MACD_SLOW: 26,
39
- MACD_SIGNAL: 9,
40
- LEVEL_LOOKBACK: 20,
41
- LEVEL_DELAY: 2,
42
- ATR_PERIOD: 14,
43
- BB_PERIOD: 20,
44
- BB_STDDEV: 2,
45
- LIMIT: 100,
46
- ATR_OPEN: 0.5,
47
- ATR_CLOSE: 1.5,
48
- OBV_SMA_PERIOD: 10,
49
- BREAKOUT_LOOKBACK_DELAY: 2,
50
- BREAKOUT_LOOKBACK: 20,
51
- REQUIRED_SCORE_LONG: 7,
52
- REQUIRED_SCORE_SHORT: 7,
53
- SIGNALS_LONG: {
54
- VOLATILE: {
55
- weight: 1,
56
- required: true
57
- },
58
- SMA_UPTREND: {
59
- weight: 1,
60
- required: true
61
- },
62
- OBV_ABOVE_SMA: {
63
- weight: 1,
64
- required: true
65
- },
66
- PREV_HIGH_BREAKOUT: {
67
- weight: 1,
68
- required: false
69
- },
70
- CLOSE_ABOVE_UPPER_BB: {
71
- weight: 1,
72
- required: false
73
- },
74
- CLOSE_ABOVE_HIGH_LEVEL: {
75
- weight: 1,
76
- required: false
77
- },
78
- CLOSE_ABOVE_PREV_CLOSE: {
79
- weight: 1,
80
- required: false
81
- }
82
- },
83
- SIGNALS_SHORT: {
84
- VOLATILE: {
85
- weight: 1,
86
- required: true
87
- },
88
- SMA_DOWNTREND: {
89
- weight: 1,
90
- required: true
91
- },
92
- OBV_BELOW_SMA: {
93
- weight: 1,
94
- required: true
95
- },
96
- PREV_LOW_BREAKDOWN: {
97
- weight: 1,
98
- required: false
99
- },
100
- CLOSE_BELOW_LOWER_BB: {
101
- weight: 1,
102
- required: false
103
- },
104
- CLOSE_BELOW_LOW_LEVEL: {
105
- weight: 1,
106
- required: false
107
- },
108
- CLOSE_BELOW_PREV_CLOSE: {
109
- weight: 1,
110
- required: false
111
- }
112
- },
113
- TP_LONG: [
114
- { profit: 0.1, rate: 0.25 },
115
- { profit: 0.15, rate: 0.5 }
116
- ],
117
- TP_SHORT: [
118
- { profit: 0.05, rate: 0.25 },
119
- { profit: 0.1, rate: 0.5 }
120
- ],
121
- SL_LONG: 0.06,
122
- SL_SHORT: 0.03
123
- };
124
-
125
- export {
126
- breakoutManifest,
127
- config
128
- };
@@ -1,62 +0,0 @@
1
- // src/MaStrategy/adapters/ai.ts
2
- import { mapAiRuntimeFromConfig } from "@tradejs/core/strategies";
3
- var maStrategyAiAdapter = {
4
- mapEntryRuntimeFromConfig: (config2) => mapAiRuntimeFromConfig(
5
- config2
6
- )
7
- };
8
-
9
- // src/MaStrategy/adapters/ml.ts
10
- import { mapMlRuntimeFromConfig } from "@tradejs/core/strategies";
11
- var maStrategyMlAdapter = {
12
- mapEntryRuntimeFromConfig: (config2) => mapMlRuntimeFromConfig(
13
- config2
14
- )
15
- };
16
-
17
- // src/MaStrategy/manifest.ts
18
- var maStrategyManifest = {
19
- name: "MaStrategy",
20
- aiAdapter: maStrategyAiAdapter,
21
- mlAdapter: maStrategyMlAdapter
22
- };
23
-
24
- // src/MaStrategy/config.ts
25
- var config = {
26
- ENV: "BACKTEST",
27
- INTERVAL: "15",
28
- MAKE_ORDERS: true,
29
- CLOSE_OPPOSITE_POSITIONS: false,
30
- BACKTEST_PRICE_MODE: "mid",
31
- AI_ENABLED: false,
32
- AI_MODE: "llm",
33
- ML_ENABLED: false,
34
- ML_THRESHOLD: 0.1,
35
- MIN_AI_QUALITY: 3,
36
- FEE_PERCENT: 5e-3,
37
- MAX_LOSS_VALUE: 10,
38
- TRADE_COOLDOWN_MS: 0,
39
- MA_FAST: 21,
40
- MA_SLOW: 55,
41
- LONG: {
42
- enable: true,
43
- direction: "LONG",
44
- TP: 2,
45
- SL: 1,
46
- minRiskRatio: 1.5
47
- },
48
- SHORT: {
49
- enable: true,
50
- direction: "SHORT",
51
- TP: 2,
52
- SL: 1,
53
- minRiskRatio: 1.5
54
- }
55
- };
56
-
57
- export {
58
- maStrategyAiAdapter,
59
- maStrategyMlAdapter,
60
- maStrategyManifest,
61
- config
62
- };
@@ -1,48 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
- }) : x)(function(x) {
10
- if (typeof require !== "undefined") return require.apply(this, arguments);
11
- throw Error('Dynamic require of "' + x + '" is not supported');
12
- });
13
- var __esm = (fn, res) => function __init() {
14
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
15
- };
16
- var __commonJS = (cb, mod) => function __require2() {
17
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
- };
19
- var __export = (target, all) => {
20
- for (var name in all)
21
- __defProp(target, name, { get: all[name], enumerable: true });
22
- };
23
- var __copyProps = (to, from, except, desc) => {
24
- if (from && typeof from === "object" || typeof from === "function") {
25
- for (let key of __getOwnPropNames(from))
26
- if (!__hasOwnProp.call(to, key) && key !== except)
27
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
- }
29
- return to;
30
- };
31
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
32
- // If the importer is in node compatibility mode or this is not an ESM
33
- // file that has been converted to a CommonJS file using a Babel-
34
- // compatible transform (i.e. "__esModule" has not been set), then set
35
- // "default" to the CommonJS "module.exports" for node compatibility.
36
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
37
- mod
38
- ));
39
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
-
41
- export {
42
- __require,
43
- __esm,
44
- __commonJS,
45
- __export,
46
- __toESM,
47
- __toCommonJS
48
- };