fewfwe
This commit is contained in:
@@ -175,7 +175,15 @@ class WeexTransaction:
|
||||
|
||||
if current_minute in [0, 30]: # 判断是否是 新的30分钟了
|
||||
|
||||
time.sleep(10)
|
||||
if self.page.ele('x://section[text()="仓位(1)"]', timeout=5):
|
||||
text = self.page.ele(
|
||||
'x://*[@id="tradeLimitContainerJS"]/div[2]/div/div[1]/div/div/div/div[5]/div/div/div[2]').text
|
||||
if "ETH/SUSDT 多" in text:
|
||||
self.start = 1
|
||||
elif "ETH/SUSDT 空" in text:
|
||||
self.start = -1
|
||||
else:
|
||||
self.start = 0
|
||||
|
||||
new_price_datas = self.get_price()
|
||||
if new_price_datas:
|
||||
@@ -187,16 +195,6 @@ class WeexTransaction:
|
||||
new_price_datas1 = sorted(new_price_datas, key=lambda x: x["id"])
|
||||
kline_1, kline_2, kline_3 = new_price_datas1[-3:]
|
||||
|
||||
if self.page.ele('x://section[text()="仓位(1)"]', timeout=15):
|
||||
text = self.page.ele(
|
||||
'x://*[@id="tradeLimitContainerJS"]/div[2]/div/div[1]/div/div/div/div[5]/div/div/div[2]').text
|
||||
if "ETH/SUSDT 多" in text:
|
||||
self.start = 1
|
||||
elif "ETH/SUSDT 空" in text:
|
||||
self.start = -1
|
||||
else:
|
||||
self.start = 0
|
||||
|
||||
if self.start == 1:
|
||||
if is_bearish(kline_1) and is_bearish(kline_2):
|
||||
self.page.ele('x://*[contains(text(), "闪电平仓")]').click()
|
||||
|
||||
Reference in New Issue
Block a user