@gbozee/ultimate 0.0.2-201 → 0.0.2-203

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.
@@ -164,6 +164,7 @@ export type SignalConfigType = {
164
164
  long: GetEntriesParams["distribution"];
165
165
  short: GetEntriesParams["distribution"];
166
166
  };
167
+ max_quantity?: number;
167
168
  };
168
169
  declare class Signal {
169
170
  focus: number;
@@ -196,7 +197,8 @@ declare class Signal {
196
197
  long: GetEntriesParams["distribution"];
197
198
  short: GetEntriesParams["distribution"];
198
199
  };
199
- constructor({ focus, symbol, budget, percent_change, price_places, decimal_places, zone_risk, fee, support, risk_reward, resistance, risk_per_trade, increase_size, additional_increase, minimum_pnl, take_profit, increase_position, minimum_size, first_order_size, gap, max_size, use_kelly, kelly_prediction_model, kelly_confidence_factor, kelly_minimum_risk, kelly_func, full_distribution, }: SignalConfigType);
200
+ max_quantity: number;
201
+ constructor({ focus, symbol, budget, percent_change, price_places, decimal_places, zone_risk, fee, support, risk_reward, resistance, risk_per_trade, increase_size, additional_increase, minimum_pnl, take_profit, increase_position, minimum_size, first_order_size, gap, max_size, use_kelly, kelly_prediction_model, kelly_confidence_factor, kelly_minimum_risk, kelly_func, full_distribution, max_quantity, }: SignalConfigType);
200
202
  build_entry({ current_price, stop_loss, pnl, stop_percent, kind, risk, no_of_trades, take_profit, distribution, }: {
201
203
  take_profit?: number;
202
204
  no_of_trades?: number;
@@ -697,6 +699,7 @@ export declare function computeRiskReward(payload: {
697
699
  risk_per_trade: number;
698
700
  target_loss?: number;
699
701
  distribution?: GetEntriesParams["distribution"];
702
+ high_range?: number;
700
703
  max_size?: number;
701
704
  }): number | {
702
705
  result: any[];
@@ -719,6 +722,7 @@ export declare function getRiskReward(payload: {
719
722
  max_size?: number;
720
723
  distribution?: GetEntriesParams["distribution"];
721
724
  risk_factor?: number;
725
+ high_range?: number;
722
726
  }): any;
723
727
  export declare function computeProfitDetail(payload: {
724
728
  focus_position: {
@@ -1348,7 +1352,7 @@ declare function constructAppConfig$1({ config, global_config, }: {
1348
1352
  kelly_func?: "theoretical" | "position_based" | "theoretical_fixed";
1349
1353
  };
1350
1354
  };
1351
- declare function buildWithOptimumReward({ config, settings, global_config, }: {
1355
+ declare function buildWithOptimumReward({ config, settings, global_config, force_exact, }: {
1352
1356
  config: TradeConfig;
1353
1357
  global_config: GlobalConfig;
1354
1358
  settings: {
@@ -1359,6 +1363,7 @@ declare function buildWithOptimumReward({ config, settings, global_config, }: {
1359
1363
  risk_reward?: number;
1360
1364
  distribution?: GetEntriesParams["distribution"];
1361
1365
  };
1366
+ force_exact?: boolean;
1362
1367
  }): {
1363
1368
  trades: any[];
1364
1369
  summary: {
@@ -402,6 +402,7 @@ class Signal {
402
402
  long: "arithmetic",
403
403
  short: "geometric"
404
404
  };
405
+ max_quantity = 0.03;
405
406
  constructor({
406
407
  focus,
407
408
  symbol,
@@ -429,7 +430,8 @@ class Signal {
429
430
  kelly_confidence_factor = 0.6,
430
431
  kelly_minimum_risk = 0.2,
431
432
  kelly_func = "theoretical",
432
- full_distribution
433
+ full_distribution,
434
+ max_quantity = 0.03
433
435
  }) {
434
436
  if (full_distribution) {
435
437
  this.distribution = full_distribution;
@@ -460,6 +462,7 @@ class Signal {
460
462
  this.kelly_confidence_factor = kelly_confidence_factor;
461
463
  this.kelly_minimum_risk = kelly_minimum_risk;
462
464
  this.kelly_func = kelly_func;
465
+ this.max_quantity = max_quantity;
463
466
  }
464
467
  build_entry({
465
468
  current_price,
@@ -953,7 +956,8 @@ class Signal {
953
956
  }) || []).filter((y) => y !== undefined).filter((y) => {
954
957
  const min_options = [0.001, 0.002, 0.003];
955
958
  if (min_options.includes(this.minimum_size) && this.symbol.toUpperCase().startsWith("BTC")) {
956
- return y.quantity <= 0.03;
959
+ console.log("max_quantity", this.max_quantity);
960
+ return y.quantity <= this.max_quantity;
957
961
  }
958
962
  return true;
959
963
  });
@@ -1633,7 +1637,8 @@ function buildConfig(app_config, {
1633
1637
  kelly_minimum_risk: kelly_minimum_risk || app_config.kelly?.kelly_minimum_risk,
1634
1638
  kelly_prediction_model: kelly_prediction_model || app_config.kelly?.kelly_prediction_model,
1635
1639
  kelly_func: kelly_func || app_config.kelly?.kelly_func,
1636
- symbol: app_config.symbol
1640
+ symbol: app_config.symbol,
1641
+ max_quantity: app_config.max_quantity
1637
1642
  };
1638
1643
  const instance = new Signal(config);
1639
1644
  if (raw_instance) {
@@ -2299,6 +2304,7 @@ function computeRiskReward(payload) {
2299
2304
  risk_per_trade,
2300
2305
  target_loss,
2301
2306
  distribution,
2307
+ high_range,
2302
2308
  max_size
2303
2309
  } = payload;
2304
2310
  const kind = entry > stop ? "long" : "short";
@@ -2310,12 +2316,14 @@ function computeRiskReward(payload) {
2310
2316
  app_config,
2311
2317
  target_loss,
2312
2318
  distribution,
2319
+ high_range,
2313
2320
  max_size
2314
2321
  });
2315
2322
  return result;
2316
2323
  }
2317
2324
  function getRiskReward(payload) {
2318
2325
  const {
2326
+ high_range,
2319
2327
  max_size,
2320
2328
  entry,
2321
2329
  stop,
@@ -2339,6 +2347,7 @@ function getRiskReward(payload) {
2339
2347
  entry,
2340
2348
  stop,
2341
2349
  risk_per_trade: risk,
2350
+ high_range,
2342
2351
  target_loss,
2343
2352
  distribution,
2344
2353
  max_size
@@ -3453,7 +3462,8 @@ function constructAppConfig2({
3453
3462
  function buildWithOptimumReward({
3454
3463
  config,
3455
3464
  settings,
3456
- global_config
3465
+ global_config,
3466
+ force_exact
3457
3467
  }) {
3458
3468
  const kind = config.entry > config.stop ? "long" : "short";
3459
3469
  let stop = settings.stop;
@@ -3475,7 +3485,8 @@ function buildWithOptimumReward({
3475
3485
  custom_b_config,
3476
3486
  app_config_kind: kind,
3477
3487
  appConfig,
3478
- symbol_config: global_config
3488
+ symbol_config: global_config,
3489
+ force_exact_risk: force_exact
3479
3490
  });
3480
3491
  const adjusted_size = summary.quantity;
3481
3492
  const symbol_config = global_config;
package/dist/index.cjs CHANGED
@@ -55899,6 +55899,7 @@ class Signal {
55899
55899
  long: "arithmetic",
55900
55900
  short: "geometric"
55901
55901
  };
55902
+ max_quantity = 0.03;
55902
55903
  constructor({
55903
55904
  focus,
55904
55905
  symbol,
@@ -55926,7 +55927,8 @@ class Signal {
55926
55927
  kelly_confidence_factor = 0.6,
55927
55928
  kelly_minimum_risk = 0.2,
55928
55929
  kelly_func = "theoretical",
55929
- full_distribution
55930
+ full_distribution,
55931
+ max_quantity = 0.03
55930
55932
  }) {
55931
55933
  if (full_distribution) {
55932
55934
  this.distribution = full_distribution;
@@ -55957,6 +55959,7 @@ class Signal {
55957
55959
  this.kelly_confidence_factor = kelly_confidence_factor;
55958
55960
  this.kelly_minimum_risk = kelly_minimum_risk;
55959
55961
  this.kelly_func = kelly_func;
55962
+ this.max_quantity = max_quantity;
55960
55963
  }
55961
55964
  build_entry({
55962
55965
  current_price,
@@ -56450,7 +56453,8 @@ class Signal {
56450
56453
  }) || []).filter((y) => y !== undefined).filter((y) => {
56451
56454
  const min_options = [0.001, 0.002, 0.003];
56452
56455
  if (min_options.includes(this.minimum_size) && this.symbol.toUpperCase().startsWith("BTC")) {
56453
- return y.quantity <= 0.03;
56456
+ console.log("max_quantity", this.max_quantity);
56457
+ return y.quantity <= this.max_quantity;
56454
56458
  }
56455
56459
  return true;
56456
56460
  });
@@ -56919,7 +56923,8 @@ function buildConfig(app_config, {
56919
56923
  kelly_minimum_risk: kelly_minimum_risk || app_config.kelly?.kelly_minimum_risk,
56920
56924
  kelly_prediction_model: kelly_prediction_model || app_config.kelly?.kelly_prediction_model,
56921
56925
  kelly_func: kelly_func || app_config.kelly?.kelly_func,
56922
- symbol: app_config.symbol
56926
+ symbol: app_config.symbol,
56927
+ max_quantity: app_config.max_quantity
56923
56928
  };
56924
56929
  const instance = new Signal(config2);
56925
56930
  if (raw_instance) {
@@ -57585,6 +57590,7 @@ function computeRiskReward(payload) {
57585
57590
  risk_per_trade,
57586
57591
  target_loss,
57587
57592
  distribution,
57593
+ high_range,
57588
57594
  max_size
57589
57595
  } = payload;
57590
57596
  const kind = entry > stop ? "long" : "short";
@@ -57596,12 +57602,14 @@ function computeRiskReward(payload) {
57596
57602
  app_config,
57597
57603
  target_loss,
57598
57604
  distribution,
57605
+ high_range,
57599
57606
  max_size
57600
57607
  });
57601
57608
  return result;
57602
57609
  }
57603
57610
  function getRiskReward(payload) {
57604
57611
  const {
57612
+ high_range,
57605
57613
  max_size,
57606
57614
  entry,
57607
57615
  stop,
@@ -57625,6 +57633,7 @@ function getRiskReward(payload) {
57625
57633
  entry,
57626
57634
  stop,
57627
57635
  risk_per_trade: risk,
57636
+ high_range,
57628
57637
  target_loss,
57629
57638
  distribution,
57630
57639
  max_size
@@ -58739,7 +58748,8 @@ function constructAppConfig2({
58739
58748
  function buildWithOptimumReward({
58740
58749
  config: config2,
58741
58750
  settings,
58742
- global_config
58751
+ global_config,
58752
+ force_exact
58743
58753
  }) {
58744
58754
  const kind = config2.entry > config2.stop ? "long" : "short";
58745
58755
  let stop = settings.stop;
@@ -58761,7 +58771,8 @@ function buildWithOptimumReward({
58761
58771
  custom_b_config,
58762
58772
  app_config_kind: kind,
58763
58773
  appConfig,
58764
- symbol_config: global_config
58774
+ symbol_config: global_config,
58775
+ force_exact_risk: force_exact
58765
58776
  });
58766
58777
  const adjusted_size = summary.quantity;
58767
58778
  const symbol_config = global_config;
package/dist/index.d.ts CHANGED
@@ -1176,6 +1176,7 @@ export type SignalConfigType = {
1176
1176
  long: GetEntriesParams["distribution"];
1177
1177
  short: GetEntriesParams["distribution"];
1178
1178
  };
1179
+ max_quantity?: number;
1179
1180
  };
1180
1181
  declare class Signal {
1181
1182
  focus: number;
@@ -1208,7 +1209,8 @@ declare class Signal {
1208
1209
  long: GetEntriesParams["distribution"];
1209
1210
  short: GetEntriesParams["distribution"];
1210
1211
  };
1211
- constructor({ focus, symbol, budget, percent_change, price_places, decimal_places, zone_risk, fee, support, risk_reward, resistance, risk_per_trade, increase_size, additional_increase, minimum_pnl, take_profit, increase_position, minimum_size, first_order_size, gap, max_size, use_kelly, kelly_prediction_model, kelly_confidence_factor, kelly_minimum_risk, kelly_func, full_distribution, }: SignalConfigType);
1212
+ max_quantity: number;
1213
+ constructor({ focus, symbol, budget, percent_change, price_places, decimal_places, zone_risk, fee, support, risk_reward, resistance, risk_per_trade, increase_size, additional_increase, minimum_pnl, take_profit, increase_position, minimum_size, first_order_size, gap, max_size, use_kelly, kelly_prediction_model, kelly_confidence_factor, kelly_minimum_risk, kelly_func, full_distribution, max_quantity, }: SignalConfigType);
1212
1214
  build_entry({ current_price, stop_loss, pnl, stop_percent, kind, risk, no_of_trades, take_profit, distribution, }: {
1213
1215
  take_profit?: number;
1214
1216
  no_of_trades?: number;
@@ -1516,6 +1518,7 @@ export declare function computeRiskReward(payload: {
1516
1518
  risk_per_trade: number;
1517
1519
  target_loss?: number;
1518
1520
  distribution?: GetEntriesParams["distribution"];
1521
+ high_range?: number;
1519
1522
  max_size?: number;
1520
1523
  }): number | {
1521
1524
  result: any[];
@@ -1538,6 +1541,7 @@ export declare function getRiskReward(payload: {
1538
1541
  max_size?: number;
1539
1542
  distribution?: GetEntriesParams["distribution"];
1540
1543
  risk_factor?: number;
1544
+ high_range?: number;
1541
1545
  }): any;
1542
1546
  export declare function computeProfitDetail(payload: {
1543
1547
  focus_position: {
@@ -1882,7 +1886,7 @@ declare function constructAppConfig$1({ config, global_config, }: {
1882
1886
  kelly_func?: "theoretical" | "position_based" | "theoretical_fixed";
1883
1887
  };
1884
1888
  };
1885
- declare function buildWithOptimumReward({ config, settings, global_config, }: {
1889
+ declare function buildWithOptimumReward({ config, settings, global_config, force_exact, }: {
1886
1890
  config: TradeConfig;
1887
1891
  global_config: GlobalConfig;
1888
1892
  settings: {
@@ -1893,6 +1897,7 @@ declare function buildWithOptimumReward({ config, settings, global_config, }: {
1893
1897
  risk_reward?: number;
1894
1898
  distribution?: GetEntriesParams["distribution"];
1895
1899
  };
1900
+ force_exact?: boolean;
1896
1901
  }): {
1897
1902
  trades: any[];
1898
1903
  summary: {
package/dist/index.js CHANGED
@@ -55836,6 +55836,7 @@ class Signal {
55836
55836
  long: "arithmetic",
55837
55837
  short: "geometric"
55838
55838
  };
55839
+ max_quantity = 0.03;
55839
55840
  constructor({
55840
55841
  focus,
55841
55842
  symbol,
@@ -55863,7 +55864,8 @@ class Signal {
55863
55864
  kelly_confidence_factor = 0.6,
55864
55865
  kelly_minimum_risk = 0.2,
55865
55866
  kelly_func = "theoretical",
55866
- full_distribution
55867
+ full_distribution,
55868
+ max_quantity = 0.03
55867
55869
  }) {
55868
55870
  if (full_distribution) {
55869
55871
  this.distribution = full_distribution;
@@ -55894,6 +55896,7 @@ class Signal {
55894
55896
  this.kelly_confidence_factor = kelly_confidence_factor;
55895
55897
  this.kelly_minimum_risk = kelly_minimum_risk;
55896
55898
  this.kelly_func = kelly_func;
55899
+ this.max_quantity = max_quantity;
55897
55900
  }
55898
55901
  build_entry({
55899
55902
  current_price,
@@ -56387,7 +56390,8 @@ class Signal {
56387
56390
  }) || []).filter((y) => y !== undefined).filter((y) => {
56388
56391
  const min_options = [0.001, 0.002, 0.003];
56389
56392
  if (min_options.includes(this.minimum_size) && this.symbol.toUpperCase().startsWith("BTC")) {
56390
- return y.quantity <= 0.03;
56393
+ console.log("max_quantity", this.max_quantity);
56394
+ return y.quantity <= this.max_quantity;
56391
56395
  }
56392
56396
  return true;
56393
56397
  });
@@ -56856,7 +56860,8 @@ function buildConfig(app_config, {
56856
56860
  kelly_minimum_risk: kelly_minimum_risk || app_config.kelly?.kelly_minimum_risk,
56857
56861
  kelly_prediction_model: kelly_prediction_model || app_config.kelly?.kelly_prediction_model,
56858
56862
  kelly_func: kelly_func || app_config.kelly?.kelly_func,
56859
- symbol: app_config.symbol
56863
+ symbol: app_config.symbol,
56864
+ max_quantity: app_config.max_quantity
56860
56865
  };
56861
56866
  const instance = new Signal(config2);
56862
56867
  if (raw_instance) {
@@ -57522,6 +57527,7 @@ function computeRiskReward(payload) {
57522
57527
  risk_per_trade,
57523
57528
  target_loss,
57524
57529
  distribution,
57530
+ high_range,
57525
57531
  max_size
57526
57532
  } = payload;
57527
57533
  const kind = entry > stop ? "long" : "short";
@@ -57533,12 +57539,14 @@ function computeRiskReward(payload) {
57533
57539
  app_config,
57534
57540
  target_loss,
57535
57541
  distribution,
57542
+ high_range,
57536
57543
  max_size
57537
57544
  });
57538
57545
  return result;
57539
57546
  }
57540
57547
  function getRiskReward(payload) {
57541
57548
  const {
57549
+ high_range,
57542
57550
  max_size,
57543
57551
  entry,
57544
57552
  stop,
@@ -57562,6 +57570,7 @@ function getRiskReward(payload) {
57562
57570
  entry,
57563
57571
  stop,
57564
57572
  risk_per_trade: risk,
57573
+ high_range,
57565
57574
  target_loss,
57566
57575
  distribution,
57567
57576
  max_size
@@ -58676,7 +58685,8 @@ function constructAppConfig2({
58676
58685
  function buildWithOptimumReward({
58677
58686
  config: config2,
58678
58687
  settings,
58679
- global_config
58688
+ global_config,
58689
+ force_exact
58680
58690
  }) {
58681
58691
  const kind = config2.entry > config2.stop ? "long" : "short";
58682
58692
  let stop = settings.stop;
@@ -58698,7 +58708,8 @@ function buildWithOptimumReward({
58698
58708
  custom_b_config,
58699
58709
  app_config_kind: kind,
58700
58710
  appConfig,
58701
- symbol_config: global_config
58711
+ symbol_config: global_config,
58712
+ force_exact_risk: force_exact
58702
58713
  });
58703
58714
  const adjusted_size = summary.quantity;
58704
58715
  const symbol_config = global_config;
@@ -62585,6 +62585,7 @@ class Signal {
62585
62585
  long: "arithmetic",
62586
62586
  short: "geometric"
62587
62587
  };
62588
+ max_quantity = 0.03;
62588
62589
  constructor({
62589
62590
  focus,
62590
62591
  symbol,
@@ -62612,7 +62613,8 @@ class Signal {
62612
62613
  kelly_confidence_factor = 0.6,
62613
62614
  kelly_minimum_risk = 0.2,
62614
62615
  kelly_func = "theoretical",
62615
- full_distribution
62616
+ full_distribution,
62617
+ max_quantity = 0.03
62616
62618
  }) {
62617
62619
  if (full_distribution) {
62618
62620
  this.distribution = full_distribution;
@@ -62643,6 +62645,7 @@ class Signal {
62643
62645
  this.kelly_confidence_factor = kelly_confidence_factor;
62644
62646
  this.kelly_minimum_risk = kelly_minimum_risk;
62645
62647
  this.kelly_func = kelly_func;
62648
+ this.max_quantity = max_quantity;
62646
62649
  }
62647
62650
  build_entry({
62648
62651
  current_price,
@@ -63136,7 +63139,8 @@ class Signal {
63136
63139
  }) || []).filter((y) => y !== undefined).filter((y) => {
63137
63140
  const min_options = [0.001, 0.002, 0.003];
63138
63141
  if (min_options.includes(this.minimum_size) && this.symbol.toUpperCase().startsWith("BTC")) {
63139
- return y.quantity <= 0.03;
63142
+ console.log("max_quantity", this.max_quantity);
63143
+ return y.quantity <= this.max_quantity;
63140
63144
  }
63141
63145
  return true;
63142
63146
  });
@@ -63605,7 +63609,8 @@ function buildConfig(app_config, {
63605
63609
  kelly_minimum_risk: kelly_minimum_risk || app_config.kelly?.kelly_minimum_risk,
63606
63610
  kelly_prediction_model: kelly_prediction_model || app_config.kelly?.kelly_prediction_model,
63607
63611
  kelly_func: kelly_func || app_config.kelly?.kelly_func,
63608
- symbol: app_config.symbol
63612
+ symbol: app_config.symbol,
63613
+ max_quantity: app_config.max_quantity
63609
63614
  };
63610
63615
  const instance = new Signal(config2);
63611
63616
  if (raw_instance) {
@@ -64258,6 +64263,7 @@ function computeRiskReward(payload) {
64258
64263
  risk_per_trade,
64259
64264
  target_loss,
64260
64265
  distribution,
64266
+ high_range,
64261
64267
  max_size
64262
64268
  } = payload;
64263
64269
  const kind = entry > stop ? "long" : "short";
@@ -64269,12 +64275,14 @@ function computeRiskReward(payload) {
64269
64275
  app_config,
64270
64276
  target_loss,
64271
64277
  distribution,
64278
+ high_range,
64272
64279
  max_size
64273
64280
  });
64274
64281
  return result;
64275
64282
  }
64276
64283
  function getRiskReward(payload) {
64277
64284
  const {
64285
+ high_range,
64278
64286
  max_size,
64279
64287
  entry,
64280
64288
  stop,
@@ -64298,6 +64306,7 @@ function getRiskReward(payload) {
64298
64306
  entry,
64299
64307
  stop,
64300
64308
  risk_per_trade: risk,
64309
+ high_range,
64301
64310
  target_loss,
64302
64311
  distribution,
64303
64312
  max_size
@@ -65314,7 +65323,8 @@ function constructAppConfig2({
65314
65323
  function buildWithOptimumReward({
65315
65324
  config: config2,
65316
65325
  settings,
65317
- global_config
65326
+ global_config,
65327
+ force_exact
65318
65328
  }) {
65319
65329
  const kind = config2.entry > config2.stop ? "long" : "short";
65320
65330
  let stop = settings.stop;
@@ -65336,7 +65346,8 @@ function buildWithOptimumReward({
65336
65346
  custom_b_config,
65337
65347
  app_config_kind: kind,
65338
65348
  appConfig,
65339
- symbol_config: global_config
65349
+ symbol_config: global_config,
65350
+ force_exact_risk: force_exact
65340
65351
  });
65341
65352
  const adjusted_size = summary.quantity;
65342
65353
  const symbol_config = global_config;
@@ -62558,6 +62558,7 @@ class Signal {
62558
62558
  long: "arithmetic",
62559
62559
  short: "geometric"
62560
62560
  };
62561
+ max_quantity = 0.03;
62561
62562
  constructor({
62562
62563
  focus,
62563
62564
  symbol,
@@ -62585,7 +62586,8 @@ class Signal {
62585
62586
  kelly_confidence_factor = 0.6,
62586
62587
  kelly_minimum_risk = 0.2,
62587
62588
  kelly_func = "theoretical",
62588
- full_distribution
62589
+ full_distribution,
62590
+ max_quantity = 0.03
62589
62591
  }) {
62590
62592
  if (full_distribution) {
62591
62593
  this.distribution = full_distribution;
@@ -62616,6 +62618,7 @@ class Signal {
62616
62618
  this.kelly_confidence_factor = kelly_confidence_factor;
62617
62619
  this.kelly_minimum_risk = kelly_minimum_risk;
62618
62620
  this.kelly_func = kelly_func;
62621
+ this.max_quantity = max_quantity;
62619
62622
  }
62620
62623
  build_entry({
62621
62624
  current_price,
@@ -63109,7 +63112,8 @@ class Signal {
63109
63112
  }) || []).filter((y) => y !== undefined).filter((y) => {
63110
63113
  const min_options = [0.001, 0.002, 0.003];
63111
63114
  if (min_options.includes(this.minimum_size) && this.symbol.toUpperCase().startsWith("BTC")) {
63112
- return y.quantity <= 0.03;
63115
+ console.log("max_quantity", this.max_quantity);
63116
+ return y.quantity <= this.max_quantity;
63113
63117
  }
63114
63118
  return true;
63115
63119
  });
@@ -63578,7 +63582,8 @@ function buildConfig(app_config, {
63578
63582
  kelly_minimum_risk: kelly_minimum_risk || app_config.kelly?.kelly_minimum_risk,
63579
63583
  kelly_prediction_model: kelly_prediction_model || app_config.kelly?.kelly_prediction_model,
63580
63584
  kelly_func: kelly_func || app_config.kelly?.kelly_func,
63581
- symbol: app_config.symbol
63585
+ symbol: app_config.symbol,
63586
+ max_quantity: app_config.max_quantity
63582
63587
  };
63583
63588
  const instance = new Signal(config2);
63584
63589
  if (raw_instance) {
@@ -64231,6 +64236,7 @@ function computeRiskReward(payload) {
64231
64236
  risk_per_trade,
64232
64237
  target_loss,
64233
64238
  distribution,
64239
+ high_range,
64234
64240
  max_size
64235
64241
  } = payload;
64236
64242
  const kind = entry > stop ? "long" : "short";
@@ -64242,12 +64248,14 @@ function computeRiskReward(payload) {
64242
64248
  app_config,
64243
64249
  target_loss,
64244
64250
  distribution,
64251
+ high_range,
64245
64252
  max_size
64246
64253
  });
64247
64254
  return result;
64248
64255
  }
64249
64256
  function getRiskReward(payload) {
64250
64257
  const {
64258
+ high_range,
64251
64259
  max_size,
64252
64260
  entry,
64253
64261
  stop,
@@ -64271,6 +64279,7 @@ function getRiskReward(payload) {
64271
64279
  entry,
64272
64280
  stop,
64273
64281
  risk_per_trade: risk,
64282
+ high_range,
64274
64283
  target_loss,
64275
64284
  distribution,
64276
64285
  max_size
@@ -65287,7 +65296,8 @@ function constructAppConfig2({
65287
65296
  function buildWithOptimumReward({
65288
65297
  config: config2,
65289
65298
  settings,
65290
- global_config
65299
+ global_config,
65300
+ force_exact
65291
65301
  }) {
65292
65302
  const kind = config2.entry > config2.stop ? "long" : "short";
65293
65303
  let stop = settings.stop;
@@ -65309,7 +65319,8 @@ function buildWithOptimumReward({
65309
65319
  custom_b_config,
65310
65320
  app_config_kind: kind,
65311
65321
  appConfig,
65312
- symbol_config: global_config
65322
+ symbol_config: global_config,
65323
+ force_exact_risk: force_exact
65313
65324
  });
65314
65325
  const adjusted_size = summary.quantity;
65315
65326
  const symbol_config = global_config;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gbozee/ultimate",
3
3
  "type": "module",
4
- "version": "0.0.2-201",
4
+ "version": "0.0.2-203",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",