コード例 #1
0
 def get_complementary_function_list(self, pattern_type: str) -> list:
     if FT.is_pattern_type_any_head_shoulder(pattern_type):
         return [self.f_param_parallel]
     elif pattern_type in [FT.TKE_BOTTOM, FT.TKE_TOP]:
         return [self.f_param_const]
     else:
         return [] if self._f_param_list is None else self._f_param_list
コード例 #2
0
 def get_function_container_by_api(api: PatternFunctionContainerFactoryApi):
     pattern_type = api.pattern_type
     sys_config = api.sys_config
     df = api.pattern_range.get_related_part_from_data_frame(api.df_min_max)
     f_upper = api.get_f_upper()
     f_lower = api.get_f_lower()
     f_cont = PatternFunctionContainerFactory.get_function_container(
         sys_config, pattern_type, df, f_lower, f_upper)
     if FT.is_pattern_type_any_head_shoulder(api.pattern_type):
         f_cont.set_tick_for_helper(
             api.pattern_range.hsf.tick_shoulder_left)
     elif FT.is_pattern_type_any_fibonacci(api.pattern_type):
         f_cont.max_positions_after_tick_for_helper = api.pattern_range.fib_form.max_positions_after_tick_for_helper
     return f_cont