当前位置: 首页 > news >正文

网站建设平台汉龙编程培训机构哪里好

网站建设平台汉龙,编程培训机构哪里好,中国菲律宾南海,利用切片做网站背景图片目录 运行情况#xff1a; ​编辑 结果json文件格式#xff1a; 代码#xff1a; 承接 【python_PyQt5开发验证K线视觉想法工具V1.1 _增加标记类型_线段】 博文 地址#xff1a;python_PyQt5开发验证K线视觉想法工具V1.1 _增加标记类型_线段_程序猿与金融与科技的博客-…目录 运行情况 ​编辑 结果json文件格式 代码 承接 【python_PyQt5开发验证K线视觉想法工具V1.1 _增加标记类型_线段】 博文 地址python_PyQt5开发验证K线视觉想法工具V1.1 _增加标记类型_线段_程序猿与金融与科技的博客-CSDN博客 运行情况 1 选择“批量验证” 2 选择时间区间与验证的数据相同的时间区间 3 选择股票日数据所在文件夹 4 选择标记结果json文件 5 可以选择某一个股票显示结果也可以通过“上一个”“下一个”按钮切换股票查看对应股票标记 结果json文件格式 代码 界面布局 1 在 EyeCheckMainWidget 类中实现 fill_stack_widget_two 方法 def fill_stack_widget_two(self):batch_choice_daily_dir_btn QtWidgets.QPushButton(选择股票日数据文件夹)batch_choice_daily_dir_btn.clicked.connect(self.batch_choice_daily_dir_btn_clicked)self.batch_choice_daily_dir_lineedit QtWidgets.QLineEdit()batch_results_file_btn QtWidgets.QPushButton(批量结果json文件)batch_results_file_btn.clicked.connect(self.batch_results_file_btn_clicked)self.batch_results_file_lineedit QtWidgets.QLineEdit()batch_layout_one QtWidgets.QFormLayout()batch_layout_one.addRow(batch_choice_daily_dir_btn,self.batch_choice_daily_dir_lineedit)batch_layout_one.addRow(batch_results_file_btn,self.batch_results_file_lineedit)self.batch_targets_combox QtWidgets.QComboBox()self.batch_targets_combox.currentTextChanged.connect(self.batch_targets_combox_currentTextChanged)batch_pre_btn QtWidgets.QPushButton(上一个)batch_pre_btn.clicked.connect(self.batch_pre_btn_clicked)batch_next_btn QtWidgets.QPushButton(下一个)batch_next_btn.clicked.connect(self.batch_next_btn_clicked)batch_layout_two QtWidgets.QHBoxLayout()batch_layout_two.addWidget(self.batch_targets_combox)batch_layout_two.addWidget(batch_pre_btn)batch_layout_two.addWidget(batch_next_btn)batch_layout QtWidgets.QVBoxLayout()batch_layout.addLayout(batch_layout_one)batch_layout.addLayout(batch_layout_two)self.stack_two.setLayout(batch_layout)pass 2 在 EyeCheckMainWidget 类  init_data 方法 def init_data(self):self.please_select_str: str -- 请选择 --self.single_settingMark_widget: QtWidgets.QWidget Noneself.target_column_list: List[str] [xTick, open, close, highest, lowest]self.target_names_list: List[str] []self.target_marks_map: Dict {}self.batch_current_target_name: str Nonepass 3 在 EyeCheckMainWidget 类 增加批量验证用到的方法 def caculate_k_data_and_show(self,daily_file:str,title_name:str):left_point self.left_point.date().toString(yyyy-MM-dd)right_point self.right_point.date().toString(yyyy-MM-dd)left_datetime datetime.datetime.strptime(left_point, %Y-%m-%d)right_datetime datetime.datetime.strptime(right_point, %Y-%m-%d)if left_datetime right_datetime:QtWidgets.QMessageBox.information(self,提示,请选择时间区间,QtWidgets.QMessageBox.Yes)returndf pd.read_csv(daily_file, encodingutf-8)df df.loc[df[openPrice] 0].copy()df[o_date] pd.to_datetime(df[tradeDate])df df.loc[(df[o_date] left_point) (df[o_date] right_point)].copy()df[open] df[openPrice] * df[accumAdjFactor]df[close] df[closePrice] * df[accumAdjFactor]df[highest] df[highestPrice] * df[accumAdjFactor]df[lowest] df[lowestPrice] * df[accumAdjFactor]df[xTick] df[tradeDate]k_data {whole_df: df,whole_header: [日期, 开盘, 收盘, 最高, 最低],whole_pd_header: self.target_column_list}self.graph_widget.first_setData(k_data)self.graph_title_label.setText(title_name)passdef batch_choice_daily_dir_btn_clicked(self):path QtWidgets.QFileDialog.getExistingDirectory(self,打开股票日数据所在目录,.)if not path:returnself.batch_choice_daily_dir_lineedit.setText(path)def batch_results_file_btn_clicked(self):path,_ QtWidgets.QFileDialog.getOpenFileName(self,打开标记计算结果json文件,.,JSON(*.json))if not path:returntry:with open(path,r,encodingutf-8) as fr:json_obj json.load(fr)self.target_marks_map json_objself.target_names_list.clear()self.target_names_list list(json_obj.keys())self.batch_targets_combox.clear()self.batch_current_target_name Noneself.batch_targets_combox.addItem(self.please_select_str)self.batch_targets_combox.addItems(self.target_names_list)self.batch_results_file_lineedit.setText(path)passexcept Exception as e:print(e)QtWidgets.QMessageBox.information(self,提示,e.__str__(),QtWidgets.QMessageBox.Yes)returnpassdef batch_targets_combox_currentTextChanged(self,txt:str):cur_txt self.batch_targets_combox.currentText()if not cur_txt or cur_txt self.please_select_str:returnself.batch_current_target_name cur_txtself.batch_show_current_target()passdef batch_pre_btn_clicked(self):if not self.batch_current_target_name:self.batch_current_target_name self.target_names_list[-1]else:node_index self.target_names_list.index(self.batch_current_target_name)if node_index 0:self.batch_current_target_name self.target_names_list[-1]else:self.batch_current_target_name self.target_names_list[node_index-1]passself.batch_show_current_target()passdef batch_next_btn_clicked(self):if not self.batch_current_target_name:self.batch_current_target_name self.target_names_list[0]else:node_index self.target_names_list.index(self.batch_current_target_name)if node_index len(self.target_names_list)-1:self.batch_current_target_name self.target_names_list[0]else:self.batch_current_target_name self.target_names_list[node_index1]self.batch_show_current_target()passdef batch_show_current_target(self):self.mark_table.clear_table_contents()one_node self.target_marks_map[self.batch_current_target_name]self.mark_table.set_data(one_node)# daily_file,title_namedaily_dir self.batch_choice_daily_dir_lineedit.text()daily_file daily_dir os.path.sep self.batch_current_target_name .csvif not daily_dir or not os.path.exists(daily_file):QtWidgets.QMessageBox.information(self,提示,股票日数据目录没有选择或对应日数据不存在,QtWidgets.QMessageBox.Yes)returnself.caculate_k_data_and_show(daily_file,self.batch_current_target_name)self.graph_widget.add_marks(one_node)pass
http://www.hkea.cn/news/14436270/

相关文章:

  • 怎么做房产网站游戏外包公司要不要去
  • 东方资产营销网站wordpress评价
  • 怎么看 网站开发语言微网站界面设计
  • 帝国cms企业网站开发网址
  • 网站 ip地址是什么做网站 服务器多少钱一年
  • 销售网站建设常遇到的问题商城网站素材
  • 旅游网站后台html模板酷炫的网站模板免费下载
  • 图列说明网站开发的流程10月上海娱乐场所又要关门了
  • 手机如何建免费网站互联网公司排名 百度
  • 后端网站开发漫画网站建设
  • 中文域名 网站专业网页制作软件都能帮助用户组织和管理
  • 哪里租服务器做网站电商网站建设小强
  • 狠狠做网站娱乐网站建设方案
  • 苏州网站设计聚尚网络智能模板网站建设收费
  • 网站怎么做才能被百度抓取到外贸网站域名赏析
  • 扁平风格网站 模板免费下载手机制作网页链接的软件
  • 长沙好玩的地方景点推荐深圳seo优化公司哪家好
  • 资源网站优化排名做游戏网站在哪里找
  • 盐城网站建设费用购物最便宜的app
  • 手机h5网站开发企业网站改版方案
  • 深圳网站定制公司网站优化意义
  • 微商手机网站制作公司哪家好企业网站开发流程简述
  • 泸州网站开发wordpress 首页显示摘要
  • lnmp wordpress 404360seo优化
  • 厦门做手机网站公司帮你做决定的网站
  • 宁波网站建站微网站栏目设置
  • 嘉兴城乡建设局网站铁岭手机网站建设
  • 什么网站下载素材做图的深圳罗湖做网站的公司哪家好
  • 灵璧做网站襄阳seo技术
  • 天津建设工程竣工备案公示网站万网网站备份