-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
93 lines (85 loc) · 2.37 KB
/
config.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
from enum import IntEnum
from typing import List, Dict
class AssetType(IntEnum):
FOREX = 0
CFD = 1
class SpreadMode(IntEnum):
BIDASK = 0
RANDOM = 1
IGNORE = 2
FIXED = 3
SESSIONAL = 4
class Op(IntEnum):
LONG = 0
SHORT = 1
HOLD = 2
CLOSEALL = 3
class Config:
datafile:str = './2021617-60.csv'
fields:Dict = {
"symbol" : "symbol",
"dt" : "dt",
"tf" : "tf",
"open" : "open",
"high" : "high",
"low" : "low",
"close" : "close",
"vol" : "volume",
"bid" : "bid",
"ask" : "ask"}
symbols: List[Dict] = [{
"name" : "USDJPY",
"asset_type": AssetType.FOREX,
"leverage": 100,
"quote" : "JPY",
"base" : "USD",
"digits" : 3,
"commission" : 7,
"min_lot" : 0.01,
"max_lot" : 1,
"lot_step" : 0.01,
"lot_size" : 100000,
"swap_long" : 2.30,
"swap_short" : 2.75,
"swap_day" : 2,
"min_spread" : 1,
"max_spread" : 10,
"fixed_spread": 3,
"spread_mode" : SpreadMode.RANDOM,
"fixed_pt_value" : 1
},
{
"name" : "EURUSD",
"asset_type": AssetType.FOREX,
"leverage": 100,
"quote" : "USD",
"base" : "EUR",
"digits" : 5,
"commission" : 0,
"min_lot" : 0.01,
"max_lot" : 1,
"lot_step" : 0.01,
"lot_size" : 100000,
"swap_long" : 0,
"swap_short" : 0,
"swap_day" : 2,
"min_spread" : 1,
"max_spread" : 10,
"fixed_spread": 3,
"spread_mode" : SpreadMode.IGNORE,
"fixed_pt_value" : 1
}]
account: Dict = {
"balance": 10000.00,
"stop_out": 0.5,
"currency": "USD",
"fields": ["balance", "equity", "last_pnl", "total_orders", "margin_hold", "margin_free", "max_fl", "max_fp", "max_dd", "win_counts", "loss_count", "break_even"]
}
env: Dict = {
"window_size": 12,
"allow_multi_orders": False,
"obs_price_features": [],
"obs_price_exclude": ["tf", "symbol", "bid", "ask"],
#"obs_account_features": ["balance", "equity", "total_orders", "margin_hold", "margin_free", "max_fl", "max_fp", "win_counts", "loss_count", "break_even"]
"obs_account_features": ["balance", "equity", "win_counts", "loss_count", "break_even"]
}