跳到正文
QMT

ContextInfo.draw_icon

在图形上绘制小图标

原型

ContextInfo.draw_icon(cond, height, type)

在图形上绘制小图标

调用方法: ContextInfo.draw_icon(cond, height, type)

参数

参数名 类型 说明 提示
cond bool 条件
height number 图标的位置
text number 图标的类型 1:椭圆
0:矩形

返回值

无

示例

def init(ContextInfo):
    close = ContextInfo.get_market_data(['close'])
    ContextInfo.draw_icon(1 > 0, close, 0)

官方来源

QMT 官方文档:在图形上绘制小图标。网页核对日期:2026-10-11。

本页目录