Bitcoin Forum
May 29, 2024, 06:38:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 »
241  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: May 26, 2013, 11:09:49 PM
Hi, I left this running in demo mode over the weekend while I was away from the computer and returned to find this message "(PROBLEM) 2013-05-27 09:06:06 Server responded with an error or no data, sleeping" repeating four times in sequence, once a minute. I waited for the next trade to take place and found that the last price seemed to be up to date. I restarted it and it reconnected immediately. This has not recurred so far (about 1.5 hours runtime).
Is it able to reconnect if the connection is lost? Should it have in this instance?

Thanks for trying it out!

Well there was a bug in Gekko since around friday: Because of wrong error handling every try to buy/sell would result in Gekko trying to refetch trade data with the error message above (instead of buying/selling again). This is fixed now so you should download the latest version.

Also check that the default currency in your Mt. Gox account is USD. Gekko will support all currencies supported by Mt. Gox in the near future. But for now you have to set the default currency to USD or disable real trading.

----

I am currently adding a portfolio manager that will take care of a lot of trade things that are really messy now:

  • Proper buy and sell order on BTC-e and Bitstamp by first checking the lowest ask / highest bid. And checking afterwards wether the order went through and if not retry.
  • Better error handling, verifying real trade settings
  • Better profit tracking based on your real portfolio instead of virtual balance

Community Request

It is not fully working yet but with this portfolio manager I am proposing a universal way at which different exchanges could be implemented the same way through different (javascript) projects. I am talking about the `portfolio managers expectations` and the `trading method expectations` as described in docs/Exchanges.md. I think standards like this would really speed up the development of different projects. If anybody has any ideas of things that need to be different / added to the document please let me know (or submit a pull request if you are a developer).
242  Economy / Trading Discussion / Re: Chrome Browser extension: MtGox trading bot on: May 24, 2013, 12:43:06 AM
So I put in the API and the secret, set up the numbers.  If I just wait, it'll automatically set up a trade when the market reaches the specified conditions?  Noob question I know, but I just want to make sure I understand how this thing works.

On the options panel / page there are settings for the thresholds. When you click the add-on button in Chrome you should see a table, the last column are the thresholds. Whenever the threshold of the most recent tick (so the top right box) is below the sell threshold the bot will sell all your BTC, when its above the buy threshold it will buy BTC.

^ that is the basic story, minor variances depend on which version you got, how many thresholds need to pass (in config), etc.
243  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: May 24, 2013, 12:31:00 AM
Update

  • The profit calculating options are now configurable.
  • Gekko now supports Bitstamp (alpha stage).

This means that Gekko now supports the three biggest exchanges. The auto buying and selling should be considered alpha (but is more stable than the BTC-e counterpart I think).

Whoa this thing is amazing. I've got it running on my VPS using forever and I tweaked the email a bit so it's short enough to be forwarded to my phone.

One thing I've noticed is that when it does to buy at BTCe, it will say "now buying" but nothing actually happens. Not sure if the same thing happens on Gox, because I hate it.

Thanks a lot for this, you inspired me to make something similar to this using Java for altcoins, but I'm doing something wrong with the EMAs.

Thanks!

Gekko is really early stage at the moment and one of the biggest issues at the moment are automatic placing orders on exchanges that don't support MKT orders through their API. Gekko also isn't keeping track of the orders, it's basically fire and forget (really unacceptable for a trade bot). Gekko doesn't have this problem at Mt. Gox because it will place a MKT order and Mt. Gox will figure out what the market price is and make sure the order gets filled.

So the biggest todo will be to improve this and make sure that when Gekko detects a trend it will make sure all it's orders are filled at all supported exchanges.

I'm really curious on you are going to solve some of the problems I'm running into (like altcoins data for example, see couple of post above). My goal for Gekko, besides learning, is to improve the quality of the open source trade bots out there Smiley.
244  Local / Meetings (Nederlands) / Re: Bitcoin Meetup Amsterdam? on: May 23, 2013, 12:05:14 AM
I'm going to try to be there, can't promise anything.
245  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: May 22, 2013, 11:02:40 PM
Thank you!

Regarding altcoin hystorical data, what about storing locally for few hours the BTC-E ticker and only then enable trading?
https://btc-e.com/api/2/ltc_usd/ticker

It's not very elegant but it should be effective. Another dirty hack could be the scraping of cryptcoincharts

http://www.cryptocoincharts.info/period-charts.php?period=2-days&resolution=hour&pair=ltc-usd&market=btc-e

Inside the page source:



Thanks for the research! I don't think it's a good idea to put a scraper in Gekko: It's not really nice towards the website and if they change a tiny thing in the HTML everyone has got a non working trade bot until I fix Gekko and everyone updates (manually).

The good news is that `ltc.block-explorer.com` pulls the data from an API (as you've shown). However I can't find any documentation on the API, so I don't think it's wise to use this private API for the same reasons. I think I will email the guys behind the site to ask.

In the meantime I'm testing it on BTC-E with BTC/USD.

I'm quite bullish with BTC, could you add an option to calculate profits in BTC instead of USD?  Grin


Cool, thanks for testing! Let me know if Gekko runs in to any trouble. I've also got Gekko running on BTC-e since the last update (almost 24h) and it just passed a threshold:



(and the math seems to add up)

Quote
(ADVICE) 2013-05-22 21:36:51 HOLD @ 117.100 (0.191)
(PROFIT REPORT) 2013-05-22 21:36:51 -0.176% profit (in 1 trades)
(ADVICE) 2013-05-22 21:56:53 HOLD @ 117.500 (0.235)
(PROFIT REPORT) 2013-05-22 21:56:53 0.165% profit (in 1 trades)
(ADVICE) 2013-05-22 22:16:52 HOLD @ 117.088 (0.231)
(PROFIT REPORT) 2013-05-22 22:16:52 -0.187% profit (in 1 trades)
(ADVICE) 2013-05-22 22:36:52 BUY @ 117.515 (0.258)
(PROFIT REPORT) 2013-05-22 22:36:52 0.177% profit (in 2 trades)
2013-05-22 22:36:52 NOW going to BUY @ BTC-E
2013-05-22 22:36:54 Send advice via email.

As for the feature: Simple request and I hope I'm able to do it tonight, else tomorrow Smiley
246  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: May 22, 2013, 10:12:25 AM
Big update!

I've implemented some new features yesterday, the bot has been running overnight but it still needs a lot of more testing to determine how stable it is.

Gekko is now able to watch trends at BTC-e

It appears that it is not possible to get historical data from BTC-e, so when you set it to watch btc-e Gekko will use data from bitcoincharts instead. You can set Gekko to watch and trade at these different currencies at the moment: USD, EUR and RUR.

Gekko cannot handle altcoins at the moment because I can't find any datasource (API) for them.

Gekko can now automatically mail you on new advice

This currently only works for Gmail and Google apps accounts. To enable this you need to set your email in address, you also have to provide your email password because Gekko will use your email address to send mails to yourself.

Make sure you've looked at the code before you provide your email address and password. Under the hood Gekko uses the emailjs module to send the email. Gekko is in NO way able to read your email or whatever and your email address and password are only sent to the gmail servers (over SSL).

(I don't like this solution very much, but I'm also not comfortable with shipping an API key for a service like Sendgrid. If anybody has a better idea that works cross platform, please let me know)

You can set the new features in Gekko's config.

Helping with Gekko

To stabilise Gekko and remove all bugs we need a lot of testing. If you are interested in Gekko you could set it up in your system and let it run (without auto trading disabled for example), this would speed up the process by a lot!

Well usually big lag(or dos) at Mt.Gox means panic on all exchanges and the moment I see price drop and hi lag I sell(at BTC-e). Than I wait. Usually you see a big drop but then you will see also a bounce. If you are good enough to buy just before the bounce you are golden... So maybe lag can be a trigger to look for price drop and then you start looking for a bounce not just looking for lag getting smaller on Mt.Gox. This is what I saw happening... I know it is idiotic but that is what it is happening... My guess it that that way the price is manipulated. If you attack the biggest you need less money to change the price.

EDIT: I also looking for buy walls to figure out where the bounce will happen... You just must figure out which will hold.

The way Gekko is setup is that it implements trading methods. Right now it only knows about EMA. With the rules you are describing the best way to go would be to create a new trading method. Before we can go at this we do need all the rules clearly defined. I would have to give this idea some thought.

Hi,

I love Node.JS, and I will definitely give Gekko a try.
I'm mostly trading on Bitstamp, so a priority request for me would be bitstamp support.

I could easily write my own bot giving advice on current price trend, but what I would be struggling with is automated trading, I'm wondering how you would implement a situation like this (taking into account the capabilities of the bitstamp API):

https://www.bitstamp.net/api/

Every new interval depending on the interval size, my bot would look at the previous interval close and determine a buy, sell, hold signal. If my bot discovers a buy signal, I would want to buy at the close of the previous interval:

So I use the bitstamp API and fill in a BUY LIMIT ORDER at the price of the previous close (BITSTAMP doesn't support BUY MKT).

Now either, my order gets filled for the quantity I want, or there isn't enough available at that moment.

How would you deal with that? Only buy the quantity that is available at that price by first looking at the order book? Or buy more at a higher price? What would your threshold be?

PS:
I read you have no real trading experience and you are using the bot currently live, note that EMA is an extremely simple indicator and is most likely to not turn up a lot of profit.

Regards,

Thanks! Note that Gekko is at this moment in no way an advanced trading bot. I also would like bitstamp in there, but because of the problem you are describing and the fact that there is no NPM module for bitstamp at this moment (I would have to create my own, not hard at all but it takes some time).

I'm still figuring out a decent way to solve the problem you are describing (BTC-e has the same problem). I was thinking of determining the price based on the last trades and the way the trend is heading at what speed. But that would be pretty dangerous as Gekko is not only speculating what is going to happen but also at what price it should buy.

I think there will be a threshold that determines (when buying for example) a higher price (more sure to get filled but less profitable). I don't think there is historical data about the order book which makes backtesting not really possible (have to look into this per exchange). I also think Gekko should monitor the orders, if they don't get filled after x minutes it will re try at a different price. (It isn't even doing that right now).

I'm open to suggestions!

About the algo: EMAs popularity is caused by Goomboo. But Gekko is currently setup so that new trading methods could get implemented rather easily: Describe your trading method in Gekko's methods, receive a object which fetches trade data and emit an advice event when you want to buy or sell.

I'm open to suggestions, what method would you like to see in Gekko?
247  Economy / Trading Discussion / Re: Gekko - a javascript trading bot for nodejs on: May 21, 2013, 12:14:57 PM
Would be cool if it could email me when a trend occurs, don't know if this is possible or not?

Been running it for a day now and nothing has been happening, just been holding, I guess its because the market is pretty stable at the moment  Undecided

Good idea, also would be really easy to implement. Added it to my list.

So maybe bitstamp?

Yep, it's on the list of exchanges I need to add!

Hi, I'm getting this error upon install:

Code:
...

Any idea?
Thanks

It is saying that `mtgox-apiv2` (a dependency of Gekko) needs a more recent version of nodejs. It needs a version above 0.10 and you have 0.6.19 installed.

Quick tip: you can install something like nvm to easiliy manage and install new versions of nodejs.

Just a idea. Detect mtgox lag and sell when it is hi enough and buy when it is low enough + some time as a additional strategy. Of course not on a mtgox but on some other exchange...

So you mean when the lag at Mt. Gox is really high trade at other exchanges beacause Mt. Gox is lagging? Because what information can we get from knowing that the lag is really big? Also all the times Mt. Gox is not under stress the the lag is low.
248  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 20, 2013, 10:44:21 PM
I'd be more interested in this if it could track the price on the same exchange as the one being traded on.  Personal choice is to not have anything to do with MtGox, so anything that can work strictly with CampBX, or BTC-e, would be best.

Every day I'm getting the feeling more and more people feel the same way. Gekko currently does not support this but will in the future, stay tuned!
249  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 20, 2013, 10:38:55 PM
No. Think of it like sqlite, there is no 3rd party dependency other than the Node.js library. LevelDB is database created by Google by the way. Levelup is the Node.js implementation.

-JP

Sorry misread your first message, levelDB looks way better then trying to implement flatfile really bad myself. Storing trade history is on my todo list and I think I will use levelDB for it. Thanks for the tip!

Thank you for your bot. Do you think to add other altcoin trading?
I think it would be great to have LTC/USD with BTC-E.

Thanks!

Currently Gekko is basing all his advice on what is happening at Mt. Gox (even when you have automatic trading set at BTC-e, because for BTC every exchange will follow the trends happening at Mt. Gox). I'm planning a new feature where you can configure on what exchange (and what currency) to watch for trends Smiley

Note that other features (mostly backtesting) are higher on my todo list at the moment.

askmike is the man! Keep up the good work dude!

Haha thanks man!
250  Economy / Trading Discussion / Re: Chrome Browser extension: MtGox trading bot on: May 20, 2013, 12:27:24 PM
Right, but do you agree with the idea of considering not only the current value of ema-diff, but its trend, too?

Interesting idea, but all EMA bots at the moment are based on the Goomboo's Journal. Goomboo, as a trader, suggested that the more simple rules such a trading system has, the more profit it will generate in the long run.

I'm currently working on implementing a backtesting feature for Gekko, when this is done it's pretty easy to test such a system against a lot of data (say the last 12 months). That way it will be a lot easier to say wether such a system will have more success. (Note that are a lot of trading tools already available that support backtesting).
251  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 20, 2013, 12:07:58 AM
Strong order - you make order to sell/buy which point price of deal
market price - you make order to sell/buy and stock execute it on current market price ( as made in TobbeLino's bot)

The names can be wrong, but the description correct imho.  

Ow that I understand Smiley

BTC-e doesn't let me do a 'market price', I have to state at which price I want to place an order. When you have enabled auto trading and Gekko identifies a trend a couple of things will happen:

  • If you configured Mt. Gox -> buy/sell at 'market price'
  • If you configured BTC-e -> look at all the BTC-e trades in the last 20 seconds and calculate average price, now buy sell with this price.

This is just a workaround to first grab the latest price and use that. Do you suggest a special strategy for 'strong orders'? Because right now Gekko will never do a strong order on Mt. Gox because it can do a market price. I can make it configurable so that Mt. Gox will also have a 'strong order' option, but what price should Gekko use or how should it calculate a price?
252  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 19, 2013, 10:16:23 PM
Gekko is being actively developed at the moment Smiley

Gekko now reports the profit it generates or would have generated (wether you have real trading enabled or not)! Gekko always simulates trading based on the EMA advice and reports about it every interval.

Quote from: Gekko
(ADVICE) 2013-05-19 22:05:53 HOLD @ 121.680 (-0.207)
(PROFIT REPORT) 2013-05-19 22:05:53 0.000 % profit (in 0 trades)

Read more in the profit reporting section in the readme. All configuration has also moved to a handy single config file.

Note that it is possible to make profit / lose money without doing any trades, due BTC changing in price

Sorry my bad english.
I mean this:
mtGOX API allow two trading strategies (market price / strong order )
BTCe - only strong order

This two strategies have different trading algorithms.
as first one method is realized and second have to be - maybe for GOX it should be switchable, as giving different trading results?

More - I was unable to find a document which describes stock strategy on strong orders. If I make order to sell at $1 and stock have order to bye on $1.1, which order will be executed if any will?  It's most interesting point.

Also I offer all settings should be stored as the options of stock and trading method. Other, we (users) will spend all the experiments time for change settings and try .

I don't quite understand it yet, because I can't find what you mean by strong order / market price strategy (I know very little about trading, I learned last week what a order book is for example). If you can point me to some links I will research it and try to put it into Gekko Smiley

Upcoming features

  • Backtesting different EMA settings
  • More exchanges
253  Local / Meetings (Nederlands) / Re: Bitcoin Meetup Amsterdam? on: May 19, 2013, 04:51:22 PM
I may be interested if it's in Amsterdam. But monday is not a possibility for me, just like any other city than Amsterdam.
254  Economy / Trading Discussion / Re: Chrome Browser extension: MtGox trading bot on: May 19, 2013, 01:08:25 PM
(each new calculated EMA-value takes the previous samples into account, so I think it needs a history of values longer than the actual "EMA-length" to be accurate)

Almost: EMA means that when calculating a new EMA it will take three factors into account: the current price, the last calculated EMA value and a weight factor*. This does mean that for the first EMA you want to use to be accurate it needs to have build up a history of EMAs to compare the current price with.

*The weight factor is just how important the current price is VS how important the last EMA is. So therefor a higher weight like 21 (a EMA21 means the weight is 21) means the last EMA is more important and it will move slower towards the price (lag behind a trend).

So EMA trade bots calculate two different EMAs and compare them to determine if a shortEMA is moving away from the longEMA (using the threshold) and thus know when the market is in trend.

Yes, be careful with very short intervals...
I advice everyone that uses this bot to check out Goomboo thread that describes the strategy that this bot uses: https://bitcointalk.org/index.php?topic=60501.

I quote from his second post in that thread:
"I caution against the lower timeframes because for the most part, they are just noise.  The spread is so large and the market is so thinly traded that if you are trying to make money on a chart of less than an hour, it can be very difficult."

100% agreed, but I would add that Goomboo said that in January 2012, a time when the market was a lot smaller and different.
255  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 19, 2013, 11:34:56 AM
Command line tool is not a good idea where you deal with empiric analysis (DEMA) with empiric coefficients. I, personally, love to understand what my money going to do  Wink

Sockets not for real time ( json 2 times faster) - this for persistent connection. Not for bot - just for Gox, which have connection problems.  

As for trading methods, I meant this:
1. buy/sell on a current float price ( btc-e didn't support this method, but it's simple and promised)
2. set order with hard price + not executed order should be canceled when(?)... you know. Chrome extension by TobbeLino didn't support this.

Thanks for your work! Hope your bot will be the best.

Good point, Gekko is going to need some sort of interface. Right now I'm thinking of creating a bookmarklet which you can run on clarkmoody that will connect to a local running Gekko and plot the advice (or the buys/sells) on the hourly graph. This would take the least amount of work and you can just use the clarkmoody graphs which are pretty good IMO.

So this would mean: user goes to clarkmoody, click a bookmark and see Gekko's advice / actions as shapes drawn on the graph.

I'm sorry but I still don't completely understand your suggestion for trade methods (not a lot of trade experience here):

1. Do you mean buy/sell on current market price on BTC-e? Because btc-e doesn't let you do an order at market price. This is how Gekko implements it right now when you configure buying/selling on btc-e:

  • Watch trends on Mt. Gox, when new trend (up/down):
  • Fetch the latest trades from btc-e (since prices are different from Mt. Gox), calculate btc-e price based on all trades in the last 20 seconds.
  • Buy/sell using this calculated price.

2. Yep this needs to added to Gekko.

Thanks for the tips Smiley


Edit For everyone who wants to help out testing Gekko but having some installation problems: I've made a tutorial on how to install and run Gekko on windows.

Installing Gekko on Windows
256  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 18, 2013, 10:07:04 PM
Gekko Update:

Gekko now also supports automatic trading via BTC-e in addition to Mt. Gox! I've also updated the readme, to clarify how to run Gekko.

edit: I've just added BTC-e and I am my Gekko is using it, but it's alpha stage to say the least.

I will add more exchanges when I have some spare time.

I agree on your thoughts about the unnecessary dependency upon Redis. If a high performance key/value store, you can use LevelDB. It's an inprocess database (no 3rd party dep)... Here is the best Node.js module that uses LevelDB: https://github.com/rvagg/node-levelup Also, there are a lot of 3rd party modules that integrate with levelup that do a lot of cool things.

Keep up the good work!

Thanks for the link. I haven't heard that much about leveldb before but will look into it, sounds pretty cool. But isn't leveldb the same kind of dependency? Right now Gekko is running fine on my laptop (OSX), my pc (Windows 7) and my server (Ubuntu). It appears) that installing leveldb for windows, for example, requires building from source using Microsoft Visual Studio (not something everyone wanting to spin Gekko for a testrun is waiting for I think).

How hard would it be to convert just the trading strategy to Java? You could use

https://github.com/ReAzem/cryptocoin-tradelib

then, and I could give you some code for a tradebot core, like I use it:

https://i.imgur.com/OoP0aNo.jpg

Maybe we could collaborate somehow?

Awesome library! If I'm understanding it correctly the libary provides easy access to a lot of exchanges right? That's definitly something Gekko needs right now.

The biggest problem for me is that I have no experience in Java, so it's pretty hard for me to read the library. Gekko is just a small project at the moment, it's just a few hundred lines of code right now. Is it possible to connect to your framework using a communication layer?

I guess the easiest to get this method (which is described in more detail by Goomboo) into your library is to just port it to Java. If you don't have a lot of experience in javascript (or nodejs), you have the advantage to look at two additional projects who implement the same trading method:


I've also just looked at how to get Gekko to talk to all exchanges using nodejs, and a lot of people have written modules for exchanges already:


It should be pretty much just plugging them into Gekko, because all connect logic is already written.
257  Economy / Service Discussion / Re: BTC-E Nonce Generation on: May 18, 2013, 09:34:55 PM
but the 8905540614 is the nonce I send. It's kinda weird, because it is 10 digits and it's ever-increasing (I reset the keys), so something else might still be causing it.

This page states that the nonce is capped at 4294967294.
258  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 18, 2013, 05:16:45 PM
Look to the:
redis ( bot have remember historical data)
reliable graphic interface ( say kind of http://bitcoincharts.com)
socket.io ( for reliable connection)
strong sell/buy algorithm, as it's different in gox/btc-e/etc. APIs.

have fun !  Wink

Thanks for your feedback Smiley

Great idea about storing historical data. Redis is great but it would mean a pretty big extra dependency for everyone who is not a developer and just wants to try/run gekko. Maybe if the difference in performance is not that big I could just go for flat file?

At the moment Gekko is just a simple command line tool (no frontend / GUI). Because it uses slow EMA, websockets to Mt. Gox would be overkill I think right? Eg. If it only needs a couple of trades every 60 minutes, not depending on anywhere near realtime.

I indeed want to abstract out all logic around buying and selling at the different exchanges so I can just plug in a new exchange. Right now the trading methods (there is only one yet Wink) are abstracted out so that the trading method can only advice and Gekko (who listens to the advice) holds the keys to the Mt. Gox API.
259  Economy / Trading Discussion / Re: Gekko: a javascript trading bot for nodejs on: May 18, 2013, 01:41:29 PM
1) being able to trade on bitstamp as well
and btc-e, Vircurex etc. with different currencies  Wink

Thanks for the feedback. I will start working on getting Gekko on different exchanges.

I am thinking on calculating the EMAs based on trades done at Mt. Gox (with a fallback when Mt. Gox is down or something), but buying and selling on a configurable exchange (bitstamp, btc-e, Vircurex, campbx, etc). Because I think that at the the moment Mt. Gox sets the trading trend and all other exchanges follow it with a delay.
260  Economy / Trading Discussion / Re: Chrome Browser extension: MtGox trading bot on: May 18, 2013, 12:20:08 PM
For those interested I've just released my own tradebot Gekko. It is also written in javascript but it runs on nodejs and not in the browser. I'm hoping we can take javascript based trade bots to the next level!

Gekko currently does EMA and I'm planning to add more methods in the future.

Gekko's thread
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 [13] 14 15 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!