[SHARE] Simple RSI BULL/BEAR strategy
Hey! I’m trying to get this strategy to work but so far woth backtesting i keep getting negative values. I used the parameters from different posts here.

Also different coins have been used(btc, ltc, xrp, etcetra) over a period of the last 3 months. What parameters and coins works in profit for you guys?

Thanks in advance.
  Reply
Hello all,

I have an idea for a modification to this strategy, but haven't been able to implement it, and would love some input on how to go about it.

My thought is this:

The RSI_BULL_BEAR_ADX strat gives a "long" advice, we buy.
The RSI_BULL_BEAR_ADX strat gives a "short" advice --
We check the price we bought at, and compare it to the current price.
Then we have some "if" logic, like "if the current price is either 5% above or 1% below the price we bought at, then sell; otherwise, continue to hold and wait for the next time the strat gives a short advice."

This might not sound like much of an idea, but I'd love some guidance on how to implement it; I feel like if I could figure out how to do this, in terms of the structure and where to put that "if" logic, then I could experiment with various different "checks" there, different conditions that have to be met to let the "short" or "long" advice from the original BULL_BEAR_ADX strat proceed to make an actual order.

Any help understanding how to do this would be much appreciated. Thanks in advance for any guidance.

--Henry
  Reply
(06-14-2018, 01:16 PM)dugu-dugu Wrote: How can I debug my strategy, that is, display the current values of indicators in logs? I'm running gekko with pm2.

Something like:
Datetime: RSI Bull=current value, RSI bear=current value, ADX=current value

It's still pretty opaque for me how this works, I need to understand more of what's going on.

I've added debug code, the result looks like this (using pm2 to start gekko in command line):
Code:
2018-07-01 18:14:19 (INFO):     - - - Begin check function - - - [/color]
2018-07-01 18:14:19 (INFO):     maSlow: 108.84379032258067 maFast: 111.06619047619064 ADX: 84.74747968645497
2018-07-01 18:14:19 (INFO):     Bull maFast: 111.06619047619064 > maSlow: 108.84379032258067
2018-07-01 18:14:19 (INFO):     Bull RSI: 32.53955349896498 bull high: 85 bull low: 40
2018-07-01 18:14:19 (INFO):     ADX: 84.74747968645497 > ADX_high 83
2018-07-01 18:14:19 (INFO):     RSI bull high: 85 + bull mod_high 5
2018-07-01 18:14:19 (INFO):     RSI bull high new value: 90
2018-07-01 18:14:19 (INFO):     RSI: 32.53955349896498 < RSI bull low: 40 calling long function
2018-07-01 18:14:19 (INFO):     Long since 2 candle(s)
2018-07-01 18:14:19 (INFO):     - - - End check function - - - -
2018-07-01 18:34:19 (INFO):     - - - Begin check function - - -
2018-07-01 18:34:19 (INFO):     maSlow: 108.82608870967745 maFast: 110.97666666666683 ADX: 89.37383363508624
2018-07-01 18:34:19 (INFO):     Bull maFast: 110.97666666666683 > maSlow: 108.82608870967745
2018-07-01 18:34:19 (INFO):     Bull RSI: 29.457775673216034 bull high: 85 bull low: 40
2018-07-01 18:34:19 (INFO):     ADX: 89.37383363508624 > ADX_high 83
2018-07-01 18:34:19 (INFO):     RSI bull high: 85 + bull mod_high 5
2018-07-01 18:34:19 (INFO):     RSI bull high new value: 90
2018-07-01 18:34:19 (INFO):     RSI: 29.457775673216034 < RSI bull low: 40 calling long function
2018-07-01 18:34:19 (INFO):     Long since 3 candle(s)
2018-07-01 18:34:19 (INFO):     - - - End check function - - - -
I don't understand why it sometimes runs the check function more than once in the same second, like in this example:
Code:
2018-07-01 17:37:00 (INFO):     - - - Begin check function - - - [/color]
2018-07-01 17:37:00 (INFO):     maSlow: 108.89625000000002 maFast: 111.34714285714303 ADX: 62.46388807339842
2018-07-01 17:37:00 (INFO):     Bull maFast: 111.34714285714303 > maSlow: 108.89625000000002
2018-07-01 17:37:00 (INFO):     Bull RSI: 44.71872438361014 bull high: 85 bull low: 40
2018-07-01 17:37:00 (INFO):     - - - End check function - - - -
2018-07-01 17:37:00 (INFO):     - - - Begin check function - - -
2018-07-01 17:37:00 (INFO):     maSlow: 108.88548387096776 maFast: 111.28809523809542 ADX: 66.23024929556257
2018-07-01 17:37:00 (INFO):     Bull maFast: 111.28809523809542 > maSlow: 108.88548387096776
2018-07-01 17:37:00 (INFO):     Bull RSI: 44.71872438361014 bull high: 85 bull low: 40
2018-07-01 17:37:00 (INFO):     - - - End check function - - - -
2018-07-01 17:37:00 (INFO):     - - - Begin check function - - -
2018-07-01 17:37:00 (INFO):     maSlow: 108.87471774193551 maFast: 111.25190476190494 ADX: 68.74115677700533
2018-07-01 17:37:00 (INFO):     Bull maFast: 111.25190476190494 > maSlow: 108.87471774193551
2018-07-01 17:37:00 (INFO):     Bull RSI: 44.71872438361014 bull high: 85 bull low: 40
2018-07-01 17:37:00 (INFO):     - - - End check function - - - -
If anyone cares about the debug code, I will post it. It makes the strategy more difficult to follow, but it helps to understand how it works with real data, real time.
  Reply
(06-26-2018, 01:35 PM)Steyn Wrote: Hey! I’m trying to get this strategy to work but so far woth backtesting i keep getting negative values. I used the parameters from different posts here.

Also different coins have been used(btc, ltc, xrp, etcetra) over a period of the last 3 months. What parameters and coins works in profit for you guys?

None for me, so far.
It's all great in backtests, but, in live trading, at the bottom line, I've lost almost half my money. Having lots of fun though, trying to make them back Smile
  Reply
Quote:None for me, so far.
It's all great in backtests, but, in live trading, at the bottom line, I've lost almost half my money. Having lots of fun though, trying to make them back Smile

Ouch, hope half wasn't too much. How long did you have the bot running?

I have been running for a little over a week now. It is up a little less than 1%.
If it isn't crypto, it isn't worth mining, it isn't worth speculating.
https://www.youtube.com/c/crypto49er
  Reply
RSI_BULL_BEAR_ADX.js.txt - I'm not 100% sure that I'm executing this correctly. Please help, when the strategy is run on uptrend, the result are impressive, unfortunately, when I run on a downtrend, past 3 months, Apr - June, the results are negative.
  Reply
Just wondering, has anyone got such result with the strategy if you backtest 1 year ?

[Image: Untitled.jpg]


I also got 890% profit over the last year with the API with the exact same parameters, kind of weird since it's the same software...

I'm getting suspicious about gekko's backtest config, what do you think of those results?


Attached Files
.jpg   Untitled.jpg (Size: 109.78 KB / Downloads: 43)
  Reply
@berringer,

Try running a backtest of the last 3 months using same parameters you run live and see if you are getting the same negative results. If yes, you need to adjust your parameters.

@Xeav,

With backtesting, you always get the perfect trade. You don't get that with live (unless you change Gekko from limit orders to market orders) so you can't expect the same gains as in backtests. Still nice to make 890% gains.
If it isn't crypto, it isn't worth mining, it isn't worth speculating.
https://www.youtube.com/c/crypto49er
  Reply
hi guys,

thanks tommie for your strat!
i don't know why but I can't run this strat - getting just an error message.. has anybody an idea?
just reinstall everything .. npm dependencies node .. but nothing helped.

Thanks Smile


Attached Files
.png   rsi.png (Size: 51.22 KB / Downloads: 47)
  Reply
Hi there,

i tried the following with the first quarter XRP/EUR at candle size 15 with warm up x10. It made +255% while the market went -76%.
Admitting i have no clue what i did, i just tweaked the values. Thoughts?

Code:
[SMA]
long = 1100
short = 30

[BULL]
rsi = 20
high = 80
low = 60
mod_high = 5
mod_low = -10

[BEAR]
rsi = 15
high = 45
low = 20
mod_high = 20
mod_low  = -10

[ADX]
adx = 2
high = 70
low = 50
  Reply


Forum Jump:


Users browsing this thread: