Compare commits

...
10 Commits
Author SHA1 Message Date
jackyu66git 31d560e5a1 添加ignore file 2026-01-29 13:50:42 +08:00
jackyu66git 77d3fb35d5 添加新股票 2025-12-16 18:11:06 +08:00
jackyu66git 4e6b0b9e75 添加ignore 2025-11-29 02:23:49 +08:00
jackyu66git 0a22d1fe34 修改了macd数值 2025-10-24 23:32:46 +08:00
jackyu66git eaaa57915c Update app.py 2025-09-11 18:40:55 +08:00
jackyu66git c6d02d7802 添加布林带显示 2025-07-23 01:53:19 +08:00
jackyu66git ba5e452af7 添加250均线 2025-07-04 00:54:31 +08:00
jackyu66git dc5b130862 添加默认均线 2025-07-02 01:14:14 +08:00
Porter 717332196c 调整均线显示位置 2025-07-01 22:54:19 +08:00
jackyu66git f2384b151d 添加均线可以用了 2025-06-30 23:33:07 +08:00
5 changed files with 1410 additions and 42 deletions
Vendored
BIN
View File
Binary file not shown.
+5
View File
@@ -158,3 +158,8 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
.DS_Store
.DS_Store
.DS_Store
.DS_Store
.DS_Store
+5 -5
View File
@@ -274,9 +274,9 @@ def get_a_stock_kl_data(symbol, timeframe, limit=1000, start_time=None, end_time
return None return None
def add_indicators(df): def add_indicators(df):
fast = 8 fast = 24
slow = 16 slow = 52
period = 6 period = 18
macd = ta.MACD(df, fastperiod=fast, slowperiod=slow, signalperiod=period) macd = ta.MACD(df, fastperiod=fast, slowperiod=slow, signalperiod=period)
df['macd'] = macd['macd'] df['macd'] = macd['macd']
@@ -325,7 +325,7 @@ def add_indicators(df):
def calculate_macd(df): def calculate_macd(df):
"""计算MACD指标""" """计算MACD指标"""
exp1 = df['close'].ewm(span=10, adjust=False).mean() exp1 = df['close'].ewm(span=12, adjust=False).mean()
exp2 = df['close'].ewm(span=26, adjust=False).mean() exp2 = df['close'].ewm(span=26, adjust=False).mean()
macd = exp1 - exp2 macd = exp1 - exp2
signal = macd.ewm(span=9, adjust=False).mean() signal = macd.ewm(span=9, adjust=False).mean()
@@ -370,7 +370,7 @@ def analyze_chan(df, timeframe='1d'):
"divergence_rate": float("inf"), "divergence_rate": float("inf"),
"bsp2_follow_1": False, "bsp2_follow_1": False,
"bsp3_follow_1": False, "bsp3_follow_1": False,
"min_zs_cnt": 1, "min_zs_cnt": 2,
"bs1_peak": False, "bs1_peak": False,
"macd_algo": "peak", "macd_algo": "peak",
"bs_type": '1,2,3a,1p,2s,3b', "bs_type": '1,2,3a,1p,2s,3b',
+2
View File
@@ -81,6 +81,8 @@ class ChinaStockData:
def get_popular_stocks(self): def get_popular_stocks(self):
"""获取热门A股股票代码列表 - 扩展版本,按行业分类""" """获取热门A股股票代码列表 - 扩展版本,按行业分类"""
return [ return [
# 包装引印刷
{'symbol': '002836', 'name': '新宏泽', 'sector': '包装印刷'},
# 银行股 # 银行股
{'symbol': '600036', 'name': '招商银行', 'sector': '银行'}, {'symbol': '600036', 'name': '招商银行', 'sector': '银行'},
{'symbol': '000001', 'name': '平安银行', 'sector': '银行'}, {'symbol': '000001', 'name': '平安银行', 'sector': '银行'},
+1398 -37
View File
File diff suppressed because it is too large Load Diff