QMT · 内置 Python绘图函数
ContextInfo.draw_vertline
在数字1和数字2之间绘垂直线
原型
ContextInfo.draw_vertline(cond, number1, number2, color='', limit='')
在数字1和数字2之间绘垂直线
调用方法: ContextInfo.draw_vertline(cond, number1, number2, color = '', limit = '')
参数
| 参数名 | 类型 | 说明 | 提示 |
|---|---|---|---|
cond |
bool |
条件 | |
number1 |
number |
数字1 | |
number2 |
number |
数字2 | |
color |
string |
颜色(不填默认为白色) | blue:蓝色 brown:棕 cyan:蓝绿 green:绿 magenta:品红 red:红 white:白 yellow:黄 |
limit |
string |
画线控制 | 'noaxis':不影响坐标画线 'nodraw':不画线 |
返回值
无
示例
def init(ContextInfo):
close = ContextInfo.get_market_data(['close'])
open = ContextInfo.get_market_data(['open'])
ContextInfo.draw_vertline(1 > 0, close, open, 'cyan')
官方来源
QMT 官方文档:在数字 1 和数字 2 之间绘垂直线。网页核对日期:2026-10-11。