[SHARE] Simple RSI BULL/BEAR strategy
(02-18-2018, 08:17 PM)ankasem Wrote: thank you
these numbers are enough for me
the majority of other coins depend on btc
btc thought all falls all rising
some may be excluded sometimes
now see the stock coins 95% red
but as you say, I will look at other pairs
but my favorite is usdt-btc
---------------------------------------------
1-Is the position you initiated the strategy a precaution?
2-primary responsibility (new-15.png)
sells rsi 70
buy  rsi  50
there is no movement despite trend down
is normal according to the strategy
not a problem for me

stay peacefully

1. Sort of. It is values that really is quite picky about the longer macro trend and will more rapidly go into the safer BEAR mode and stay there for longer periods.

2. I do not understand this, is it a question?
  Reply
@tommiehansen

I'm importing a lot of data and doing a lot of backtests with your strategies.
Although this error appears:

2018-02-22 02:54:57 (INFO): Setting up Gekko in backtest mode
2018-02-22 02:54:57 (INFO):
2018-02-22 02:54:57 (INFO): Setting up:
2018-02-22 02:54:57 (INFO): Trading Advisor
2018-02-22 02:54:57 (INFO): Calculate trading advice
2018-02-22 02:54:57 (INFO): Using the strategy: RSI_BULL_BEAR_ADX
2018-02-22 02:54:57 (WARN): TALIB indicators could not be loaded, they will be unavailable.
2018-02-22 02:54:57 (INFO):

2018-02-22 02:54:57 (INFO): Setting up:
2018-02-22 02:54:57 (INFO): Paper Trader
2018-02-22 02:54:57 (INFO): Paper trader that simulates fake trades.
2018-02-22 02:54:57 (INFO):

2018-02-22 02:54:57 (INFO): Setting up:
2018-02-22 02:54:57 (INFO): Performance Analyzer
2018-02-22 02:54:57 (INFO): Analyzes performances of trades
2018-02-22 02:54:57 (INFO):

2018-02-22 02:54:57 (INFO): WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-02-22 02:54:57 (INFO): WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-02-22 02:55:11 (INFO): ====================================
2018-02-22 02:55:11 (INFO): Finished in 13.86 seconds
2018-02-22 02:55:11 (INFO): ====================================

The data is imported correctly and the backtests all give positive values. What I would like to understand is if this talib serves something in your strategies or the warning that appears is only a generic warning and my gekko is working correctly.
  Reply
Good evening.

I installed Gekko and the two RSI strategies. All is working fine, almost  Wink
When I run a backtest of RSI_BULL_BEAR_ADX, no results are shown in Gekko after the simulation. Is there a setting I have to modify?
When I run RSI_BULL_BEAR everything is fine.

I noticed a difference in the log:

RSI_BULL_BEAR:

Code:
2018-02-22 20:33:45 (INFO):    Setting up Gekko in backtest mode
2018-02-22 20:33:45 (INFO):    
2018-02-22 20:33:45 (INFO):    Setting up:
2018-02-22 20:33:45 (INFO):         Trading Advisor
2018-02-22 20:33:45 (INFO):         Calculate trading advice
2018-02-22 20:33:45 (INFO):         Using the strategy: RSI_BULL_BEAR
2018-02-22 20:33:46 (INFO):    

2018-02-22 20:33:46 (INFO):    Setting up:
2018-02-22 20:33:46 (INFO):         Paper Trader
2018-02-22 20:33:46 (INFO):         Paper trader that simulates fake trades.
2018-02-22 20:33:46 (INFO):    

2018-02-22 20:33:46 (INFO):    Setting up:
2018-02-22 20:33:46 (INFO):         Performance Analyzer
2018-02-22 20:33:46 (INFO):         Analyzes performances of trades
2018-02-22 20:33:46 (INFO):    

2018-02-22 20:33:46 (INFO):        WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-02-22 20:33:46 (INFO):        WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-02-22 20:35:10 (DEBUG):    ====================================
2018-02-22 20:35:10 (DEBUG):    Finished in 1.4012166666666666 minutes
2018-02-22 20:35:10 (DEBUG):    ====================================
 --> POST /api/backtest 200 85s 524.07kb

RSI_BULL_BEAR_ADX:
Code:
2018-02-22 20:31:24 (INFO):    Setting up Gekko in backtest mode
2018-02-22 20:31:24 (INFO):    
2018-02-22 20:31:24 (INFO):    Setting up:
2018-02-22 20:31:24 (INFO):         Trading Advisor
2018-02-22 20:31:24 (INFO):         Calculate trading advice
2018-02-22 20:31:24 (INFO):         Using the strategy: RSI_BULL_BEAR_ADX
2018-02-22 20:31:24 (INFO):    ====================================
2018-02-22 20:31:24 (INFO):    Running RSI Bull and Bear + ADX
2018-02-22 20:31:24 (INFO):    ====================================
2018-02-22 20:31:24 (INFO):    Make sure your warmup period matches SMA_long and that Gekko downloads data if needed
2018-02-22 20:31:24 (WARN):    *** WARNING *** Your Warmup period is lower then SMA_long. If Gekko does not download data automatically when running LIVE the strategy will default to BEAR-mode until it has enough data.
2018-02-22 20:31:24 (INFO):    

2018-02-22 20:31:24 (INFO):    Setting up:
2018-02-22 20:31:24 (INFO):         Paper Trader
2018-02-22 20:31:24 (INFO):         Paper trader that simulates fake trades.
2018-02-22 20:31:24 (INFO):    

2018-02-22 20:31:24 (INFO):    Setting up:
2018-02-22 20:31:24 (INFO):         Performance Analyzer
2018-02-22 20:31:24 (INFO):         Analyzes performances of trades
2018-02-22 20:31:24 (INFO):    

2018-02-22 20:31:25 (INFO):        WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-02-22 20:31:25 (INFO):        WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!
2018-02-22 20:31:30 (INFO):    ====================================
2018-02-22 20:31:30 (INFO):    Finished in 2.07 minutes
2018-02-22 20:31:30 (INFO):    ====================================
2018-02-22 20:33:28 (INFO):    ====================================
2018-02-22 20:33:28 (INFO):    Finished in 2.06 minutes
2018-02-22 20:33:28 (INFO):    ====================================

At the end of he second file, "POST /api/backtest 200 85s 524.07kb" (or something along these lines) is missing. Looks like there is no result data returned?

Thanks a lot for your help!!

Luke

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Edit:

This SOLVED the issue:

https://forum.gekko.wizb.it/thread-53.ht...ht=timeout
  Reply
Been running this strategy for 3 days with no sales yet. The bot bought some LTC @ $210 and watched it go to $230 twice and it just held. Is there anyway to tweak this code for the bot to sell at a certain percentage?
  Reply
hi
strategy does not work as you say
what is bear, what is bull
sma-rsi-ema --- long-short-read and learn them

OK
  Reply
Hello everyone, i want to add the ADX strategy to a new config file , do i simply copy the toml data in to the config file or will need to do more?

I do not want to use the UI as i'm on a VPS so what to use command line to set this up.

Thanks
  Reply
(02-12-2018, 01:25 PM)gibba Wrote:
(02-12-2018, 12:48 AM)tommiehansen Wrote: On page 4:
https://forum.gekko.wizb.it/thread-100-page-4.html

Yes, need to add a repository.

Edit: added repo @ https://github.com/tommiehansen/gekko_to...strategies

Thanks for sharing!
I'm testing it live right now Wink

how are your tests?
  Reply
Hello

Any idea how to add this stop loss to strategy  RSI_Bull_Bear_ADX ? I would be very thankfull. Let's say i want max 5% stop loss.



//In the strategy init create the stoploss variable:

this.stop = "";





if(logic that determines a sell || this.stop != "" && price<this.stop){

       

//if you want to show a stoploss being triggered in the console:

        if(this.stop != "" && price<this.stop){

            console.log("stoplosss triggered - "+ this.stop);

        }



        this.direction="short";

        if(this.trend == "long"){

            this.stop = "";

            this.trend = this.direction;

            this.advice(this.direction);

        }

   

    }else if(logic that determines a buy){

        if(this.stop==""){

//sets up the stoploss, you should make the .2 a variable in the strategy config really

            this.stop = price-(price*.2);

            this.direction="long";

            this.trend = this.direction;

            this.advice(this.direction);

        }

    }
  Reply
Well no matter that i try i get the error message "typeError: cannot read property SMA_long of undefined.

Copied new files and re install indicators still same error any ideas?

This is through using a config file and not UI
  Reply
(03-04-2018, 07:20 PM)Fab1j0 Wrote: Hello

Any idea how to add this stop loss to strategy  RSI_Bull_Bear_ADX ? I would be very thankfull. Let's say i want max 5% stop loss.
....
....
As has been discovered by everyone who's tried, stop losses really don't work well with this strategy. If you want to try, my stop loss modification is here: https://raw.githubusercontent.com/RJPGri...dx_Stop.js
You need to add a "Stop_Loss_Percent" variable to the toml file, or in the UI Parameters. This represents the % price you want it to fall to before selling. i.e. a 5% stop loss is 95% of the price, so put "Stop_Loss_Percent = 95"
The reason I added the stop loss was to put the strategy through genetic analysis for a few days - the result was that for this strategy to perform the stop loss had to be low enough to never be hit. For me that pretty conclusively proved that it wasn't worth chasing.
  Reply


Forum Jump:


Users browsing this thread: