This commit is contained in:
윤도상/택배파트
2024-11-15 10:52:48 +09:00
parent 5c97e3edc2
commit b4d23fc692
2 changed files with 24 additions and 0 deletions

View File

@@ -724,3 +724,17 @@ class Common:
return True
return False
def buy_stock_ichimok(self, stock_daily):
# 어제의 저가는 선행 1과 2 사이에 있었는데, 오늘은 선행 1과 2 위로 올라왔다.
check_buy = False
min_open_close_1 = min(stock_daily['open'].iloc[-2], stock_daily['close'].iloc[-2])
min_open_close = min(stock_daily['open'].iloc[-1], stock_daily['close'].iloc[-1])
if (stock_daily['leadingSpan1'].iloc[-2] < min_open_close_1 <= stock_daily['leadingSpan2'].iloc[-2] and
stock_daily['leadingSpan1'].iloc[-1] < stock_daily['leadingSpan2'].iloc[-1] < min_open_close):
check_buy = True
return check_buy