This commit is contained in:
dsyoon
2023-02-11 16:54:05 +09:00
parent 08a606bee1
commit 5c646b3a2f
4 changed files with 84 additions and 16 deletions

View File

@@ -286,8 +286,6 @@ class AnalyzerSqlite:
self.makeDir("15", "daily_낙폭과대")
self.makeDir("16", "daily_EV하단_내려옴")
self.makeDir("99", "daily_auto_trading")
return
def writeFile(self, dir_code, dir_name, CODE, NAME, top, stock, state, final_status_count=-1):
@@ -428,7 +426,7 @@ class AnalyzerSqlite:
return stock
# 후보 찾기
def findCandidate(self, outPath):
def findCandidates(self, outPath):
self.makeDirectory(outPath)
stockTableName = 'stock'
@@ -582,13 +580,6 @@ class AnalyzerSqlite:
dir_name = "final"
self.writeFile(dir_code, dir_name, CODE, NAME, top, stock_daily, final_status, final_status_count)
bsLine, data = self.buySellChecker.checkTransactionWithEnvelope(stock_daily, CODE, 120, isRealTime=False)
if len(data) > 10 and max(bsLine['buy'][len(bsLine['buy']) - 1:]) > 1000:
dir_code = "99"
dir_name = "daily_auto_trading"
self.writeFile(dir_code, dir_name, CODE, NAME, top, stock_daily, final_status, final_status_count)
return
def get_moving_average(self, stock):
@@ -999,7 +990,7 @@ if __name__ == "__main__":
shutil.rmtree(outPath)
os.mkdir(outPath)
print("print to Html...")
analyzer.findCandidate(outPath)
analyzer.findCandidates(outPath)
print("time : %6.2f" % (time.time() - start))