后台指标计算返回数据格式说明10 - FILLRGN格式
FILLRGN函数:FILLRGN,根据条件用RGN颜色填充区域
用法:FILLRGN(PRICE1,PRICE2,COND1,COLOR1,COND2,COLOR2…),填充PRICE1到PRICE2之间的区域,当COND1条件满足时,用COLOR1颜色,当COND2条件满足时,用COLOR2颜色,否则不填充,从COLOR1之后的参数均可以省略,最多可以有15组条件。
例如:FILLRGN(CLOSE,OPEN,CLOSE>OPEN,RGB(255,0,0),CLOSE<OPEN,RGB(0,255,0))表示填充开盘价和收盘价之间的区域,阳线时用红色,阴线时用绿色,平盘不绘制。
基础的属性这里就不说了,具体看后台指标计算返回数据格式说明1 - 基础数据格式
DrawType
“FILLRGN” 固定
Type
1 固定 代表绘图函数数据类型
Draw
绘图函数输出数据
Price
数值型数组,
Price2
数值型数组,
Color
字符串数组, Price, Price2填充颜色, 如果是null 不当前数据不填充颜色
样例指标脚本
FILLRGN(CLOSE,OPEN,CLOSE>OPEN,RGB(255,0,0),CLOSE<OPEN,RGB(0,255,0));
json返回数据
{
"Period": 0,
"Right": 0,
"Symbol": "600000.sh",
"Date": [
20201028,
20201029,
20201030,
20201102,
20201103,
20201104,
20201105,
20201106,
20201109,
20201110,
20201111,
20201112,
20201113,
20201116,
20201117,
20201118,
20201119,
20201120,
20201123,
20201124
],
"OutVar": [
{
"Name": "__temp_1__",
"DrawType": "FILLRGN",
"Draw": {
"Price": [
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,
9.7,
9.74,
9.67,
9.9,
9.85
],
"Price2": [
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,
9.53,
9.7,
9.68,
9.66,
9.92
],
"Color": [
"RGB(0,255,0)",
"RGB(255,0,0)",
"RGB(0,255,0)",
"RGB(0,255,0)",
"RGB(0,255,0)",
"RGB(0,255,0)",
"RGB(0,255,0)",
"RGB(255,0,0)",
"RGB(255,0,0)",
"RGB(0,255,0)",
"RGB(255,0,0)",
"RGB(0,255,0)",
"RGB(0,255,0)",
"RGB(255,0,0)",
"RGB(255,0,0)",
"RGB(255,0,0)",
"RGB(255,0,0)",
"RGB(0,255,0)",
"RGB(255,0,0)",
"RGB(0,255,0)"
]
},
"Type": 1,
"Attribute": [
"NONE_OUT_NAME"
]
}
]
}
QQ群: 950092318
如果还有问题可以加交流QQ群: 950092318
HQChart代码地址地址:github.com/jones2000/HQChart
个人爱好(模型/摄影)地出 游民,紧追