Add replay good now
This commit is contained in:
@@ -29,8 +29,6 @@ class WebDataAPI(CCommonStockApi):
|
||||
|
||||
# 确保数据按时间排序并重置索引
|
||||
df_data = df_data.sort_values('date').reset_index(drop=True)
|
||||
print(f"WebDataAPI: 处理 {len(df_data)} 条K线数据,K线级别: {self.k_type}")
|
||||
|
||||
# 检查并处理重复时间
|
||||
if 'timestamp' in df_data.columns:
|
||||
df_data = df_data.drop_duplicates(subset=['timestamp'], keep='last')
|
||||
@@ -48,7 +46,6 @@ class WebDataAPI(CCommonStockApi):
|
||||
if 'timestamp' in row:
|
||||
current_timestamp = row['timestamp']
|
||||
if prev_timestamp is not None and current_timestamp <= prev_timestamp:
|
||||
print(f"跳过重复或倒序时间戳: {current_timestamp}, 上个时间戳: {prev_timestamp}")
|
||||
continue
|
||||
prev_timestamp = current_timestamp
|
||||
|
||||
@@ -72,10 +69,6 @@ class WebDataAPI(CCommonStockApi):
|
||||
auto=use_auto
|
||||
)
|
||||
|
||||
# 输出详细调试信息(只输出前几条)
|
||||
if idx < 3:
|
||||
print(f"第{idx+1}条数据: 原始时间={time_obj}, CTime={ctime}, auto={use_auto}, timestamp={ctime.ts}")
|
||||
|
||||
# 创建数据字典
|
||||
data_dict = {
|
||||
DATA_FIELD.FIELD_TIME: ctime,
|
||||
|
||||
Reference in New Issue
Block a user