[SHARE] Simple RSI BULL/BEAR strategy
#5
Yes, it will 'keep the bag' as you say and that's one of the things one would want to fix since a reversal in the trend would be a quite clear sign that it would be time to accept a loss.

I tested it now though and that simple thing does not really do much except hurt the strategy. What ends up happening is that the strategy sells and then buys again since the MA comes close to the RSI-buy at the BEAR trend. One can clearly see this since some time periods becomes only 1 candle long. That isn't always awful but the short tests i did it hurt more then it gave profits.

Here's the code that i used:

Code:
    // BEAR TREND
    if( maFast < maSlow )
    {
        // check if it's a trend reversal
        if( this.trend.adviced && this.trend.direction == 'up' )
        {
            this.advice('short'); // drop dead weight
        }
        
        log.debug('BEAR Trend');
        rsi = ind.BEAR_RSI.result.result;
        if( rsi > this.settings.BEAR_RSI_high ) goShort = true;
        if( rsi < this.settings.BEAR_RSI_low )  goLong = true;
    }
Could do with more refinments and having a reversal ofc will make it possible to adjust all other values as well. Would need to be backtested on a larger amount of data as well.

This first thing was just a sort of baseline idea. :-)

Note: I would also wait until the bugs regarding the TULIP indicators gets properly fix since they might give some bad data at the moment, see:
https://github.com/askmike/gekko/issues/1827

This strategy will still work since the idea is sound in itself but the specific parameters would probably need to be modified.
  Reply


Messages In This Thread
RE: Share: Simple RSI BULL/BEAR strategy - by tommiehansen - 02-01-2018, 02:11 AM
Werkkrew Stoploss - by susitronix - 02-02-2018, 09:39 PM
Removed post - by susitronix - 02-03-2018, 06:49 PM
@Gryphon Confirmation - by mvangoor - 03-22-2019, 11:59 PM
for 3 months - by ankasem - 02-18-2018, 05:30 PM

Forum Jump:


Users browsing this thread: