QMT Python API

振幅

振幅

qmt://docs/python
Python
1# coding:gbk
2'''
3内置python, 振幅
4'''
5from datetime import datetime
6def init(C):
7 stock = "${stock_code}.${market}" # 股票代码
8 tick = C.get_full_tick([stock])[stock]
9 high, low = tick['high'], tick['low']
10 振幅 = round(((high - low) / low) * 100, 2)
11 print(f'{stock}的振幅是{振幅}%')
12 return
13
14def handlebar(C):
15 return

智能助手

咨询式 AI · 带入当前文档

智能助手加载中...