@@ -39,9 +39,9 @@ let NEUTRAL_RATE_AUTO = false;
39
39
let iterationCount = 0 ;
40
40
41
41
let runCommand = ( taskStrategyName , phenotype , cb ) => {
42
- let commonArgs = `--strategy=${ taskStrategyName } --period_length =${ phenotype . period_length } --min_periods=${ phenotype . min_periods } --markup_pct =${ phenotype . markup_pct } --order_type=${ phenotype . order_type } --sell_stop_pct=${ phenotype . sell_stop_pct } --buy_stop_pct=${ phenotype . buy_stop_pct } --profit_stop_enable_pct=${ phenotype . profit_stop_enable_pct } --profit_stop_pct=${ phenotype . profit_stop_pct } ` ;
42
+ let commonArgs = `--strategy=${ taskStrategyName } --periodLength =${ phenotype . period_length } --min_periods=${ phenotype . min_periods } --markdown_buy_pct =${ phenotype . markdown_buy_pct } --markup_sell_pct= ${ phenotype . markup_sell_pct } --order_type=${ phenotype . order_type } --sell_stop_pct=${ phenotype . sell_stop_pct } --buy_stop_pct=${ phenotype . buy_stop_pct } --profit_stop_enable_pct=${ phenotype . profit_stop_enable_pct } --profit_stop_pct=${ phenotype . profit_stop_pct } ` ;
43
43
let strategyArgs = {
44
- crossover_vwap : `--emalen1=${ phenotype . emalen1 } --vwap_length=${ phenotype . vwap_length } --vwap_max=${ phenotype . vwap_max } --markdown_buy_pct= ${ phenotype . markdown_buy_pct } --markup_sell_pct= ${ phenotype . markup_sell_pct } ` ,
44
+ crossover_vwap : `--emalen1=${ phenotype . emalen1 } --vwap_length=${ phenotype . vwap_length } --vwap_max=${ phenotype . vwap_max } ` ,
45
45
trendline : `--lastpoints=${ phenotype . lastpoints } --avgpoints=${ phenotype . avgpoints } --lastpoints2=${ phenotype . lastpoints2 } --avgpoints2=${ phenotype . avgpoints2 } --markdown_buy_pct=${ phenotype . markdown_buy_pct } --markup_sell_pct=${ phenotype . markup_sell_pct } ` ,
46
46
cci_srsi : `--cci_periods=${ phenotype . rsi_periods } --rsi_periods=${ phenotype . srsi_periods } --srsi_periods=${ phenotype . srsi_periods } --srsi_k=${ phenotype . srsi_k } --srsi_d=${ phenotype . srsi_d } --oversold_rsi=${ phenotype . oversold_rsi } --overbought_rsi=${ phenotype . overbought_rsi } --oversold_cci=${ phenotype . oversold_cci } --overbought_cci=${ phenotype . overbought_cci } --constant=${ phenotype . constant } ` ,
47
47
srsi_macd : `--rsi_periods=${ phenotype . rsi_periods } --srsi_periods=${ phenotype . srsi_periods } --srsi_k=${ phenotype . srsi_k } --srsi_d=${ phenotype . srsi_d } --oversold_rsi=${ phenotype . oversold_rsi } --overbought_rsi=${ phenotype . overbought_rsi } --ema_short_period=${ phenotype . ema_short_period } --ema_long_period=${ phenotype . ema_long_period } --signal_period=${ phenotype . signal_period } --up_trend_threshold=${ phenotype . up_trend_threshold } --down_trend_threshold=${ phenotype . down_trend_threshold } ` ,
@@ -164,7 +164,8 @@ let processOutput = output => {
164
164
days : days ,
165
165
period_length : params . period_length ,
166
166
min_periods : params . min_periods ,
167
- markup_pct : params . markup_pct ,
167
+ markdown_buy_pct : params . markdown_buy_pct ,
168
+ markup_sell_pct : params . markup_sell_pct ,
168
169
order_type : params . order_type ,
169
170
roi : roi ,
170
171
wlRatio : losses > 0 ? roundp ( wins / losses , 3 ) : 'Infinity' ,
@@ -258,7 +259,8 @@ let strategies = {
258
259
// -- common
259
260
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
260
261
min_periods : Range ( 1 , 200 ) ,
261
- markup_pct : RangeFloat ( 0 , 5 ) ,
262
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
263
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
262
264
order_type : RangeMakerTaker ( ) ,
263
265
sell_stop_pct : Range0 ( 1 , 50 ) ,
264
266
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -281,7 +283,8 @@ let strategies = {
281
283
// -- common
282
284
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
283
285
min_periods : Range ( 1 , 200 ) ,
284
- markup_pct : RangeFloat ( 0 , 5 ) ,
286
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
287
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
285
288
order_type : RangeMakerTaker ( ) ,
286
289
sell_stop_pct : Range0 ( 1 , 50 ) ,
287
290
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -305,7 +308,8 @@ let strategies = {
305
308
// -- common
306
309
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
307
310
min_periods : Range ( 1 , 200 ) ,
308
- markup_pct : RangeFloat ( 0 , 5 ) ,
311
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
312
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
309
313
order_type : RangeMakerTaker ( ) ,
310
314
sell_stop_pct : Range0 ( 1 , 50 ) ,
311
315
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -325,7 +329,8 @@ let strategies = {
325
329
// -- common
326
330
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
327
331
min_periods : Range ( 1 , 200 ) ,
328
- markup_pct : RangeFloat ( 0 , 5 ) ,
332
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
333
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
329
334
order_type : RangeMakerTaker ( ) ,
330
335
sell_stop_pct : Range0 ( 1 , 50 ) ,
331
336
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -344,7 +349,8 @@ let strategies = {
344
349
// -- common
345
350
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
346
351
min_periods : Range ( 1 , 200 ) ,
347
- markup_pct : RangeFloat ( 0 , 5 ) ,
352
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
353
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
348
354
order_type : RangeMakerTaker ( ) ,
349
355
sell_stop_pct : Range0 ( 1 , 50 ) ,
350
356
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -363,7 +369,8 @@ let strategies = {
363
369
// -- common
364
370
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
365
371
min_periods : Range ( 2 , 100 ) ,
366
- markup_pct : RangeFloat ( 0 , 5 ) ,
372
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
373
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
367
374
order_type : RangeMakerTaker ( ) ,
368
375
sell_stop_pct : Range0 ( 1 , 50 ) ,
369
376
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -378,7 +385,8 @@ let strategies = {
378
385
// -- common
379
386
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
380
387
min_periods : Range ( 1 , 100 ) ,
381
- markup_pct : RangeFloat ( 0 , 5 ) ,
388
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
389
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
382
390
order_type : RangeMakerTaker ( ) ,
383
391
sell_stop_pct : Range0 ( 1 , 50 ) ,
384
392
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -393,7 +401,8 @@ let strategies = {
393
401
// -- common
394
402
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
395
403
min_periods : Range ( 1 , 100 ) ,
396
- markup_pct : RangeFloat ( 0 , 5 ) ,
404
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
405
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
397
406
order_type : RangeMakerTaker ( ) ,
398
407
sell_stop_pct : Range0 ( 1 , 50 ) ,
399
408
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -409,7 +418,8 @@ let strategies = {
409
418
// -- common
410
419
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
411
420
min_periods : Range ( 1 , 100 ) ,
412
- markup_pct : RangeFloat ( 0 , 5 ) ,
421
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
422
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
413
423
order_type : RangeMakerTaker ( ) ,
414
424
sell_stop_pct : Range0 ( 1 , 50 ) ,
415
425
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -428,7 +438,8 @@ let strategies = {
428
438
// -- common
429
439
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
430
440
min_periods : Range ( 1 , 200 ) ,
431
- markup_pct : RangeFloat ( 0 , 5 ) ,
441
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
442
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
432
443
order_type : RangeMakerTaker ( ) ,
433
444
sell_stop_pct : Range0 ( 1 , 50 ) ,
434
445
buy_stop_pct : Range0 ( 1 , 50 ) ,
@@ -467,7 +478,8 @@ let strategies = {
467
478
// -- common
468
479
period_length : RangePeriod ( 1 , 120 , 'm' ) ,
469
480
min_periods : Range ( 1 , 100 ) ,
470
- markup_pct : RangeFloat ( 0 , 5 ) ,
481
+ markdown_buy_pct : RangeFloat ( - 1 , 5 ) ,
482
+ markup_sell_pct : RangeFloat ( - 1 , 5 ) ,
471
483
order_type : RangeMakerTaker ( ) ,
472
484
sell_stop_pct : Range0 ( 1 , 50 ) ,
473
485
buy_stop_pct : Range0 ( 1 , 50 ) ,
0 commit comments