init
This commit is contained in:
@@ -423,22 +423,23 @@ class AnalyzerSqlite:
|
||||
po.write_html(fig, file=fileName, auto_open=False)
|
||||
return
|
||||
|
||||
def checkVolume(self, p_volume, volume):
|
||||
if p_volume < 10000 and p_volume * 50 < volume:
|
||||
def checkVolume(self, p_volume, p_close, volume, close):
|
||||
if p_close < close:
|
||||
if 0 < p_volume <= 10000 and p_volume * 700 < volume:
|
||||
return True
|
||||
if p_volume < 50000 and p_volume * 20 < volume:
|
||||
if 10000 < p_volume <= 50000 and p_volume * 40 < volume:
|
||||
return True
|
||||
if p_volume < 100000 and p_volume * 15 < volume:
|
||||
if 50000 < p_volume <= 100000 and p_volume * 25 < volume:
|
||||
return True
|
||||
if p_volume < 200000 and p_volume * 7 < volume:
|
||||
if 100000 < p_volume <= 200000 and p_volume * 15 < volume:
|
||||
return True
|
||||
if p_volume < 700000 and p_volume * 5 < volume:
|
||||
if 200000 < p_volume <= 700000 and p_volume * 13 < volume:
|
||||
return True
|
||||
if p_volume < 1000000 and p_volume * 4 < volume:
|
||||
if 700000 < p_volume <= 1000000 and p_volume * 10 < volume:
|
||||
return True
|
||||
if p_volume < 5000000 and p_volume * 3 < volume:
|
||||
if 5000000 < p_volume <= 5000000 and p_volume * 5 < volume:
|
||||
return True
|
||||
if p_volume > 5000000 and p_volume * 2 < volume:
|
||||
if 5000000 < p_volume and p_volume * 4 < volume:
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -685,7 +686,7 @@ class AnalyzerSqlite:
|
||||
type = "-3_후행스팬_캔들_아래로_내려옴"
|
||||
self.writeFile(type, CODE, NAME, stock, state)
|
||||
|
||||
if self.checkVolume(volume[1], volume[0]):
|
||||
if self.checkVolume(volume[1], close[1], volume[0], close[0]):
|
||||
type = "1_거래량_상승"
|
||||
self.writeFile(type, CODE, NAME, stock, state)
|
||||
|
||||
@@ -815,7 +816,7 @@ if __name__ == "__main__":
|
||||
fnguideFileName = PROJECT_HOME + '/resources/fnguide.db'
|
||||
analyzer = AnalyzerSqlite(PROJECT_HOME, stockFileName, fnguideFileName)
|
||||
|
||||
analyzer.analyze()
|
||||
#analyzer.analyze()
|
||||
|
||||
day = datetime.today().strftime("%Y%m%d")
|
||||
|
||||
|
||||
@@ -447,6 +447,7 @@ class Common:
|
||||
if len(stock['close']) > 2:
|
||||
if (not (stock["avg120"][1] < stock["avg60"][1] < stock["avg20"][1] < stock["avg5"][1] < stock["close"][1]) and
|
||||
stock["avg120"][0] < stock["avg60"][0] < stock["avg20"][0] < stock["avg5"][0] < stock["close"][0]):
|
||||
if stock["avg5"][1] < stock["avg5"][0]:
|
||||
return "arrange_"
|
||||
return ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user