精选指标
今天分享一套主图个股结合大盘K线副图副图高山流水,能清晰看出入场点和离场点结合大盘进行判断
主图:个股+大盘K线源码
C1:=EMA(INDEXC,125)/EMA(C,125);
D1:=INDEXO/C1; D2:=INDEXH/C1;
D3:=INDEXL/C1; D4:=INDEXC/C1;
上证K线:STICKLINE(D4>=REF(D4,1),D3,D2,0,0),COLORRED;
STICKLINE(D4>=REF(D4,1),D4,D1,5,0),COLORRED;
STICKLINE(D4< REF(D4,1),D3,D2,0,0),COLORFFCC66;
STICKLINE(D4< REF(D4,1),D4,D1,5,0),COLORFFCC66;
主攻线: MA(CLOSE,4),COLORWHITE,LINETHICK2;
助攻线:MA(主攻线,8),COLORFF00FF,LINETHICK2;
强弱势分界:EMA(主攻线,33),COLORFFCC66,LINETHICK2;
Y:=(HIGH+LOW)/2;
AO:=MA(Y,5)-MA(Y,21);
DU0:=CROSS(AO,0);
UD0:=CROSS(0,AO);
TDU0:=BARSLAST(DU0);
TUD0:=BARSLAST(UD0);
DU3:=REF(DU0,1);
UD3:=REF(UD0,1);
TDU3:=BARSLAST(DU3);
TUD3:=BARSLAST(UD3);
劫:IF(TDU3<TUD3,REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3)),COLOR00FF00;
R1:=SMA(Y,8,1);
R2:=REF(R1,5);
KU1:=IF(HIGH=HHV(HIGH,3),1,0);
KD1:=IF(LOW=LLV(LOW,3),1,0);
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1
AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1
AND REF(KD1,1)=0 AND KD1=0)));
上:IF(HIGH>=R2,UL,REF(UL,BARSLAST(HIGH>R2))),COLOR0066FF,POINTDOT;
下:IF(LOW<=R2,DL,REF(DL,BARSLAST(LOW<=R2))),COLORAAAE5D,POINTDOT;
STICKLINE(BARSLAST(ABS(上-REF(上,1)))<BARSLAST(CLOSE>上 AND REF(CLOSE,1)<REF(上,1)),上,
上,4,1),COLOR0066FF,LINETHICK2,POINTDOT;
STICKLINE(BARSLAST(ABS(下-REF(下,1)))<BARSLAST(CLOSE<下 AND REF(CLOSE,1)>REF(下,1)),下,
下,4,1),COLORAAAE5D,LINETHICK2,POINTDOT;
VA:=CROSS(EMA(CLOSE,4),EMA(CLOSE,17));
VB:=EMA(CLOSE,6)>EMA(CLOSE,13);
DRAWTEXT(VA AND VB,EMA(CLOSE,13),'▲'),COLORFF00FF;
A:=BARSCOUNT(CLOSE);
AH:=HHV(HIGH,200);
AL:=LLV(LOW,200);
B0:=(AH-AL)/40;
B1:=HIGH+B0;
B2:=LOW-B0;
STICKLINE((A+0)/34=FLOOR((A+0)/34),B2,B2-2*B0,4,0),COLORYELLOW;
DRAWTEXT((A+0)/34=FLOOR((A+0)/34),B2-2.2*B0,'时间窗'),COLORFFFFFF;
V1:=REF(CLOSE,1);
V2:=SMA(MAX(CLOSE-V1,0),6,1)/SMA(ABS(CLOSE-V1),6,1)*100;
DRAWTEXT(IF(CROSS(81,V2),1,0),HIGH*1.03,'●'),COLOR00FF00;
副图高山流水源码
高山:HHV(MA(H,N),N),COLORRED,LINETHICK2;
流水:MA(H,N),COLORFFFFFF,LINETHICK2;
出水:IF(C>HHV(MA(H,N),8) AND HHV(MA(H,N),8)>MA(H,N),1,DRAWNULL),COLORFF00FF,POINTDOT,NODRAW;
回踩:IF((CROSS(MA(H,N),L) OR CROSS(MA(H,N)*1.01,C))AND BARSLAST(出水)<=5,1,DRAWNULL),COLOR00FFFF,POINTDOT,NODRAW;
STICKLINE(出水,(C+O)/2,(C+O)/2,3,0),COLORFF00FF;DRAWTEXT_FIX(C>O,0.6,0.6,1,'更多指标+V:HNXZ1994'),COLOR0FFFFF;
STICKLINE(出水,H,L,0,0),COLORFF00FF;
DRAWTEXT(回踩,L, '↑'),COLORFFFFFF;
HHV(流水,2),COLOR00FF00;
HHV(流水,3),COLOR00FF00;
HHV(流水,4),COLOR00FF00;
HHV(流水,5),COLOR00FF00;
HHV(流水,6),COLOR00FF00;
HHV(流水,7),COLOR00FF00;
HHV(流水,8),COLOR00FF00;
HHV(MA(H,N),N),COLORRED,LINETHICK2;