Beispiel #1
0
 def __init__(self, app: Dash, sys_config: SystemConfiguration,
              trade_handler_online: PatternTradeHandler):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self.exchange_config = self.sys_config.exchange_config
     self._trade_handler_online = trade_handler_online
     self._df_trade = self.sys_config.db_stock.get_trade_records_for_replay_as_dataframe(
     )
     self._df_trade_for_replay = self._df_trade[
         TradeTable.get_columns_for_replay()]
     self._trade_rows_for_data_table = MyDCC.get_rows_from_df_for_data_table(
         self._df_trade_for_replay)
     self._df_pattern = self.sys_config.db_stock.get_pattern_records_for_replay_as_dataframe(
     )
     self._df_pattern_for_replay = self._df_pattern[
         PatternTable.get_columns_for_replay()]
     self._pattern_rows_for_data_table = MyDCC.get_rows_from_df_for_data_table(
         self._df_pattern_for_replay)
     self.__init_selected_row__()
     self.__init_replay_handlers__()
     self._selected_pattern_trade = None
     self._selected_buy_trigger = None
     self._selected_trade_strategy = None
     self._n_click_restart = 0
     self._n_click_cancel_trade = 0
     self._n_click_reset = 0
     self._replay_speed = 4
     self._trades_stored_number = 0
     self._trades_online_active_number = 0
     self._trades_online_all_number = 0
     self._pattern_stored_number = 0
     self._cached_trade_table = None
     self._time_stamp_last_ticker_refresh = MyDate.time_stamp_now()
     self._check_actual_trades_for_trade_handler_online_n_intervals = -1
     self._print_callback_start_details = False
Beispiel #2
0
 def __init__(self, app: Dash, sys_config: SystemConfiguration,
              color_handler: DashColorHandler):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self._color_handler = color_handler
     self._df_base = None
     self.__fill_df_base__()
     self._statistic_plotter = self.__get_statistic_plotter__()
Beispiel #3
0
 def __init__(self, app: Dash, sys_config: SystemConfiguration):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self._job_handler = MyDashJobHandler(sys_config.process_manager)
     self.sys_config = sys_config
     self._db = self.sys_config.db_stock
     self._dd_handler = JobsTabDropDownHandler()
     self._n_clicks_start = 0
     self._n_clicks_activate = 0
     self._selected_table_name = STBL.PROCESS
     self._selected_limit = 10
     self._selected_date_range = DTRG.TODAY
     self._grid_table = None
 def __init__(self, app: Dash, sys_config: SystemConfiguration,
              trade_handler_online: PatternTradeHandler):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self.sys_config = self.__get_adjusted_sys_config_copy__(sys_config)
     self.exchange_config = self.sys_config.exchange_config
     self._pattern_controller = PatternDetectionController(self.sys_config)
     self._recommender_table = RecommenderTable(
         self.sys_config.db_stock, self.sys_config.data_provider)
     self._active_manage_button_clicks = 0
     self._refresh_button_clicks = 0
     self._trade_handler_online = trade_handler_online
     self._dd_handler = RecommenderTabDropDownHandler()
 def __init__(self, app: Dash, sys_config: SystemConfiguration):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self.sys_config = sys_config
     self._db = self.sys_config.db_stock
     self._dd_handler = DBTabDropDownHandler()
     self._access_layer_process = AccessLayer4Process(
         self.sys_config.db_stock)
     self._access_layer_wave = AccessLayer4Wave(self.sys_config.db_stock)
     self._access_layer_pattern = AccessLayer4Pattern(
         self.sys_config.db_stock)
     self._selected_table_name = STBL.PROCESS
     self._selected_limit = 10
     self._selected_date_range = DTRG.TODAY
     self._where_clause_entered = ''
     self._db_table = self._db.get_table_by_name(self._selected_table_name)
     self._df_for_grid_table = None
     self._db_grid_table = None
 def __init__(self, app: Dash, sys_config: SystemConfiguration,
              trade_handler_online: PatternTradeHandler):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self.sys_config = self.__get_adjusted_sys_config_copy__(sys_config)
     self.exchange_config = self.sys_config.exchange_config
     self._table_rows = []
     self._reset_portfolio_selection_clicks = 0
     self._refresh_portfolio_selection_clicks = 0
     self._active_manage_button_clicks = 0
     self._selected_indicator = INDI.NONE
     self._selected_row_index = -1
     self._selected_row = None
     self._selected_ticker_id = ''
     self._selected_ticker_id_management = ''
     self._pattern_controller = PatternDetectionController(self.sys_config)
     self._trade_handler_online = trade_handler_online
     self._dd_handler = PortfolioTabDropDownHandler()
     self._selected_ticker_count_dict = {}
 def __init__(self, app: Dash, sys_config: SystemConfiguration):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self.sys_config = self.__get_adjusted_sys_config_copy__(sys_config)
     self.exchange_config = self.sys_config.exchange_config
     self._dd_handler = LogTabDropDownHandler()
     self._log_data_frame_dict = {}
     self._access_layer_process = AccessLayer4Process(
         self.sys_config.db_stock)
     self._access_layer_wave = AccessLayer4Wave(self.sys_config.db_stock)
     self._access_layer_pattern = AccessLayer4Pattern(
         self.sys_config.db_stock)
     self.__fill_log_data_frame_dict__()
     self._selected_log_type = LOGT.MESSAGE_LOG
     self._selected_process = ''
     self._selected_process_step = ''
     self._selected_date_range = DTRG.TODAY
     self._refresh_button_clicks = 0
     self._log_table = LogTable(self._log_data_frame_dict,
                                self._selected_log_type,
                                self._selected_date_range)
Beispiel #8
0
 def __init__(self, app: Dash, sys_config: SystemConfiguration, trade_handler_online: PatternTradeHandler):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self.bitfinex_config = self.sys_config.exchange_config
     self.trade_handler_online = trade_handler_online
     self.sys_config_second = sys_config.get_semi_deep_copy()
     self.sys_config_fibonacci = self.sys_config.get_semi_deep_copy()
     self._pattern_controller = PatternDetectionController(self.sys_config, TP.ONLINE)
     self.detector = None
     self._index_options = self.sys_config.index_config.get_indices_as_options()
     self._ticker_options = []
     self._ticker_selected = ''
     self.__fill_ticker_options__()
     self._dd_handler = PatternTabDropDownHandler(self._index_options, self._ticker_options)
     self._time_stamp_next_refresh = None
     self._graph_first_data_provider_api = None
     self._graph_second_data_provider_api = None
     self._graph_first_cache = MyGraphCache('my_graph_first')
     self._graph_second_cache = MyGraphCache('my_graph_second')
     self._state_handler = MyDashStateHandler(self._ticker_options)
     self._graph_key_first = ''
     self._detector_first = None
     self._pattern_data_first = None
     self._balance_saving_times = MyDate.get_epoch_seconds_for_current_day_as_list()
Beispiel #9
0
 def __init__(self, app: Dash, sys_config: SystemConfiguration, trade_handler_online: PatternTradeHandler):
     MyPatternDashBaseTab.__init__(self, app, sys_config)
     self._trade_handler_online = trade_handler_online