[Share] RSI-BB-ADX with candlebatcher
#11
Both of those errors are failures to find gekko variables or modules, they don't look like anything to do with the strategy. Make sure you can run other strategies and get gekko working, then try this again!
  Reply
#12
Thanks Gryphon;

I removed the current version of Gekko, and made a fresh installation- testing live trade on GUI is working fine now, except that I keep getting ESOCKETTIMEDOUT errors every now and then.

and yes, I tested other strategies on CLI And they are working fine!

I would really appreciate the support! perhaps someone can list what modules are required to run gekko that I can npm install? as I have already reinstalled as per instructions on the website!
  Reply
#13
Quick info check please - does the timeframe determine the trade execution if all settings are met? if so how does the 1 min candle help? Im trying to get my head around the logic of the timeframe function so i can look to optimise it.

Thanks
  Reply
#14
I don't quite follow... Trade execution if all settings are met?

To simplify it, imagine you had a single RSI indicator with a length of 20, and ran it on five minute candles. Run that normally in gekko with 5 minute candles and every 5 minute gekko will update the indicator with the latest closing price and check the trade logic.

Now to run that with the candlebatching I've used here. Set the timeframe to 5 as that is the candle size you want, then run it on 1 minute candles in gekko. What the strategy now does is actually create 5 RSI indicators. (Desired candle length 5, divided by actual running candle length 1). Assuming the strategy has been seeded with data, when the first minute candle comes in, RSI1 is updated, result read and trading logic checked. When the second minute candle comes in, RSI2 is updated and checked. So on to RSI3, 4 and 5, then back to RSI1.
You have 5 RSI indicators staggered through time, and have checked for entry/exit points 5 times as regularly.

Now as I'm writing this I'm wondering if I'm a complete idiot... Would an RSI(20) on 5 minute candles give the same result as an RSI(100) on 1 minute candles? I'll have to test that. If they give the same result... Then yeah I'll feel rather stupid, I've been playing around with this candle batching for ages.
  Reply
#15
Thats the explanation i was looking for i can see the benefit now as the indicator is constantly updating within that time frame. It in theory makes all indicators update in a similar way to moving averages do. I'll dig into the stats this weekend and play around.

Thanks
  Reply
#16
I try to use the strategy, but it doesn't make any trade when I do backtesting.
Code:
2018-12-23 17:17:33 (INFO):     Setting up Gekko in backtest mode
2018-12-23 17:17:33 (INFO):
2018-12-23 17:17:33 (WARN):     The plugin Candle writer does not support the mode backtest. It has been disabled.
2018-12-23 17:17:33 (INFO):     Setting up:
2018-12-23 17:17:33 (INFO):              Trading Advisor
2018-12-23 17:17:33 (INFO):              Calculate trading advice
2018-12-23 17:17:33 (INFO):              Using the strategy: RSI_BB_ADX
2018-12-23 17:17:33 (ERROR):    Failed to load indicator Alligator
2018-12-23 17:17:33 (ERROR):    Failed to load indicator HEIKEN
2018-12-23 17:17:33 (ERROR):    Failed to load indicator NN
2018-12-23 17:17:33 (ERROR):    Failed to load indicator NNv2
2018-12-23 17:17:33 (ERROR):    Failed to load indicator PIVOTHIGHLOW
2018-12-23 17:17:33 (ERROR):    Failed to load indicator RSI-beta
2018-12-23 17:17:34 (ERROR):    Failed to load indicator STC-1525204573
2018-12-23 17:17:34 (INFO):     ====================================
2018-12-23 17:17:34 (INFO):     Running RSI Bull and Bear + ADX M1
2018-12-23 17:17:34 (INFO):     ====================================
2018-12-23 17:17:34 (INFO):     Make sure your warmup period matches SMA_long and that Gekko downloads data if needed
2018-12-23 17:17:34 (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-12-23 17:17:34 (INFO):

2018-12-23 17:17:34 (INFO):     Setting up:
2018-12-23 17:17:34 (INFO):              Paper Trader
2018-12-23 17:17:34 (INFO):              Paper trader that simulates fake trades.
2018-12-23 17:17:34 (INFO):

2018-12-23 17:17:34 (INFO):     Setting up:
2018-12-23 17:17:34 (INFO):              Performance Analyzer
2018-12-23 17:17:34 (INFO):              Analyzes performances of trades
2018-12-23 17:17:34 (INFO):

2018-12-23 17:17:34 (INFO):     Scanning local history for backtestable dateranges.
2018-12-23 17:17:34 (DEBUG):    Available 42042
2018-12-23 17:17:34 (DEBUG):    Optimal 42041
2018-12-23 17:17:34 (INFO):     Gekko is able to fully use the local history.
2018-12-23 17:17:34 (INFO):     Gekko was able to find a single daterange in the locally stored history:
2018-12-23 17:17:34 (INFO):              from: 2018-11-23 21:00:00
2018-12-23 17:17:34 (INFO):              to: 2018-12-23 01:41:00

2018-12-23 17:17:34 (INFO):             WARNING: BACKTESTING FEATURE NEEDS PROPER TESTING
2018-12-23 17:17:34 (INFO):             WARNING: ACT ON THESE NUMBERS AT YOUR OWN RISK!

2018-12-23 17:17:34 (INFO):     2018-11-24 01:00:00: Paper trader simulated a BUY       0.00000000 USD  => 1.49228417 BCH
2018-12-23 17:17:35 (INFO):     ====================================
2018-12-23 17:17:35 (INFO):     Finished in 1.68 seconds
2018-12-23 17:17:35 (INFO):     ====================================
2018-12-23 17:17:35 (INFO):
2018-12-23 17:17:35 (INFO):     (ROUNDTRIP) REPORT:
2018-12-23 17:17:35 (INFO):     (ROUNDTRIP) entry date (UTC)    exit date (UTC)         exposed duration        P&L     profit
2018-12-23 17:17:35 (INFO):
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) start time:                      2018-11-24 06:59:00
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) end time:                        2018-12-23 01:42:00
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) timespan:                        a month
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) exposure:                        0
2018-12-23 17:17:35 (INFO):
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) start price:                     202.83 USD
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) end price:                       189.8 USD
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) Market:                          -6.42409900%
2018-12-23 17:17:35 (INFO):
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) amount of trades:                1
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) original balance:                302.83000000 USD
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) current balance:                 283.23553547 USD
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) profit:                          -19.59446453 USD (-6.47045026%)
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) simulated yearly profit:         -248.6714993143757 USD (-82.11587336603891%)
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) sharpe ratio:                    NaN
2018-12-23 17:17:35 (INFO):     (PROFIT REPORT) expected downside:               NaN
  Reply
#17
(12-23-2018, 11:20 PM)flychicken Wrote: I try to use the strategy, but it doesn't make any trade when I do backtesting.
Code:
ERRORS

The strategy is fine, your setup may be not. The errors might give a hint Smile
Please discuss strategy here, not backtesting errors.
  Reply
#18
(12-31-2018, 03:06 PM)R4nD00m Wrote:
(12-23-2018, 11:20 PM)flychicken Wrote: I try to use the strategy, but it doesn't make any trade when I do backtesting.
Code:
ERRORS

The strategy is fine, your setup may be not. The errors might give a hint Smile
Please discuss strategy here, not backtesting errors.

The set up is the original setup shows here. Those errors from indicator, but those indicator are not relates this strategy.
  Reply
#19
Hi - great addition to an already great strat!

Could someone tell me hw to set this up to batch back test in gekkoga as it seems to crash when i try 1 min candles., which is the whole point of this strat..

heres my gekkoga config so far:


Code:
const randomExt = require('random-ext');

const config = {
stratName: 'RSI_BULL_BEAR_ADX_CANDLEB',
gekkoConfig: {
  watch: {
    exchange: 'binance',
    currency: 'USDT',
    asset: 'BTC'
  },

   //daterange: 'scan',

daterange: {
    from: '2017-09-17 09:00',
    to: '2019-02-01 00:00'
    },

  simulationBalance: {
    'asset': 0.022,
    'currency': 50
  },

  slippage: 0.1,
  feeTaker: 0.075,
  feeMaker: 0.075,
  feeUsing: 'maker', // maker || taker

},
apiUrl: 'http://localhost:3000',

// Population size, better reduce this for larger data
populationAmt: 4,

//  How many completely new units will be added to the population (populationAmt * variation must be a whole number!!)
variation: 2,

// How many components maximum to mutate at once
mutateElements: 1,

// How many parallel queries to run at once
parallelqueries: 4,
 
// Min sharpe to consider in the profitForMinSharpe main objective
minSharpe: 0,

// profit || score || profitForMinSharpe
// score = ideas? feedback?
// profit = recommended!
// profitForMinSharpe = same as profit but sharpe will never be lower than minSharpe
mainObjective: 'score',

// optionally recieve and archive new all time high every new all time high
notifications: {
  email: {
    enabled: false,
    receiver: '',
    senderservice: 'gmail',
    sender: '',
    senderpass: '',
  },
},

candleValues: [1, 5, 10, 30],

getProperties: () => ({

  candleSize: randomExt.pick(config.candleValues),
  historySize: 1000,

  //# SMA INDICATOR
  SMA_long: randomExt.integer(20,1)*50,
  SMA_short: randomExt.integer(50,2),
  SMA_Timeframe: randomExt.integer(20, 1)*1,

  //# RSI BULL / BEAR
  BULL_RSI: randomExt.integer(50,5),
  BULL_RSI_high: randomExt.integer(100,50),
  BULL_RSI_low: randomExt.integer(50,0),
  BULL_RSI_Timeframe: randomExt.integer(20, 1)*1,

  BEAR_RSI: randomExt.integer(50,5),
  BEAR_RSI_high: randomExt.integer(100,50),
  BEAR_RSI_low: randomExt.integer(50,0),
  BEAR_RSI_Timeframe: randomExt.integer(20, 1)*1,

  //# MODIFY RSI (depending on ADX)
  BULL_MOD_high: randomExt.integer(15,0),
  BULL_MOD_low: randomExt.integer(0,-15),
  BEAR_MOD_high: randomExt.integer(15,0),
  BEAR_MOD_low: randomExt.integer(0,-15),

  //# ADX
  ADX: randomExt.integer(20,0),
  ADX_high: randomExt.integer(100,50),
  ADX_low: randomExt.integer(50,0),
  ADX_Timeframe: randomExt.integer(20, 1)*1,

  Stoploss_Percentage: randomExt.integer(100, 0),

})
};

module.exports = config;
  Reply
#20
From a quick scan, you should just set candleSize : 1, no need for the array and random pick any more. Then you can easily check if it actually is the candle size causing the crashes.


Can't really see anything untoward otherwise. On the timeframes you have a *1 on the end, which does nothing but shouldn't cause a crash...
  Reply


Forum Jump:


Users browsing this thread: