Hi Mike, why is the gannswing strategy not working with gekko ? And can someone please update it it seems to make good profits even in a downtrend. Thanks.
Hey, There is no custom gannswing strategy part of Gekko, here is a list of example strategies that come with Gekko. What strategy are you referring to?
I think he is referring to https://github.com/johndoe75/gekko-gannswing
Ah interesting strat. It's from before Gekko supported TAlib indicators, really old haha.
Quite a few things have changed ever since, anyone willing to migrate this strat?
https://github.com/johndoe75/gekko-gannswing
It's this one i'm reffering to, it would be awesome if anyone can upgrade it to make it compatible with the actual gekko
And when someone does - we can add it to the default strategies to be sure it will be kept up to date in future versions of Gekko.
Unfortunately I am very busy at the moment, so I don't think I will have time for this anytime soon.. See https://gekko.wizb.it/docs/introduction/roadmap.html for details.
Yeah i know it's hard to keep up being alone developping gekko but can you somehow post it or add something to the title so people can see it and try to participate to uptade it ?
I've added it to the title here and it also has the tag open-for-pulls, but I am not sure how many people are using that.
I could add a request section to this page: https://gekko.wizb.it/docs/introduction/roadmap.html
Thought honestly I am not sure if there will be someone who wants to do this anytime soon. Maybe a bounty system where people who want something could offer a bounty for it and people could do it for the bounty or something? What do you think?
Yeah why not how much btc would be good for it I can find some traders who can participate with me to finance the bounty
Not sure as for the amount, but if it's not bad I might just implement it :)
I have been thinking about a bounty system for a while, but given everyone here being anonymous except for me I would want to act as an escrow (when someone wants to offer a bounty to do X for Y bitcoin, send Y bitcoin to me before I can add it to a bounty page). What do you think?
I lifted the vix strat out of https://github.com/johndoe75/gekko-gannswing, it's alright.
Yeah pretty nice idea do you have a gmail or something else so we can see the details in private ?
@thegamecat How ? i don't get it ?
The guy wrote a vix function, you can copy that into your own strategy :)
The gannswing strategy above works as is if you download gannswing.js to the strategies folder and run it from the command line using config.js file. It does show up in the interface but can't seem to pass settings required. What changes are needed to correctly define stoploss, vixperiod and swingperiod so it can used trough the UI?
@CheckRazor:
Other than having to run "npm install talib-promise" first, to get it working in the UI:
vixperiod = 20
swingperiod = 250
[stoploss]
enabled = false
trailing = false
percent = 5
@imkane
Tested this after following your instructions.
Ubuntu 16.04.3 LTS
Fresh stable branch install of Gekko
The strategy runs but no actions are taken and the following error is output multiple times in the terminal.
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/home/x/gekko/gekko_new/gekko/strategies/gannswing.js:82:26)
at tryCatcher (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/home/x/gekko/gekko_new/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Any ideas?
@SoleConsumer - Was that from the command-line or GUI?
@imkane
From the command line, when run from the GUI no errors are shown (but no buy/sell actions are taken).
A more thorough explanation:
I ran 'node gekko --ui' from the CLI and then performed a backtest using the GUI. The error messages were shown in the CLI.
The same result happens when running a backtest from the CLI without using the GUI.
I assume your config.js file contains this code?
config['gannswing'] = {
// stop-loss
stoploss: {
// stop-loss enabled
enabled: false,
// if stop-loss enabled, shall it be trailing?
trailing: false,
// how many percent before we trigger stop-loss sell?
percent: 5
},
vixperiod: 20,
// trend reaction time between 50 and 250
swingperiod: 250
}
And:
config.tradingAdvisor = {
enabled: true,
method: 'gannswing',
Other than that, you may have to log some debug messages in the actual strategy .js file and try to debug where it's messing up. I didn't see any of those errors myself. I also didn't find the strategy to be that effective. Perhaps it needs to be combined with others ...
EDIT, not sure why the code above is formatted so weird, sorry lol
Also, your backtest period may be too short? I think I saw something like 7 trades in 2 months while testing.
@imkane people works with it and i still don't know how they say it's profitable (in bitcointalk)
Yeah maybe they're combining it with other indicators?
Actually not they just work with it and it's maximizing profit in downtrends unlike the other indicators that mosly only work in uptrends.
Weird, maybe this particular code has a bug. I tested in downtrends and although I can take LESS of a loss than B&H, it's STILL a LOSS ;)
GDAX - BTC/LTC

What exchange and currency pairs are they trading?
One of them were trading ltc and the other xrp both on poloniex.
Maybe you did not enable the stop loss ? (The trade between july16 and 23 was too much of a loss, a stoploss should be triggered normally
Good point, but this is what I used:
vixperiod = 20
swingperiod = 150
[stoploss]
enabled = true
trailing = true
percent = 5
What if you change the swing period and backtest with different periods ? Maybe that's the point because none of them shared his settings
Well this is more than a 5 percent i think so the stoploss isn't working i think
Yeah definitely > 5%.
I tried messing with all those params. But if those guys say it is profitable in downtrends, this example is clearly a downtrend. Maybe some bugs in the code.
Yeah probably, at least now we know that the stoploss code should be updated.
Concerning the swing period, try with other values and tell me more about it.
And lastly try to disable the trailing and keep the stop loss enabled and tell me if the stop loss works?
Will do! Probably won't have time until tomorrow though :)
Well take your time i'm far from my computer tho otherwise i'll do it myself and keep you updated
swingperiod:
10 = -76% profit
50 = -46% profit
150 = -41% profit
200 = -40% profit
250 = -40% profit
And lastly try to disable the trailing and keep the stop loss enabled and tell me if the stop loss works?
Made no difference, so it looks like stop loss is not being used at all, will debug!
https://github.com/imkane/gekko/commit/d5107f10cc6ff631557fbbc58999fd536f0a5dcc
Ok I think I got stoploss working. Ignore my space -> tab and other formatting changes, it's really line 247 that's important :)
Is it working now i just got everything ready for my gekko but still i installed the talib-promise, got the gannswing.toml and still when i try to backtest nothing happens ...
Are you using all the same params as me?
Error: Cannot find module 'talib-promise'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object.
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
xxx POST /api/backtest 500 383ms -
Error: non-error thrown: Child process has died.
at Object.onerror (/root/gekko/node_modules/koa/lib/context.js:105:40)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
Well that means you didn't install talib-promise :) Or something went wrong with it.
This is the error i get i don't know why i did install talib-promise using : wget "https://raw.githubusercontent.com/johndoe75/gekko-gannswing/master/gannswing.js"
On wich directory should it be done ?i tried on the gekko directory, on the gekko/strategies, and gekko/config/strategies, since i can't seem to find the methods directory
gannswing.js goes in gekko/strategies.
You'll need to figure out why that talib-promise module isn't working first. I'm not sure how to help with that.
Well i'm running a Kali Linux i'll try to find ou why i'll keep you updated
Well fine just reinstalled the talib-promise and it worked well
Oh nice! Great to hear
Still getting errors on terminal why trying to backtest it seems like the gannswing method is having some troubles with the value "null" where it can't decide of a trade either it's coming from the VIX or something else ...
Here are the logs I get all are red execpt these first ones :
2017-08-31 01:04:09 (DEBUG): gannswing: buycount: 0 sellcount: 0
2017-08-31 01:04:09 (DEBUG): tradebuy: false tradesell: false
2017-08-31 01:04:09 (DEBUG): VIX t: 6.862745098039212 VIX t-1: 6.862745098039212
2017-08-31 01:04:09 (DEBUG): gannswing: buycount: 0 sellcount: 0
2017-08-31 01:04:09 (DEBUG): tradebuy: false tradesell: false
2017-08-31 01:04:09 (DEBUG): VIX t: 7.352941176470591 VIX t-1: 6.862745098039212
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:96:25)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:134:29)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:147:30)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:160:33)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:173:34)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:96:25)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:134:29)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:147:30)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:160:33)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:173:34)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:82:26)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:82:26)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
You saw my updated gannswing.js file I posted above?
What params are you using? And what exchange, currencies, dates?
gannswing.toml you mean yeah i placed it in parameters, if not i did not find any gannswing.js updated.
my parameters are :
vixperiod = 20
swingperiod = 150
[stoploss]
enabled = false
trailing = false
percent = 5
And for other gekko parameters, I use :
5 min candle size and 10 for warmup period, for the exchange it's Poloniex on the SC/BTC pair on 2 months and 2 weeks period, working well with other indicators so the problem doesn't come from here
I mean this file:
https://github.com/imkane/gekko/commit/d5107f10cc6ff631557fbbc58999fd536f0a5dcc
I got stoploss working (I think) :)
Yeah i got it replaced it with the original gannswing.js but still no trade are made ?
2017-08-31 01:22:44 (DEBUG): gannswing: buycount: 0 sellcount: 0
2017-08-31 01:22:44 (DEBUG): tradebuy: false tradesell: false
2017-08-31 01:22:44 (DEBUG): VIX t: 31.34328358208956 VIX t-1: 28.731343283582095
2017-08-31 01:22:44 (DEBUG): gannswing: buycount: 0 sellcount: 0
2017-08-31 01:22:44 (DEBUG): tradebuy: false tradesell: false
2017-08-31 01:22:44 (DEBUG): VIX t: 30.33707865168539 VIX t-1: 31.34328358208956
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:96:25)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:134:29)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:147:30)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:160:33)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:173:34)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:96:25)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:134:29)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:147:30)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:160:33)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:173:34)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:82:26)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/root/gekko/strategies/gannswing.js:82:26)
at tryCatcher (/root/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/root/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/root/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/root/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/root/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/root/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/root/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:781:20)
at tryOnImmediate (timers.js:743:5)
at processImmediate [as _immediateCallback] (timers.js:714:5)
Those are the last errors i get in my terminal :/ still weird i don't get it
Sounds like you're gonna have to do some debugging :)
I think there's something wrong with the VIX function
this.vix.sma= data.result
it returns the value null wich cause all these problems I guess
If you run with all the same params, exchange, dates, as I did, do you get errors?
@imkane thanks for the updated stoploss. Everything appears to be working well in the UI using Bash on Win 10. Been back testing ETH-USD and the stoploss (trailing or not) tends to hurt profitability. Testing with 5 - 15 min periods and most results beat B+H even in downtrends.
Still the same ... can you upload all your gekko directory ? if it's not too much asking :/
@CheckRazor that's interesting that the stoploss hurts profitability for your testing. For the data I was using it seemed to help, although I've only tested in a downtrend so far.
@Pedro942 I'm on the latest version of the develop branch, maybe that's it? Other than that, everything's normal.
i'll try with the latest branch and tell you more about it then
Maybe also "npm install" or "npm update" in the root dir to update node modules?
@imkane Nothing tho ... i still have problems with it no matter what branch i'll trynow on my win10 maybe it will work better
Still i tried installing gekko with bash on my windows10 I keep ketting the same error as with Linux :
Unhandled rejection TypeError: Cannot read property 'result' of null
at talib.execute.then (/mnt/c/Users/Scorp/Desktop/gekko/gekko/strategies/gannswing.js:160:33)
at tryCatcher (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
There's definitely something wrong with talib promise and the value null returned by gannswing.js at the VIX function.
@imkane @CheckRazor Can one of you please upload the complete gekko directory in a zip file ? i can't seem to find what's wrong I repeated everything many times i tried on linux and wndows10 bash and still having the same issue ...
@Pedro942 if you're runing talib 1.03 then install 1.0.2 instead, it's not work with new 1.0.3 callback
@vietlongn Root@DESKTOP-QQB64JJ:/mnt/c/Users/Scorp/Desktop/gekko/gekko$ npm remove talib
npm ERR! EIO: i/o error, unlink '/mnt/c/Users/Scorp/Desktop/gekko/gekko/node_modules/talib/build/Release/talib.node'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /mnt/c/Users/Scorp/Desktop/gekko/gekko/npm-debug.log
This is what I get after removing talib and reinstalling it
After trying to backtest again I still get the same error with no trades being executed.


this bash doesn't work well with window file system, try follow commands:
rm -rf node_modules/talib
npm install [email protected]
damn you're a life savior <3
Thanks a lot now it's working i'll test the stoplosses and keep you updated if I find a good configuration to make profit in downtrend as it's supposed to be.

glad it helped :)
@imkane Stop loss is working

Woah awesome that you got it working!
In the gannswing.js how does the vixperiod input work? Changing vixperiod doesn't seem to affect backtesting results at all.
Good question, I have no idea lol
@imkane Thanks buddy yeah but still I can't find a nice configuration i was backtesting with a lot of parameters but still nothing can beat a good DEMA in terms of profit.
@CheckRazor Actually i tried to change only vix between 2 and 50 and it does slightly affect the profit about 1% every 10 or 20, still I don't know how it is calculated and what does the swingperiod stand for, I looked at the Johndoe repository and checked the sources but still I can't get it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.
Most helpful comment
Not sure as for the amount, but if it's not bad I might just implement it :)
I have been thinking about a bounty system for a while, but given everyone here being anonymous except for me I would want to act as an escrow (when someone wants to offer a bounty to do X for Y bitcoin, send Y bitcoin to me before I can add it to a bounty page). What do you think?