forked from ln-markets/trading-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
launcher.py
26 lines (21 loc) · 953 Bytes
/
launcher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from strategies.ta_summary import TAS
import os
import yaml
# To load Configuration.yml file
def load_yaml(file):
with open(file) as file:
load = yaml.load(file, Loader=yaml.FullLoader)
return load
yaml_file = load_yaml(os.path.join(os.path.dirname(__file__), "configuration.yml"))
lnm_options = yaml_file["lnm_credentials"]
# call the bot you have choosed in configuration file
def bot():
if yaml_file['strategies']['ta_summary']:
config = yaml_file['ta_summary']
return TAS.ta_summary(TAS(lnm_options),
quantity = config['quantity'],
leverage = config['leverage'],
takeprofit = config['takeprofit'],
stoploss = config['stoploss'],
interval = config['interval'],
timeout = config['timeout'])