init
This commit is contained in:
@@ -199,7 +199,7 @@ class BuySellChecker:
|
|||||||
### STOCHASTIC buy 분석 ###
|
### STOCHASTIC buy 분석 ###
|
||||||
##########################
|
##########################
|
||||||
if i < 40:
|
if i < 40:
|
||||||
if data["slow_k"][i] <= 10:
|
if data["slow_k"][i] <= 20:
|
||||||
if data["slow_k"][i - 1] < data["slow_d"][i - 1] and data["slow_d"][i] < data["slow_k"][i]:
|
if data["slow_k"][i - 1] < data["slow_d"][i - 1] and data["slow_d"][i] < data["slow_k"][i]:
|
||||||
if data["Close"][i] < data["avg5"][i]:
|
if data["Close"][i] < data["avg5"][i]:
|
||||||
buy = data["Close"][i]
|
buy = data["Close"][i]
|
||||||
@@ -228,7 +228,7 @@ class BuySellChecker:
|
|||||||
###################
|
###################
|
||||||
### RSI buy 분석 ###
|
### RSI buy 분석 ###
|
||||||
###################
|
###################
|
||||||
if data["rsi"][i] < 20:
|
if data["rsi"][i] < 25:
|
||||||
if data["rsi"][i - 1] < data["rsis"][i - 1] and data["rsis"][i] < data["rsi"][i]:
|
if data["rsi"][i - 1] < data["rsis"][i - 1] and data["rsis"][i] < data["rsi"][i]:
|
||||||
if data["Close"][i] < data["avg5"][i]:
|
if data["Close"][i] < data["avg5"][i]:
|
||||||
buy = data["Close"][i]
|
buy = data["Close"][i]
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ class HTS_122630:
|
|||||||
|
|
||||||
def buyRealTime(self, stock_code, GIVEN_DAY):
|
def buyRealTime(self, stock_code, GIVEN_DAY):
|
||||||
orderChecker = OrderChecker(stock_code)
|
orderChecker = OrderChecker(stock_code)
|
||||||
BASE_COUNT = 150
|
BASE_COUNT = 250
|
||||||
|
|
||||||
timecheckList = pd.read_csv("timecheck.csv").values.tolist()
|
timecheckList = pd.read_csv("timecheck.csv").values.tolist()
|
||||||
timecheck = {GIVEN_DAY + " " + str(second).zfill(6): False for second, check in timecheckList}
|
timecheck = {GIVEN_DAY + " " + str(second).zfill(6): False for second, check in timecheckList}
|
||||||
|
|||||||
@@ -547,7 +547,7 @@ class HTS_252670:
|
|||||||
|
|
||||||
def buyRealTime(self, stock_code, GIVEN_DAY):
|
def buyRealTime(self, stock_code, GIVEN_DAY):
|
||||||
orderChecker = OrderChecker(stock_code)
|
orderChecker = OrderChecker(stock_code)
|
||||||
BASE_COUNT = 150
|
BASE_COUNT = 250
|
||||||
|
|
||||||
timecheckList = pd.read_csv("timecheck.csv").values.tolist()
|
timecheckList = pd.read_csv("timecheck.csv").values.tolist()
|
||||||
timecheck = {GIVEN_DAY + " " + str(second).zfill(6):False for second, check in timecheckList}
|
timecheck = {GIVEN_DAY + " " + str(second).zfill(6):False for second, check in timecheckList}
|
||||||
|
|||||||
@@ -128,7 +128,13 @@ class Simulation:
|
|||||||
fig.append_trace(trace, 4, 1)
|
fig.append_trace(trace, 4, 1)
|
||||||
#fig.update_xaxes(nticks=5)
|
#fig.update_xaxes(nticks=5)
|
||||||
#fig.update_layout(height=1800, title=stock_code + "_" + given_day, xaxis_rangeslider_visible=False)
|
#fig.update_layout(height=1800, title=stock_code + "_" + given_day, xaxis_rangeslider_visible=False)
|
||||||
fig.update_layout(height=1800, title=stock_code + "_" + given_day)
|
|
||||||
|
df = pd.DataFrame(bsLine)
|
||||||
|
df = df.fillna(-1)
|
||||||
|
buy_count = len(df.loc[df["buy"] > 0])
|
||||||
|
sell_count = len(df.loc[df["sell"] > 0])
|
||||||
|
|
||||||
|
fig.update_layout(height=1800, title=stock_code + "_" + given_day + "_" + str(buy_count)+","+str(sell_count))
|
||||||
fig.show()
|
fig.show()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user