From f1b0daa55f0faa5c8a2fad8127a49ce59dd39a39 Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Mon, 16 Mar 2026 16:26:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=AC=A1=E6=AC=A1?= =?UTF-8?q?=E5=91=A8=E6=9C=9F=E6=98=BE=E7=A4=BA=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TF_DF.py | 8 +-- web/app.py | 3 + web/templates/index.html | 150 +++++++++++++++++++++++---------------- 3 files changed, 95 insertions(+), 66 deletions(-) diff --git a/TF_DF.py b/TF_DF.py index d160503..9a052cf 100644 --- a/TF_DF.py +++ b/TF_DF.py @@ -986,7 +986,7 @@ class TF_DF(): if last_top.high > klc.high: bi_list[-1].add_klc(klc) klc.set_bi(bi_list[-1]) - klc.set_klc_fx_type(Chan_KLC_FX.TOP3) + #klc.set_klc_fx_type(Chan_KLC_FX.TOP3) #print(klc.end_time, klc.fx, "二类卖点Sell 1") else: # A new top found @@ -1005,7 +1005,7 @@ class TF_DF(): if last_bottom.index + bi_klc_min > klc.index: if last_top.high > klc.high: #print(klc.start_time, klc.fx, "二类卖点Sell 1") - klc.set_klc_fx_type(Chan_KLC_FX.TOP8) + #klc.set_klc_fx_type(Chan_KLC_FX.TOP8) bi_list[-1].add_klc(klc) klc.set_bi(bi_list[-1]) # New TOP Found前面的UKNOWN可能出现TOP7,但是这里的也可能出现TOP8分型 @@ -1104,7 +1104,7 @@ class TF_DF(): if last_bottom.low < klc.low: bi_list[-1].add_klc(klc) klc.set_bi(bi_list[-1]) - klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM3) + #klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM3) #print(last_bottom.start_time, last_bottom.end_time, "--------------------------------1") #print(klc.end_time, klc.fx, "二类买点Buy 1") else: @@ -1125,7 +1125,7 @@ class TF_DF(): #print(klc.end_time, klc.fx, "中枢买点Buy 1") bi_list[-1].add_klc(klc) klc.set_bi(bi_list[-1]) - klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM8) + #klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM8) # Found new bottom没有意义,上面UNKNOWN的时候已经是笔破坏了 else: #print(klc.end_time, last_bottom.end_time, "Found a new bottom") diff --git a/web/app.py b/web/app.py index 3e0d086..090ba7d 100644 --- a/web/app.py +++ b/web/app.py @@ -1619,6 +1619,9 @@ def analyze(): sub_sub_df = add_indicators(sub_sub_df) sub_sub_analysis = analyze_chan(sub_sub_df, symbol, sub_sub_timeframe) result['sub_sub_timeframe'] = sub_sub_timeframe + result['sub_sub_kline_data'] = clean_dataframe_for_json(sub_sub_df).to_dict('records') + result['sub_sub_atr'] = sub_sub_df['atr'].tolist() + result['sub_sub_macd'] = calculate_macd(sub_sub_df) result['sub_sub_bi_list'] = [{ 'start_time': bi.start_klc.end_time if isinstance(bi.start_klc.end_time, str) else bi.start_klc.end_time.astimezone(client_tz).isoformat(), 'end_time': (bi.end_klc.end_time if isinstance(bi.end_klc.end_time, str) else bi.end_klc.end_time.astimezone(client_tz).isoformat()) if bi.end_klc else None, diff --git a/web/templates/index.html b/web/templates/index.html index 8207afe..7cdbd12 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -851,6 +851,10 @@ +
+ + +
@@ -876,7 +880,7 @@
-
+
@@ -960,7 +964,7 @@
-
+