From abfd47f53b362c2e6ccff03ab523380ec7fc6d52 Mon Sep 17 00:00:00 2001 From: mkuendig Date: Tue, 2 Jan 2018 21:54:13 +1100 Subject: [PATCH 1/3] update products.json file to newest trading pairs at binance (#1028) --- extensions/exchanges/binance/products.json | 1005 +++++++++++++++++++- 1 file changed, 975 insertions(+), 30 deletions(-) diff --git a/extensions/exchanges/binance/products.json b/extensions/exchanges/binance/products.json index b72f93ae9a..7dcb76511b 100644 --- a/extensions/exchanges/binance/products.json +++ b/extensions/exchanges/binance/products.json @@ -1,4 +1,13 @@ [ + { + "id": "NULSBNB", + "asset": "NULS", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "NULS/BNB" + }, { "id": "VENBNB", "asset": "VEN", @@ -17,6 +26,24 @@ "increment": "0.00000001", "label": "BNB/BTC" }, + { + "id": "NULSBTC", + "asset": "NULS", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "NULS/BTC" + }, + { + "id": "CTRBTC", + "asset": "CTR", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "CTR/BTC" + }, { "id": "NEOBTC", "asset": "NEO", @@ -27,13 +54,13 @@ "label": "NEO/BTC" }, { - "id": "CTRBTC", - "asset": "CTR", - "currency": "BTC", + "id": "NULSETH", + "asset": "NULS", + "currency": "ETH", "min_size": "1.00000000", "max_size": "100000", "increment": "0.00000001", - "label": "CTR/BTC" + "label": "NULS/ETH" }, { "id": "LINKBTC", @@ -422,6 +449,78 @@ "increment": "0.000001", "label": "SALT/ETH" }, + { + "id": "ADABTC", + "asset": "ADA", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ADA/BTC" + }, + { + "id": "ADAETH", + "asset": "ADA", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ADA/ETH" + }, + { + "id": "ADXBNB", + "asset": "ADX", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "ADX/BNB" + }, + { + "id": "ADXBTC", + "asset": "ADX", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ADX/BTC" + }, + { + "id": "ADXETH", + "asset": "ADX", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "ADX/ETH" + }, + { + "id": "AIONBNB", + "asset": "AION", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "AION/BNB" + }, + { + "id": "AIONBTC", + "asset": "AION", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "AION/BTC" + }, + { + "id": "AIONETH", + "asset": "AION", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "AION/ETH" + }, { "id": "AMBBNB", "asset": "AMB", @@ -467,6 +566,24 @@ "increment": "0.000001", "label": "ARK/ETH" }, + { + "id": "ARNBTC", + "asset": "ARN", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ARN/BTC" + }, + { + "id": "ARNETH", + "asset": "ARN", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ARN/ETH" + }, { "id": "ASTBTC", "asset": "AST", @@ -476,6 +593,33 @@ "increment": "0.00000001", "label": "AST/BTC" }, + { + "id": "BATBNB", + "asset": "BAT", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "BAT/BNB" + }, + { + "id": "BATBTC", + "asset": "BAT", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "BAT/BTC" + }, + { + "id": "BATETH", + "asset": "BAT", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "BAT/ETH" + }, { "id": "BCCBNB", "asset": "BCC", @@ -503,6 +647,51 @@ "increment": "0.01", "label": "BCC/USDT" }, + { + "id": "BCDBTC", + "asset": "BCD", + "currency": "BTC", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.000001", + "label": "BCD/BTC" + }, + { + "id": "BCDETH", + "asset": "BCD", + "currency": "ETH", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.00001", + "label": "BCD/ETH" + }, + { + "id": "BCPTBNB", + "asset": "BCPT", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "BCPT/BNB" + }, + { + "id": "BCPTBTC", + "asset": "BCPT", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "BCPT/BTC" + }, + { + "id": "BCPTETH", + "asset": "BCPT", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "BCPT/ETH" + }, { "id": "BNBETH", "asset": "BNB", @@ -521,6 +710,33 @@ "increment": "0.00000001", "label": "BNT/BTC" }, + { + "id": "BRDBNB", + "asset": "BRD", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "BRD/BNB" + }, + { + "id": "BRDBTC", + "asset": "BRD", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "BRD/BTC" + }, + { + "id": "BRDETH", + "asset": "BRD", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "BRD/ETH" + }, { "id": "BTGBTC", "asset": "BTG", @@ -539,6 +755,105 @@ "increment": "0.000001", "label": "BTG/ETH" }, + { + "id": "BTSBNB", + "asset": "BTS", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "BTS/BNB" + }, + { + "id": "BTSBTC", + "asset": "BTS", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "BTS/BTC" + }, + { + "id": "BTSETH", + "asset": "BTS", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "BTS/ETH" + }, + { + "id": "CDTBTC", + "asset": "CDT", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "CDT/BTC" + }, + { + "id": "CDTETH", + "asset": "CDT", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "CDT/ETH" + }, + { + "id": "CMTBNB", + "asset": "CMT", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "CMT/BNB" + }, + { + "id": "CMTBTC", + "asset": "CMT", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "CMT/BTC" + }, + { + "id": "CMTETH", + "asset": "CMT", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "CMT/ETH" + }, + { + "id": "CNDBNB", + "asset": "CND", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "CND/BNB" + }, + { + "id": "CNDBTC", + "asset": "CND", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "CND/BTC" + }, + { + "id": "CNDETH", + "asset": "CND", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "CND/ETH" + }, { "id": "DASHBTC", "asset": "DASH", @@ -557,6 +872,24 @@ "increment": "0.00001", "label": "DASH/ETH" }, + { + "id": "DGDBTC", + "asset": "DGD", + "currency": "BTC", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.000001", + "label": "DGD/BTC" + }, + { + "id": "DGDETH", + "asset": "DGD", + "currency": "ETH", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.00001", + "label": "DGD/ETH" + }, { "id": "DLTBNB", "asset": "DLT", @@ -594,31 +927,67 @@ "label": "DNT/BTC" }, { - "id": "ENGBTC", - "asset": "ENG", + "id": "EDOBTC", + "asset": "EDO", "currency": "BTC", - "min_size": "1.00000000", + "min_size": "0.01000000", "max_size": "100000", - "increment": "0.00000001", - "label": "ENG/BTC" + "increment": "0.0000001", + "label": "EDO/BTC" }, { - "id": "ENGETH", - "asset": "ENG", + "id": "EDOETH", + "asset": "EDO", "currency": "ETH", - "min_size": "1.00000000", + "min_size": "0.01000000", "max_size": "100000", - "increment": "0.0000001", - "label": "ENG/ETH" + "increment": "0.000001", + "label": "EDO/ETH" }, { - "id": "ENJBTC", - "asset": "ENJ", + "id": "ELFBTC", + "asset": "ELF", "currency": "BTC", "min_size": "1.00000000", "max_size": "100000", "increment": "0.00000001", - "label": "ENJ/BTC" + "label": "ELF/BTC" + }, + { + "id": "ELFETH", + "asset": "ELF", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ELF/ETH" + }, + { + "id": "ENGBTC", + "asset": "ENG", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ENG/BTC" + }, + { + "id": "ENGETH", + "asset": "ENG", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "ENG/ETH" + }, + { + "id": "ENJBTC", + "asset": "ENJ", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "ENJ/BTC" }, { "id": "ENJETH", @@ -665,6 +1034,24 @@ "increment": "0.0000001", "label": "EVX/ETH" }, + { + "id": "FUELBTC", + "asset": "FUEL", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "FUEL/BTC" + }, + { + "id": "FUELETH", + "asset": "FUEL", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "FUEL/ETH" + }, { "id": "FUNBTC", "asset": "FUN", @@ -674,6 +1061,69 @@ "increment": "0.00000001", "label": "FUN/BTC" }, + { + "id": "GTOBNB", + "asset": "GTO", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "GTO/BNB" + }, + { + "id": "GTOBTC", + "asset": "GTO", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "GTO/BTC" + }, + { + "id": "GTOETH", + "asset": "GTO", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "GTO/ETH" + }, + { + "id": "GVTBTC", + "asset": "GVT", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "GVT/BTC" + }, + { + "id": "GVTETH", + "asset": "GVT", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "GVT/ETH" + }, + { + "id": "GXSBTC", + "asset": "GXS", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "GXS/BTC" + }, + { + "id": "GXSETH", + "asset": "GXS", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "GXS/ETH" + }, { "id": "HSRBTC", "asset": "HSR", @@ -701,6 +1151,42 @@ "increment": "0.00000001", "label": "ICN/BTC" }, + { + "id": "ICXBNB", + "asset": "ICX", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "ICX/BNB" + }, + { + "id": "ICXBTC", + "asset": "ICX", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "ICX/BTC" + }, + { + "id": "ICXETH", + "asset": "ICX", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "ICX/ETH" + }, + { + "id": "IOTABNB", + "asset": "IOTA", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "IOTA/BNB" + }, { "id": "KMDBTC", "asset": "KMD", @@ -719,6 +1205,24 @@ "increment": "0.000001", "label": "KMD/ETH" }, + { + "id": "LENDBTC", + "asset": "LEND", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "LEND/BTC" + }, + { + "id": "LENDETH", + "asset": "LEND", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "LEND/ETH" + }, { "id": "LRCBTC", "asset": "LRC", @@ -737,6 +1241,105 @@ "increment": "0.00000001", "label": "LRC/ETH" }, + { + "id": "LSKBNB", + "asset": "LSK", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0001", + "label": "LSK/BNB" + }, + { + "id": "LSKBTC", + "asset": "LSK", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "LSK/BTC" + }, + { + "id": "LSKETH", + "asset": "LSK", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "LSK/ETH" + }, + { + "id": "LTCBNB", + "asset": "LTC", + "currency": "BNB", + "min_size": "0.00001000", + "max_size": "100000", + "increment": "0.01", + "label": "LTC/BNB" + }, + { + "id": "LTCETH", + "asset": "LTC", + "currency": "ETH", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.00001", + "label": "LTC/ETH" + }, + { + "id": "LTCUSDT", + "asset": "LTC", + "currency": "USDT", + "min_size": "0.00001000", + "max_size": "100000", + "increment": "0.01", + "label": "LTC/USDT" + }, + { + "id": "LUNBTC", + "asset": "LUN", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "LUN/BTC" + }, + { + "id": "LUNETH", + "asset": "LUN", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "LUN/ETH" + }, + { + "id": "MANABTC", + "asset": "MANA", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "MANA/BTC" + }, + { + "id": "MANAETH", + "asset": "MANA", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "MANA/ETH" + }, + { + "id": "MCOBNB", + "asset": "MCO", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "MCO/BNB" + }, { "id": "MDABTC", "asset": "MDA", @@ -810,40 +1413,130 @@ "label": "MTL/ETH" }, { - "id": "NULSBNB", - "asset": "NULS", + "id": "NAVBNB", + "asset": "NAV", "currency": "BNB", "min_size": "0.01000000", "max_size": "100000", "increment": "0.00001", - "label": "NULS/BNB" + "label": "NAV/BNB" }, { - "id": "NULSBTC", - "asset": "NULS", + "id": "NAVBTC", + "asset": "NAV", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "NAV/BTC" + }, + { + "id": "NAVETH", + "asset": "NAV", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "NAV/ETH" + }, + { + "id": "NEBLBNB", + "asset": "NEBL", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "NEBL/BNB" + }, + { + "id": "NEBLBTC", + "asset": "NEBL", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "NEBL/BTC" + }, + { + "id": "NEBLETH", + "asset": "NEBL", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "NEBL/ETH" + }, + { + "id": "NEOBNB", + "asset": "NEO", + "currency": "BNB", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.001", + "label": "NEO/BNB" + }, + { + "id": "NEOUSDT", + "asset": "NEO", + "currency": "USDT", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.001", + "label": "NEO/USDT" + }, + { + "id": "OAXBTC", + "asset": "OAX", "currency": "BTC", "min_size": "1.00000000", "max_size": "100000", "increment": "0.00000001", - "label": "NULS/BTC" + "label": "OAX/BTC" }, { - "id": "NULSETH", - "asset": "NULS", + "id": "OSTBNB", + "asset": "OST", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "OST/BNB" + }, + { + "id": "OSTBTC", + "asset": "OST", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "OST/BTC" + }, + { + "id": "OSTETH", + "asset": "OST", "currency": "ETH", "min_size": "1.00000000", "max_size": "100000", "increment": "0.00000001", - "label": "NULS/ETH" + "label": "OST/ETH" }, { - "id": "OAXBTC", - "asset": "OAX", + "id": "POEBTC", + "asset": "POE", "currency": "BTC", "min_size": "1.00000000", "max_size": "100000", "increment": "0.00000001", - "label": "OAX/BTC" + "label": "POE/BTC" + }, + { + "id": "POEETH", + "asset": "POE", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "POE/ETH" }, { "id": "POWRBNB", @@ -872,6 +1565,51 @@ "increment": "0.00000001", "label": "POWR/ETH" }, + { + "id": "PPTBTC", + "asset": "PPT", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "PPT/BTC" + }, + { + "id": "PPTETH", + "asset": "PPT", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "PPT/ETH" + }, + { + "id": "QSPBNB", + "asset": "QSP", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "QSP/BNB" + }, + { + "id": "QSPBTC", + "asset": "QSP", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "QSP/BTC" + }, + { + "id": "QSPETH", + "asset": "QSP", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "QSP/ETH" + }, { "id": "RCNBNB", "asset": "RCN", @@ -989,6 +1727,69 @@ "increment": "0.00000001", "label": "SUB/ETH" }, + { + "id": "TNBBTC", + "asset": "TNB", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "TNB/BTC" + }, + { + "id": "TNBETH", + "asset": "TNB", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "TNB/ETH" + }, + { + "id": "TNTBTC", + "asset": "TNT", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "TNT/BTC" + }, + { + "id": "TNTETH", + "asset": "TNT", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "TNT/ETH" + }, + { + "id": "TRIGBNB", + "asset": "TRIG", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "TRIG/BNB" + }, + { + "id": "TRIGBTC", + "asset": "TRIG", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "TRIG/BTC" + }, + { + "id": "TRIGETH", + "asset": "TRIG", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "TRIG/ETH" + }, { "id": "TRXBTC", "asset": "TRX", @@ -1043,6 +1844,78 @@ "increment": "0.00000001", "label": "VIB/ETH" }, + { + "id": "WABIBNB", + "asset": "WABI", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "WABI/BNB" + }, + { + "id": "WABIBTC", + "asset": "WABI", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "WABI/BTC" + }, + { + "id": "WABIETH", + "asset": "WABI", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "WABI/ETH" + }, + { + "id": "WAVESBNB", + "asset": "WAVES", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0001", + "label": "WAVES/BNB" + }, + { + "id": "WAVESBTC", + "asset": "WAVES", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "WAVES/BTC" + }, + { + "id": "WAVESETH", + "asset": "WAVES", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "WAVES/ETH" + }, + { + "id": "WINGSBTC", + "asset": "WINGS", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "WINGS/BTC" + }, + { + "id": "WINGSETH", + "asset": "WINGS", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.0000001", + "label": "WINGS/ETH" + }, { "id": "WTCBNB", "asset": "WTC", @@ -1052,6 +1925,33 @@ "increment": "0.0001", "label": "WTC/BNB" }, + { + "id": "XLMBNB", + "asset": "XLM", + "currency": "BNB", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.00001", + "label": "XLM/BNB" + }, + { + "id": "XLMBTC", + "asset": "XLM", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "XLM/BTC" + }, + { + "id": "XLMETH", + "asset": "XLM", + "currency": "ETH", + "min_size": "1.00000000", + "max_size": "100000", + "increment": "0.00000001", + "label": "XLM/ETH" + }, { "id": "XMRBTC", "asset": "XMR", @@ -1097,6 +1997,33 @@ "increment": "0.00000001", "label": "XVG/BTC" }, + { + "id": "XZCBNB", + "asset": "XZC", + "currency": "BNB", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.001", + "label": "XZC/BNB" + }, + { + "id": "XZCBTC", + "asset": "XZC", + "currency": "BTC", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "XZC/BTC" + }, + { + "id": "XZCETH", + "asset": "XZC", + "currency": "ETH", + "min_size": "0.01000000", + "max_size": "100000", + "increment": "0.000001", + "label": "XZC/ETH" + }, { "id": "YOYOBNB", "asset": "YOYO", @@ -1124,6 +2051,24 @@ "increment": "0.00000001", "label": "YOYO/ETH" }, + { + "id": "ZECBTC", + "asset": "ZEC", + "currency": "BTC", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.000001", + "label": "ZEC/BTC" + }, + { + "id": "ZECETH", + "asset": "ZEC", + "currency": "ETH", + "min_size": "0.00100000", + "max_size": "100000", + "increment": "0.00001", + "label": "ZEC/ETH" + }, { "id": "BNBUSDT", "asset": "BNB", @@ -1142,4 +2087,4 @@ "increment": "0.01", "label": "ETH/USDT" } -] \ No newline at end of file +] From 860dfc5dc1a0bf75c202f46540753d211e4d1635 Mon Sep 17 00:00:00 2001 From: mkuendig Date: Tue, 2 Jan 2018 21:54:36 +1100 Subject: [PATCH 2/3] Binance changed API 24 hours to 1 hour (#1027) * Update README * Update README again * add generation data to gitignore (#1012) * binance changed their API strategy from 24 hour windows to 1 hour. --- .gitignore | 1 + README.md | 14 +++++++------- extensions/exchanges/binance/exchange.js | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 47f62ebeca..816e9b0f84 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ sim_result* trade_result* *_test backtesting_* +generation_data_* models/*.json models/*.html *.pyc diff --git a/README.md b/README.md index 1d36cb0e33..f9940f8460 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![zenbot logo](https://rawgit.com/carlos8f/zenbot/master/assets/logo.png) +![zenbot logo](https://rawgit.com/deviavir/zenbot/master/assets/logo.png) > β€œTo follow the path, look to the master, follow the master, walk with the master, see through the master, become the master.” > – Zen Proverb @@ -50,13 +50,13 @@ Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB. I Run in your console, ``` -git clone https://github.com/carlos8f/zenbot.git +git clone https://github.com/deviavir/zenbot.git ``` Or, without git, ``` -wget https://github.com/carlos8f/zenbot/archive/master.tar.gz +wget https://github.com/deviavir/zenbot/archive/master.tar.gz tar -xf zenbot-master.tar.gz mv zenbot-master zenbot ``` @@ -93,7 +93,7 @@ sudo apt-get install build-essential mongodb -y curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt-get install -y nodejs -git clone https://github.com/carlos8f/zenbot.git +git clone https://github.com/deviavir/zenbot.git cd zenbot npm install @@ -470,7 +470,7 @@ c.order_adjust_time = 10000 ## Reading the console output -![console](https://rawgit.com/carlos8f/zenbot/master/assets/console.png) +![console](https://rawgit.com/deviavir/zenbot/master/assets/console.png) From left to right: @@ -668,7 +668,7 @@ zenbot sell gdax.BTC-USD --pct=10 ## Chat with other Zenbot users -[![zenbot logo](https://rawgit.com/carlos8f/zenbot/master/assets/discord.png)](https://discord.gg/ZdAd2gP) +[![zenbot logo](https://rawgit.com/deviavir/zenbot/master/assets/discord.png)](https://discord.gg/ZdAd2gP) Zenbot has a Discord chat! You can get in [through this invite link](https://discord.gg/ZdAd2gP). @@ -680,7 +680,7 @@ P.S., some have asked for how to donate to Zenbot development. I accept donation `187rmNSkSvehgcKpBunre6a5wA5hQQop6W` -![zenbot logo](https://rawgit.com/carlos8f/zenbot/master/assets/zenbot_square.png) +![zenbot logo](https://rawgit.com/deviavir/zenbot/master/assets/zenbot_square.png) Thanks! diff --git a/extensions/exchanges/binance/exchange.js b/extensions/exchanges/binance/exchange.js index ac8f4f7c03..d332f78104 100644 --- a/extensions/exchanges/binance/exchange.js +++ b/extensions/exchanges/binance/exchange.js @@ -64,11 +64,11 @@ module.exports = function container (get, set, clear) { } if (args.startTime && !args.endTime) { // add 12 hours - args.endTime = args.startTime + 43200000 + args.endTime = args.startTime + 3600000 } else if (args.endTime && !args.startTime) { // subtract 12 hours - args.startTime = args.endTime - 43200000 + args.startTime = args.endTime - 3600000 } var client = publicClient() From fccae8eb363f030aa7dd71ed81631c281bc0e7d9 Mon Sep 17 00:00:00 2001 From: FunFR Date: Thu, 4 Jan 2018 11:29:03 +0100 Subject: [PATCH 3/3] rename periodLength to period_length (#1035) --- commands/sim.js | 2 +- commands/trade.js | 4 +- commands/train.js | 12 +- extensions/exchanges/bittrex/exchange.js | 2 +- extensions/strategies/cci_srsi/strategy.js | 214 +++++++++--------- .../strategies/crossover_vwap/strategy.js | 4 +- .../strategies/forex_analytics/strategy.js | 6 +- extensions/strategies/macd/strategy.js | 6 +- extensions/strategies/neural/strategy.js | 4 +- extensions/strategies/noop/strategy.js | 4 +- extensions/strategies/rsi/strategy.js | 6 +- extensions/strategies/sar/strategy.js | 4 +- extensions/strategies/speed/strategy.js | 6 +- extensions/strategies/srsi_macd/strategy.js | 4 +- extensions/strategies/stddev/strategy.js | 4 +- extensions/strategies/ta_ema/strategy.js | 4 +- extensions/strategies/ta_macd/strategy.js | 4 +- extensions/strategies/trend_ema/strategy.js | 4 +- extensions/strategies/trendline/strategy.js | 4 +- .../strategies/trust_distrust/strategy.js | 4 +- lib/engine.js | 14 +- scripts/auto_backtester/backtester.js | 18 +- .../backtester_trust_distrust.js | 8 +- scripts/genetic_backtester/darwin.js | 38 ++-- scripts/genetic_backtester/phenotype.js | 4 +- 25 files changed, 192 insertions(+), 192 deletions(-) diff --git a/commands/sim.js b/commands/sim.js index 88de36f8b3..c989eefc30 100644 --- a/commands/sim.js +++ b/commands/sim.js @@ -79,7 +79,7 @@ module.exports = function container (get, set, clear) { var engine = get('lib.engine')(s) if (!so.min_periods) so.min_periods = 1 var cursor, reversing, reverse_point - var query_start = so.start ? tb(so.start).resize(so.periodLength).subtract(so.min_periods + 2).toMilliseconds() : null + var query_start = so.start ? tb(so.start).resize(so.period_length).subtract(so.min_periods + 2).toMilliseconds() : null function exitSim () { console.log() diff --git a/commands/trade.js b/commands/trade.js index c145945e6d..74997ea557 100644 --- a/commands/trade.js +++ b/commands/trade.js @@ -112,7 +112,7 @@ module.exports = function container (get, set, clear) { ].join('') + '\n') process.stdout.write([ z(15, (so.mode === 'paper' ? ' ' : (so.mode === 'live' && (so.manual === false || typeof so.manual === 'undefined')) ? ' ' + 'AUTO'.black.bgRed + ' ' : ' ' + 'MANUAL'.black.bgGreen + ' '), ' '), - z(13, so.periodLength, ' '), + z(13, so.period_length, ' '), z(29, (so.order_type === 'maker' ? so.order_type.toUpperCase().green : so.order_type.toUpperCase().red), ' '), z(31, (so.mode === 'paper' ? 'avg. '.grey + so.avg_slippage_pct + '%' : 'max '.grey + so.max_slippage_pct + '%'), ' '), z(20, (so.order_type === 'maker' ? so.order_type + ' ' + s.exchange.makerFee : so.order_type + ' ' + s.exchange.takerFee), ' ') @@ -308,7 +308,7 @@ module.exports = function container (get, set, clear) { } var db_cursor, trade_cursor - var query_start = tb().resize(so.periodLength).subtract(so.min_periods * 2).toMilliseconds() + var query_start = tb().resize(so.period_length).subtract(so.min_periods * 2).toMilliseconds() var days = Math.ceil((new Date().getTime() - query_start) / 86400000) var session = null var sessions = get('db.sessions') diff --git a/commands/train.js b/commands/train.js index 2835884a09..3db11b15ed 100644 --- a/commands/train.js +++ b/commands/train.js @@ -131,13 +131,13 @@ module.exports = function container (get, set, clear) { if (!so.min_periods) so.min_periods = 1 var cursor, reversing, reverse_point - var query_start = so.start_training ? tb(so.start_training).resize(so.periodLength).subtract(so.min_periods + 2).toMilliseconds() : null + var query_start = so.start_training ? tb(so.start_training).resize(so.period_length).subtract(so.min_periods + 2).toMilliseconds() : null function writeTempModel (strategy) { var tempModelString = JSON.stringify( { "selector": so.selector.normalized, - "period": so.periodLength, + "period": so.period_length, "start_training": moment(so.start_training), "end_training": moment(so.end_training), "options": fa_getTrainOptions(so), @@ -159,7 +159,7 @@ module.exports = function container (get, set, clear) { var finalModelString = JSON.stringify( { "selector": so.selector.normalized, - "period": so.periodLength, + "period": so.period_length, "start_training": moment(so.start_training).utc(), "end_training": moment(end_training).utc(), "result_training": trainingResult, @@ -172,7 +172,7 @@ module.exports = function container (get, set, clear) { var testVsBuyHold = typeof(testResult) !== "undefined" ? testResult.vsBuyHold : 'noTest' var finalModelFile = 'models/forex.model_' + so.selector.normalized - + '_period=' + so.periodLength + + '_period=' + so.period_length + '_from=' + moment(so.start_training).utc().format('YYYYMMDD_HHmmssZZ') + '_to=' + moment(end_training).utc().format('YYYYMMDD_HHmmssZZ') + '_trainingVsBuyHold=' + trainingResult.vsBuyHold @@ -234,7 +234,7 @@ module.exports = function container (get, set, clear) { '--modelfile', path.resolve(__dirname, '..', tempModelFile), '--start', so.start_training, '--end', so.end_training, - '--period', so.periodLength, + '--period', so.period_length, '--filename', path.resolve(__dirname, '..', tempModelFile) + '-simTrainingResult.html' ] var trainingSimulation = spawn(path.resolve(__dirname, '..', zenbot_cmd), trainingArgs, { stdio: 'inherit' }) @@ -260,7 +260,7 @@ module.exports = function container (get, set, clear) { '--disable_options', '--modelfile', path.resolve(__dirname, '..', tempModelFile), '--start', so.end_training, - '--period', so.periodLength, + '--period', so.period_length, '--filename', path.resolve(__dirname, '..', tempModelFile) + '-simTestResult.html', ] var testSimulation = spawn(path.resolve(__dirname, '..', zenbot_cmd), testArgs, { stdio: 'inherit' }) diff --git a/extensions/exchanges/bittrex/exchange.js b/extensions/exchanges/bittrex/exchange.js index 8f4bedc6ee..40332b673a 100644 --- a/extensions/exchanges/bittrex/exchange.js +++ b/extensions/exchanges/bittrex/exchange.js @@ -64,7 +64,7 @@ module.exports = function container(get, set, clear) { bittrex_public.getmarkethistory(args, function( data ) { if (!shownWarning) { console.log('please note: the bittrex api does not support backfilling (trade/paper only).') - console.log('please note: make sure to set the --periodLength=1m to make sure data for trade/paper is fetched.') + console.log('please note: make sure to set the --period_length=1m to make sure data for trade/paper is fetched.') shownWarning = true } if (typeof data !== 'object') { diff --git a/extensions/strategies/cci_srsi/strategy.js b/extensions/strategies/cci_srsi/strategy.js index 3eddff6155..5f84cd0496 100644 --- a/extensions/strategies/cci_srsi/strategy.js +++ b/extensions/strategies/cci_srsi/strategy.js @@ -1,107 +1,107 @@ -let z = require('zero-fill') - , n = require('numbro') - -module.exports = function container (get, set, clear) { - return { - name: 'cci_srsi', - description: 'Stochastic CCI Strategy', - - getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '20m') - this.option('periodLength', 'period length, same as --period', String, '20m') - this.option('min_periods', 'min. number of history periods', Number, 30) - this.option('ema_acc', 'sideways threshold (0.2-0.4)', Number, 0.03) - this.option('cci_periods', 'number of RSI periods', Number, 14) - this.option('rsi_periods', 'number of RSI periods', Number, 14) - this.option('srsi_periods', 'number of RSI periods', Number, 9) - this.option('srsi_k', '%K line', Number, 5) - this.option('srsi_d', '%D line', Number, 3) - this.option('oversold_rsi', 'buy when RSI reaches or drops below this value', Number, 18) - this.option('overbought_rsi', 'sell when RSI reaches or goes above this value', Number, 85) - this.option('oversold_cci', 'buy when CCI reaches or drops below this value', Number, -90) - this.option('overbought_cci', 'sell when CCI reaches or goes above this value', Number, 140) - this.option('constant', 'constant', Number, 0.015) - console.log('If you have questions about this strategy, contact me... @talvasconcelos'); - }, - - calculate: function (s) { - //get market trend - get('lib.ema')(s, 'trend_ema', s.options.min_periods) - if (typeof s.period.trend_ema !== 'undefined') - s.trend = s.period.trend_ema > s.lookback[0].trend_ema ? 'up' : 'down' - - // compute Stochastic RSI - get('lib.srsi')(s, 'srsi', s.options.rsi_periods, s.options.srsi_k, s.options.srsi_d) - - // compute CCI - get('lib.cci')(s, 'cci', s.options.cci_periods, s.options.constant) - - if (typeof s.period.cci !== 'undefined' && typeof s.period.srsi_K !== 'undefined') { - s.cci_fromAbove = s.period.cci < s.lookback[0]['cci'] - s.rsi_fromAbove = s.period.srsi_K < s.lookback[0]['srsi_K'] - } - - if (s.period.trend_ema && s.lookback[0] && s.lookback[0].trend_ema) { - s.period.acc = Math.abs((s.period.trend_ema - s.lookback[0].trend_ema) / s.lookback[0].trend_ema * 100) - } - }, - - onPeriod: function (s, cb) { - if (!s.in_preroll && typeof s.trend !== 'undefined') { - - // Sideways Market - if (s.period.acc < s.options.ema_acc) { - // Buy signal - if (s.period.cci <= s.options.oversold_cci && /*s.period.srsi_K > s.period.srsi_D &&*/ s.period.srsi_K <= s.options.oversold_rsi) { - if (!s.cci_fromAbove && !s.rsi_fromAbove) { - s.signal = 'buy' - } - } - // Sell signal - if (s.period.cci >= s.options.overbought_cci && /*s.period.srsi_K < s.period.srsi_D &&*/ s.period.srsi_K >= s.options.overbought_rsi) { - if (s.cci_fromAbove || s.rsi_fromAbove) { - s.signal = 'sell' - } - } - //cb() - } - // Buy signal - if (s.trend === 'up') { - if (s.period.cci <= s.options.oversold_cci && /*s.period.srsi_K > s.period.srsi_D &&*/ s.period.srsi_K <= s.options.oversold_rsi) { - if (!s.cci_fromAbove && !s.rsi_fromAbove) { - s.signal = 'buy' - } - } - } - // Sell signal - if (s.trend === 'down') { - if (s.period.cci >= s.options.overbought_cci && /*s.period.srsi_K < s.period.srsi_D &&*/ s.period.srsi_K >= s.options.overbought_rsi) { - if (s.cci_fromAbove || s.rsi_fromAbove) { - s.signal = 'sell' - } - } - } - } - cb() - }, - onReport: function (s) { - var cols = [] - if (typeof s.period.cci === 'number') { - var color = 'grey' - if (s.period.cci > 0) { - color = 'green' - } - else if (s.period.cci < 0) { - color = 'red' - } - cols.push(z(8, n(s.period.cci).format('000'), ' ')[color]) - cols.push(s.period.acc > s.options.ema_acc ? z(8, n(s.period.srsi_K).format('000'), ' ')[color] : ' --> ') - } - else { - cols.push(' ') - } - return cols - } - } -} -/* Made by talvasconcelos*/ +let z = require('zero-fill') + , n = require('numbro') + +module.exports = function container (get, set, clear) { + return { + name: 'cci_srsi', + description: 'Stochastic CCI Strategy', + + getOptions: function () { + this.option('period', 'period length, same as --period_length', String, '20m') + this.option('period_length', 'period length, same as --period', String, '20m') + this.option('min_periods', 'min. number of history periods', Number, 30) + this.option('ema_acc', 'sideways threshold (0.2-0.4)', Number, 0.03) + this.option('cci_periods', 'number of RSI periods', Number, 14) + this.option('rsi_periods', 'number of RSI periods', Number, 14) + this.option('srsi_periods', 'number of RSI periods', Number, 9) + this.option('srsi_k', '%K line', Number, 5) + this.option('srsi_d', '%D line', Number, 3) + this.option('oversold_rsi', 'buy when RSI reaches or drops below this value', Number, 18) + this.option('overbought_rsi', 'sell when RSI reaches or goes above this value', Number, 85) + this.option('oversold_cci', 'buy when CCI reaches or drops below this value', Number, -90) + this.option('overbought_cci', 'sell when CCI reaches or goes above this value', Number, 140) + this.option('constant', 'constant', Number, 0.015) + console.log('If you have questions about this strategy, contact me... @talvasconcelos'); + }, + + calculate: function (s) { + //get market trend + get('lib.ema')(s, 'trend_ema', s.options.min_periods) + if (typeof s.period.trend_ema !== 'undefined') + s.trend = s.period.trend_ema > s.lookback[0].trend_ema ? 'up' : 'down' + + // compute Stochastic RSI + get('lib.srsi')(s, 'srsi', s.options.rsi_periods, s.options.srsi_k, s.options.srsi_d) + + // compute CCI + get('lib.cci')(s, 'cci', s.options.cci_periods, s.options.constant) + + if (typeof s.period.cci !== 'undefined' && typeof s.period.srsi_K !== 'undefined') { + s.cci_fromAbove = s.period.cci < s.lookback[0]['cci'] + s.rsi_fromAbove = s.period.srsi_K < s.lookback[0]['srsi_K'] + } + + if (s.period.trend_ema && s.lookback[0] && s.lookback[0].trend_ema) { + s.period.acc = Math.abs((s.period.trend_ema - s.lookback[0].trend_ema) / s.lookback[0].trend_ema * 100) + } + }, + + onPeriod: function (s, cb) { + if (!s.in_preroll && typeof s.trend !== 'undefined') { + + // Sideways Market + if (s.period.acc < s.options.ema_acc) { + // Buy signal + if (s.period.cci <= s.options.oversold_cci && /*s.period.srsi_K > s.period.srsi_D &&*/ s.period.srsi_K <= s.options.oversold_rsi) { + if (!s.cci_fromAbove && !s.rsi_fromAbove) { + s.signal = 'buy' + } + } + // Sell signal + if (s.period.cci >= s.options.overbought_cci && /*s.period.srsi_K < s.period.srsi_D &&*/ s.period.srsi_K >= s.options.overbought_rsi) { + if (s.cci_fromAbove || s.rsi_fromAbove) { + s.signal = 'sell' + } + } + //cb() + } + // Buy signal + if (s.trend === 'up') { + if (s.period.cci <= s.options.oversold_cci && /*s.period.srsi_K > s.period.srsi_D &&*/ s.period.srsi_K <= s.options.oversold_rsi) { + if (!s.cci_fromAbove && !s.rsi_fromAbove) { + s.signal = 'buy' + } + } + } + // Sell signal + if (s.trend === 'down') { + if (s.period.cci >= s.options.overbought_cci && /*s.period.srsi_K < s.period.srsi_D &&*/ s.period.srsi_K >= s.options.overbought_rsi) { + if (s.cci_fromAbove || s.rsi_fromAbove) { + s.signal = 'sell' + } + } + } + } + cb() + }, + onReport: function (s) { + var cols = [] + if (typeof s.period.cci === 'number') { + var color = 'grey' + if (s.period.cci > 0) { + color = 'green' + } + else if (s.period.cci < 0) { + color = 'red' + } + cols.push(z(8, n(s.period.cci).format('000'), ' ')[color]) + cols.push(s.period.acc > s.options.ema_acc ? z(8, n(s.period.srsi_K).format('000'), ' ')[color] : ' --> ') + } + else { + cols.push(' ') + } + return cols + } + } +} +/* Made by talvasconcelos*/ diff --git a/extensions/strategies/crossover_vwap/strategy.js b/extensions/strategies/crossover_vwap/strategy.js index 8a508d37e8..72a53f0f07 100644 --- a/extensions/strategies/crossover_vwap/strategy.js +++ b/extensions/strategies/crossover_vwap/strategy.js @@ -19,8 +19,8 @@ module.exports = function container (get, set, clear) { zenbot sim kraken.XXRP-ZEUR --period="120m" --strategy=crossover_vwap --currency_capital=700 --asset_capital=0 --max_slippage_pct=100 --days=60 --avg_slippage_pct=0.045 --vwap_max=8000 --markup_sell_pct=0.5 --markdown_buy_pct=0.5 --emalen1=50 zenbot sim kraken.XXRP-ZEUR --period="120m" --strategy=crossover_vwap --currency_capital=700 --asset_capital=0 --max_slippage_pct=100 --days=60 --avg_slippage_pct=0.045 --vwap_max=8000 --markup_sell_pct=0.5 --markdown_buy_pct=0.5 --emalen1=30 */ - this.option('period', 'period length, same as --periodLength', String, '120m') - this.option('periodLength', 'period length, same as --period', String, '120m') + this.option('period', 'period length, same as --period_length', String, '120m') + this.option('period_length', 'period length, same as --period', String, '120m') this.option('emalen1', 'Length of EMA 1', Number, 30 )//green this.option('smalen1', 'Length of SMA 1', Number, 108 )//red this.option('smalen2', 'Length of SMA 2', Number, 60 )//purple diff --git a/extensions/strategies/forex_analytics/strategy.js b/extensions/strategies/forex_analytics/strategy.js index f3c0102538..16d59098bc 100644 --- a/extensions/strategies/forex_analytics/strategy.js +++ b/extensions/strategies/forex_analytics/strategy.js @@ -11,8 +11,8 @@ module.exports = function container (get, set, clear) { getOptions: function (s) { this.option('modelfile', 'modelfile (generated by running `train`), should be in models/', String, 'none') - this.option('period', 'period length of a candlestick (default: 30m), same as --periodLength', String, '30m') - this.option('periodLength', 'period length of a candlestick (default: 30m), same as --period', String, '30m') + this.option('period', 'period length of a candlestick (default: 30m), same as --period_length', String, '30m') + this.option('period_length', 'period length of a candlestick (default: 30m), same as --period', String, '30m') this.option('min_periods', 'min. number of history periods', Number, 100) if (s.options) { @@ -85,4 +85,4 @@ module.exports = function container (get, set, clear) { return cols } } -} \ No newline at end of file +} diff --git a/extensions/strategies/macd/strategy.js b/extensions/strategies/macd/strategy.js index 9f77c16be9..79bb69ddd9 100644 --- a/extensions/strategies/macd/strategy.js +++ b/extensions/strategies/macd/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Buy when (MACD - Signal > 0) and sell when (MACD - Signal < 0).', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '1h') - this.option('periodLength', 'period length, same as --period', String, '1h') + this.option('period', 'period length, same as --period_length', String, '1h') + this.option('period_length', 'period length, same as --period', String, '1h') this.option('min_periods', 'min. number of history periods', Number, 52) this.option('ema_short_period', 'number of periods for the shorter EMA', Number, 12) this.option('ema_long_period', 'number of periods for the longer EMA', Number, 26) @@ -83,4 +83,4 @@ module.exports = function container (get, set, clear) { return cols } } -} \ No newline at end of file +} diff --git a/extensions/strategies/neural/strategy.js b/extensions/strategies/neural/strategy.js index f3ad05561b..7dd8e4dd46 100644 --- a/extensions/strategies/neural/strategy.js +++ b/extensions/strategies/neural/strategy.js @@ -14,8 +14,8 @@ module.exports = function container (get, set, clear) { name: 'neural', description: 'Use neural learning to predict future price. Buy = mean(last 3 real prices) < mean(current & last prediction)', getOptions: function () { - this.option('period', 'period length - make sure to lower your poll trades time to lower than this value. Same as --periodLength', String, '1m') - this.option('periodLength', 'period length - make sure to lower your poll trades time to lower than this value. Same as --period', String, '1m') + this.option('period', 'period length - make sure to lower your poll trades time to lower than this value. Same as --period_length', String, '1m') + this.option('period_length', 'period length - make sure to lower your poll trades time to lower than this value. Same as --period', String, '1m') this.option('activation_1_type', "Neuron Activation Type: sigmoid, tanh, relu", String, 'sigmoid') this.option('neurons_1', "Neurons in layer 1 Shoot for atleast 100", Number, 1) this.option('depth', "Rows of data to predict ahead for matches/learning", Number, 1) diff --git a/extensions/strategies/noop/strategy.js b/extensions/strategies/noop/strategy.js index c2d216acd0..27d99f5d71 100644 --- a/extensions/strategies/noop/strategy.js +++ b/extensions/strategies/noop/strategy.js @@ -4,8 +4,8 @@ module.exports = function container (get, set, clear) { description: 'Just do nothing. Can be used to e.g. generate candlesticks for training the genetic forex strategy.', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '30m') - this.option('periodLength', 'period length, same as --period', String, '30m') + this.option('period', 'period length, same as --period_length', String, '30m') + this.option('period_length', 'period length, same as --period', String, '30m') }, calculate: function (s) { diff --git a/extensions/strategies/rsi/strategy.js b/extensions/strategies/rsi/strategy.js index 571363f88b..8dfa8b4330 100644 --- a/extensions/strategies/rsi/strategy.js +++ b/extensions/strategies/rsi/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Attempts to buy low and sell high by tracking RSI high-water readings.', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '2m') - this.option('periodLength', 'period length, same as --period', String, '2m') + this.option('period', 'period length, same as --period_length', String, '2m') + this.option('period_length', 'period length, same as --period', String, '2m') this.option('min_periods', 'min. number of history periods', Number, 52) this.option('rsi_periods', 'number of RSI periods', 14) this.option('oversold_rsi', 'buy when RSI reaches or drops below this value', Number, 30) @@ -71,4 +71,4 @@ module.exports = function container (get, set, clear) { return cols } } -} \ No newline at end of file +} diff --git a/extensions/strategies/sar/strategy.js b/extensions/strategies/sar/strategy.js index 2c44af523d..c8e64fde04 100644 --- a/extensions/strategies/sar/strategy.js +++ b/extensions/strategies/sar/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Parabolic SAR', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '2m') - this.option('periodLength', 'period length, same as --period', String, '2m') + this.option('period', 'period length, same as --period_length', String, '2m') + this.option('period_length', 'period length, same as --period', String, '2m') this.option('min_periods', 'min. number of history periods', Number, 52) this.option('sar_af', 'acceleration factor for parabolic SAR', Number, 0.015) this.option('sar_max_af', 'max acceleration factor for parabolic SAR', Number, 0.3) diff --git a/extensions/strategies/speed/strategy.js b/extensions/strategies/speed/strategy.js index 2fc7980aca..d89f3881fe 100644 --- a/extensions/strategies/speed/strategy.js +++ b/extensions/strategies/speed/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Trade when % change from last two 1m periods is higher than average.', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '1m') - this.option('periodLength', 'period length, same as --period', String, '1m') + this.option('period', 'period length, same as --period_length', String, '1m') + this.option('period_length', 'period length, same as --period', String, '1m') this.option('min_periods', 'min. number of history periods', Number, 3000) this.option('baseline_periods', 'lookback periods for volatility baseline', Number, 3000) this.option('trigger_factor', 'multiply with volatility baseline EMA to get trigger value', Number, 1.6) @@ -53,4 +53,4 @@ module.exports = function container (get, set, clear) { return cols } } -} \ No newline at end of file +} diff --git a/extensions/strategies/srsi_macd/strategy.js b/extensions/strategies/srsi_macd/strategy.js index 18828e403c..c184fcba42 100644 --- a/extensions/strategies/srsi_macd/strategy.js +++ b/extensions/strategies/srsi_macd/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Stochastic MACD Strategy', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '30m') - this.option('periodLength', 'period length, same as --period', String, '30m') + this.option('period', 'period length, same as --period_length', String, '30m') + this.option('period_length', 'period length, same as --period', String, '30m') this.option('min_periods', 'min. number of history periods', Number, 200) this.option('rsi_periods', 'number of RSI periods', 14) this.option('srsi_periods', 'number of RSI periods', Number, 9) diff --git a/extensions/strategies/stddev/strategy.js b/extensions/strategies/stddev/strategy.js index 1a1b1e58d8..cdd7cd899c 100644 --- a/extensions/strategies/stddev/strategy.js +++ b/extensions/strategies/stddev/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { name: 'stddev', description: 'Buy when standard deviation and mean increase, sell on mean decrease.', getOptions: function () { - this.option('period', 'period length, set poll trades to 100ms, poll order 1000ms. Same as --periodLength', String, '100ms') - this.option('periodLength', 'period length, set poll trades to 100ms, poll order 1000ms. Same as --period', String, '100ms') + this.option('period', 'period length, set poll trades to 100ms, poll order 1000ms. Same as --period_length', String, '100ms') + this.option('period_length', 'period length, set poll trades to 100ms, poll order 1000ms. Same as --period', String, '100ms') this.option('trendtrades_1', "Trades for array 1 to be subtracted stddev and mean from", Number, 5) this.option('trendtrades_2', "Trades for array 2 to be calculated stddev and mean from", Number, 53) this.option('min_periods', "min_periods", Number, 1250) diff --git a/extensions/strategies/ta_ema/strategy.js b/extensions/strategies/ta_ema/strategy.js index 081c24d914..48b9f5a749 100644 --- a/extensions/strategies/ta_ema/strategy.js +++ b/extensions/strategies/ta_ema/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Buy when (EMA - last(EMA) > 0) and sell when (EMA - last(EMA) < 0). Optional buy on low RSI.', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '10m') - this.option('periodLength', 'period length, same as --period', String, '10m') + this.option('period', 'period length, same as --period_length', String, '10m') + this.option('period_length', 'period length, same as --period', String, '10m') this.option('min_periods', 'min. number of history periods', Number, 52) this.option('trend_ema', 'number of periods for trend EMA', Number, 20) this.option('neutral_rate', 'avoid trades if abs(trend_ema) under this float (0 to disable, "auto" for a variable filter)', Number, 0.06) diff --git a/extensions/strategies/ta_macd/strategy.js b/extensions/strategies/ta_macd/strategy.js index 1cb20e28bd..7f9a44f87d 100644 --- a/extensions/strategies/ta_macd/strategy.js +++ b/extensions/strategies/ta_macd/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Buy when (MACD - Signal > 0) and sell when (MACD - Signal < 0).', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '1h') - this.option('periodLength', 'period length, same as --period', String, '1h') + this.option('period', 'period length, same as --period_length', String, '1h') + this.option('period_length', 'period length, same as --period', String, '1h') this.option('min_periods', 'min. number of history periods', Number, 52) this.option('ema_short_period', 'number of periods for the shorter EMA', Number, 12) this.option('ema_long_period', 'number of periods for the longer EMA', Number, 26) diff --git a/extensions/strategies/trend_ema/strategy.js b/extensions/strategies/trend_ema/strategy.js index fd282abbaf..6acbcad0a9 100644 --- a/extensions/strategies/trend_ema/strategy.js +++ b/extensions/strategies/trend_ema/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Buy when (EMA - last(EMA) > 0) and sell when (EMA - last(EMA) < 0). Optional buy on low RSI.', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '2m') - this.option('periodLength', 'period length, same as --period', String, '2m') + this.option('period', 'period length, same as --period_length', String, '2m') + this.option('period_length', 'period length, same as --period', String, '2m') this.option('min_periods', 'min. number of history periods', Number, 52) this.option('trend_ema', 'number of periods for trend EMA', Number, 26) this.option('neutral_rate', 'avoid trades if abs(trend_ema) under this float (0 to disable, "auto" for a variable filter)', Number, 'auto') diff --git a/extensions/strategies/trendline/strategy.js b/extensions/strategies/trendline/strategy.js index f34bbfa023..1b20bffe0a 100644 --- a/extensions/strategies/trendline/strategy.js +++ b/extensions/strategies/trendline/strategy.js @@ -11,7 +11,7 @@ module.exports = function container (get, set, clear) { getOptions: function () { this.option('period', 'period length', String, '30s') - this.option('periodLength', 'period length', String, '30s') + this.option('period_length', 'period length', String, '30s') this.option('lastpoints', "Number of trades for short trend average", Number, 100) this.option('avgpoints', "Number of trades for long trend average", Number, 1000) this.option('lastpoints2', "Number of trades for short trend average", Number, 10) @@ -100,4 +100,4 @@ module.exports = function container (get, set, clear) { return cols }, } -} \ No newline at end of file +} diff --git a/extensions/strategies/trust_distrust/strategy.js b/extensions/strategies/trust_distrust/strategy.js index caed23be31..dab2824f32 100644 --- a/extensions/strategies/trust_distrust/strategy.js +++ b/extensions/strategies/trust_distrust/strategy.js @@ -7,8 +7,8 @@ module.exports = function container (get, set, clear) { description: 'Sell when price higher than $sell_min% and highest point - $sell_threshold% is reached. Buy when lowest price point + $buy_threshold% reached.', getOptions: function () { - this.option('period', 'period length, same as --periodLength', String, '30m') - this.option('periodLength', 'period length, same as --period', String, '30m') + this.option('period', 'period length, same as --period_length', String, '30m') + this.option('period_length', 'period length, same as --period', String, '30m') this.option('min_periods', 'min. number of history periods', Number, 52) this.option('sell_threshold', 'sell when the top drops at least below this percentage', Number, 2) this.option('sell_threshold_max', 'sell when the top drops lower than this max, regardless of sell_min (panic sell, 0 to disable)', Number, 0) diff --git a/lib/engine.js b/lib/engine.js index 731cde592c..6ded4cd1a4 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -19,10 +19,10 @@ module.exports = function container (get, set, clear) { s.asset = so.selector.asset s.currency = so.selector.currency - if (typeof so.periodLength == 'undefined') - so.periodLength = so.period + if (typeof so.period_length == 'undefined') + so.period_length = so.period else - so.period = so.periodLength + so.period = so.period_length var products = s.exchange.getProducts() products.forEach(function (product) { @@ -123,10 +123,10 @@ module.exports = function container (get, set, clear) { } function initBuffer (trade) { - var d = tb(trade.time).resize(so.periodLength) + var d = tb(trade.time).resize(so.period_length) s.period = { period_id: d.toString(), - size: so.periodLength, + size: so.period_length, time: d.toMilliseconds(), open: trade.price, high: trade.price, @@ -688,7 +688,7 @@ module.exports = function container (get, set, clear) { } readline.clearLine(process.stdout) readline.cursorTo(process.stdout, 0) - process.stdout.write(moment(is_progress ? s.period.close_time : tb(s.period.time).resize(so.periodLength).add(1).toMilliseconds()).format('YYYY-MM-DD HH:mm:ss')[is_progress && !blink_off ? 'bgBlue' : 'grey']) + process.stdout.write(moment(is_progress ? s.period.close_time : tb(s.period.time).resize(so.period_length).add(1).toMilliseconds()).format('YYYY-MM-DD HH:mm:ss')[is_progress && !blink_off ? 'bgBlue' : 'grey']) process.stdout.write(' ' + fc(s.period.close, true, true, true) + ' ' + s.product_id.grey) if (s.lookback[0]) { var diff = (s.period.close - s.lookback[0].close) / s.lookback[0].close @@ -800,7 +800,7 @@ module.exports = function container (get, set, clear) { if (s.period && trade.time < s.period.time) { return done() } - var period_id = tb(trade.time).resize(so.periodLength).toString() + var period_id = tb(trade.time).resize(so.period_length).toString() var day = tb(trade.time).resize('1d') if (s.last_day && s.last_day.toString() && day.toString() !== s.last_day.toString()) { s.day_count++ diff --git a/scripts/auto_backtester/backtester.js b/scripts/auto_backtester/backtester.js index 7d4b3bf914..8f21a1ab80 100755 --- a/scripts/auto_backtester/backtester.js +++ b/scripts/auto_backtester/backtester.js @@ -82,7 +82,7 @@ let runCommand = (strategy, cb) => { trend_ema: `--trend_ema=${strategy.trend_ema} --oversold_rsi=${strategy.oversold_rsi} --oversold_rsi_periods=${strategy.oversold_rsi_periods} --neutral_rate=${strategy.neutral_rate}` }; let zenbot_cmd = process.platform === 'win32' ? 'zenbot.bat' : './zenbot.sh'; // Use 'win32' for 64 bit windows too - let command = `${zenbot_cmd} sim ${simArgs} ${strategyArgs[strategyName]} --periodLength=${strategy.periodLength} --min_periods=${strategy.min_periods}`; + let command = `${zenbot_cmd} sim ${simArgs} ${strategyArgs[strategyName]} --period_length=${strategy.period_length} --min_periods=${strategy.min_periods}`; console.log(`[ ${countArr.length}/${strategies[strategyName].length} ] ${command}`); shell.exec(command, {silent:true, async:true}, (code, stdout, stderr) => { @@ -189,7 +189,7 @@ let processOutput = output => { oversoldRsi: params.oversold_rsi, days: days, - periodLength: params.periodLength, + period_length: params.period_length, min_periods: params.min_periods, roi: roi, wlRatio: losses > 0 ? roundp(wins / losses, 3) : 'Infinity', @@ -199,7 +199,7 @@ let processOutput = output => { let strategies = { cci_srsi: objectProduct({ - periodLength: ['20m'], + period_length: ['20m'], min_periods: [52, 200], rsi_periods: [14, 20], srsi_periods: [14, 20], @@ -212,7 +212,7 @@ let strategies = { constant: [0.015] }), srsi_macd: objectProduct({ - periodLength: ['30m'], + period_length: ['30m'], min_periods: [52, 200], rsi_periods: [14, 20], srsi_periods: [14, 20], @@ -227,7 +227,7 @@ let strategies = { down_trend_threshold: [0] }), macd: objectProduct({ - periodLength: ['1h'], + period_length: ['1h'], min_periods: [52], ema_short_period: range(10, 15), ema_long_period: range(20, 30), @@ -238,7 +238,7 @@ let strategies = { overbought_rsi: range(70, 70) }), rsi: objectProduct({ - periodLength: ['2m'], + period_length: ['2m'], min_periods: [52], rsi_periods: range(10, 30), oversold_rsi: range(20, 35), @@ -248,19 +248,19 @@ let strategies = { rsi_divisor: range(2, 2) }), sar: objectProduct({ - periodLength: ['2m'], + period_length: ['2m'], min_periods: [52], sar_af: range(0.01, 0.055, 0.005), sar_max_af: range(0.1, 0.55, 0.05) }), speed: objectProduct({ - periodLength: ['1m'], + period_length: ['1m'], min_periods: [52], baseline_periods: range(1000, 5000, 200), trigger_factor: range(1.0, 2.0, 0.1) }), trend_ema: objectProduct({ - periodLength: ['2m'], + period_length: ['2m'], min_periods: [52], trend_ema: range(TREND_EMA_MIN, TREND_EMA_MAX), neutral_rate: (NEUTRAL_RATE_AUTO ? new Array('auto') : []).concat(range(NEUTRAL_RATE_MIN, NEUTRAL_RATE_MAX).map(r => r / 100)), diff --git a/scripts/auto_backtester/backtester_trust_distrust.js b/scripts/auto_backtester/backtester_trust_distrust.js index 0c4f9f738b..68523f8006 100644 --- a/scripts/auto_backtester/backtester_trust_distrust.js +++ b/scripts/auto_backtester/backtester_trust_distrust.js @@ -8,7 +8,7 @@ * EMA Parameters: "trend_ema", "neutral_rate" * RSI Parameters: "oversold_rsi", "oversold_rsi_periods" * - * Example: ./backtester.js gdax.ETH-USD --days=10 --currency_capital=5 --periodLength=1m + * Example: ./backtester.js gdax.ETH-USD --days=10 --currency_capital=5 --period_length=1m */ let shell = require('shelljs'); @@ -67,7 +67,7 @@ let objectProduct = obj => { let runCommand = (strategy, cb) => { countArr.push(1); - let command = `./zenbot.sh sim ${simArgs} --strategy=trust_distrust --periodLength=${strategy.periodLength}m --sell_threshold=${strategy.sell_threshold} --sell_threshold_max=${strategy.sell_threshold_max} --sell_min=${strategy.sell_min} --buy_threshold=${strategy.buy_threshold} --days=30`; + let command = `./zenbot.sh sim ${simArgs} --strategy=trust_distrust --period_length=${strategy.period_length}m --sell_threshold=${strategy.sell_threshold} --sell_threshold_max=${strategy.sell_threshold_max} --sell_min=${strategy.sell_min} --buy_threshold=${strategy.buy_threshold} --days=30`; console.log(`[ ${countArr.length}/${strategies.length} ] ${command}`); shell.exec(command, {silent:true, async:true}, (code, stdout, stderr) => { @@ -114,7 +114,7 @@ let processOutput = output => { sellMin: params.sell_min, buyThreshold: params.buy_threshold, days: days, - periodLength: params.periodLength, + period_length: params.period_length, roi: roi, wlRatio: losses > 0 ? roundp(wins / losses, 3) : 'Infinity', frequency: roundp((wins + losses) / days, 3) @@ -126,7 +126,7 @@ let strategies = objectProduct({ sell_threshold_max: range(SELL_THRESHOLD_MAX_MIN, SELL_THRESHOLD_MAX_MAX), sell_min: range(SELL_MIN_MIN, SELL_MIN_MAX), buy_threshold: range(BUY_THRESHOLD_MIN, BUY_THRESHOLD_MAX), - periodLength: range(PERIOD_MIN, PERIOD_MAX) + period_length: range(PERIOD_MIN, PERIOD_MAX) }); let tasks = strategies.map(strategy => { diff --git a/scripts/genetic_backtester/darwin.js b/scripts/genetic_backtester/darwin.js index f99a7afc36..49a9fd9a25 100755 --- a/scripts/genetic_backtester/darwin.js +++ b/scripts/genetic_backtester/darwin.js @@ -39,7 +39,7 @@ let NEUTRAL_RATE_AUTO = false; let iterationCount = 0; let runCommand = (taskStrategyName, phenotype, cb) => { - let commonArgs = `--strategy=${taskStrategyName} --periodLength=${phenotype.periodLength} --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}`; + 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}`; let strategyArgs = { 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}`, 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}`, @@ -149,7 +149,7 @@ let processOutput = output => { losses: losses, errorRate: parseFloat(errorRate), days: days, - periodLength: params.periodLength, + period_length: params.period_length, min_periods: params.min_periods, markup_pct: params.markup_pct, order_type: params.order_type, @@ -199,12 +199,12 @@ let RangeFloat = (min, max) => { return r; }; -let RangePeriod = (min, max, periodLength) => { +let RangePeriod = (min, max, period_length) => { var r = { - type: 'periodLength', + type: 'period_length', min: min, max: max, - periodLength: periodLength + period_length: period_length }; return r; }; @@ -226,7 +226,7 @@ let RangeNeuralActivation = () => { let strategies = { crossover_vwap: { // -- common - periodLength: RangePeriod(1, 400, 'm'), + period_length: RangePeriod(1, 400, 'm'), min_periods: Range(1, 200), markdown_buy_pct: RangeFloat(-1, 5), markup_sell_pct: RangeFloat(-1, 5), @@ -243,7 +243,7 @@ let strategies = { }, cci_srsi: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 200), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -266,7 +266,7 @@ let strategies = { }, srsi_macd: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 200), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -290,7 +290,7 @@ let strategies = { }, macd: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 200), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -310,7 +310,7 @@ let strategies = { }, neural: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 200), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -329,7 +329,7 @@ let strategies = { }, rsi: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 200), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -348,7 +348,7 @@ let strategies = { }, sar: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(2, 100), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -363,7 +363,7 @@ let strategies = { }, speed: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 100), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -378,7 +378,7 @@ let strategies = { }, trend_ema: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 100), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -394,7 +394,7 @@ let strategies = { }, trust_distrust: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 100), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -413,7 +413,7 @@ let strategies = { }, ta_macd: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 200), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -434,7 +434,7 @@ let strategies = { }, trendline: { // -- common - periodLength: RangePeriod(1, 400, 'm'), + period_length: RangePeriod(1, 400, 'm'), min_periods: Range(1, 200), markdown_buy_pct: RangeFloat(-1, 5), markup_sell_pct: RangeFloat(-1, 5), @@ -452,7 +452,7 @@ let strategies = { }, ta_ema: { // -- common - periodLength: RangePeriod(1, 120, 'm'), + period_length: RangePeriod(1, 120, 'm'), min_periods: Range(1, 100), markup_pct: RangeFloat(0, 5), order_type: RangeMakerTaker(), @@ -613,7 +613,7 @@ let simulateGeneration = () => { results.sort((a, b) => (a.fitness < b.fitness) ? 1 : ((b.fitness < a.fitness) ? -1 : 0)); - let fieldsGeneral = ['selector', 'fitness', 'vsBuyHold', 'wlRatio', 'frequency', 'strategy', 'order_type', 'endBalance', 'buyHold', 'wins', 'losses', 'periodLength', 'min_periods', 'days', 'params']; + let fieldsGeneral = ['selector', 'fitness', 'vsBuyHold', 'wlRatio', 'frequency', 'strategy', 'order_type', 'endBalance', 'buyHold', 'wins', 'losses', 'period_length', 'min_periods', 'days', 'params']; let fieldNamesGeneral = ['Selector', 'Fitness', 'VS Buy Hold (%)', 'Win/Loss Ratio', '# Trades/Day', 'Strategy', 'Order Type', 'Ending Balance ($)', 'Buy Hold ($)', '# Wins', '# Losses', 'Period', 'Min Periods', '# Days', 'Full Parameters']; let dataCSV = json2csv({ diff --git a/scripts/genetic_backtester/phenotype.js b/scripts/genetic_backtester/phenotype.js index 54ac1beac2..71cfd72592 100644 --- a/scripts/genetic_backtester/phenotype.js +++ b/scripts/genetic_backtester/phenotype.js @@ -31,9 +31,9 @@ module.exports = { var items = ['sigmoid', 'tanh', 'relu']; var index = Math.floor(Math.random() * items.length); r[k] = items[index]; - } else if (v.type === 'periodLength') { + } else if (v.type === 'period_length') { var s = Math.floor((Math.random() * (v.max - v.min + 1)) + v.min); - r[k] = s + v.periodLength; + r[k] = s + v.period_length; } } return r;