Pages:
Author

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

sr. member
Activity: 369
Merit: 250
/// (( ... snip ... )) ///
Speaking of which...

I found one with support for the cryptsy exchange, and I pulled in the code to enable cryptsy support
(I have not tested it yet though, so it's nothing I'm promising if/when it will actually work)

Yesterday's prerelease / 2014 July 2nd (initial cryptsy support)

/// (( ... snip ... )) ///


Did you merge the crypsty code into your cex.io fork of gekko or are you keeping them separate?

Yes. The cryptsy code is in my cex.io fork, and you can download it from that link.

Note: sorry about this bad news, but the cryptsy support will probably not be very useful on my fork currently while I'm still fixing the bugs with cex.io reinvest support -- keep in mind that while my fork is still set up for testing on cex.io it has to have the logic for "sell" completely disabled, so you'd only ever see "buy" signals until "sell" is re-enabled.

I don't have a timeframe yet for when I'll be re-enabling the sell logic. Most of the trading methods are still based on old code which is largely untested with my fork, and might still be incompatible or cause issues.



... But you might just want to directly use this one though since it doesn't have "sell" orders disabled:

https://github.com/dowjames/gekko

Sorry, I can't really debug that one since it's too different than my own fork.

Good luck.
sr. member
Activity: 252
Merit: 250
So far the bot only buys GHS when I deposit BTC or get BTC from mining. It never sells GHS to buy them later at a cheaper price. Is this normal?
It's not meant to sell them. Use the normal gekko if you want that.




Is the normal gekko working? I thought it is no longer maintained

There are some other people maintaining a fork of gekko which still works, but I haven't found any which support all exchanges, as I believe most of the forks which are in a [semi-]working state appear to only support and test on 1-2 exchanges.

Speaking of which...

I found one with support for the cryptsy exchange, and I pulled in the code to enable cryptsy support
(I have not tested it yet though, so it's nothing I'm promising if/when it will actually work)

Yesterday's prerelease / 2014 July 2nd (initial cryptsy support)

^ The new cryptsy support is based on this fork:
https://github.com/dowjames/gekko
Did you merge the crypsty code into your cex.io fork of gekko or are you keeping them separate?

sr. member
Activity: 369
Merit: 250
So far the bot only buys GHS when I deposit BTC or get BTC from mining. It never sells GHS to buy them later at a cheaper price. Is this normal?
It's not meant to sell them. Use the normal gekko if you want that.




Is the normal gekko working? I thought it is no longer maintained

There are some other people maintaining a fork of gekko which still works, but I haven't found any which support all exchanges, as I believe most of the forks which are in a [semi-]working state appear to only support and test on 1-2 exchanges.

Speaking of which...

I found one with support for the cryptsy exchange, and I pulled in the code to enable cryptsy support
(I have not tested it yet though, so it's nothing I'm promising if/when it will actually work)

Yesterday's prerelease / 2014 July 2nd (initial cryptsy support)

^ The new cryptsy support is based on this fork:
https://github.com/dowjames/gekko
legendary
Activity: 1708
Merit: 1000
Reality is stranger than fiction
So far the bot only buys GHS when I deposit BTC or get BTC from mining. It never sells GHS to buy them later at a cheaper price. Is this normal?
It's not meant to sell them. Use the normal gekko if you want that.




Is the normal gekko working? I thought it is no longer maintained
sr. member
Activity: 252
Merit: 250
So far the bot only buys GHS when I deposit BTC or get BTC from mining. It never sells GHS to buy them later at a cheaper price. Is this normal?
It's not meant to sell them. Use the normal gekko if you want that.

legendary
Activity: 1708
Merit: 1000
Reality is stranger than fiction
So far the bot only buys GHS when I deposit BTC or get BTC from mining. It never sells GHS to buy them later at a cheaper price. Is this normal?
sr. member
Activity: 369
Merit: 250
How did the bots go with the large GHS price crash earlier today?

There were several ups and downs with the price, and the zerolag MACD method I was using (with 43-83-7 EMA weights) did a good job for me, and worked almost exactly as I had expected (typically bought at better prices than the manually reinvested buy orders I usually do with my namecoin balance).

Every time the price was in a decline, the zerolag MACD method (43-83-7 weights) would delay the reinvestment "buy" action until the downward price trend started to reverse. Or worded another way, every time it seemed like the price was "as low as it is going to get" the bot reinvested whatever newly mined BTC was available in my portfolio.

Here are my logs (a raw log, and an "cooked" log) for the randomly selected (short/long/signal) 43-83-7 zerolag EMA weights:

RAW) https://gist.github.com/kuzetsa/10883a7bb7c6aaec27f1

COOKED) https://gist.github.com/kuzetsa/bc038a4072fbc653770a



After 2014-07-01 19:05:16 (local NY time) I decided to change my EMA weights.

The data wouldn't have been consistent, so I backed up the log, manually labeling it 43-83-7.RAW.log after I ran my "data cooker" script on it:

https://gist.github.com/kuzetsa/56e951ce821d0e69d96e

I'll be doing much testing to find the EMA weights which work best for my own needs. As should anyone who uses TA indicators to make [re]investment or trading decisions and/or automate them. There is no "one size fits all" trading strategy or method, and that's why the bot will continue to have the ability to do things I don't personally consider to be useful, or wish to use as a basis for automated actions using my API key(s), etc. etc. etc. Smiley
sr. member
Activity: 252
Merit: 250
How did the bots go with the large GHS price crash earlier today?

legendary
Activity: 1708
Merit: 1000
Reality is stranger than fiction
Also, the fee rounding code has passed all the testing during the past several days, so the current "latest" release has been bumped to the one where the cex.io fees are actually at the correct 0.2%

https://github.com/kuzetsa/gekko/releases/latest

Great! I'm gonna install this version then.


I decided that at some point in a future, upcoming release... and only once I finish auditing the relevant code (part of why I'm working on the new "zerolag" method is that it gives me a chance to debug a method I made myself without breaking older code) I'll be re-adding the option for sell orders.

Woohoo!  Smiley Smiley Smiley Smiley Smiley
sr. member
Activity: 369
Merit: 250
Testing a new market data (candle) processing engine inspired by "Heikin-Ashi candles"

http://www.investopedia.com/articles/technical/04/092204.asp

So far, I've only incorporated this feature into 3 new experimental MACD-based indicators:

nikiehihsa is Heikin-Ashi spelled backwards(ish ... close enough)

  • nikiehihsa -- MACD based on regular EMAs, but with Heikin-Ashi xClose instead of simple Close price
  • x3nikiehihsa -- same as above MACD, except using TEMA moving averages
  • ZERO -- Heikin-Ashi with zero-lag EMAs (DEMA for long, TEMA for short), and vanilla 1x EMA signal line...
    Additionally, the ZERO method has a few tweaks to more intelligently use more features from the MACD:
    Mostly I just mean it also uses the difference between the EMAs instead of just the momentum oscillator.
    (there is also some other simple logic changes in this method to reduce false "buy signals")

The new ZERO method (as well as the other Heikin-Ashi-based MACD methods) are in the new "prerelease" / beta named "zerolag:

https://github.com/kuzetsa/gekko/releases

Also, the fee rounding code has passed all the testing during the past several days, so the current "latest" release has been bumped to the one where the cex.io fees are actually at the correct 0.2%

https://github.com/kuzetsa/gekko/releases/latest



Edited to add:

I decided that at some point in a future, upcoming release... and only once I finish auditing the relevant code (part of why I'm working on the new "zerolag" method is that it gives me a chance to debug a method I made myself without breaking older code) I'll be re-adding the option for sell orders.

For now, the only working logic is "buy and hold", since that's pretty harmless if it ever acts buggy for something like cex.io GHS cloud mining -- even a bad price is still a reinvestment Smiley



Quote from: unknown
Perfect is the enemy of good.
Quote from: unknown
Anything worth doing well is worth doing poorly.

sr. member
Activity: 369
Merit: 250
I've also read a few things regarding TA (EMA etc). I will install your Gekko fork in windows and give it a try.

I have some questions, if you don't mind answering:
  • In the CEX with your Gekko I can only buy GHs and hold them (to generate BTC) or trade them?
  • How will the bot know that I want it to use EMA only and not MACD,2xMACD etc?


Thanks in advance

For clarity, I'll be renaming the old, legacy code (which is currently misnamed) BACK to something more clear as to what it actually is:

It's going to be a few versions:

  • LEGACY -- the original EMA method from about a year ago when it was the only method
  • x2CROSS -- a variant on the original EMA crossover method, using an actua DEMA indicator instead of simple 1x EMA like the legacy method (this is often called a "zerolag" EMA indicator)
  • x3CROSS -- same as above, but using the TEMA zerolag variant

... It's too confusing to have both a single-EMA-based method named DEMA, and then an actual DEMA-based method named x2EMA --- Currently, it's still misnamed "DEMA", so if you were to use gekko in its current state, just keep in mind that the original method which will soon be rebranded as the "LEGACY" method is misnamed:

DEMA ~ AKA "exponential-moving-average-crossovers.js" (this was when it got misnamed)

I think that's confusing. I audited the code and it really is just a simple 1x (vanilla) EMA crossover between a slow and a fast (short / long-term) -- I don't know why it's named that, but i'll be changing the name to LEGACY whenever I get around to updating to add the other EMA crossover variants.
legendary
Activity: 1708
Merit: 1000
Reality is stranger than fiction
...
This chart from the "Goomboo's Journal" thread has a nice chart showing examples of how the simulations worked out based on the data they personally backtested against.

The EMA settings themselves are based on TA (technical analysis) theory, so you might be able to figure out how certain settings perform by looking at historical data using a charting tool which supports TA indicators such as the charts provided on:

..

I'm not going to try to manage your portfolio for you (not for free, and without a suitable contract)
nor would I want to "basically be a liar" by promising the defaults are suitable for your needs  Undecided

Hello kuzetsa,

Thank you very much for your answer. I've read many posts from the "Goomboo's Journal" thread, it is a very valuable resource.

I've also read a few things regarding TA (EMA etc). I will install your Gekko fork in windows and give it a try.

I have some questions, if you don't mind answering:
  • In the CEX with your Gekko I can only buy GHs and hold them (to generate BTC) or trade them?
  • How will the bot know that I want it to use EMA only and not MACD,2xMACD etc?


Thanks in advance
legendary
Activity: 1237
Merit: 1010


"buy and hold" / "reinvest only" is the one I personally use though, so that will continue to be well tested & audited Smiley
Sounds reasonable, it's is after all a specialized gekko fork for trading on cex.io.

That doesn't mean my feature requests are unreasonable, since I'm also trading on cex...  Tongue
sr. member
Activity: 252
Merit: 250


"buy and hold" / "reinvest only" is the one I personally use though, so that will continue to be well tested & audited Smiley
Sounds reasonable, it's is after all a specialized gekko fork for trading on cex.io.

newbie
Activity: 19
Merit: 0
What OS are you running?
sr. member
Activity: 369
Merit: 250
((...snip...))

Selling GHS for BTC when the market goes downward a certain % in a certain time period, just to minimize losses. This could be fixed in the config file and should be easy to develop. Just a simple sell API call like "IF GHS<0.0073 RUN EMERGENCYSELLOFF();". The more advanced technique would be that the bot tracks which prices he bought for and you tell him for instance that when the threshhold of your average GHS/BTC value drops below -10% then just sell

Sorry, I thought about it some more, and might be able to help this weekend?

http://www.investopedia.com/terms/p/ppo.asp

^ want to do some testing with the PPO method to see if we can get it to do what you want?


https://github.com/kuzetsa/gekko/releases/tag/microtrade

^ in that prerelease version from yesterday it still has an older version of the PPO method which has "sell" logic in it still. Just be sure to set your indicator trading method thingy to PPO instead of MACD.



oops:

Sorry, actually I just reviewed the code again... and it seems as though a fix for the "stuck state" bug actually prevents PPO or other methods from being able to create a sell order, and this change was intentional at the time.

... I ended up saving myself a lot of hassle not having to worry about anything I may have missed which might cause a panic sell (which I didn't want)

Without a rewrite, I guess there's no easy way to support "no panic sell ever" in addition to "optional panic sell, and/or other reasons for sell orders"... And since this isn't going to be easy, I'm going to just be lazy and give up on the idea of sell orders completely for now.

I don't want to give anyone false hopes in thinking that I'll provide patches, support, and debugging for a live trading (for both buy AND sell) version of gekko at no cost. It's just not something I'm interested in, so I won't be testing it without an incentive to do so.

I'm starting to realize why so many bots are on a recurring subscription basis. Providing ongoing support for more than one strategy is a lot of work.

"buy and hold" / "reinvest only" is the one I personally use though, so that will continue to be well tested & audited Smiley
sr. member
Activity: 369
Merit: 250
1) hehe, it already does that... It always tries to buy at the cheapest price possible, and during a flat or downtrend it just holds out and waits for a better price Smiley

Is there a way to test run this with my current live balance?

No, probably not. I don't think it's ever been done.  Huh

At this time, there's no good way to simulate the GHS cloud mining income, nor the deduction of maintenance fees ... Accurately simulating such things would require a model for the cex.io GHS cloud mining which means the upkeep fee (for electricity & hosting) as well as the income would need to be simulated...

But that's basically impossible since the payouts as well as the fees are pretty random
(multiple times per day, and during that time the prices change CONSTANTLY)

At best, any simulation would be a rough estimate.



I still want to figure out how to implement though Smiley

legendary
Activity: 1237
Merit: 1010
1) hehe, it already does that... It always tries to buy at the cheapest price possible, and during a flat or downtrend it just holds out and waits for a better price Smiley

Is there a way to test run this with my current live balance?
sr. member
Activity: 369
Merit: 250
Okay, good to know. It's still usable for CEX.IO botting.

Two features would make this bot _REALLY_ usable:

1) Intelligent buying GHS on certain times a day, watching the market and buying when the bot thinks is cheapest ...

2) More importantly: Selling GHS for BTC ...

1) hehe, it already does that... It always tries to buy at the cheapest price possible, and during a flat or downtrend it just holds out and waits for a better price Smiley

2) yeah, maybe... I guess so? ... at some point I'm thinking of re-adding "sell" logic, but I think it'd be better for the "panic sell" to track the [[ GHS mining profits VS maintenance fees ]] or whatever... Theres a very good chance the market price for GHS might not actually change much whenever the profitability decline gets really bad at some point in the not too distant future...

Bitcoin network difficulty doesn't have to rise very much for 26 cents per month maintenance fee to be too expensive to continue to own GHS cloud mining with cex.io... that "profitability decline" is coming up in just few a months unless:

  • either cex.io upgrades to more energy efficient hardaware so the maintainence fees won't be so bad
  • and/or the price of bitcoin goes WAY WAY up high enough that the tiny mining revenue will still be enough to pay maintenance fees

Just sayin'
legendary
Activity: 1237
Merit: 1010
Okay, good to know. It's still usable for CEX.IO botting.

Two features would make this bot _REALLY_ usable:

1) Intelligent buying GHS on certain times a day, watching the market and buying when the bot things is cheapest using (MACD|DEMA|X). This could be configurable for instance like just watch and report or even alert via mail when the bot things the time is right. Or just tell the bot to at least try to enforce buy once a certain treshhold is hit, disregarding certain minimal losses just to get the mining going.

2) More importantly: Selling GHS for BTC when the market goes downward a certain % in a certain time period, just to minimize losses. This could be fixed in the config file and should be easy to develop. Just a simple sell API call like "IF GHS<0.0073 RUN EMERGENCYSELLOFF();". The more advanced technique would be that the bot tracks which prices he bought for and you tell him for instance that when the threshhold of your average GHS/BTC value drops below -10% then just sell and hold, wait for admin input.

Thanks Sarah!
Pages:
Jump to: