Skip to content

Commit

Permalink
msg
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 25, 2019
1 parent 81d7c30 commit b0b46d6
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 10 deletions.
Binary file added .hitbtc.js.swp
Binary file not shown.
1 change: 0 additions & 1 deletion binance.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ var sortBy = (function() {

}());
var gogo = []
var msg = "";

var result3 = []
var result4 = []
Expand Down
3 changes: 1 addition & 2 deletions hitbtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let neversellataloss = true;
let stoploss = 0.88;
let neversellatalossReductionIntervalMinutes = 3;

let msg;
let msg = 'msg<br>';

let returnPortfolio;
let benchmark;
Expand Down Expand Up @@ -153,7 +153,6 @@ var sortBy = (function() {

}());
var gogo = []
var msg = "";

var result3 = []
var result4 = []
Expand Down
66 changes: 66 additions & 0 deletions nohup.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 9 additions & 7 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<script src="https://code.highcharts.com/stock/modules/export-data.js"></script>
<div id="msg"></div>
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. <a href="https://medium.com/@jarettrsdunn/binance-hitbtc-etc-market-maker-pitch-how-to-get-rich-online-2988c1d328ac">Read More Here.</a> <br> <br> # current orders: <div id = 'numOrders'></div> Buy orders: <div id = 'buyOrders'></div> Sell orders: <div id = 'sellOrders'></div> <br> # recent trades: <div id = 'numTrades'></div><br>All balances: <div id = "balances"></div><br>Oldest trade in recent memory: <div id = 'least'></div> and btcVol in recent memory: <div id='btcVol'></div><br>Hours since oldest trade: <div id ='hours'></div><br>Est. daily vol: <div id="dailyvol"></div><br><br>Est. 1 BTC invested: <div id="1btc"></div>Est. 5 BTC invested: <div id="5btc"></div>Est. 10 BTC invested: <div id="10btc"></div>Est. 20 BTC invested: <div id="20btc"></div><br>Minutely Sharpe vs. hold BTC: <div id="sharpe"></div><br><br>sharpe and green line on chart, along with total usd eth btc are adjusted for 0.0% fees in recent memory.<br>

<div id="container0" style="height: 500px; min-width: 310px"></div>
Expand All @@ -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 = []
Expand All @@ -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('');
Expand Down Expand Up @@ -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
Expand All @@ -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%: <span style="color:red;">' + (c * 0.001) + '</span> income @ 0.1%: <span style="color:red;">' + (d / dd - d) + '</span> income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: <span style="color:green;">' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d))))))+ '</span>')
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%: <span style="color:red;">' + (c * 0.001) + '</span> income @ 0.1%: <span style="color:red;">' + (d / dd - d) + '</span> income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: <span style="color:green;">' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d)))))) + '</span>')
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%: <span style="color:red;">' + (c * 0.001) + '</span> income @ 0.1%: <span style="color:red;">' + (d / dd - d) + '</span> income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: <span style="color:green;">' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d))))))+ '</span>')
$('#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%: <span style="color:red;">' + (c * 0.001) + '</span> income @ 0.1%: <span style="color:red;">' + (d / dd - d) + '</span> income @ 0.0%: ' + ((c * 0.001) + ((d / dd - d))) + ' income @ 0.1% rebate: <span style="color:green;">' + (((c * 0.001) + (((c * 0.001) + ((d / dd - d))))))+ '</span>')
console.log(max )
for (var p in jsondata.trades2){
if (jsondata.trades2[p].isBuyer == 'buy'){
Expand Down

0 comments on commit b0b46d6

Please sign in to comment.