返回列表 发布新帖

涨停价的计算函数

2139 1
发表于 2025-1-5 21:36:35 | 显示全部楼层 阅读模式

先计算涨停价,然后再判断是否i涨停

def calculate_high_limit_price(stock_code, preClose): """计算涨停价""" if stock_code.startswith("68") or stock_code.startswith("30"): high_limit_price = preClose 1.2 else: high_limit_price = preClose 1.1

high_limit_price = float(Decimal(high_limit_price * 100).quantize(Decimal('1'), rounding=ROUND_HALF_UP) / 100)
return high_limit_price 

评论1

*******4875
发表于 2025-1-11 00:28:56 | 显示全部楼层
    当日涨停价: ContextInfo.get_instrumentdetail('000001.SZ')["UpStopPrice"]
    当日跌停价: ContextInfo.get_instrumentdetail('000001.SZ')["DownStopPrice"]

回复

您需要登录后才可以回帖 登录 | 立即注册

客服专线

400-080-8112

用思考的速度交易,用真诚的态度合作,我们是认真的!
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2025 迅投QMT社区 版权所有 All Rights Reserved. 京ICP备2025122616号-3
关灯 快速发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表