Gekko: Needed parameters for StochRSI_MACD.js

Created on 4 Jan 2018  路  3Comments  路  Source: askmike/gekko

I'm trying to setup this strategy from @John1231983:
https://gist.github.com/John1231983/0822062d6e252dda82e1759bb47ef4fb

And I'm using these parameters, taken from StochRSI and MACD:
interval = 14
short = 10
long = 21
signal = 9

[thresholds]
low = 20
high = 80
persistence = 3
down = -0.025
up = 0.025

However, when I click Backtest, nothing happens. Are the parameters above the correct parameters I should be using in the gekko-stable/config/StochRSI_MACD.toml file?
Thanks.

wontfix

Most helpful comment

I was able to run with this toml:

interval = 14
short = 12
long = 26
signal = 9

[bbands]
TimePeriod = 20
NbDevDn = 2
NbDevUp = 2
persistence_upper = 10
persistence_lower = 10  

[thresholds]
low = 20
high = 80
down = 0.1
persistence = 2

But only through the command line, with my config.js. When I tried in the UI, I've got the same result, regardless of my choices, one sell after the warmup.
I still don't know why.

These are my files.zip:

  • config/strategies/StochRSI_MACD_BB.toml
  • strategies/indicators/BB.js
  • strategies/StochRSI_MACD_BB.js

This goes in my config.js:

// StochRSI_MACD_BB Settings
config.StochRSI_MACD_BB = {
  interval: 14,
  short: 12,
  long: 26,
  signal: 9, 
  bbands: {
    TimePeriod: 20,
    NbDevDn: 2,
    NbDevUp: 2,
    persistence_upper: 10,
    persistence_lower: 10,  
  }, 
  thresholds: {
    low: 20,
    high: 80,
    down: -0.1,//-2,//-0.1,
    up: 0.1,//1.5,//0.25,   
    // How many candle intervals should a trend persist
    // before we consider it real?
    persistence: 2
  }
};

All 3 comments

Noticed a few things about that file;

  • It as this.addIndicator('bb', 'BB', this.settings.bbands); so the parameters are likely looking for bbands and a BB indicator to be included - there's no BB.js within indicators.
  • var RSI = require('./indicators/RSI.js'); - this variable isn't used.
  • (updated by askmike) @ 30/07/2016 - it could be out of date

I was able to run with this toml:

interval = 14
short = 12
long = 26
signal = 9

[bbands]
TimePeriod = 20
NbDevDn = 2
NbDevUp = 2
persistence_upper = 10
persistence_lower = 10  

[thresholds]
low = 20
high = 80
down = 0.1
persistence = 2

But only through the command line, with my config.js. When I tried in the UI, I've got the same result, regardless of my choices, one sell after the warmup.
I still don't know why.

These are my files.zip:

  • config/strategies/StochRSI_MACD_BB.toml
  • strategies/indicators/BB.js
  • strategies/StochRSI_MACD_BB.js

This goes in my config.js:

// StochRSI_MACD_BB Settings
config.StochRSI_MACD_BB = {
  interval: 14,
  short: 12,
  long: 26,
  signal: 9, 
  bbands: {
    TimePeriod: 20,
    NbDevDn: 2,
    NbDevUp: 2,
    persistence_upper: 10,
    persistence_lower: 10,  
  }, 
  thresholds: {
    low: 20,
    high: 80,
    down: -0.1,//-2,//-0.1,
    up: 0.1,//1.5,//0.25,   
    // How many candle intervals should a trend persist
    // before we consider it real?
    persistence: 2
  }
};

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rcoenen picture rcoenen  路  5Comments

laurentgrangeau picture laurentgrangeau  路  6Comments

crypto-kid picture crypto-kid  路  5Comments

thegamecat picture thegamecat  路  4Comments

ChadTaljaardt picture ChadTaljaardt  路  5Comments