init
This commit is contained in:
@@ -82,9 +82,9 @@ class HTS_etf (HTS):
|
|||||||
|
|
||||||
def getCount(self, stock_code, price):
|
def getCount(self, stock_code, price):
|
||||||
if stock_code == "252670" or stock_code == "122630":
|
if stock_code == "252670" or stock_code == "122630":
|
||||||
MAX_BUY_PRICE = 200000
|
|
||||||
else:
|
|
||||||
MAX_BUY_PRICE = 100000
|
MAX_BUY_PRICE = 100000
|
||||||
|
else:
|
||||||
|
MAX_BUY_PRICE = 50000
|
||||||
|
|
||||||
count = int(MAX_BUY_PRICE / price)
|
count = int(MAX_BUY_PRICE / price)
|
||||||
return count
|
return count
|
||||||
@@ -138,7 +138,7 @@ class HTS_etf (HTS):
|
|||||||
|
|
||||||
if bs_buy_price > 0:
|
if bs_buy_price > 0:
|
||||||
|
|
||||||
if not self.orderChecker.exist(today, "A" + stock['stock_code'], mins=180):
|
if not self.orderChecker.exist(today, "A" + stock['stock_code'], hours=9):
|
||||||
buy_count = self.getCount(stock['stock_code'], bs_buy_price)
|
buy_count = self.getCount(stock['stock_code'], bs_buy_price)
|
||||||
|
|
||||||
if buy_count > 0:
|
if buy_count > 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user