Background indicator calculation return data format description 9-PARTLINE format
PARTLINE
Usage: PARTLINE (PRICE, COND1, COLOR1, COND2, COLOR2...),
draw PRICE line, when COND1 conditions are met, use COLOR1 color, when COND2 conditions are met, use COLOR2 color, otherwise do not draw, from the parameters after COLOR1 It can be omitted, and there can be up to 10 sets of conditions.For
example: PARTLINE(CLOSE,CLOSE>OPEN,RGB(255,0,0),CLOSE<OPEN,RGB(0,255,0),1,RGB(0,0,255))
means painting The closing price line, red for the positive line, green for the negative line, and blue for the flat. Note that the last condition is 1, which means that this condition must be met if the previous conditions are not met.
Return format description
The basic attributes are not mentioned here. For details, see the background indicator calculation return data format description 1-basic data format
DrawType
"PARTLINE" fixed
Type
1 Fixed data type representing the drawing function
Draw
Plotting function output data
Price
Output Y axis value, numeric type array
Color
The line color string array, if it is null, the current point does not need to be drawn
Sample
Indicator script
PARTLINE(CLOSE,CLOSE>OPEN,RGB(255,0,0),CLOSE<OPEN,RGB(0,255,0),1,RGB(0,0,255));
json return data
{
"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": "PARTLINE",
"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
],
"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 group: 950092318
If you still have questions, you can add to the exchange QQ group: 950092318
HQChart code address
Address: github.com/jones2000/HQChart
Personal hobbies (modeling/photography)
To the runners and refined shark
to the scud, Quintessons
to the runners and homeless