后台指标计算返回数据格式说明8 - DRAWBAND格式
作者:互联网
后台指标计算返回数据格式说明8 - DRAWBAND格式
DRAWTEXT_FIX画出带状线.
用法:
DRAWBAND(VAL1,COLOR1,VAL2,COLOR2),当VAL1>VAL2时,在VAL1和VAL2之间填充COLOR1;当VAL1<VAL2时,填充COLOR2,这里的颜色均使用RGB函数计算得到.
例如:
DRAWBAND(OPEN,RGB(0,224,224),CLOSE,RGB(255,96,96));
基础的属性这里就不说了,具体看后台指标计算返回数据格式说明1 - 基础数据格式
DrawType
“DRAWBAND” 固定
Type
1 固定 代表绘图函数数据类型
Draw
绘图函数输出数据
Val1
数值类型数组
Val2
数值类型数组
Color1
字符串类型 RGB颜色 如:RGB(0,224,224)
Color2
字符串类型 RGB颜色 如:RGB(0,224,224)
样例指标脚本
DRAWBAND(OPEN,RGB(0,224,224),CLOSE,RGB(255,96,96));
json返回数据
{
"Period": 0,
"Right": 0,
"Symbol": "600000.sh",
"Date": [
20201021,
20201022,
20201023,
20201026,
20201027,
20201028,
20201029,
20201030,
20201102,
20201103,
20201104,
20201105,
20201106,
20201109,
20201110,
20201111,
20201112,
20201113,
20201116,
20201117
],
"OutVar": [
{
"Name": "__temp_1__",
"DrawType": "DRAWBAND",
"Draw": {
"Val1": [
9.58,
9.67,
9.63,
9.72,
9.59,
9.48,
9.35,
9.38,
9.28,
9.31,
9.35,
9.46,
9.37,
9.42,
9.47,
9.49,
9.52,
9.41,
9.38,
9.46
],
"Val2": [
9.7,
9.65,
9.7,
9.6,
9.48,
9.4,
9.37,
9.26,
9.25,
9.3,
9.34,
9.36,
9.39,
9.43,
9.46,
9.56,
9.43,
9.36,
9.45,
9.53
],
"Color1": "RGB(0,224,224)",
"Color2": "RGB(255,96,96)"
},
"Type": 1,
"Attribute": [
"NONE_OUT_NAME"
],
"Attribute2": {
"Function": "DRAWBAND"
}
}
]
}
QQ群: 950092318
如果还有问题可以加交流QQ群: 950092318
HQChart代码地址地址:github.com/jones2000/HQChart
标签:224,RGB,后台,数据格式,VAL1,DRAWBAND,96 来源: https://blog.51cto.com/u_15292634/2979811