fix(web): 自动刷新保留 K 线视窗;威科夫与图表增量更新
自动刷新改用 tail update 与 scrollToPosition 恢复视窗,避免 setData 后跳到最右;拆分 chart_tv 模块并扩展 analyze/recent API。同步威科夫分析、pipeline 增量构建及相关策略与配置。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -77,7 +77,7 @@ class ChanLun_BTC_15(IStrategy):
|
||||
trailing_only_offset_is_reached = False
|
||||
|
||||
position_adjustment_enable = True
|
||||
startup_candle_count = 100
|
||||
startup_candle_count = 1000
|
||||
|
||||
time5 = 5
|
||||
time15 = 15
|
||||
@@ -88,21 +88,14 @@ class ChanLun_BTC_15(IStrategy):
|
||||
time5 = 1440
|
||||
last_time = datetime.now()
|
||||
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||
tf_df_5 = TF_DF(dataframe, self.time5, '5m')
|
||||
tf_df_15 = TF_DF(dataframe, self.time15, '15m')
|
||||
tf_df_30 = TF_DF(dataframe, self.time30, '30m')
|
||||
tf_df_60 = TF_DF(dataframe, self.time60, '60m')
|
||||
tf_df_4h = TF_DF(dataframe, self.time4h, '4h')
|
||||
tf_df_1d = TF_DF(dataframe, self.time1d, '1d')
|
||||
|
||||
df_5m = resample_to_interval(dataframe, self.time5)
|
||||
df_15m = resample_to_interval(dataframe, self.time15)
|
||||
dataframe = TF_DF.add_indicators(dataframe)
|
||||
df_5m = TF_DF.add_indicators(df_5m)
|
||||
df_15m = TF_DF.add_indicators(df_15m)
|
||||
|
||||
|
||||
dataframe = resampled_merge(dataframe, tf_df_5.dataframe)
|
||||
dataframe = resampled_merge(dataframe, tf_df_15.dataframe)
|
||||
dataframe = resampled_merge(dataframe, tf_df_30.dataframe)
|
||||
dataframe = resampled_merge(dataframe, tf_df_60.dataframe)
|
||||
dataframe = resampled_merge(dataframe, tf_df_4h.dataframe)
|
||||
dataframe = resampled_merge(dataframe, tf_df_1d.dataframe)
|
||||
dataframe = resampled_merge(dataframe, df_5m)
|
||||
dataframe = resampled_merge(dataframe, df_15m)
|
||||
return dataframe
|
||||
|
||||
def custom_entry_price(self, pair: str, trade: Trade | None, current_time: datetime, proposed_rate: float,
|
||||
|
||||
Reference in New Issue
Block a user