02-01-2018, 02:11 AM
(This post was last modified: 02-01-2018, 02:14 AM by tommiehansen.)
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:
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.
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;
}
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.