[SHARE] Simple RSI BULL/BEAR strategy
#51
Hello and thanks for sharing this strategy!

I'm trying to figure out how to set parameters in config.js using commandline not gekko UI


Code:
config.tradingAdvisor = {
 enabled: true,
 method: 'RSI_BULL_BEAR',
 candleSize: 15,
 historySize: 10,
 adapter: 'sqlite'
}

config.RSI_BULL_BEAR = {
 //SMA Trends
 SMA_long: 1000,
 SMA_short: 50,

 //BULL
 BULL_RSI: 10,
 BULL_RSI_high: 80,
 BULL_RSI_low: 60,

 //BEAR
 BEAR_RSI: 15,
 BEAR_RSI_high: 50,
 BEAR_RSI_low: 20
}


Is this right? Looking at other strategies in the config.js file i see they use a "thresholds" nested
brackets, but i don't know hot to adapt that for this strategy.

Thank you!
  Reply
#52
(02-09-2018, 08:35 PM)gibba Wrote: Hello and thanks for sharing this strategy!

I'm trying to figure out how to set parameters in config.js using commandline not gekko UI


Code:
config.tradingAdvisor = {
 enabled: true,
 method: 'RSI_BULL_BEAR',
 candleSize: 15,
 historySize: 10,
 adapter: 'sqlite'
}

config.RSI_BULL_BEAR = {
 //SMA Trends
 SMA_long: 1000,
 SMA_short: 50,

 //BULL
 BULL_RSI: 10,
 BULL_RSI_high: 80,
 BULL_RSI_low: 60,

 //BEAR
 BEAR_RSI: 15,
 BEAR_RSI_high: 50,
 BEAR_RSI_low: 20
}


Is this right? Looking at other strategies in the config.js file i see they use a "thresholds" nested
brackets, but i don't know hot to adapt that for this strategy.

Thank you!

Threshholds is a function that this strategy does not use, just like it doesn't use Double EMA or other things that could be used.
Thus you would have to write such functions for this strategy if you would like to use such things.

Different strategies make use of different settings since they rely on different indicators, methods etc.

If you find it hard to change params use the UI?

(02-09-2018, 08:02 PM)ankasem Wrote: Thank  you very much
tommie

look pretty
we are a little nervous

RSI_BULL_BEAR_ADX.js   okey but
settings (code)
where to place
Can you give an example to toml file
thank you

That strategy does not use a TOML-file for its settings since it's hard coded (since it's a test).
If you would like to use a TOML-file you simply would have to write one + remove the /* TEMP: set params */ from the JS-code.
  Reply
#53
Thanks for the quick response
success follows
  Reply
#54
(02-09-2018, 07:53 PM)tommiehansen Wrote:
(02-09-2018, 02:26 PM)Nima Wrote: Thank you,
i have tried the strategy. It is working well but seems to make losses in a sideward movement (no trend).

Try changing the params.

Thx. This would help finding good Parameters: https://github.com/Gab0/japonicus/issues/74
  Reply
#55
(02-09-2018, 10:10 PM)Nima Wrote:
(02-09-2018, 07:53 PM)tommiehansen Wrote:
(02-09-2018, 02:26 PM)Nima Wrote: Thank you,
i have tried the strategy. It is working well but seems to make losses in a sideward movement (no trend).

Try changing the params.

Thx. This would help finding good Parameters: https://github.com/Gab0/japonicus/issues/74

All these seem over-engineered and i have yet to get any GA working. I'll look into the gekko api to see if i can just POST, get data and append to csv files etc. It would seem one could just create some simple php + ajax stuff for this. php would not require any depedencies except a running server so would be easy to setup and run for most.

This is off topic for this thread though, started a GA-thread here:
https://forum.gekko.wizb.it/thread-1460.html
  Reply
#56
(02-09-2018, 09:25 PM)tommiehansen Wrote:
(02-09-2018, 08:35 PM)gibba Wrote: Hello and thanks for sharing this strategy!

I'm trying to figure out how to set parameters in config.js using commandline not gekko UI


Code:
config.tradingAdvisor = {
 enabled: true,
 method: 'RSI_BULL_BEAR',
 candleSize: 15,
 historySize: 10,
 adapter: 'sqlite'
}

config.RSI_BULL_BEAR = {
 //SMA Trends
 SMA_long: 1000,
 SMA_short: 50,

 //BULL
 BULL_RSI: 10,
 BULL_RSI_high: 80,
 BULL_RSI_low: 60,

 //BEAR
 BEAR_RSI: 15,
 BEAR_RSI_high: 50,
 BEAR_RSI_low: 20
}


Is this right? Looking at other strategies in the config.js file i see they use a "thresholds" nested
brackets, but i don't know hot to adapt that for this strategy.

Thank you!

Threshholds is a function that this strategy does not use, just like it doesn't use Double EMA or other things that could be used.
Thus you would have to write such functions for this strategy if you would like to use such things.

Different strategies make use of different settings since they rely on different indicators, methods etc.

If you find it hard to change params use the UI?


Hello and thanks for your answer!
Is not that i find it hard to modify params in config.js, is the opposite, i find it as easy as to open vim editor.

My question was more towards the syntax i need to use in config.js. Is my previous example correct? Will it work as expected using my snippet of code? Taking your words about thresholds it seems that my example it's ok  Wink

I can't/wan't use UI because i'm over ssh on a VPS, no risks opening a new port to the net and some extra features like Telegram Smile

Thank you again for your help!
  Reply
#57
Config.js is to configure output from TOML-files RSI BULL/BEAR ADX does not have a TOML-file so it simply will not work.
In order for it to work you would have to:

1. Create a TOML-file
2. Make that test-strategy use it (by removing the TEMP-params in the strategy.js file); all the this.settings.XXXXX = stuff that should go into the TOML-file without the 'this.settings'. See other strategies for how it works.

The syntax one has to use in the config.js is out of the scope for this thread and would seem to be more of a general Gekko question?
  Reply
#58
(02-11-2018, 12:10 AM)tommiehansen Wrote: Config.js is to configure output from TOML-files RSI BULL/BEAR ADX does not have a TOML-file so it simply will not work.
In order for it to work you would have to:

1. Create a TOML-file
2. Make that test-strategy use it (by removing the TEMP-params in the strategy.js file); all the this.settings.XXXXX = stuff that should go into the TOML-file without the 'this.settings'. See other strategies for how it works.

The syntax one has to use in the config.js is out of the scope for this thread and would seem to be more of a general Gekko question?

Hallo Tommie,
i don't use ADX version but the strategy you shared in the first post Wink

My original question was just how to convert your TOML file to an usable config.js
I have received an advice from the live testing i'm currently running (with the config.js i have posted above) so I think I succeeded

Anyway i will keep your 2 steps instructions for a future references WITH ADX Wink
Thanks!
  Reply
#59
Code:
config.RSI_BULL_BEAR = {
//SMA Trends
SMA_long: 1000,
SMA_short: 50,

//BULL
BULL_RSI: 10,
BULL_RSI_high: 80,
BULL_RSI_low: 60,

//BEAR
BEAR_RSI: 15,
BEAR_RSI_high: 50,
BEAR_RSI_low: 20
};
it was some posts ago
  Reply
#60
(02-11-2018, 07:29 PM)xFFFFF Wrote:
Code:
config.RSI_BULL_BEAR = {
//SMA Trends
SMA_long: 1000,
SMA_short: 50,

//BULL
BULL_RSI: 10,
BULL_RSI_high: 80,
BULL_RSI_low: 60,

//BEAR
BEAR_RSI: 15,
BEAR_RSI_high: 50,
BEAR_RSI_low: 20
};
it was some posts ago

Yes i know, it was a post of mine Smile
  Reply


Forum Jump:


Users browsing this thread: