Ejemplo n.º 1
0
 def __init__(self):
     # Přiřazení vnějších tříd a metod.
     self.conf = Helper.Config()
     self.tapi = Tapi.TradeApi()
     self.api = Api.PublicApi()
     self.bigticker = None
     self.printer = Printer.TraderPrinter()
     self.logger = Logger.TraderLogging()
     self.methods = TradeMethods()
     self.currentfunds = self.getCurrentAccountState()
     self.initialfunds = self.currentfunds
     self.usdinitialfunds = self.getAccountStateInUSD()
     self.starttime = time.asctime()
     self.boughts = []
     self.buys = 0
     self.sells = 0
     self.losses = 0
     self.profits = 0
     self.currentticker = None
Ejemplo n.º 2
0
 def __init__(self):
     self.config = Helper.Config()
     self.bigticker = None
     self.buyslipage = self.config.buySlipage
     self.sellslipage = self.config.sellSlipage
     self.logger = Logger.TraderLogging()
     self.printer = Printer.TraderPrinter()
     self.buys = 0
     self.sells = 0
     self.losses = 0
     self.profits = 0
     self.trades = 0
     self.cykles = 1
     self.starttime = time.asctime()
     self.initialfunds = self.getAccountState()
     self.initializedDolars = self.getAccountStateInUSD(self.initialfunds)
     self.currentfunds = self.getAccountState()
     self.currentDolars = self.getAccountStateInUSD(self.currentfunds)
     self.boughts = list()