1.松鼠期货app官方下载
如题。做了很长一段时间的 flet 文章分享,一直没有分享一个完整 flet 作品,今天补上。
2.松鼠期货下载
最近人工智能比较热门,我也凑热闹,利用了一点点人工智能api,设计了一个 期货自动交易系统(松鼠期货v1.0),展示了一个比较完整的 flet 程序设计这个作品 app,利用到了几乎 flet 各方面的特性,从各种控件使用、界面布局、事件循环、多线程编程、网络编程 等综合技术。
3.松鼠量化ap掌赢科技有限公司p
作为金融分析app,我也利用了股票、期货的 均线、K线、MACD 等多种技术指标,进行数据分析。当然算法不成熟,赚不到钱。不过软件平台搭建好了,后面可以慢慢优化算法。
4.松鼠ai期权
今天分享的目的,只在体验 flet 编程技术今天也把这个 app 中,使用的一个工具类,分享给大家在 flet 开发中,经常要用到 对话框输入密码验证、底部弹出消息、顶部弹出消息,等等我就设计了一个工具模块 tool_flet.py
5.松鼠交易吧
,自行拿去使用即可暂时包括了5个工具:闪现一个底部消息提示框、弹出一个顶部消息提示框、弹出一个确认对话框、异步密码验证、同步密码验证完整代码如下:# -*- coding掌赢科技有限公司: utf-8 -*-# -*- author: 松鼠哥哥 -*-。
6.松鼠 股票
# -*- time: 2025/02/08 -*-# -*- version: 1.0 -*-import flet as ft import asyncio classShowSnackBar:工具1:闪现一个底部消息提示框
7.松鼠证券官网
def__init__(self, page, content, bg_color=”orange”, text_color=”white”): snackbar = ft.SnackBar( ft.Text掌赢科技有限公司(content, color=text_color), bgcolor=bg_color )
8.松鼠估值
try: page.snack_bar = snackbar snackbar.open = True page.update()
9.松鼠a股票
except:passclassShowBanner:工具2:弹出一个顶部消息提示框def__init__(self, page, content, bg_color=”orange”, text_color=
10.松鼠a1估值
“white”): ban掌赢科技有限公司ner = ft.Banner( bgcolor=bg_color, content=ft.Text(content, color=text_color), actions=[ ft.TextButton(
“朕知道了”, on_click=lambda e: self.close_banner(page, banner)) ] ) try: page.open(banner)
except:passdefclose_banner(self, page, banner):try: pag掌赢科技有限公司e.close(banner) except:passclassAskDialog
:工具3:弹出一个确认对话框def__init__(self, page, text_content, on_confirm, on_cancel): self.page = page self.text_content = text_content self.on_confirm = on_confirm self.on_cancel = on_cancel self.dialog = ft.AlertDialog(掌赢科技有限公司 title=ft.Text(
“确认操作”), content=ft.Text(self.text_content), actions=[ ft.TextButton(
“确定”, on_click=self.confirm), ft.TextButton(“取消”, on_click=self.cancel), ], actions_alignment=ft.MainAxisAlignment.END, )
defshow(self): self.pag掌赢科技有限公司e.dialog = self.dialog self.dialog.open = Truetry: self.page.update()
except: passdefconfirm(self, e): self.dialog.open = Falsetry: self.page.update() ShowSnackBar(self.page,
“选择了“确定”,程序已执行”, “green”) except: pass self.on_confirm() defcancel(sel掌赢科技有限公司f, e): self.dialog.open =
Falsetry: self.page.update() ShowSnackBar(self.page, “选择了“取消”,任务已终止”, “orange”
) except: pass self.on_cancel() classPasswordChecker:工具4:异步密码验证def__init__(self, page)
: self.page = page self.password_future = None掌赢科技有限公司defopen_dialog(self): self.password_input = ft.TextField( label=
“请输入密码”, password=True, can_reveal_password=True, autofocus=True, ) self.dialog = ft.AlertDialog( modal=
True, title=ft.Text(“密码验证”), content=self.password_掌赢科技有限公司input, actions=[ ft.TextButton(
“确定”, on_click=self.validate_password), ft.TextButton(“取消”, on_click=self.cancel_password), ], actions_alignment=ft.MainAxisAlignment.END, ) self.page.open(self.dialog)
defvalidate_password(self, e):# 这里要自行传递参数,修改为掌赢科技有限公司自己的密码对比if self.password_input.value == 111111: ShowSnackBar(self.page,
“密码通过验证!”, “green”) self.password_future.set_result(True) else: ShowSnackBar(self.page,
“密码错误,请重试!”, “red”) self.password_future.set_result(False) self.page.close(self.dialog)
defcance掌赢科技有限公司l_password(self, e): ShowSnackBar(self.page, “密码验证取消”, “orange”) self.password_future.set_result(
False) self.page.close(self.dialog) asyncdefget_password_validation(self): self.password_future = asyncio.Future() self.open_dialog()
returnawait self.pass掌赢科技有限公司word_future deff_check_password(page):工具5:同步密码验证 res = False is_clicked =
False password_input = ft.TextField( value= , label=”请输入密码”, password=True
, can_reveal_password=True, autofocus=True, ) defvalidate_pas掌赢科技有限公司sword(e):nonlocal
res, password_input, dialog, is_clicked res = False# 这里要自行传递参数,修改为自己的密码对比if password_input.value ==
111111: ShowSnackBar(page, “密码通过验证!”, “green”) res = Trueelse: ShowSnackBar(page,
“密码错误,请重试!”, “red”) res = False page.close(dialog) 掌赢科技有限公司 is_clicked = Truedefcancel_password
(e):nonlocal res, password_input, dialog, is_clicked ShowSnackBar(page, “密码验证取消”, “orange”) res =
False page.close(dialog) is_clicked = True dialog = ft.AlertDialog( modal=
True, title=ft.Text(“密码验证”), 掌赢科技有限公司 content=password_input, actions=[ ft.TextButton(
“确定”, on_click=validate_password), ft.TextButton(“取消”, on_click=cancel_password), ], actions_alignment=ft.MainAxisAlignment.END, ) page.open(dialog)
whilenot is_clicked: passreturn res 掌赢科技有限公司 (分享完毕,感谢收看!)
我们深耕 MQL4 程序开发,提供 定制化指标开发、EA 开发服务,可根据交易策略与习惯打造专属工具,降低操作成本,提升执行效率。



