Pages:
Author

Topic: Gekko - a javascript trading bot and backtesting platform - page 30. (Read 147876 times)

newbie
Activity: 25
Merit: 0
Great tool testing it out on my pc.

Is it possible to run nodejs on a raspberry pi? I tried installing it using https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager but the installation fails every time. Not really a linux user so have no idea what to do.

Used a fresh install of debian.

I'm running Gekko on my Raspberry v B since this weekend non stop. I'm also a Linux noob and didn't run into major problems.
The installation of node (lateste version) took a loooong time (think in terms of hours not minutes )

full member
Activity: 294
Merit: 100
Thanks for letting Gekko out for a spin and let me know how it goes!

---

When (or if) the price of BTC goes up Gekko I assume that with most configurations Gekko should start to report some profit. Note that if you would have hold 1 BTC at 130USD a couple of days ago you would now (106USD) have a 20%+ loss.


Yeah I've been watching the price... I bought into a dip at ~108 so that's not too concerned with current price.  I'm fiddling with the values more and keeping an eye on recommendations, while initially they seemed to be contrary to typical logic (buy low/sell high), it seems to have leveled out.  Looking forward to some more movement in the market price to see Gekko really in action.

Btw I didn't intend my earlier comment to sound negative, was just reporting my experience.  I very much appreciate your hard work in producing this and releasing it to the public Smiley
sr. member
Activity: 287
Merit: 250
Great tool testing it out on my pc.

Is it possible to run nodejs on a raspberry pi? I tried installing it using https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager but the installation fails every time. Not really a linux user so have no idea what to do.

Used a fresh install of debian.

I haven't tested it myself but it should work on a raspberry. What part is failing?

Maybe you can try this tutorial instead? It is specifically for a Raspberry Pi and it's fairly recent.
sr. member
Activity: 352
Merit: 250
Great tool testing it out on my pc.

Is it possible to run nodejs on a raspberry pi? I tried installing it using https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager but the installation fails every time. Not really a linux user so have no idea what to do.

Used a fresh install of debian.
sr. member
Activity: 287
Merit: 250
Well after running for 4-5 days it's been buying high and selling low, I'm not quite sure why.  10% loss so far :x

Because of the indicators used... Also this is a pretty technical bot, I would assume you have some basic Node knowledge so you can read the code? If so just have a look and you'll understand. If not it's a bit dangerous to run a bot you basically have no understanding on.

Yep Gekko is still in an early state and not many people have looked at the code yet. Node.js (the platform Gekko runs on top of) is a platform for developing server software, it is not really oriented for end users (non developers). I am very happy that people are trying out Gekko and nothing bad can really happen as long as you keep it running in simulation mode.

I think a modification to the setup document needs to made to make it clear you can run the bot in simulation mode only. I think the default will actually make it try to trade.


I agree that this should be clear and currently is not.


This part:

Code:
config.normal = {
  enabled: true,
  exchange: 'MtGox', // 'MtGox', 'BTCe' or 'Bitstamp'
  currency: 'USD',
  asset: 'BTC',
  key: '',
  secret: '',
}

As far as I can tell will actually turn on live trading. You have to set enabled: to false to ensure it does not. And put in your key and secret so it can get info from MtGox but not trade.

Then I think it switches to the advanced section looking for what exchange to follow/trade on.
Notice the same layout here. Just ensure all are set to enabled: false, and it should just run in simulation mode.


When you leave the key and secret blank it will run in simulation mode (though I will add a switch like `enableTrading` to make it more clear).

The advanced section is only active when you disable the normal section (so even though it is filled in and enabled it will only activate when the `enabled` setting in normal is false or the whole normal object is missing).


I've gone through the code briefly to get an idea of what it was doing but I haven't examined it in close detail.  I figured I'd try it out with a fairly small sum of money to begin with to see how it operates, so not much risk was involved.  The parameters I'm testing with:

Code:
interval: 60
  shortEMA: 10
  longEMA: 21
  ticks: 100
  sampleSize: 10
  sellTreshold: -0.15
  buyTreshold: 0.23

Thanks for letting Gekko out for a spin and let me know how it goes!

---

When (or if) the price of BTC goes up Gekko I assume that with most configurations Gekko should start to report some profit. Note that if you would have hold 1 BTC at 130USD a couple of days ago you would now (106USD) have a 20%+ loss.
newbie
Activity: 27
Merit: 0
Because of the indicators used... Also this is a pretty technical bot, I would assume you have some basic Node knowledge so you can read the code? If so just have a look and you'll understand. If not it's a bit dangerous to run a bot you basically have no understanding on.

I've gone through the code briefly to get an idea of what it was doing but I haven't examined it in close detail.  I figured I'd try it out with a fairly small sum of money to begin with to see how it operates, so not much risk was involved.  The parameters I'm testing with:

Code:
interval: 60
  shortEMA: 10
  longEMA: 21
  ticks: 100
  sampleSize: 10
  sellTreshold: -0.15
  buyTreshold: 0.23

Hey there. how did you go with these settings snowcrashed?
full member
Activity: 196
Merit: 100
I think a modification to the setup document needs to made to make it clear you can run the bot in simulation mode only. I think the default will actually make it try to trade.

This part:

Code:
config.normal = {
  enabled: true,
  exchange: 'MtGox', // 'MtGox', 'BTCe' or 'Bitstamp'
  currency: 'USD',
  asset: 'BTC',
  key: '',
  secret: '',
}

As far as I can tell will actually turn on live trading. You have to set enabled: to false to ensure it does not. And put in your key and secret so it can get info from MtGox but not trade.

Then I think it switches to the advanced section looking for what exchange to follow/trade on.
Notice the same layout here. Just ensure all are set to enabled: false, and it should just run in simulation mode.


full member
Activity: 294
Merit: 100
Because of the indicators used... Also this is a pretty technical bot, I would assume you have some basic Node knowledge so you can read the code? If so just have a look and you'll understand. If not it's a bit dangerous to run a bot you basically have no understanding on.

I've gone through the code briefly to get an idea of what it was doing but I haven't examined it in close detail.  I figured I'd try it out with a fairly small sum of money to begin with to see how it operates, so not much risk was involved.  The parameters I'm testing with:

Code:
interval: 60
  shortEMA: 10
  longEMA: 21
  ticks: 100
  sampleSize: 10
  sellTreshold: -0.15
  buyTreshold: 0.23
sr. member
Activity: 462
Merit: 250
Well after running for 4-5 days it's been buying high and selling low, I'm not quite sure why.  10% loss so far :x

Because of the indicators used... Also this is a pretty technical bot, I would assume you have some basic Node knowledge so you can read the code? If so just have a look and you'll understand. If not it's a bit dangerous to run a bot you basically have no understanding on.
full member
Activity: 294
Merit: 100
Well after running for 4-5 days it's been buying high and selling low, I'm not quite sure why.  10% loss so far :x
sr. member
Activity: 462
Merit: 250
I have run it now ~1 week and now updated from git; - in this week:
Code:
2013-06-07 21:08:05 (INFO): (PROFIT REPORT) profit: -4.698 USD (-2.149%)


Well the price just sank at the end of last week and over the weekend, not much any bot could have done I think. Keep in mind that a price drop is hurting everyone who is holding all their bitcoins. Most of  my Gekko instances (on Mt. Gox) suggested a buy a couple of hours ago.

1 week 2% loss on a flat market, not bad. The indicator you are using is great in a trending market not in a flat one.
sr. member
Activity: 287
Merit: 250
I have run it now ~1 week and now updated from git; - in this week:
Code:
2013-06-07 21:08:05 (INFO): (PROFIT REPORT) profit: -4.698 USD (-2.149%)


Well the price just sank at the end of last week and over the weekend, not much any bot could have done I think. Keep in mind that a price drop is hurting everyone who is holding all their bitcoins. Most of  my Gekko instances (on Mt. Gox) suggested a buy a couple of hours ago.
member
Activity: 88
Merit: 10
I have run it now ~1 week and now updated from git; - in this week:
Code:
2013-06-07 21:08:05 (INFO): (PROFIT REPORT) profit: -4.698 USD (-2.149%)

Grin Grin Grin
There is no magical program to win.
legendary
Activity: 2955
Merit: 1049
I have run it now ~1 week and now updated from git; - in this week:
Code:
2013-06-07 21:08:05 (INFO): (PROFIT REPORT) profit: -4.698 USD (-2.149%)
sr. member
Activity: 287
Merit: 250
I shifted some things in the config. It should now be a lot easier to set Gekko up for a normal use case (set an exchange and fill in the keys if you want Gekko to trade).

If you want to do some experimental stuff like watching trends at Mt. Gox BTC/USD and acting (buying / selling) on BTC-e BTC/RUR than you have to check out the advanced section.

Everything in the config is now explained in the improved documentation.
sr. member
Activity: 287
Merit: 250
Great! Do you plan to implement backtesting before TAlib? Since there are so many strategies, one could build his own, and test it on past data

I don't know the order at which I will implement the features (depends on a couple of things), but that's the main idea. Would be great if everyone could very easily backtest using all different algos with different settings. The next step would be to implement something like a neural network (or more simply multiple algo's at the same time with weight) as suggested by oper128.

At this moment Gekko's code is not really optimised for speed which is important when creating backtesting (though when using talib a lot of calculations are done by the low level library already).

---

I am changing some internals in Gekko so if someone is working on a new trading method watch the repo closely.
newbie
Activity: 46
Merit: 0
whydifficult, your gcc version may be too old or too new Smiley 4.7.2 works for me.

Edit: google says it might be a problem with node v0.10.0, I use v0.10.8 now.


Apparently it was caused by my old version of node, after updating everything works fine. I am now rewriting some things so that Gekko will internally calculate candles based on trade data so that implementing different methods (as well as Talib) will be easy as pie. I do think talib will become optional since it doesn't work on Windows.

Edit: when Talib makes it into Gekko, Gekko will support a lot of trading methods. These methods include:

  • Exponential Moving Average
  • Moving Average Convergence/Divergence
  • Double Exponential Moving Average
  • Triple Exponential Moving Average
  • Bollinger Bands
  • Relative Strength Index
  • Directional Movement Index

The full list of all 138 supported methods can be found here.

Great! Do you plan to implement backtesting before TAlib? Since there are so many strategies, one could build his own, and test it on past data
sr. member
Activity: 287
Merit: 250
whydifficult, your gcc version may be too old or too new Smiley 4.7.2 works for me.

Edit: google says it might be a problem with node v0.10.0, I use v0.10.8 now.


Apparently it was caused by my old version of node, after updating everything works fine. I am now rewriting some things so that Gekko will internally calculate candles based on trade data so that implementing different methods (as well as Talib) will be easy as pie. I do think talib will become optional since it doesn't work on Windows.

Edit: when Talib makes it into Gekko, Gekko will support a lot of trading methods. These methods include:

  • Exponential Moving Average
  • Moving Average Convergence/Divergence
  • Double Exponential Moving Average
  • Triple Exponential Moving Average
  • Bollinger Bands
  • Relative Strength Index
  • Directional Movement Index

The full list of all 138 supported methods can be found here.
newbie
Activity: 28
Merit: 0
whydifficult, your gcc version may be too old or too new Smiley 4.7.2 works for me.

Edit: google says it might be a problem with node v0.10.0, I use v0.10.8 now.
sr. member
Activity: 287
Merit: 250
Good Job! Also don't forget my remark on candlesticks, it would be good practice to save the open, high, low, close per interval instead of only the close you have now.

Will do, if something like talib (read below) will not become the standard I think I will abstract out a candle calculator based on current data fetcher so that trading methods can just request candle data from exchanges, that way I can do stuff like that way more easily.

Works stable, but log format changes too frequently ;-) BTW I've made some visualisations from log data for easier analysis. Currently after 1 day 6 hours time and 4 transactions I have -0.28% profit (-1.34 to 3.68 during that time) with market being ~ +1%. Not so bad ;-)

Awesome! I'm curious about the visualisations.

Installed flawlessly on my debian wheezy box with latest node. Let me know if I could help somehow.

I still haven't had the time to look into it, but this is what I'm getting on my mac:

Code:
building talib functions...
  CXX(target) Release/obj.target/talib/src/talib.o
../src/talib.cpp:694:9: error: no matching function for call to 'uv_queue_work'
        uv_queue_work(uv_default_loop(), req, ExecuteWork, ExecuteWorkDone);
        ^~~~~~~~~~~~~
/Users/mike/.node-gyp/0.9.3/deps/uv/include/uv.h:1355:15: note: candidate function not viable:
      no known conversion from 'void (uv_work_t *, int)' to 'uv_after_work_cb'
      (aka 'void (*)(uv_work_t *)') for 4th argument;
UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,

(and I think I got the same on my ubuntu system, not 100% sure)

Simple voting should do the job for now. With neural networks (what amazes me there's again a ready to use node library https://npmjs.org/package/brain) you'll have to teach it with history as input (price and all methods) and deserved output (buy/sell) - this part may be the hardest job to do.

Woow that looks awesome, when I have the time I definitely will look into it!

+1 for backtesting and MACD, but use mysql or postgres as database engine if possible.

I prefer to keep Gekko as cross platform as possible and without a big dependency tree. Someone recommended levelDB as it's a lightweight datastore for node (without external dependencies). But I will have to make a list of what data I want to keep stored, etc before I'll choose a database.
Pages:
Jump to: