Pages:
Author

Topic: [ANN] BitBot - A Crypto-Currency trading bot and Backtesting platform (FREE) (Read 14001 times)

hero member
Activity: 504
Merit: 500
I would use it if it wasn't so hard to configure!
do you have some kind of tutorial for it?
sr. member
Activity: 417
Merit: 253
I hate everyone, equally.
After I launch, i'm keep getting error:
"{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version"
Searched internet, but no success to fix that?

I solved this way:

npm install bson
cd [BOTROOT]/node_modules/mongojs/node_modules/mongodb/node_modules/bson/ext
edit index.js and replace:

     bson = require('../build/Release/bson');

with:

     bson = require('bson');

I'm backtesting and waiting to see if this bot can bring some profits, or if it's gonna waste all my funds.  Undecided
USE IT with config.tradingEnabled = false; in config.js file and backtest a lot before giving it your money, trust me.
You will probably need to fix it a bit and keep testing until you find the correct indicators and parameters.  Wink
member
Activity: 118
Merit: 100
A Programmer
From what i heard, it is possible to convert node scripts to a desktop application such as appjs.com?
perhaps a UI will better inform newbie user such as myself Smiley
newbie
Activity: 10
Merit: 0
Bot needs serious expert modification. In 4 days lost 20% of money.
newbie
Activity: 10
Merit: 0
I'm facing same problem as "#R#a#u#t#e#" faced.

I have changed decimal rounder to 3, but no success.
IMO problem is in adviser. It doesn't check minimal amount to trade. I mean if your balanced is lower then 0.01 BTC, it shouldn't run "buy".

EDIT:
I have changed this function for now...

Quote
agent.prototype.placeRealOrder = function()
{

   if(this.orderDetails.amount <= 0.01) {

      this.logger.log('Insufficient funds to place an order.');

   } else {

      this.exchangeapi.placeOrder(this.orderDetails.orderType, this.orderDetails.amount, this.orderDetails.price, true, this.processOrder);

   }

};
newbie
Activity: 10
Merit: 0
Hello 5an1ty,

Thanks for your work.


After I launch, i'm keep getting error:

"{ [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }

js-bson: Failed to load c++ bson extension, using pure JS version"

Searched internet, but no success to fix that? Or I should ignore that? Because as I can see connections are comming to mongo db. And I see some better logs:

"[10-07-2015 14:05:08] - INFO: Created a new 5 minute candlestick!
[10-07-2015 14:05:08] - INFO: {"period":1436526000,"open":285.223,"high":286.786
,"low":284.203,"close":285.733,"volume":68.36832427,"vwap":285.98941818}
[10-07-2015 14:05:08] - INFO: Advice: hold (null)"
newbie
Activity: 48
Merit: 0
I will look into it later today, but my Java experience is very limited.
I think i only changed the amount value (in file ..tradingagent.js)
will test to round both to 3 decimal, but i dont think anymore that this is the issue.
The examples from BTC-E exteed the 3 decimals and Gekko bot uses 8 decimals as well...

I also found API Example from BTCE site:
Sample request:
https://btc-e.com/api/3/trades/btc_usd

{"type":"bid","price":243.141,"amount":0.015,"tid":54711701,"timestamp":1431264485}
{"type":"ask","price":242.412,"amount":0.01002,"tid":54711707,"timestamp":1431264511}

according to this the type should be bid/ask...
while in the documentation they (BTCE) say the type is buy/sell

i think in your code it is buy sell too. Now the more i look into it the less i underestand  Huh

Is there an easy way to write the actual API request for buy sell in the logfile (the exact same thing as is send to btce api)?  
Because then the problem should be found easy i guess.




EDIT:It just successfully bought and sold
...just did rounded to 3 decimals for both price and amount in tradingagent.js
for exampel: "this.orderDetails.price = tools.round(lowestAskWithSlippage, 3);"

but i think the amount can be up to 8 decimals, its should just be the price rounded to 3 decimals.

Glad you figured it out, when I get the time I'll make the changes upstream.
member
Activity: 65
Merit: 10
plese see my edit above...
also if you look in btce-orderbook this makes sense!

Price          Ammount
243.838   0.02202309
243.86   3.01000001
...             ...
newbie
Activity: 48
Merit: 0
Currently you don't see the raw request but in the btc-e exchange file I execute:

    if(type === 'buy') {

      this.btce.trade(pair, 'buy', price, amount, this.errorHandler(this.placeOrder, args, retry, 'placeOrder', handler, finished));

    } else if (type === 'sell') {

      this.btce.trade(pair, 'sell', price, amount, this.errorHandler(this.placeOrder, args, retry, 'placeOrder', handler, finished));

    } else {

      cb(new Error('Invalid order type!'), null);

    }

and I use a third party btc-e api wrapper you can find here:

https://github.com/pskupinski/node-btc-e

In that module you can see the required parameters for the Trade method:

BTCE.prototype.trade = function(pair, type, rate, amount, callback) {
  this.makeRequest('Trade', {
    'pair': pair,
    'type': type,
    'rate': rate,
    'amount': amount
  }, callback);
};

I provide them correctly, so not sure what's wrong.
member
Activity: 65
Merit: 10
I will look into it later today, but my Java experience is very limited.
I think i only changed the amount value (in file ..tradingagent.js)
will test to round both to 3 decimal, but i dont think anymore that this is the issue.
The examples from BTC-E exteed the 3 decimals and Gekko bot uses 8 decimals as well...

I also found API Example from BTCE site:
Sample request:
https://btc-e.com/api/3/trades/btc_usd

{"type":"bid","price":243.141,"amount":0.015,"tid":54711701,"timestamp":1431264485}
{"type":"ask","price":242.412,"amount":0.01002,"tid":54711707,"timestamp":1431264511}

according to this the type should be bid/ask...
while in the documentation they (BTCE) say the type is buy/sell

i think in your code it is buy sell too. Now the more i look into it the less i underestand  Huh

Is there an easy way to write the actual API request for buy sell in the logfile (the exact same thing as is send to btce api)?  
Because then the problem should be found easy i guess.




EDIT:It just successfully bought and sold
...just did rounded to 3 decimals for both price and amount in tradingagent.js
for exampel: "this.orderDetails.price = tools.round(lowestAskWithSlippage, 3);"

but i think the amount can be up to 8 decimals, its should just be the price rounded to 3 decimals.
newbie
Activity: 48
Merit: 0
Great Work 5an1ty!
Just played around with it a little and I like it.

However the real trading for BTC-E seems not to work.
The BTC-E API always returns: ERROR: You incorrectly entered one of fields. (like in the previous post)

The Order volumes was defenitly larger than the minimum of 0.01 BTC.
I changed the max decimal places from 8 to 3 (because the BTCE API says: "decimal_places":3,") but that does not seem to help...

Also the Bot seems retrying to place the order every 15 seconds without a timelimit or a count limit. I suggest stoppting this after x failed attempts or something.


Beside this little problems i realy like how flexible this Bot is.

Im now trying to get some basic JS knowledge.  Grin

I'm trying to figure that BTC-E issue out but it doesn't really make sense. I currently don't have a BTC-E account to play with so it's hard to test.

Did you try and change the rounding before it submits the order to 3 decimals in this file in your local copy:
https://github.com/5an1ty/BitBot/blob/master/services/tradingagent.js

this.orderDetails.price
this.orderDetails.amount

apply Math.Round for 3 decimals on these 2 variables.
hero member
Activity: 1204
Merit: 531
Metaverse 👾 Cyberweapons
I heard much of Javascript/Node from a friend who's developing in them. Personally, I find JS an excellent choice for this purpose because of various reasons even if I don't know Node much. I am sure this project will be useful. Thank you!
legendary
Activity: 1596
Merit: 1010
Would be interesting if this bot supported Bittrex as well, as most "traders" will prefer BTC/Alts vs BTC/Fiat
member
Activity: 65
Merit: 10
Great Work 5an1ty!
Just played around with it a little and I like it.

However the real trading for BTC-E seems not to work.
The BTC-E API always returns: ERROR: You incorrectly entered one of fields. (like in the previous post)

The Order volumes was defenitly larger than the minimum of 0.01 BTC.
I changed the max decimal places from 8 to 3 (because the BTCE API says: "decimal_places":3,") but that does not seem to help...

Also the Bot seems retrying to place the order every 15 seconds without a timelimit or a count limit. I suggest stoppting this after x failed attempts or something.


Beside this little problems i realy like how flexible this Bot is.

Im now trying to get some basic JS knowledge.  Grin
newbie
Activity: 83
Merit: 0
Hello.

Thank you for your answer.

The exchange I am using BTC-e.

I have more than 0.01 BTC.

The SEEL purchase gives the following message:

C:\BitBot-master>node app.js
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Starting BitBot v0.9.7
[25-04-2015 21:58:55] - INFO: Real Trading Enabled = true
[25-04-2015 21:58:55] - INFO: Working Dir = C:\BitBot-master
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Launching trader module.
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:59] - INFO: Downloader started!
[25-04-2015 21:59:01] - INFO: Advice: sell (-0.02892375)
[25-04-2015 21:59:06] - INFO: Preparing to place a sell order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee:
0.2)
[25-04-2015 21:59:06] - INFO: Highest Bid: 226.704 Highest Bid With Slippage: 226.477296
[25-04-2015 21:59:08] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 21:59:08] - ERROR: You incorrectly entered one of fields.
[25-04-2015 21:59:08] - ERROR: Retrying in 15 seconds!


The BUY:

[25-04-2015 18:14:51] - INFO: Downloader started!
[25-04-2015 18:14:53] - INFO: Advice: buy (0.10834456)
[25-04-2015 18:14:57] - INFO: Preparing to place a buy order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee: 0.2)
[25-04-2015 18:14:57] - INFO: Lowest Ask: 226.5 Lowest Ask With Slippage: 226.7265
[25-04-2015 18:15:00] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 18:15:00] - ERROR: Value BTC must be greater than 0.01 BTC.
[25-04-2015 18:15:00] - ERROR: Retrying in 15 seconds!

I do not understand, something seems to me that this evil, because I think I have all the conditions for business work.

Thank you.
newbie
Activity: 48
Merit: 0
Hi,

I'm trying to use BitBot which seems very good, but I have some errors in real, but in this simulation okay.

[25-04-2015 18:14:51] - INFO: Downloader started!
[25-04-2015 18:14:53] - INFO: Advice: buy (0.10834456)
[25-04-2015 18:14:57] - INFO: Preparing to place a buy order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee: 0.2)
[25-04-2015 18:14:57] - INFO: Lowest Ask: 226.5 Lowest Ask With Slippage: 226.7265
[25-04-2015 18:15:00] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 18:15:00] - ERROR: Value BTC must be greater than 0.01 BTC.
[25-04-2015 18:15:00] - ERROR: Retrying in 15 seconds!


I thank any suggestions



What exchange are you using?
But this makes sense, it's trying to place a buy order, but you have not enough USD balance to buy a significant enough BTC amount. The exchange won't accept an order smaller than 0.01 BTC.
newbie
Activity: 83
Merit: 0
hi

SELL:

C:\BitBot-master>node app.js
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Starting BitBot v0.9.7
[25-04-2015 21:58:55] - INFO: Real Trading Enabled = true
[25-04-2015 21:58:55] - INFO: Working Dir = C:\BitBot-master
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:55] - INFO: Launching trader module.
[25-04-2015 21:58:55] - INFO: ----------------------------------------------------
[25-04-2015 21:58:59] - INFO: Downloader started!
[25-04-2015 21:59:01] - INFO: Advice: sell (-0.02892375)
[25-04-2015 21:59:06] - INFO: Preparing to place a sell order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee:
0.2)
[25-04-2015 21:59:06] - INFO: Highest Bid: 226.704 Highest Bid With Slippage: 226.477296
[25-04-2015 21:59:08] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 21:59:08] - ERROR: You incorrectly entered one of fields.
[25-04-2015 21:59:08] - ERROR: Retrying in 15 seconds!
newbie
Activity: 83
Merit: 0
Hi,

I'm trying to use BitBot which seems very good, but I have some errors in real, but in this simulation okay.

[25-04-2015 18:14:51] - INFO: Downloader started!
[25-04-2015 18:14:53] - INFO: Advice: buy (0.10834456)
[25-04-2015 18:14:57] - INFO: Preparing to place a buy order! (BTC Balance: 0.02013323 USD Balance: 0.00700479 Trading Fee: 0.2)
[25-04-2015 18:14:57] - INFO: Lowest Ask: 226.5 Lowest Ask With Slippage: 226.7265
[25-04-2015 18:15:00] - ERROR: placeOrder Exchange API returned the following error:
[25-04-2015 18:15:00] - ERROR: Value BTC must be greater than 0.01 BTC.
[25-04-2015 18:15:00] - ERROR: Retrying in 15 seconds!


I thank any suggestions

newbie
Activity: 48
Merit: 0
Hello,

The settings that are provided are just examples and shouldn't be used without knowledge of what happens when the bot uses those settings.
I don't think we can expect the bot to profit using those settings and 5 minute candlesticks because the amount of transactions would be this high that you would lose money with paying the transaction fees every time.

You need to do some research into what MACD actually does (http://en.wikipedia.org/wiki/MACD) and what candlesticks (http://en.wikipedia.org/wiki/Candlestick_chart) are in order to be able to properly configure your settings.

You need to realize that automated trading is something very complicated and that it is not a money making machine (earning money with bots isn't something that magically works).

BitBot is set up to be modular so in principle you could write your own indicator that is more likely to fit your needs.

Also simulating on a very small historical dataset might not give you a correct idea of how the selected indicator settings actually perform.
Keep on running bitbot with real trading disabled for a while to gather more historical data and then find settings that you like.

Best of luck!
5an1ty
newbie
Activity: 8
Merit: 0
Hello,

After trying to create my own very naive trade bot in python for Kraken (sell if higher, buy if lower + some % profit, you get the idea...) I decided to have a look at what was out there.

I decided to try BitBot however I am at loss as to how to tweak it, so far I only have negative profit (simulated) with 5mn candlesticks using MACD with options: {neededPeriods: 26, shortPeriods: 12, longPeriods: 26, emaPeriods: 9, buyThreshold: 0, sellThreshold: 0}...

It has been running for a couple hours like this... I don't know if there is some "learning" time required for it to become profitable...

On Kraken would it be wise to use say 30mn candlesticks anyway?

Thank you,

Franz
Pages:
Jump to: