diff --git a/.hitbtc.js.swp b/.hitbtc.js.swp new file mode 100644 index 0000000..f0d0e71 Binary files /dev/null and b/.hitbtc.js.swp differ diff --git a/binance.js b/binance.js index f021b0a..9ebe410 100644 --- a/binance.js +++ b/binance.js @@ -151,7 +151,6 @@ var sortBy = (function() { }()); var gogo = [] -var msg = ""; var result3 = [] var result4 = [] diff --git a/hitbtc.js b/hitbtc.js index 31d86f0..a9348f7 100644 --- a/hitbtc.js +++ b/hitbtc.js @@ -20,7 +20,7 @@ let neversellataloss = true; let stoploss = 0.88; let neversellatalossReductionIntervalMinutes = 3; -let msg; +let msg = 'msg
'; let returnPortfolio; let benchmark; @@ -153,7 +153,6 @@ var sortBy = (function() { }()); var gogo = [] -var msg = ""; var result3 = [] var result4 = [] diff --git a/nohup.out b/nohup.out index e7ef269..e50c2fe 100644 --- a/nohup.out +++ b/nohup.out @@ -539482,3 +539482,69 @@ SyntaxError: Identifier 'msg' has already been declared at Function.Module.runMain (module.js:694:10) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3 +Connecting to wss://real.okex.com:10442/ws/v3 +(node:9064) [DEP0010] DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead. +(node:9064) [DEP0011] DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead. +Connected to wss://real.okex.com:10442/ws/v3 +{ ExecutionReport: [] } +total2 before: NaN +total2 after: NaN +total2 before: NaN +total2 after: NaN +total2 before: NaN +total2 after: NaN +total2 before: NaN +total2 after: NaN +total2 before: NaN +total2 after: NaN +total2 before: NaN +total2 after: NaN +total2 before: 49.507852414484866 +total2 after: 49.507852414484866 +btcvol: 0.000404501803804 +btcvol: 0.000490528693753 +btcvol: 0.000761271364149 +btcvol: 0.0007648910472182244 +btcvol: 0.0011094680973432244 +btcvol: 0.0014540451474682244 +btcvol: 0.0014576648305374487 +btcvol: 0.001461284513606673 +btcvol: 0.0014649041966758973 +btcvol: 0.0014685238797451216 +btcvol: 0.0014721435628143459 +btcvol: 0.0014757632458835702 +btcvol: 0.0014793829289527945 +btcvol: 0.0014830026120220188 +btcvol: 0.001486622295091243 +btcvol: 0.0014902419781604673 +btcvol: 0.0014938616612296916 +btcvol: 0.0014974777352771266 +btcvol: 0.0018988792951361267 +btcvol: 0.002036296045358127 +btcvol: 0.002300280854995127 +btcvol: 0.0027016824148541267 +btcvol: 0.0027159479215327297 +btcvol: 0.002744478934889936 +btcvol: 0.0027516116882292376 +btcvol: 0.0027872754549257456 +btcvol: 0.0028229036415134473 +btcvol: 0.0032285104490374474 +btcvol: 0.0036341172565614475 +btcvol: 0.0037680337269664476 +btcvol: 0.0040901571287514475 +btcvol: 0.004546914469910447 +btcvol: 0.004556541223091615 +btcvol: 0.004972362025543615 +btcvol: 0.005437460135071615 +btcvol: 0.005657368785228615 +btcvol: 0.005959230969605615 +btcvol: 0.006406349810221615 +btcvol: 0.006858392491550615 +btcvol: 0.007367813121206115 +btcvol: 0.007447229472871115 +btcvol: 0.007940158552171115 +btcvol: 0.007943343469265635 +total2 before: 49.507852414484866 +total2 after: 49.538996119525116 +total2 before: 49.46850711134749 +total2 after: 49.49965081638774 diff --git a/views/index.ejs b/views/index.ejs index dbc44bb..2d0c358 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -199,6 +199,7 @@ +
The goal of this bot isn't to profit: it's to show off that there would be profits if we eliminated the 0.1% trading fee, or effect a market maker rebate of -0.01% or up to -0.1%. Imagine this chart as you're watching it without the steep climbs after some of the green (buying) lines: those drops are fees. Imagine it with bigger falls on some of the red (selling) lines: sales without fees. Read More Here.

# current orders:
Buy orders:
Sell orders:

# recent trades:

All balances:

Oldest trade in recent memory:
and btcVol in recent memory:

Hours since oldest trade:

Est. daily vol:


Est. 1 BTC invested:
Est. 5 BTC invested:
Est. 10 BTC invested:
Est. 20 BTC invested:

Minutely Sharpe vs. hold BTC:


sharpe and green line on chart, along with total usd eth btc are adjusted for 0.0% fees in recent memory.
@@ -211,7 +212,7 @@ The goal of this bot isn't to profit: it's to show off that there would be profi var prices = []; var rois = []; - var lasks = []; + var lasks = []; $(document).ready(function() { console.log("ready!"); var total = [] @@ -226,6 +227,7 @@ The goal of this bot isn't to profit: it's to show off that there would be profi setInterval(function() { //chart = Highcharts.stockChart('container', options); $.getJSON('http://techvoices.club/update?name=2', function(jsondata) { + $('#msg').html(jsondata.msg) $('#numOrders').html(jsondata.orders); $('#numTrades').html(jsondata.trades) $('#balances').html(''); @@ -287,13 +289,13 @@ if (jsondata.trades2[p].time < max){ $('#hours').html((new Date().getTime() - max) / 1000 / 60 / 60) let hours = (new Date().getTime() - max) / 1000 / 60 / 60 -console.log(hours) +console.log(hours) let div = 24 / hours console.log('div:' + div) -console.log('btcvol: ' +jsondata.btcVol) +console.log('btcvol: ' +jsondata.btcVol) let dailyvol = div * jsondata.btcVol -console.log('dailyvol: ' + dailyvol) -$('#dailyvol').html(dailyvol) +console.log('dailyvol: ' + dailyvol) +$('#dailyvol').html(dailyvol) $('#sharpe').html(jsondata.sharpe) let a = jsondata.btc / 0.01 @@ -315,13 +317,13 @@ console.log(c) d = d * 5 console.log(c) $('#5btc').html('daily vol: ' + c + ' 30 day vol: ' + (c * 30) + ' days til 0% fees: ' + (1500 / c) + ' dd: ' + (dd) + ' exp. drawdown til 0%: ' + Math.pow(dd, 1500 / c) + ' daily fees @ 0.1%: ' + (c * 0.001) + ' income @ 0.1%: ' + (d / dd - d) + ' income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: ' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d))))))+ '') -console.log(c) +console.log(c) c = c * 2 d = d * 2 $('#10btc').html('daily vol: ' + c + ' 30 day vol: ' + (c * 30) + ' days til 0% fees: ' + (1500 / c) + ' dd: ' + (dd) + ' exp. drawdown til 0%: ' + Math.pow(dd, 1500 / c) + ' daily fees @ 0.1%: ' + (c * 0.001) + ' income @ 0.1%: ' + (d / dd - d) + ' income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: ' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d)))))) + '') c = c * 2 d = 20 - $('#20btc').html('daily vol: ' + c + ' 30 day vol: ' + (c * 30) + ' days til 0% fees: ' + (1500 / c) + ' dd: ' + (dd) + ' exp. drawdown til 0%: ' + Math.pow(dd, 1500 / c) + ' daily fees @ 0.1%: ' + (c * 0.001) + ' income @ 0.1%: ' + (d / dd - d) + ' income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: ' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d))))))+ '') + $('#20btc').html('daily vol: ' + c + ' 30 day vol: ' + (c * 30) + ' days til 0% fees: ' + (1500 / c) + ' dd: ' + (dd) + ' exp. drawdown til 0%: ' + Math.pow(dd, 1500 / c) + ' daily fees @ 0.1%: ' + (c * 0.001) + ' income @ 0.1%: ' + (d / dd - d) + ' income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: ' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d))))))+ '') console.log(max ) for (var p in jsondata.trades2){ if (jsondata.trades2[p].isBuyer == 'buy'){