[SHARE] Simple RSI BULL/BEAR strategy
(04-25-2018, 03:47 AM)yesman85 Wrote:
(04-24-2018, 07:40 AM)zappra Wrote:
(04-22-2018, 01:54 AM)yesman85 Wrote:
(04-13-2018, 09:17 PM)Henry151 Wrote: Just out of curiosity -- how many of you, or are any of you, running this strategy and finding it profitable, with live trading?

I'm running it since a few weeks now on ETH Poloniex, it's giving mixed results, but generally has made a few % profit.

Do you mean overall after a few weeks its profitable by a few %, or it's had a few profitable trades, but is not making a profit overall?

I hope it's the first, and that "mixed results" means there are a few (or even quite a few) loss making trades. That's to be expected!

Yeah after a few weeks I had a few % profit, but it makes a single "mistake" and that's all gone then. I'm having trouble figuring out why it doesn't take better advantage of sharp rises and falls, for example this short period:

[Image: vOEQrEh.png]

Trying to see why it fails to sell when the fairly steep dip happens around 6 AM..

(04-24-2018, 08:21 AM)tommiehansen Wrote:
(04-24-2018, 07:40 AM)zappra Wrote:
(04-22-2018, 01:54 AM)yesman85 Wrote:
(04-13-2018, 09:17 PM)Henry151 Wrote: Just out of curiosity -- how many of you, or are any of you, running this strategy and finding it profitable, with live trading?

I'm running it since a few weeks now on ETH Poloniex, it's giving mixed results, but generally has made a few % profit.

Do you mean overall after a few weeks its profitable by a few %, or it's had a few profitable trades, but is not making a profit overall?

I hope it's the first, and that "mixed results" means there are a few (or even quite a few) loss making trades. That's to be expected!

Mixed results are always to be expected as you say. If one backtests long periods it's easy to see that there sometimes do occur a couple of bad trades in a row etc.
No risk, no reward. Smile

Agree! And I'm fine with that, but I find that testing with a long period skews the results of the short term last period, market is behaving very differently the last month vs a year ago vs last December. I've seen results with 1000's of %'s of profit but applying those strategies to for example just this year gives you a negative result!

You're talking about the strategy as if there is a fixed setting that "just works"?
This is not the case, quite frankly -- this isn't even remotely close to the case.

It will always fail to do what's the absolute greatest thing to do, every single time.

It's not about timing a specific point in time perfectly, it's about doing more good then bad in the long run.

-

I've done basically 10's of thousands of backtest. Just for the XRP/USD pair i've done over 15 000 backtests (via my backtesting tool GAB) for the period 2016-01-02 > 2018-02-18 at 5 min candles

From all these runs and for all runs for all other coins the summary is basically this (5 min candles):

1. Large coins are worse e.g. BTC/USD and ETH/USD (but ETH often fares much better)
2. A shorter long SMA is usually better but often also has a higher risk. A general rule of thumb here is a value of around 300.
3. Short SMA of 10-30 usually works better.
4. RSI length of 15+ usually works better
5. ADX length of 10+ usually works better
6. 5 min candles simply yields the best results (but i haven't done 10 000+ runs for all time series)
7. etc..

Here is the average for the most profitable runs out of 15 034 runs XRP/USD @ Poloniex between 2016-01-02 > 2018-02-18 where it tops out at 12 trillion % and the lowest is at 1 trillion %. Note that this is by using 5 min candles:


Code:
[SMA]
long = 245
short = 16

[BULL]
rsi = 22
high = 76
low = 48
mod_high = 7
mod_low = -8

[BEAR]
rsi = 21
high = 53
low = 35
mod_high = 17
mod_low = -8

[ADX]
adx = 19
high = 75
low = 23



Do also note that this is simply the average settings for all those 100 top performing runs.
One wouldn't want to directly use these values but rather round them to more sane values e.g. replace RSI 22 with 20 or 25 etc.
Basically use it to get an idea on what works better and don't.

These are the averages for the top 50 sorted by win% where it tops out at 8 trillion % and where the lowest of these 50 is 1 million %, also at 5 min candles.
The average win% (number of winning trades vs number of losing) has an average of 86% for this toplist:


Code:
[SMA]
long = 220
short = 21

[BULL]
rsi = 29
high = 76
low = 31
mod_high = 7
mod_low = -10

[BEAR]
rsi = 27
high = 55
low = 24
mod_high = 21
mod_low = -7

[ADX]
adx = 17
high = 75
low = 26
  Reply
(04-24-2018, 08:17 AM)tommiehansen Wrote:
(04-24-2018, 02:35 AM)gt3 Wrote: Hey guys, firstly, I've been following this thread since inception and have had 5 instances of Gekko running very nicely for about 2 months. I started using the RSI_BULL_BEAR strategy when it was first posted and subsequently changed to the improved RSI_BULL_BEAR_ADX strategy.

My existing instances have been producing a nice return lately and I am wanting to spin up another one. As a result I downloaded to the latest version of gekko_tools and copied over the gekko-extra-indicators as per the instructions. I've also created the json file RSI_BULL_BEAR_ADX.json (placed it next to the existing toml version in gekko/config/strategies) both by using the code example posted by Kris191 earlier in this thread and also by using an online converter. However, I'm still getting the error when attempting a backtest:

2018-04-24 02:29:26 (INFO): Setting up Gekko in backtest mode
2018-04-24 02:29:26 (INFO):
2018-04-24 02:29:26 (INFO): Setting up:
2018-04-24 02:29:26 (INFO): Trading Advisor
2018-04-24 02:29:26 (INFO): Calculate trading advice
2018-04-24 02:29:26 (INFO): Using the strategy: RSI_BULL_BEAR_ADX
/home/admin/gekko/strategies/RSI_BULL_BEAR_ADX.js:39
this.addIndicator('maSlow', 'SMA', this.settings.SMA.long );
                                                ^

TypeError: Cannot read property 'SMA' of undefined
   at Base.init (/home/admin/gekko/strategies/RSI_BULL_BEAR_ADX.js:39:52)
   at Base.bound [as init] (/home/admin/gekko/node_modules/lodash/dist/lodash.js:729:21)
   at new Base (/home/admin/gekko/plugins/tradingAdvisor/baseTradingMethod.js:87:8)
   at Actor.setupTradingMethod (/home/admin/gekko/plugins/tradingAdvisor/tradingAdvisor.js:62:17)
   at Actor.bound [as setupTradingMethod] (/home/admin/gekko/node_modules/lodash/dist/lodash.js:729:21)
   at new Actor (/home/admin/gekko/plugins/tradingAdvisor/tradingAdvisor.js:23:8)
   at load (/home/admin/gekko/core/pluginUtil.js:95:22)
   at /home/admin/gekko/node_modules/async/dist/async.js:1156:9
   at replenish (/home/admin/gekko/node_modules/async/dist/async.js:1030:17)
   at iterateeCallback (/home/admin/gekko/node_modules/async/dist/async.js:1015:17)

This a brand new install with the latest version of Gekko, gekko_tools, gekko-extra-indicators (copied to both gekko/strategies and gekko/strategies/indicators), tulind. I'm using version 1.0.2 of talib.

I've spent hours trying to debug this Sad Sorry to be a pain but really hoping someone can help out! Thank you for all your work so far @tommiehansen and for everyone else contributions

You're using an outdated TOML-file for some reason. It basically is saying that

[SMA]
long = xxxxxx

Does not exist.
Latest version of RBB ADX does not use tulip or talib.

Thanks for the reply. I was using the updated toml file but for some reason Gekko just wouldn't read it... Anyway, I've integrated the toml settings into my config.js and it's working fine now. 

Interestingly, a side by side backtest comparison of the new RSI_BULL_BEAR_ADX strategy vs the old one shows the old one outperforming the new by about %30 - using the data set, settings etc.
  Reply
(04-27-2018, 04:39 AM)gt3 Wrote:
(04-24-2018, 08:17 AM)tommiehansen Wrote:
(04-24-2018, 02:35 AM)gt3 Wrote: Hey guys, firstly, I've been following this thread since inception and have had 5 instances of Gekko running very nicely for about 2 months. I started using the RSI_BULL_BEAR strategy when it was first posted and subsequently changed to the improved RSI_BULL_BEAR_ADX strategy.

My existing instances have been producing a nice return lately and I am wanting to spin up another one. As a result I downloaded to the latest version of gekko_tools and copied over the gekko-extra-indicators as per the instructions. I've also created the json file RSI_BULL_BEAR_ADX.json (placed it next to the existing toml version in gekko/config/strategies) both by using the code example posted by Kris191 earlier in this thread and also by using an online converter. However, I'm still getting the error when attempting a backtest:

2018-04-24 02:29:26 (INFO): Setting up Gekko in backtest mode
2018-04-24 02:29:26 (INFO):
2018-04-24 02:29:26 (INFO): Setting up:
2018-04-24 02:29:26 (INFO): Trading Advisor
2018-04-24 02:29:26 (INFO): Calculate trading advice
2018-04-24 02:29:26 (INFO): Using the strategy: RSI_BULL_BEAR_ADX
/home/admin/gekko/strategies/RSI_BULL_BEAR_ADX.js:39
this.addIndicator('maSlow', 'SMA', this.settings.SMA.long );
                                                ^

TypeError: Cannot read property 'SMA' of undefined
   at Base.init (/home/admin/gekko/strategies/RSI_BULL_BEAR_ADX.js:39:52)
   at Base.bound [as init] (/home/admin/gekko/node_modules/lodash/dist/lodash.js:729:21)
   at new Base (/home/admin/gekko/plugins/tradingAdvisor/baseTradingMethod.js:87:8)
   at Actor.setupTradingMethod (/home/admin/gekko/plugins/tradingAdvisor/tradingAdvisor.js:62:17)
   at Actor.bound [as setupTradingMethod] (/home/admin/gekko/node_modules/lodash/dist/lodash.js:729:21)
   at new Actor (/home/admin/gekko/plugins/tradingAdvisor/tradingAdvisor.js:23:8)
   at load (/home/admin/gekko/core/pluginUtil.js:95:22)
   at /home/admin/gekko/node_modules/async/dist/async.js:1156:9
   at replenish (/home/admin/gekko/node_modules/async/dist/async.js:1030:17)
   at iterateeCallback (/home/admin/gekko/node_modules/async/dist/async.js:1015:17)

This a brand new install with the latest version of Gekko, gekko_tools, gekko-extra-indicators (copied to both gekko/strategies and gekko/strategies/indicators), tulind. I'm using version 1.0.2 of talib.

I've spent hours trying to debug this Sad Sorry to be a pain but really hoping someone can help out! Thank you for all your work so far @tommiehansen and for everyone else contributions

You're using an outdated TOML-file for some reason. It basically is saying that

[SMA]
long = xxxxxx

Does not exist.
Latest version of RBB ADX does not use tulip or talib.

Thanks for the reply. I was using the updated toml file but for some reason Gekko just wouldn't read it... Anyway, I've integrated the toml settings into my config.js and it's working fine now. 

Interestingly, a side by side backtest comparison of the new RSI_BULL_BEAR_ADX strategy vs the old one shows the old one outperforming the new by about %30 - using the data set, settings etc.

Well -- if you're running CLI the TOML will not work of course since the CLI requires raw JSON-objects.. Smile
It should perform the same though, else you've done something wrong.
  Reply
if getting a TOML type error please use the below text in your config.

{
"SMA": {
"long": 1000,
"short": 50
},
"BULL": {
"rsi": 15,
"high": 80,
"low": 60,
"mod_high": 5,
"mod_low": -5
},
"BEAR": {
"rsi": 15,
"high": 50,
"low": 20,
"mod_high": 15,
"mod_low": -5
},
"ADX": {
"adx": 3,
"high": 70,
"low": 50
}
}
  Reply
Guys I´ve read this hole post and I still can not make it run, I´m having problems with the Talib indicators on windows 10.
Error: ENOENT: no such file or directory, scandir 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework'

any help would be great!
  Reply
(04-30-2018, 12:49 AM)AlfonsoMX Wrote: Guys I´ve read this hole post and I still can not make it run, I´m having problems with the Talib indicators on windows 10.
Error: ENOENT: no such file or directory, scandir 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework'

any help would be great!

None of the strategies use TALIB.
  Reply
AlfonsoMX,

Does Gekko work with the default strategies? If not, create a post in the technical support section about your issue. As tommiehansen said, his strategy doesn't use talib indicators, just the ADX that Gab0 ported from TAlib if you use the ADX version.

tommiehansen,

I hope you like praises. Wow. Awesome work! I don't have a full understanding of the strategy yet (still reviewing) but the simulated profits are insane! I had no problem following your instructions for installing the strategy and I admire how you're willing to help people that literally just installed Gekko and have no idea what they are doing.
If it isn't crypto, it isn't worth mining, it isn't worth speculating.
https://www.youtube.com/c/crypto49er
  Reply
Random Question: I use CLI for this strat and therefore have copied the strat and parameters into the config file i run, is this right or should i have adjusted the TOML file instead?

thanks
  Reply
Kris191,

That sounds right to me.

(04-30-2018, 04:19 PM)Kris191 Wrote: Random Question: I use CLI for this strat and therefore have copied the strat and parameters into the config file i run, is this right or should i have adjusted the TOML file instead?

thanks
If it isn't crypto, it isn't worth mining, it isn't worth speculating.
https://www.youtube.com/c/crypto49er
  Reply
Hello 
there
rsi-bull-bear AdX (new update)

 | 2018-04-30 21:21:18 (ERROR): Indicator STC could not load

cli mode error
Works properly in UI mode

Stc file in the display folder
I tried 2 different stc files and the result gives the same error

another file is needed

Which stc file works in cli mode

gekko loaded 0.5.14 ago




https://github.com/gab0/gekko-extra-indi...indicators
thank you


  Reply


Forum Jump:


Users browsing this thread: