init
This commit is contained in:
@@ -484,7 +484,7 @@ class Bithumb_minute(HTS):
|
||||
data1['buy'][i] = buy
|
||||
bsLine['buy'][i] = buy
|
||||
bsLine['buy_weight'][i] = 0.3
|
||||
"""
|
||||
|
||||
if data2['slow_k'][i] > 90:
|
||||
if (data1['slow_d'][i-1] < data1['slow_k'][i-1] and data1['slow_k'][i] < data1['slow_d'][i]):
|
||||
sell = data1['close'][i]
|
||||
@@ -503,7 +503,7 @@ class Bithumb_minute(HTS):
|
||||
data1['sell'][i] = sell
|
||||
bsLine['sell'][i] = sell
|
||||
bsLine['sell_weight'][i] = 100
|
||||
"""
|
||||
|
||||
return bsLine
|
||||
|
||||
def get_ohlcv(self, ticker, minute=5):
|
||||
@@ -622,10 +622,6 @@ class Bithumb_minute(HTS):
|
||||
# bithumb
|
||||
df_ = pybithumb.get_ohlcv(ticker)
|
||||
"""
|
||||
stock = self.getStock(ticker, analyzed_day, day=30)
|
||||
if stock["slow_k"][len(stock['close'])-1] > 40:
|
||||
print (datetime.now().strftime('%Y-%m-%d %H:%M:%S'), ",", round(stock["slow_k"][len(stock['close'])-3],2), ",", round(stock["slow_k"][len(stock['close'])-2],2), ",", round(stock["slow_k"][len(stock['close'])-1], ))
|
||||
return
|
||||
|
||||
stock1 = self.getStock(ticker, analyzed_day, minute=5)
|
||||
stock2 = self.getStock(ticker, analyzed_day, minute=30)
|
||||
@@ -657,6 +653,11 @@ class Bithumb_minute(HTS):
|
||||
# 매수 조건
|
||||
if max(bsLine['buy'][len(bsLine['buy']) - 2:]) > 100:
|
||||
|
||||
stock = self.getStock(ticker, analyzed_day, day=30)
|
||||
if stock["slow_k"][len(stock['close'])-1] > 40:
|
||||
print (datetime.now().strftime('%Y-%m-%d %H:%M:%S'), ",", round(stock["slow_k"][len(stock['close'])-3],2), ",", round(stock["slow_k"][len(stock['close'])-2],2), ",", round(stock["slow_k"][len(stock['close'])-1], ))
|
||||
return
|
||||
|
||||
tmp = self.bithumb.get_balance(ticker)
|
||||
balance = tmp[2]
|
||||
#count = round((balance * (bsLine['buy_weight'][len(bsLine['buy_weight']) - 1] / 100)) / bsLine['buy'][len(bsLine['buy']) - 1], 2)
|
||||
|
||||
Reference in New Issue
Block a user