|  | @@ -129,8 +129,9 @@ def get_hlfx(data):
 | 
											
												
													
														|  |                              # 产生信号,进入hlfx_pool
 |  |                              # 产生信号,进入hlfx_pool
 | 
											
												
													
														|  |                              if x == len(df_day.index) - 1:
 |  |                              if x == len(df_day.index) - 1:
 | 
											
												
													
														|  |                                  Trading_signals = 1
 |  |                                  Trading_signals = 1
 | 
											
												
													
														|  | 
 |  | +                        break
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -                    elif df_day.loc[m, 'HL'] == 'L':
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    elif df_day.loc[m, 'HL'] in ['L', 'LL', 'L*']:
 | 
											
												
													
														|  |                          if df_day.loc[m - 1, 'low'] > df_day.loc[x - 1, 'low']:
 |  |                          if df_day.loc[m - 1, 'low'] > df_day.loc[x - 1, 'low']:
 | 
											
												
													
														|  |                              # 前一个为底更高,且中间不存在更低的底
 |  |                              # 前一个为底更高,且中间不存在更低的底
 | 
											
												
													
														|  |                              df_day.loc[x, 'HL'] = 'L'
 |  |                              df_day.loc[x, 'HL'] = 'L'
 | 
											
										
											
												
													
														|  | @@ -168,6 +169,7 @@ def get_hlfx(data):
 | 
											
												
													
														|  |                              # 产生信号,进入hlfx_pool
 |  |                              # 产生信号,进入hlfx_pool
 | 
											
												
													
														|  |                              if x == len(df_day.index) - 1:
 |  |                              if x == len(df_day.index) - 1:
 | 
											
												
													
														|  |                                  Trading_signals = 2
 |  |                                  Trading_signals = 2
 | 
											
												
													
														|  | 
 |  | +                        break
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |                      elif df_day.loc[m, 'HL'] == 'H':
 |  |                      elif df_day.loc[m, 'HL'] == 'H':
 | 
											
												
													
														|  |                          if df_day.loc[x - 1, 'high'] > df_day.loc[m - 1, 'high']:
 |  |                          if df_day.loc[x - 1, 'high'] > df_day.loc[m - 1, 'high']:
 |