有买卖提示、缺口提示、黄金柱提示的MA均线指标
这是本人整合后的均线指标,既有高低点画线,可看压力与支撑,又有买卖点提示(可能有未来函数,请使用时注意),还有跳空缺口显示,黄金柱提示,一标多用,非常实用!!
希望大家多多支持!
MA指标缺省参数p1——p6分别为:5、10、24、72、120、200(可按自己意愿修改)
MA1:MA(CLOSE,P1);
MA2:MA(CLOSE,P2);
MA3:MA(CLOSE,P3);
MA4:MA(CLOSE,P4);
MA5:MA(CLOSE,P5);
MA6:MA(CLOSE,P6);
MA24:ma(c,24),colorFF00FF,linethick2;
VAR3:=LLV(HIGH,240);
VAR4:=100*(CLOSE-VAR3)/VAR3;
VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
VAR7:=0;
VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);
买1:=VAR10;
买2:=(VAR11+VAR13+VAR15+VAR17);
卖1:=(VAR12+VAR14+VAR16+VAR18);
DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'←买入'),CROSSDOT,LINETHICK1,COLORRED;
DRAWTEXT(卖1>0,HIGH*1.02,'←卖出'),CROSSDOT,LINETHICK1,COLORGREEN;
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
TY:=C;
AA1:=REF(TY,10)=HHV(TY,2*10+1); BB1:=FILTER(AA1,10); C1:=BACKSET(BB1,10+1); HD:=FILTER(C1,10);
AA2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(AA2,10); CC2:=BACKSET(B2,10+1); LD:=FILTER(CC2,10);
前期高位:REF(H,BARSLAST(HD)),COLOR00FF00,POINTDOT,LINETHICK1;
前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,POINTDOT,LINETHICK1;
{向下跳空缺口}
I1:=0;
flag1:=0;
while I1<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
DO
IF REF(H,I1)<REF(L,I1+1) AND REF(L,I1+1)>HHV(H,I1+1)
THEN BEGIN FLAG1:=1;
S1:=I1;
I1:=BARSLAST(DISPSTATUS=1);
END
ELSE I1:=I1+1;
STICKLINE(FLAG1,REF(L,S1+1),HHV(H,S1+1),(s1+1)*20,0),ColorC0C0C0,ALIGN1,LAYER7;
DRAWTEXT(flag1,REF(L,s1+1),NUMTOSTRN(ref(h,s1+1),2)+'-'+NUMTOSTRN(hhV(h,S1+1),2)),ALIGN2,COLORgreen;
{向上跳空缺口}
I:=0;
flag:=0;
while I<BARSLAST(DISPSTATUS=1)-BARSLAST(DISPSTATUS=2)
DO
IF REF(L,I)>REF(H,I+1) AND REF(H,I+1)<LLV(LOW,I+1)
THEN BEGIN FLAG:=1;
S:=I;
I:=BARSLAST(DISPSTATUS=1);
END
ELSE I:=I+1;
STICKLINE(FLAG,REF(h,S+1),LLV(LOW,S+1),20*(s+1),500),ColorC0C0C0,ALIGN1,LAYER7;
DRAWTEXT(FLAG,REF(H,s+1),NUMTOSTRN(ref(h,s+1),2)+'-'+NUMTOSTRN(LLV(LOW,S+1),2)),ALIGN2,COLORgreen;
DRAWTEXTABS(6,10,'总股本:'+NUMTOSTRN(FINANCE2( 35),0 )+'万股'+' 流通A股:'+ NUMTOSTRN(FINANCE2( 37),0)+'万股'+
' 净资产:'+NUMTOSTRN(FINANCE2(4),3 )+'元' +' 收益:'+ NUMTOSTRN(FINANCE2(3),3)+'元'+' 市盈率:'+NUMTOSTRN(DYNAINFO(39),2)+'%'),COLORbbffff;
MA144:=MA(VOL,144);
TJ1:=VOL=HHV(VOL,10) AND VOL>1.7*REF(VOL,1) AND C>=REF(C,1) AND C>=O AND VOL<=MA144*3.5;
LJL:=FILTER(TJ1,3);
TJ3:=IF(BARSLAST(LJL)=1 AND CLOSE>REF(LOW,3),1,0);
ST:=TJ3=1;
CL:=FILTER(ST,3);
STICKLINE(C,REF(L,BARSLAST(CL)),REF(L,BARSLAST(CL)),2,0),COLORYELLOW;
STICKLINE(CLOSE,REF(L,BARSLAST(LJL)),REF(L,BARSLAST(LJL)),2,0),COLORCYAN;
STICKLINE(LJL,OPEN,CLOSE,5,0),COLORYELLOW;
A :=MA(CLOSE,27);
UP:=A + 2*STD(CLOSE,27);
LOWER:=A - 2*STD(CLOSE,27);
W1:=C=HHV(C,18);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
DRAWICON(W4 AND COUNT(W4,5)=1,L*0.98,7),ALIGN1;
|