//名称:红宝顶级
//描述:红宝顶级
//参数一共7个,分别如下:
//M1,最小2,最大100,默认3
//M2,最小2,最大100,默认4
//M3,最小2,最大100,默认13
//M4,最小2,最大100,默认90
//M5,最小0,最大100,默认9
//M6,最小0,最大100,默认3
//M7,最小0,最大100,默认3
M1 :=3;
M2 :=4;
M3:=13;
M4:=90;
M5:=9;
M6:=3;
M7:=3;
PP1:=C<O;
STICKLINE(PP1 ,H,L,0,0),colorcyan;
STICKLINE(PP1 ,O,C,2,5),LINETHICK1,colorcyan;
AMV0:=VOL*(O+C)/2;
北斗生命线:SUM(AMV0,88)/SUM(VOL,88),COLORFF00FF,LINETHICK2;
CG:MA(C,17),COLORFFCC66,LINETHICK2;
FL:=HHV(CG,2);
北斗持股线:HHV(CG,2),COLOR00FF00;
FS:CG-(FL-CG),coloryellow,LINETHICK2;
DRAWICON(COUNT(REF(EMA(C,M1),1)<REF(EMA(C,M1),2),M2)=M2 AND EMA(C,M1)>REF(EMA(C,M1),1),L,25);
ZDCGD := ABS(C - FS);
HIGH_13 := HHV(ZDCGD,M3);
MC := (C - FS) > (HIGH_13 * M4 / 100);
MR := (FS - C) > (HIGH_13 * M4 / 100);
RSV :=(CLOSE-LLV(LOW,M5))/(HHV(HIGH,M5)-LLV(LOW,M5))*100;
K :=SMA(RSV,M6,1);
D :=SMA(K,M7,1);
KDJMR :=CROSS(K,D);
KDJMC :=CROSS(D,K);
DRAWICON(MC, H, 26);
DRAWICON(KDJMC, H, 12);