@tradejs/strategy-double-tap 3.0.3-beta.7 → 3.0.4-beta.11

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/index.cjs CHANGED
@@ -44,7 +44,9 @@ var config = {
44
44
  ML_ENABLED: false,
45
45
  ML_THRESHOLD: 0.1,
46
46
  MIN_AI_QUALITY: 4,
47
- FEE_PERCENT: import_constants.FEE_PERCENT,
47
+ RISK_FEE_RATE: import_constants.FEE_PERCENT,
48
+ RISK_SLIPPAGE_BPS: 0,
49
+ RISK_MARKET_IMPACT_BPS: 0,
48
50
  MAX_LOSS_VALUE: 10,
49
51
  MA_FAST: 14,
50
52
  MA_MEDIUM: 49,
@@ -741,8 +743,8 @@ var createDoubleTapCore = async ({ config: config2, data: initialData, strategyA
741
743
  entryPrice: currentPrice,
742
744
  stopLossPrice: pattern.stopLossPrice,
743
745
  takeProfitPrice: pattern.targetPrice,
744
- feeRate: Number(config2.FEE_PERCENT ?? 0),
745
- slippageBps: Number(config2.SLIPPAGE_BASE_BPS ?? 0) + Number(config2.SLIPPAGE_MARKET_IMPACT_BPS ?? 0)
746
+ feeRate: Number(config2.RISK_FEE_RATE ?? 0),
747
+ slippageBps: Number(config2.RISK_SLIPPAGE_BPS ?? 0) + Number(config2.RISK_MARKET_IMPACT_BPS ?? 0)
746
748
  });
747
749
  const qty = economics.lossPerUnit > 0 ? Number(config2.MAX_LOSS_VALUE ?? 0) / economics.lossPerUnit : 0;
748
750
  const riskRatio = economics.netRiskRatio;
@@ -1656,7 +1658,7 @@ var doubleTapManifest = {
1656
1658
  // src/DoubleTap/strategy.ts
1657
1659
  var DoubleTapStrategyDefinition = {
1658
1660
  defaults: config,
1659
- parseConfig: (0, import_config2.createStrategyConfigParser)({
1661
+ parseConfig: (0, import_config2.createCostIsolatedStrategyConfigParser)({
1660
1662
  strategyName: "DoubleTap",
1661
1663
  defaults: config
1662
1664
  }),
package/dist/index.d.cts CHANGED
@@ -18,7 +18,9 @@ declare const config: {
18
18
  readonly ML_ENABLED: false;
19
19
  readonly ML_THRESHOLD: 0.1;
20
20
  readonly MIN_AI_QUALITY: 4;
21
- readonly FEE_PERCENT: 0.001;
21
+ readonly RISK_FEE_RATE: 0.001;
22
+ readonly RISK_SLIPPAGE_BPS: 0;
23
+ readonly RISK_MARKET_IMPACT_BPS: 0;
22
24
  readonly MAX_LOSS_VALUE: 10;
23
25
  readonly MA_FAST: 14;
24
26
  readonly MA_MEDIUM: 49;
package/dist/index.d.ts CHANGED
@@ -18,7 +18,9 @@ declare const config: {
18
18
  readonly ML_ENABLED: false;
19
19
  readonly ML_THRESHOLD: 0.1;
20
20
  readonly MIN_AI_QUALITY: 4;
21
- readonly FEE_PERCENT: 0.001;
21
+ readonly RISK_FEE_RATE: 0.001;
22
+ readonly RISK_SLIPPAGE_BPS: 0;
23
+ readonly RISK_MARKET_IMPACT_BPS: 0;
22
24
  readonly MAX_LOSS_VALUE: 10;
23
25
  readonly MA_FAST: 14;
24
26
  readonly MA_MEDIUM: 49;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { defineStrategyPlugin } from "@tradejs/core/config";
3
3
 
4
4
  // src/DoubleTap/config.ts
5
- import { FEE_PERCENT } from "@tradejs/core/constants";
5
+ import { FEE_PERCENT as RISK_FEE_RATE } from "@tradejs/core/constants";
6
6
  var config = {
7
7
  ENV: "BACKTEST",
8
8
  INTERVAL: "15",
@@ -14,7 +14,9 @@ var config = {
14
14
  ML_ENABLED: false,
15
15
  ML_THRESHOLD: 0.1,
16
16
  MIN_AI_QUALITY: 4,
17
- FEE_PERCENT,
17
+ RISK_FEE_RATE,
18
+ RISK_SLIPPAGE_BPS: 0,
19
+ RISK_MARKET_IMPACT_BPS: 0,
18
20
  MAX_LOSS_VALUE: 10,
19
21
  MA_FAST: 14,
20
22
  MA_MEDIUM: 49,
@@ -65,7 +67,7 @@ var config = {
65
67
  };
66
68
 
67
69
  // src/DoubleTap/strategy.ts
68
- import { createStrategyConfigParser } from "@tradejs/strategy-kit/config";
70
+ import { createCostIsolatedStrategyConfigParser } from "@tradejs/strategy-kit/config";
69
71
 
70
72
  // src/DoubleTap/core.ts
71
73
  import { round } from "@tradejs/core/math";
@@ -714,8 +716,8 @@ var createDoubleTapCore = async ({ config: config2, data: initialData, strategyA
714
716
  entryPrice: currentPrice,
715
717
  stopLossPrice: pattern.stopLossPrice,
716
718
  takeProfitPrice: pattern.targetPrice,
717
- feeRate: Number(config2.FEE_PERCENT ?? 0),
718
- slippageBps: Number(config2.SLIPPAGE_BASE_BPS ?? 0) + Number(config2.SLIPPAGE_MARKET_IMPACT_BPS ?? 0)
719
+ feeRate: Number(config2.RISK_FEE_RATE ?? 0),
720
+ slippageBps: Number(config2.RISK_SLIPPAGE_BPS ?? 0) + Number(config2.RISK_MARKET_IMPACT_BPS ?? 0)
719
721
  });
720
722
  const qty = economics.lossPerUnit > 0 ? Number(config2.MAX_LOSS_VALUE ?? 0) / economics.lossPerUnit : 0;
721
723
  const riskRatio = economics.netRiskRatio;
@@ -1632,7 +1634,7 @@ var doubleTapManifest = {
1632
1634
  // src/DoubleTap/strategy.ts
1633
1635
  var DoubleTapStrategyDefinition = {
1634
1636
  defaults: config,
1635
- parseConfig: createStrategyConfigParser({
1637
+ parseConfig: createCostIsolatedStrategyConfigParser({
1636
1638
  strategyName: "DoubleTap",
1637
1639
  defaults: config
1638
1640
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/strategy-double-tap",
3
- "version": "3.0.3-beta.7",
3
+ "version": "3.0.4-beta.11",
4
4
  "description": "Double-top and double-bottom strategy with pivot and neckline validation, confirmation, retests, and pattern-height targets for TradeJS.",
5
5
  "type": "module",
6
6
  "packageManager": "yarn@4.13.0",
@@ -46,7 +46,7 @@
46
46
  "sideEffects": false,
47
47
  "devDependencies": {
48
48
  "@tradejs/core": "^3.0.1",
49
- "@tradejs/strategy-kit": "^3.0.1",
49
+ "@tradejs/strategy-kit": "^3.0.5",
50
50
  "@tradejs/types": "^3.0.1",
51
51
  "@types/jest": "^29.5.14",
52
52
  "jest": "^29.7.0",
@@ -70,7 +70,7 @@
70
70
  "author": "aleksnick (https://github.com/aleksnick)",
71
71
  "peerDependencies": {
72
72
  "@tradejs/core": "^3.0.1",
73
- "@tradejs/strategy-kit": "^3.0.1",
73
+ "@tradejs/strategy-kit": "^3.0.5",
74
74
  "@tradejs/types": "^3.0.1"
75
75
  }
76
76
  }