Author

Topic: Simple script for btc-e almost completed (Read 1066 times)

sr. member
Activity: 410
Merit: 257
February 19, 2017, 04:56:39 PM
#5
If you combine it with something like apache cordova (for UI) you'd have a nice smartphone app.
sr. member
Activity: 364
Merit: 250
February 19, 2017, 04:41:42 AM
#4
Simple script for btc-e almost completed people dont just go about downloading script without any purpose, you need to tell us what this script is designed to do on btc-e platform, is a trading bot, a script to protect account from hacking, a script to alert on profitable trade setup etc
legendary
Activity: 1750
Merit: 1115
Providing AI/ChatGpt Services - PM!
February 18, 2017, 06:18:20 AM
#3
Take a look is very simple might be useful to someone

http://pastebin.com/shXZFPBV

You recently started programming ? What does the script do ? Though I don't know how  client side script would make a difference I'd like to point out a few "avoid-doing-that" in your script.

Code:
var balance_btc = 0.4345, balance_usd = 0;
var min_diff = 1;
var last_bid_price = parseFloat($('#max_price').html());
var last_ask_price = null;
var is_selling = false;
Globals! Avoid them!
Do you use ECMA Script 6 ? Don't assign fixed values to "var",use constant instead.Also "use strict".
Code:
sell(last_bid_price,balance_btc);

Use Jquery to call your global or wrap them with the ending "();" braces to make them IIEF (Immediately Involked Self Executing Functions)
newbie
Activity: 52
Merit: 0
February 18, 2017, 05:03:21 AM
#2
You probably want to move it to source control system like github. It will track you changes and other people can fork it.
full member
Activity: 241
Merit: 102
February 17, 2017, 09:53:55 PM
#1
Take a look is very simple might be useful to someone

http://pastebin.com/shXZFPBV
Jump to: