任意K线
{X:2 300 3}{可以不设置参数也行}
CS:=X;{可以调整此值来绘制不同周期值的方框}
XDWZ:=MOD(CURRBARSCOUNT,CS);
ZD:=XDWZ=1;
QD:=XDWZ=0;
H1:=IF(XDWZ=1,HHV(H,CS),DRAWNULL);
HH:=IF(XDWZ=1,H1,IF(XDWZ=0,REFX(H1,CS-1),REFX(H1,XDWZ-1)));
L1:=IF(XDWZ=1,LLV(L,CS),DRAWNULL);
LL:=IF(XDWZ=1,L1,IF(XDWZ=0,REFX(L1,CS-1),REFX(L1,XDWZ-1)));
STICKLINE(PERIOD=5 AND ZD=1,HH,LL,0,1),COLORBROWN;
STICKLINE(PERIOD=5 AND QD=1,HH,LL,0,1),COLORBROWN;
STICKLINE(PERIOD=5 AND QD!=1 AND ZD!=1,HH,HH,8,1),COLORBROWN;
{月涨跌}
月O:O#MONTH,NODRAW;
月H:=H#MONTH,NODRAW;
月L:=L#MONTH,NODRAW;
月C:C#MONTH,NODRAW;
STICKLINE(月C>=月O,月C,月O,5,-1),COLORLIRED;{月涨}
STICKLINE(月C<月O,月C,月O,5,-1),COLORGREEN;{月跌}
{周涨跌}
周O:O#WEEK,NODRAW;
周H:=H#WEEK,NODRAW;
周L:=L#WEEK,NODRAW;
周C:C#WEEK,NODRAW;
STICKLINE(周C>=周O,周O,周C,5,0)COLORCC3299;{周涨}
STICKLINE(周C<周O,周O,周C,5,0)COLORBLUE;{周跌}
DRAWKLINE(H,O,L,C);
{涨K线}
STICKLINE(C>O,C,O,2.6,0),COLOR000088;
STICKLINE(C>O,C,O,1.9,0),COLOR0000AA;
STICKLINE(C>O,C,O,1.2,0),COLOR0000CC;
STICKLINE(C>O,C,O,0.4,0),COLOR0000EE;
{跌K线}
STICKLINE(O>=C,C,O,2.6,0),COLOR009900;
STICKLINE(O>=C,C,O,1.9,0),COLOR00BB00;
STICKLINE(O>=C,C,O,1.2,0),COLOR00DD00;
STICKLINE(O>=C,C,O,0.4,0),COLOR00FF00;