@tradejs/strategies 2.0.1 → 2.0.3

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.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Interval, TrendLineOptions, StrategyAiAdapter, StrategyMlAdapter, StrategyRegistryEntry, StrategyConfig } from '@tradejs/types';
2
2
 
3
3
  type AdaptiveMomentumRibbonKcMaType = 'SMA' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA';
4
- declare const config$f: {
4
+ declare const config$g: {
5
5
  readonly ENV: "BACKTEST";
6
6
  readonly INTERVAL: Interval;
7
7
  readonly MAKE_ORDERS: true;
@@ -44,7 +44,7 @@ declare const config$f: {
44
44
  };
45
45
  };
46
46
 
47
- declare const config$e: {
47
+ declare const config$f: {
48
48
  readonly ENV: "BACKTEST";
49
49
  readonly INTERVAL: Interval;
50
50
  readonly MAKE_ORDERS: true;
@@ -95,7 +95,7 @@ declare const config$e: {
95
95
  };
96
96
  };
97
97
 
98
- declare const config$d: {
98
+ declare const config$e: {
99
99
  ML_ENABLED: boolean;
100
100
  MA_FAST: number;
101
101
  MA_MEDIUM: number;
@@ -194,7 +194,7 @@ declare const config$d: {
194
194
  SL_SHORT: number;
195
195
  };
196
196
 
197
- declare const config$c: {
197
+ declare const config$d: {
198
198
  readonly ENV: "BACKTEST";
199
199
  readonly INTERVAL: Interval;
200
200
  readonly MAKE_ORDERS: true;
@@ -243,7 +243,7 @@ declare const config$c: {
243
243
  };
244
244
  };
245
245
 
246
- declare const config$b: {
246
+ declare const config$c: {
247
247
  readonly ENV: "BACKTEST";
248
248
  readonly INTERVAL: Interval;
249
249
  readonly MAKE_ORDERS: true;
@@ -287,6 +287,62 @@ declare const config$b: {
287
287
  };
288
288
  };
289
289
 
290
+ declare const config$b: {
291
+ readonly ENV: "BACKTEST";
292
+ readonly INTERVAL: Interval;
293
+ readonly MAKE_ORDERS: true;
294
+ readonly CLOSE_OPPOSITE_POSITIONS: false;
295
+ readonly BACKTEST_PRICE_MODE: "open";
296
+ readonly AI_ENABLED: false;
297
+ readonly AI_MODE: "llm";
298
+ readonly ML_ENABLED: false;
299
+ readonly ML_THRESHOLD: 0.1;
300
+ readonly MIN_AI_QUALITY: 3;
301
+ readonly FEE_PERCENT: 0.001;
302
+ readonly MAX_LOSS_VALUE: 10;
303
+ readonly MA_FAST: 20;
304
+ readonly MA_MEDIUM: 50;
305
+ readonly MA_SLOW: 100;
306
+ readonly OBV_SMA: 10;
307
+ readonly ATR: 14;
308
+ readonly ATR_PCT_SHORT: 7;
309
+ readonly ATR_PCT_LONG: 30;
310
+ readonly BB: 20;
311
+ readonly BB_STD: 2;
312
+ readonly MACD_FAST: 12;
313
+ readonly MACD_SLOW: 26;
314
+ readonly MACD_SIGNAL: 9;
315
+ readonly GRID_FAST_EMA: 20;
316
+ readonly GRID_SLOW_EMA: 55;
317
+ readonly GRID_ATR_PERIOD: 14;
318
+ readonly GRID_TREND_SLOPE_BARS: 5;
319
+ readonly GRID_MIN_TREND_STRENGTH_ATR: 0.15;
320
+ readonly GRID_MAX_TREND_STRENGTH_ATR: 2.5;
321
+ readonly GRID_MIN_SLOW_SLOPE_ATR: 0.04;
322
+ readonly GRID_MIN_ATR_PCT: 0.15;
323
+ readonly GRID_MAX_ATR_PCT: 5;
324
+ readonly GRID_MAX_PULLBACK_BEYOND_SLOW_ATR: 0.5;
325
+ readonly GRID_STEP_ATR_MULT: 0.8;
326
+ readonly GRID_MIN_STEP_PCT: 0.35;
327
+ readonly GRID_STOP_ATR_MULT: 4.5;
328
+ readonly GRID_TAKE_PROFIT_STEP_MULT: 1;
329
+ readonly GRID_MAX_LEVELS: 4;
330
+ readonly GRID_MAX_CANDLE_RANGE_ATR: 3;
331
+ readonly GRID_EXIT_ON_REGIME_FLIP: true;
332
+ readonly GRID_EXIT_ON_VOLATILITY_SHOCK: true;
333
+ readonly GRID_ENTRY_COOLDOWN_BARS: 8;
334
+ readonly GRID_PROTECTION_REPRICE_ATR: 0.15;
335
+ readonly GRID_MAX_FIGURE_POINTS: 160;
336
+ readonly LONG: {
337
+ readonly enable: true;
338
+ readonly direction: "LONG";
339
+ };
340
+ readonly SHORT: {
341
+ readonly enable: true;
342
+ readonly direction: "SHORT";
343
+ };
344
+ };
345
+
290
346
  declare const config$a: {
291
347
  readonly ENV: "BACKTEST";
292
348
  readonly INTERVAL: Interval;
@@ -329,7 +385,7 @@ declare const config$9: {
329
385
  readonly AI_MODE: "llm";
330
386
  readonly ML_ENABLED: false;
331
387
  readonly ML_THRESHOLD: 0.1;
332
- readonly MIN_AI_QUALITY: 3;
388
+ readonly MIN_AI_QUALITY: 4;
333
389
  readonly FEE_PERCENT: 0.001;
334
390
  readonly MAX_LOSS_VALUE: 10;
335
391
  readonly MA_FAST: 14;
@@ -346,25 +402,25 @@ declare const config$9: {
346
402
  readonly MACD_SIGNAL: 9;
347
403
  readonly LEVEL_LOOKBACK: 20;
348
404
  readonly LEVEL_DELAY: 2;
349
- readonly RR_MIN_ALPHA_24H: 0.8;
350
- readonly RR_MIN_RATIO_RETURN_24H: 0.4;
351
- readonly RR_MIN_RELATIVE_STRENGTH_1H: 0.15;
405
+ readonly RR_MIN_ALPHA_24H: 4;
406
+ readonly RR_MIN_RATIO_RETURN_24H: 1;
407
+ readonly RR_MIN_RELATIVE_STRENGTH_1H: 4;
352
408
  readonly RR_MIN_VOLUME_REL20: 0.8;
353
409
  readonly RR_REQUIRE_RATIO_TREND: true;
354
410
  readonly RR_REQUIRE_BTC_ALT_REGIME_ALIGNMENT: false;
355
- readonly RR_STOP_ATR_MULT: 1.6;
411
+ readonly RR_STOP_ATR_MULT: 2.4;
356
412
  readonly RR_STOP_BUFFER_PCT: 0.05;
357
- readonly RR_TARGET_R_MULT: 2.5;
358
- readonly RR_EXIT_ON_OPPOSITE_ROTATION: true;
413
+ readonly RR_TARGET_R_MULT: 1.5;
414
+ readonly RR_EXIT_ON_OPPOSITE_ROTATION: false;
359
415
  readonly LONG: {
360
416
  readonly enable: true;
361
417
  readonly direction: "LONG";
362
- readonly minRiskRatio: 1.5;
418
+ readonly minRiskRatio: 1.2;
363
419
  };
364
420
  readonly SHORT: {
365
421
  readonly enable: true;
366
422
  readonly direction: "SHORT";
367
- readonly minRiskRatio: 1.5;
423
+ readonly minRiskRatio: 1.2;
368
424
  };
369
425
  };
370
426
 
@@ -819,6 +875,8 @@ declare const trendShiftAiAdapter: StrategyAiAdapter;
819
875
 
820
876
  declare const doubleTapAiAdapter: StrategyAiAdapter;
821
877
 
878
+ declare const gridAiAdapter: StrategyAiAdapter;
879
+
822
880
  declare const liquidityTailsAiAdapter: StrategyAiAdapter;
823
881
 
824
882
  declare const liquidityZonesAiAdapter: StrategyAiAdapter;
@@ -840,4 +898,4 @@ declare const _default: {
840
898
  strategyEntries: StrategyRegistryEntry[];
841
899
  };
842
900
 
843
- export { adaptiveMomentumRibbonAiAdapter, config$f as adaptiveMomentumRibbonDefaultConfig, adaptiveMomentumRibbonMlAdapter, adaptiveTrendChannelAiAdapter, config$e as adaptiveTrendChannelDefaultConfig, config$d as breakoutDefaultConfig, _default as default, doubleTapAiAdapter, config$b as doubleTapDefaultConfig, getBuiltInStrategyDefaultConfig, liquidityTailsAiAdapter, config$8 as liquidityTailsDefaultConfig, liquidityZonesAiAdapter, config$7 as liquidityZonesDefaultConfig, maStrategyAiAdapter, config$a as maStrategyDefaultConfig, maStrategyMlAdapter, marketFlushReversalAiAdapter, config$c as marketFlushReversalDefaultConfig, relativeRotationAiAdapter, config$9 as relativeRotationDefaultConfig, reverseTrendLineAiAdapter, config$6 as reverseTrendLineDefaultConfig, strategyEntries, structureZonesAiAdapter, config$5 as structureZonesDefaultConfig, trendFollowAiAdapter, config$4 as trendFollowDefaultConfig, config$2 as trendLineDefaultConfig, trendShiftAiAdapter, config$3 as trendShiftDefaultConfig, volatilityCompressionBreakoutAiAdapter, config as volatilityCompressionBreakoutDefaultConfig, volumeDivergenceAiAdapter, config$1 as volumeDivergenceDefaultConfig, volumeDivergenceMlAdapter };
901
+ export { adaptiveMomentumRibbonAiAdapter, config$g as adaptiveMomentumRibbonDefaultConfig, adaptiveMomentumRibbonMlAdapter, adaptiveTrendChannelAiAdapter, config$f as adaptiveTrendChannelDefaultConfig, config$e as breakoutDefaultConfig, _default as default, doubleTapAiAdapter, config$c as doubleTapDefaultConfig, getBuiltInStrategyDefaultConfig, gridAiAdapter, config$b as gridDefaultConfig, liquidityTailsAiAdapter, config$8 as liquidityTailsDefaultConfig, liquidityZonesAiAdapter, config$7 as liquidityZonesDefaultConfig, maStrategyAiAdapter, config$a as maStrategyDefaultConfig, maStrategyMlAdapter, marketFlushReversalAiAdapter, config$d as marketFlushReversalDefaultConfig, relativeRotationAiAdapter, config$9 as relativeRotationDefaultConfig, reverseTrendLineAiAdapter, config$6 as reverseTrendLineDefaultConfig, strategyEntries, structureZonesAiAdapter, config$5 as structureZonesDefaultConfig, trendFollowAiAdapter, config$4 as trendFollowDefaultConfig, config$2 as trendLineDefaultConfig, trendShiftAiAdapter, config$3 as trendShiftDefaultConfig, volatilityCompressionBreakoutAiAdapter, config as volatilityCompressionBreakoutDefaultConfig, volumeDivergenceAiAdapter, config$1 as volumeDivergenceDefaultConfig, volumeDivergenceMlAdapter };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Interval, TrendLineOptions, StrategyAiAdapter, StrategyMlAdapter, StrategyRegistryEntry, StrategyConfig } from '@tradejs/types';
2
2
 
3
3
  type AdaptiveMomentumRibbonKcMaType = 'SMA' | 'EMA' | 'SMMA (RMA)' | 'WMA' | 'VWMA';
4
- declare const config$f: {
4
+ declare const config$g: {
5
5
  readonly ENV: "BACKTEST";
6
6
  readonly INTERVAL: Interval;
7
7
  readonly MAKE_ORDERS: true;
@@ -44,7 +44,7 @@ declare const config$f: {
44
44
  };
45
45
  };
46
46
 
47
- declare const config$e: {
47
+ declare const config$f: {
48
48
  readonly ENV: "BACKTEST";
49
49
  readonly INTERVAL: Interval;
50
50
  readonly MAKE_ORDERS: true;
@@ -95,7 +95,7 @@ declare const config$e: {
95
95
  };
96
96
  };
97
97
 
98
- declare const config$d: {
98
+ declare const config$e: {
99
99
  ML_ENABLED: boolean;
100
100
  MA_FAST: number;
101
101
  MA_MEDIUM: number;
@@ -194,7 +194,7 @@ declare const config$d: {
194
194
  SL_SHORT: number;
195
195
  };
196
196
 
197
- declare const config$c: {
197
+ declare const config$d: {
198
198
  readonly ENV: "BACKTEST";
199
199
  readonly INTERVAL: Interval;
200
200
  readonly MAKE_ORDERS: true;
@@ -243,7 +243,7 @@ declare const config$c: {
243
243
  };
244
244
  };
245
245
 
246
- declare const config$b: {
246
+ declare const config$c: {
247
247
  readonly ENV: "BACKTEST";
248
248
  readonly INTERVAL: Interval;
249
249
  readonly MAKE_ORDERS: true;
@@ -287,6 +287,62 @@ declare const config$b: {
287
287
  };
288
288
  };
289
289
 
290
+ declare const config$b: {
291
+ readonly ENV: "BACKTEST";
292
+ readonly INTERVAL: Interval;
293
+ readonly MAKE_ORDERS: true;
294
+ readonly CLOSE_OPPOSITE_POSITIONS: false;
295
+ readonly BACKTEST_PRICE_MODE: "open";
296
+ readonly AI_ENABLED: false;
297
+ readonly AI_MODE: "llm";
298
+ readonly ML_ENABLED: false;
299
+ readonly ML_THRESHOLD: 0.1;
300
+ readonly MIN_AI_QUALITY: 3;
301
+ readonly FEE_PERCENT: 0.001;
302
+ readonly MAX_LOSS_VALUE: 10;
303
+ readonly MA_FAST: 20;
304
+ readonly MA_MEDIUM: 50;
305
+ readonly MA_SLOW: 100;
306
+ readonly OBV_SMA: 10;
307
+ readonly ATR: 14;
308
+ readonly ATR_PCT_SHORT: 7;
309
+ readonly ATR_PCT_LONG: 30;
310
+ readonly BB: 20;
311
+ readonly BB_STD: 2;
312
+ readonly MACD_FAST: 12;
313
+ readonly MACD_SLOW: 26;
314
+ readonly MACD_SIGNAL: 9;
315
+ readonly GRID_FAST_EMA: 20;
316
+ readonly GRID_SLOW_EMA: 55;
317
+ readonly GRID_ATR_PERIOD: 14;
318
+ readonly GRID_TREND_SLOPE_BARS: 5;
319
+ readonly GRID_MIN_TREND_STRENGTH_ATR: 0.15;
320
+ readonly GRID_MAX_TREND_STRENGTH_ATR: 2.5;
321
+ readonly GRID_MIN_SLOW_SLOPE_ATR: 0.04;
322
+ readonly GRID_MIN_ATR_PCT: 0.15;
323
+ readonly GRID_MAX_ATR_PCT: 5;
324
+ readonly GRID_MAX_PULLBACK_BEYOND_SLOW_ATR: 0.5;
325
+ readonly GRID_STEP_ATR_MULT: 0.8;
326
+ readonly GRID_MIN_STEP_PCT: 0.35;
327
+ readonly GRID_STOP_ATR_MULT: 4.5;
328
+ readonly GRID_TAKE_PROFIT_STEP_MULT: 1;
329
+ readonly GRID_MAX_LEVELS: 4;
330
+ readonly GRID_MAX_CANDLE_RANGE_ATR: 3;
331
+ readonly GRID_EXIT_ON_REGIME_FLIP: true;
332
+ readonly GRID_EXIT_ON_VOLATILITY_SHOCK: true;
333
+ readonly GRID_ENTRY_COOLDOWN_BARS: 8;
334
+ readonly GRID_PROTECTION_REPRICE_ATR: 0.15;
335
+ readonly GRID_MAX_FIGURE_POINTS: 160;
336
+ readonly LONG: {
337
+ readonly enable: true;
338
+ readonly direction: "LONG";
339
+ };
340
+ readonly SHORT: {
341
+ readonly enable: true;
342
+ readonly direction: "SHORT";
343
+ };
344
+ };
345
+
290
346
  declare const config$a: {
291
347
  readonly ENV: "BACKTEST";
292
348
  readonly INTERVAL: Interval;
@@ -329,7 +385,7 @@ declare const config$9: {
329
385
  readonly AI_MODE: "llm";
330
386
  readonly ML_ENABLED: false;
331
387
  readonly ML_THRESHOLD: 0.1;
332
- readonly MIN_AI_QUALITY: 3;
388
+ readonly MIN_AI_QUALITY: 4;
333
389
  readonly FEE_PERCENT: 0.001;
334
390
  readonly MAX_LOSS_VALUE: 10;
335
391
  readonly MA_FAST: 14;
@@ -346,25 +402,25 @@ declare const config$9: {
346
402
  readonly MACD_SIGNAL: 9;
347
403
  readonly LEVEL_LOOKBACK: 20;
348
404
  readonly LEVEL_DELAY: 2;
349
- readonly RR_MIN_ALPHA_24H: 0.8;
350
- readonly RR_MIN_RATIO_RETURN_24H: 0.4;
351
- readonly RR_MIN_RELATIVE_STRENGTH_1H: 0.15;
405
+ readonly RR_MIN_ALPHA_24H: 4;
406
+ readonly RR_MIN_RATIO_RETURN_24H: 1;
407
+ readonly RR_MIN_RELATIVE_STRENGTH_1H: 4;
352
408
  readonly RR_MIN_VOLUME_REL20: 0.8;
353
409
  readonly RR_REQUIRE_RATIO_TREND: true;
354
410
  readonly RR_REQUIRE_BTC_ALT_REGIME_ALIGNMENT: false;
355
- readonly RR_STOP_ATR_MULT: 1.6;
411
+ readonly RR_STOP_ATR_MULT: 2.4;
356
412
  readonly RR_STOP_BUFFER_PCT: 0.05;
357
- readonly RR_TARGET_R_MULT: 2.5;
358
- readonly RR_EXIT_ON_OPPOSITE_ROTATION: true;
413
+ readonly RR_TARGET_R_MULT: 1.5;
414
+ readonly RR_EXIT_ON_OPPOSITE_ROTATION: false;
359
415
  readonly LONG: {
360
416
  readonly enable: true;
361
417
  readonly direction: "LONG";
362
- readonly minRiskRatio: 1.5;
418
+ readonly minRiskRatio: 1.2;
363
419
  };
364
420
  readonly SHORT: {
365
421
  readonly enable: true;
366
422
  readonly direction: "SHORT";
367
- readonly minRiskRatio: 1.5;
423
+ readonly minRiskRatio: 1.2;
368
424
  };
369
425
  };
370
426
 
@@ -819,6 +875,8 @@ declare const trendShiftAiAdapter: StrategyAiAdapter;
819
875
 
820
876
  declare const doubleTapAiAdapter: StrategyAiAdapter;
821
877
 
878
+ declare const gridAiAdapter: StrategyAiAdapter;
879
+
822
880
  declare const liquidityTailsAiAdapter: StrategyAiAdapter;
823
881
 
824
882
  declare const liquidityZonesAiAdapter: StrategyAiAdapter;
@@ -840,4 +898,4 @@ declare const _default: {
840
898
  strategyEntries: StrategyRegistryEntry[];
841
899
  };
842
900
 
843
- export { adaptiveMomentumRibbonAiAdapter, config$f as adaptiveMomentumRibbonDefaultConfig, adaptiveMomentumRibbonMlAdapter, adaptiveTrendChannelAiAdapter, config$e as adaptiveTrendChannelDefaultConfig, config$d as breakoutDefaultConfig, _default as default, doubleTapAiAdapter, config$b as doubleTapDefaultConfig, getBuiltInStrategyDefaultConfig, liquidityTailsAiAdapter, config$8 as liquidityTailsDefaultConfig, liquidityZonesAiAdapter, config$7 as liquidityZonesDefaultConfig, maStrategyAiAdapter, config$a as maStrategyDefaultConfig, maStrategyMlAdapter, marketFlushReversalAiAdapter, config$c as marketFlushReversalDefaultConfig, relativeRotationAiAdapter, config$9 as relativeRotationDefaultConfig, reverseTrendLineAiAdapter, config$6 as reverseTrendLineDefaultConfig, strategyEntries, structureZonesAiAdapter, config$5 as structureZonesDefaultConfig, trendFollowAiAdapter, config$4 as trendFollowDefaultConfig, config$2 as trendLineDefaultConfig, trendShiftAiAdapter, config$3 as trendShiftDefaultConfig, volatilityCompressionBreakoutAiAdapter, config as volatilityCompressionBreakoutDefaultConfig, volumeDivergenceAiAdapter, config$1 as volumeDivergenceDefaultConfig, volumeDivergenceMlAdapter };
901
+ export { adaptiveMomentumRibbonAiAdapter, config$g as adaptiveMomentumRibbonDefaultConfig, adaptiveMomentumRibbonMlAdapter, adaptiveTrendChannelAiAdapter, config$f as adaptiveTrendChannelDefaultConfig, config$e as breakoutDefaultConfig, _default as default, doubleTapAiAdapter, config$c as doubleTapDefaultConfig, getBuiltInStrategyDefaultConfig, gridAiAdapter, config$b as gridDefaultConfig, liquidityTailsAiAdapter, config$8 as liquidityTailsDefaultConfig, liquidityZonesAiAdapter, config$7 as liquidityZonesDefaultConfig, maStrategyAiAdapter, config$a as maStrategyDefaultConfig, maStrategyMlAdapter, marketFlushReversalAiAdapter, config$d as marketFlushReversalDefaultConfig, relativeRotationAiAdapter, config$9 as relativeRotationDefaultConfig, reverseTrendLineAiAdapter, config$6 as reverseTrendLineDefaultConfig, strategyEntries, structureZonesAiAdapter, config$5 as structureZonesDefaultConfig, trendFollowAiAdapter, config$4 as trendFollowDefaultConfig, config$2 as trendLineDefaultConfig, trendShiftAiAdapter, config$3 as trendShiftDefaultConfig, volatilityCompressionBreakoutAiAdapter, config as volatilityCompressionBreakoutDefaultConfig, volumeDivergenceAiAdapter, config$1 as volumeDivergenceDefaultConfig, volumeDivergenceMlAdapter };