网友求助:

只显示黄色线紫色K线 其他正常显示

趋势:MA(LOW,20)*1.2,COLORMAGENTA,LINETHICK0;


次上趋势:MA(LOW,20)*1.1,LINETHICK0;


次下趋势:MA(HIGH,20)*0.9,POINTDOT,LINETHICK0;

下趋势:MA(HIGH,20)*0.8,POINTDOT,LINETHICK0;


趋势强度:=IF(C>次上趋势,IF(C>上趋势,4,3),IF(C>次下趋势 AND C<次上趋势,2,IF(C<下趋势,0,1)));

STICKLINE(趋势强度=0,H,L,5,1),COLORBLUE;

STICKLINE(趋势强度=1,H,L,0,1),COLORGREEN;


STICKLINE(趋势强度=2,H,L,0,1),COLORGRAY;

STICKLINE(趋势强度=3,H,L,0,1),COLORYELLOW;

STICKLINE(趋势强度=4,H,L,0,1),COLORMAGENTA;

STICKLINE(趋势强度=0,C,O,0,0),COLORBLUE;


STICKLINE(趋势强度=1,C,O,5,0),COLORGREEN;
STICKLINE(趋势强度=2,C,O,5,0),COLORGRAY;
STICKLINE(趋势强度=3,C,O,5,0),COLORYELLOW;
STICKLINE(趋势强度=4,C,O,5,0),COLORMAGENTA;

 

 

 

 改写 K 线颜色 指标 只显示黄色线紫色K线

 

解答如下:

上趋势:MA(LOW,20)*1.2,COLORMAGENTA,LINETHICK0;
次上趋势:MA(LOW,20)*1.1,LINETHICK0;
次下趋势:MA(HIGH,20)*0.9,POINTDOT,LINETHICK0;
下趋势:MA(HIGH,20)*0.8,POINTDOT,LINETHICK0;
趋势强度:=IF(C>次上趋势,IF(C>上趋势,4,3),IF(C>次下趋势 AND C<次上趋势,2,IF(C<下趋势,0,1)));
STICKLINE(c,H,L,0,1),COLOR999999;
STICKLINE(c,C,O,5,0),COLOR999999;
STICKLINE(趋势强度=3,H,L,0,1),COLORYELLOW;
STICKLINE(趋势强度=4,H,L,0,1),COLORMAGENTA;
STICKLINE(趋势强度=3,C,O,5,0),COLORYELLOW;
STICKLINE(趋势强度=4,C,O,5,0),COLORMAGENTA;