def __init__(self, conn, k, account): self.conn = conn self.k = k self.pairs = account.asset_pair.keys() self.pred = dict() self.diff = dict() self.price = dict() self.simulate = True # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = hf.get_tader_name(self) self.constant = hf.get_trader_config()[trader_name] #Calculate the predicted change self.predict_change()
def __init__(self, account): self.account = account self.queries = db_queries.DbQueries() self.pairs = account.asset_pair.keys() self.diff = dict() self.price = dict() # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = hf.get_tader_name(self) self.constant = hf.get_trader_config()[trader_name] self.keep = min(0.01, self.constant["delta"]) # Calculate the predicted change self.run_trader() self.keep_back(dt.datetime.strptime("2016-01-01", "%Y-%m-%d"))
def __init__(self, account): self.account = account self.queries = db_queries.DbQueries() self.pairs = account.asset_pair.keys() self.diff = dict() self.price = dict() # Get Configuration Values for Trader from JSON File # This is required in case, we want ot optimize the algorithms later on. trader_name = hf.get_tader_name(self) self.constant = hf.get_trader_config()[trader_name] self.keep = min(0.01,self.constant["delta"]) # Calculate the predicted change self.run_trader() self.keep_back(dt.datetime.strptime("2016-01-01","%Y-%m-%d"))
def write_new_trader(self): hf.save_trader_config(self.constant, hf.get_tader_name(self))