-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
47 lines (31 loc) · 1.27 KB
/
main.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import argparse
import pandas as pd
from chart import create_plot
from simp_zoom import zoom_factory
from simulator import Simulator
import mplfinance as mpf
def arg_handler():
parser = argparse.ArgumentParser(description="Trading Bot V3",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument(
"mode", help="Select a mode between 'test' and 'live'.")
parser.add_argument("-s", "--symbol", type=str,
help="define the symbol.", default="BTCBUSD")
parser.add_argument("-p", "--past-days", type=int,
help="define the past days.", default=365)
parser.add_argument("-t", "--time-interval", type=str,
help="define the time interval.", default="1h")
parser.add_argument("-r", "--refresh-rate", type=int,
help="define the refresh rate in m.", default=1)
parser.add_argument("-d", "--simulation-days", type=int,
help="define the simulation days", default=30)
args = parser.parse_args()
config = vars(args)
return config
def main():
config = arg_handler()
simulator = Simulator(config)
simulator.run()
mpf.show()
if __name__ == "__main__":
main()