How to run MK_RSI_BULL_BEAR strategy in CLI mode
#1
Hi
How to run MK_RSI_BULL_BEAR strategy in CLI mode

https://github.com/xFFFFF/Gekko-Strategies

# SMA Trends
# MK 200 worked better - all other changes were worse
# SMA_long = 1000
SMA_long = 200
SMA_short = 50

# BULL
BULL_RSI = 10
BULL_FAST_RSI = 5
BULL_SLOW_RSI = 14
BULL_RSI_HIGH=80
BULL_RSI_LOW=60

# BEAR
BEAR_RSI = 15
BEAR_FAST_RSI = 5
BEAR_SLOW_RSI = 14
BEAR_RSI_HIGH=50
BEAR_RSI_LOW=20

# BULL/BEAR is defined by the longer SMA trends
# if SHORT over LONG = BULL
# if SHORT under LONG = BEAR
-----------------------------------------------

how can we adapt such strategies (ui) to fashion (cli) fashion
written source please
thank you
  Reply
#2
First of all -- you need to convert it to json.
This is fairly simple if one understands how TOML works.

In TOML all [SOMETHING] is a parent object, in your specific case you don't got any of these though so it simply becomes:

{
"SMA_long": 200,
"SMA_short": 50,
"BULL_RSI": 10,
"BULL_FAST_RSI": 5,
"BULL_SLOW_RSI": 14,
"BULL_RSI_HIGH": 80,
"BULL_RSI_LOW": 60,
"BEAR_RSI": 15,
"BEAR_FAST_RSI": 5,
"BEAR_SLOW_RSI": 14,
"BEAR_RSI_HIGH": 50,
"BEAR_RSI_LOW": 20
}

You can use this simple tool to convert TOML to JSON:
https://toml-to-json.matiaskorhonen.fi/

For other queries regarding running stuff in CLI-mode please search the forums.
  Reply


Forum Jump:


Users browsing this thread: