分享

红绿灯

 萍水相逢acxdz8 2024-06-14 发布于广东

A0:=(L+H+C*2)/4;

A1:=EMA(A0,3),coloryellow,LINETHICK2,NODRAW;

A2:=EMA(A0,7),colorliblue,LINETHICK2;

A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;

A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;

买进:IF(A2X>=0,REF(EMA(C,7),BARSLAST(CROSS(A2X,0))+1),DRAWNULL),colorred,,POINTDOT,LINETHICK6;

逃顶:IF(A1X<0,REF(EMA(C,3),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),colorgreen,POINTDOT,LINETHICK6;

//{看多 看空}

A11:=EMA(A0,3),colorblue;

A12:=EMA(A0,7),colorliblue;

A11X:=(A11-REF(A11,1))/REF(A11,1)*100,NODRAW;

A12X:=(A12-REF(A12,1))/REF(A12,1)*100,NODRAW;

看多:IF(A11X>=0 AND BARSLAST(CROSS(A11X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A11X,0))),DRAWNULL),colormagenta;

看空:IF(A11X<0 AND BARSLAST(CROSS(0,A11X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A11X))),DRAWNULL),colorcyan;

//{支撑 压力 蓝柱出 }

A3:=EMA(C,6),colorwhite,LINETHICK1;

A3X:=(A3-REF(A3,1))/REF(A3,1)*100,NODRAW;

支撑位:IF(A3X>=0,REF(EMA(C,11),BARSLAST(CROSS(A3X,0))+1),DRAWNULL),COLORRED;

压力位:IF(A3X<0,REF(EMA(C,11),BARSLAST(CROSS(0,A3X))+1),DRAWNULL),colorgreen;

STICKLINE(CROSS(A3X,0),C,O,1.5,0),coloryellow;

STICKLINE(CROSS(0,A3X),C,O,1.5,0),colorblue;

{}

买入:IF(A1X>=0,A1,DRAWNULL),COLORRED,NODRAW;

卖出:IF(A1X<0 AND A2X<0,A1,DRAWNULL),colorgreen,NODRAW;

STICKLINE(CROSS(A1X,0),C,O,1.5,0),COLORRED;

STICKLINE(CROSS(0,A1X),C,O,0.5,0),colorliblue;

{STICKLINE(CROSS(A1X,0)OR  CROSS(0,A1X),REF(EMA(C,14),1),REF(EMA(C,14),1)*0.996,2,0),colorwhite;

STICKLINE(ISLASTBAR,REF(EMA(C,4),1),REF(EMA(C,4),1)*0.996,3,0),colorlimagenta;}

//{分界线}

T1B:=CONST(LLVBARS(LOW,10));

T1HIGH:=CONST(REF(HIGH,T1B));

CCC:=CONST(CURRBARSCOUNT);

T2B:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T1B AND H>T1HIGH));

T2HIGH:=CONST(REF(HIGH,T2B));

T3B:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T2B AND HIGH>T2HIGH));

T3HIGH:=CONST(REF(HIGH,T3B));

过线:DRAWLINE(CURRBARSCOUNT=T3B+1, T3HIGH, ISLASTBAR, T3HIGH, 1),coloryellow,DOTLINE;

DRAWTEXT(ISLASTBAR, T3HIGH,'    过去线'),LINETHICK1,coloryellow;

过线1:=T3HIGH,NODRAW,coloryellow;

N1:=10;

TK:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1;

量能平台:IF(CURRBARSCOUNT<=N1+0,CONST(IF(TK=0,C,REF(C,TK))),DRAWNULL),colorgray,LINETHICK1;

NOTEXT_新量能点:IF(CURRBARSCOUNT=TK+1,量能平台,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK5;

DRAWTEXT(ISLASTBAR,量能平台,'   量能平台'),colorgray;

//{突破线}

STICKLINE(ISLASTBAR,REF(EMA(C,14),1),REF(EMA(C,14),1),50,0),colorwhite;

DRAWTEXT(ISLASTBAR,REF(EMA(C,14),0),'  突破线'),colorwhite;

//{前高 前低}

{VAR31:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);

VAR41:=CROSS(VAR31,0.9);

VAR51:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);

VAR61:=CROSS(VAR51,0.1);

前高:REF(HIGH,BARSLAST(VAR41)),NODRAW,coloryellow;

STICKLINE(C,REF(HIGH,BARSLAST(VAR41)),REF(HIGH,BARSLAST(VAR41)),2,1),COLOR00FFFF;

前低:REF(LOW,BARSLAST(VAR61)),NODRAW,COLORLIGRAY;

STICKLINE(C,REF(LOW,BARSLAST(VAR61)),REF(LOW,BARSLAST(VAR61)),2,1),COLORLIGRAY;

近日高:=HHV(H,5),NODRAW,colorligreen;

STICKLINE(ISLASTBAR,HHV(H,5),HHV(H,5),40,-1),colorligreen;

近日低:=HHV(L,5),NODRAW,colorlicyan;

STICKLINE(ISLASTBAR,LLV(L,5),LLV(L,5),30,-1),colorlicyan;}

//{MA3 5 7 13 止损 休息}

趋势线:=EMA(C,3);

生命线:=EMA(C,7);

工作线:=EMA(C,5);

止损线:=EMA(C,13);

DRAWBAND(趋势线-0.001,RGB(150,10,10),工作线+0.001,RGB(240,255,255));

B11:=EMA(C,11);

趋势:IF(C>=趋势线 AND EMA(C,3)>=EMA(C,5),趋势线,DRAWNULL),COLOR000099,LINETHICK1;

生命:IF(C>=生命线 AND EMA(C,7)>=EMA(C,11),生命线,DRAWNULL),COLORFF7F00;

工作:IF(C>=工作线 AND EMA(C,5)>=EMA(C,7),工作线,DRAWNULL),COLOR663399,LINETHICK1;

止损:IF(C>=止损线 AND EMA(C,11)>=EMA(C,14),止损线,DRAWNULL),coloryellow;

准备区:IF(C>=工作线 AND EMA(C,14)<EMA(C,25),工作线,DRAWNULL), colormagenta;

休息:IF(C<B11,B11,DRAWNULL),LINETHICK1,colorgreen;

DRAWICON((ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)<=REF(ZIG(3,5),3)),LOW*0.992,1);

DRAWICON((ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG(3,5),2)>=REF(ZIG(3,5),3)),HIGH*1.006,2);

//{倍量 启动}

V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);

STICKLINE(V2>=1,O,C,1.5,0),coloryellow;

MA13:=MA(CLOSE,13);

X1:=(C+L+H)/3;

BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;

EMA8:=EMA(C,8);

B0:=MIN(O,C);

B1:=ABS(O-C);

T1:=FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10);

STICKLINE(T1,B0,B0+B1/4,1,0),COLOR007575;

STICKLINE(T1,B0+B1/4,B0+B1/2,1,0),COLORFF0000;

STICKLINE(T1,B0+B1/2,B0+B1*3/4,1,0),COLOR007575;

STICKLINE(T1,B0+B1*3/4,B0+B1,1,0),COLORFF0000;

//{黑柱出逃}

LC:=REF(CLOSE,1);

RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);

FF:=EMA(CLOSE,3);

MA15:=EMA(CLOSE,21);

STICKLINE(CROSS(FF,MA15),B0,B0+B1/2,1,0),COLOR7F017F;

STICKLINE(CROSS(88,RSI),B0+B1,B0+B1/2,1.5,0),colorblack;

T2:=COUNT(CROSS(BBI,3),3)=1 AND CROSS(C,BBI);

DRAWTEXT(T2,H*1.05,'反转'),colorwhite;

STICKLINE(T2,O,C,1,0),COLORRED;

//{涨 跌 震幅%线 };

T12:=V2>=1;

T0:=BARSLAST(T12);

L1:=REF(L,T0);

H1:=REF(H,T0);

STICKLINE(REF(T12,1) OR REF(T12,2) OR REF(T12,3),H1,H1,3,-1),colorwhite;

STICKLINE(REF(T12,1) OR REF(T12,2) OR REF(T12,3),L1,L1,3,-1),colorwhite;

T13:=REF(T12,3) AND COUNT(L<L1,4)=0 AND COUNT(L>H1,4)>1;

L11:=MIN(REF(L,1),L);

L10:=MIN(L11,REF(L,2));

L21:=MAX(REF(L,1),L);

L20:=MAX(L21,REF(L,2));

T111:=(REF(V2>=1,3) OR REF(V2>=1,2) OR REF(V2>=1,1)) AND

((L10>L1 AND L20>H1) OR (L11>L1 AND L21>H1));

T11:=T111 AND REF(T111,1)=0;

STICKLINE(T11,O,C,1,0),COLORFF00FF;

STICKLINE(T1,B0,B0+B1/2,1,0),COLOR007575;

STICKLINE(T1,B0+B1/2,B0+B1,1,0),colorblue;

STICKLINE(T11 AND T12,B0,B0+B1/2,1,0),COLORFF00FF;

STICKLINE(T11 AND T12,B0+B1/2,B0+B1,2,0),coloryellow;

STICKLINE(T1 AND T12,B0+B1/3,B0+B1,2,0),coloryellow;

STICKLINE(T1 AND T12,B0,B0+B1/3,1,0),COLOR007575;

STICKLINE(T1 AND T12,B0+B1/3,B0+B1*2/3,1,0),colorblue;

{STICKLINE(T2 AND T12,B0+B1/2,B0+B1,1,0),COLORRED;};

STICKLINE(T2 AND T12,B0,B0+B1/2,1,0),coloryellow;

C2:=REF(C,1);

非ST涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);

涨停:=非ST涨停;

NUMBER:=COUNT(非ST涨停,BARSSINCE(非ST涨停)+1);

DRAWNUMBER(非ST涨停,HIGH*1.04,NUMBER),colorwhite;

DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.10,0.02,0,NUMBER),colorwhite;

DRAWTEXT_FIX(CURRBARSCOUNT=1,0.02,0.02,0,'上市以来共涨停'),coloryellow;

//?{红绿灯 副图}

DRAWTEXT_FIX(ISLASTBAR=1,0.01,0.75,0,STKNAME),colorwhite;

DRAWTEXT_FIX(ISLASTBAR=1,0.06,0.75,0,CODE),coloryellow;

//{红绿灯 }

DIFF:=(EMA(C,3)-EMA(C,26))*10,COLORRED,NODRAW;

红灯:IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLORRED,LINETHICK7;

{IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLOR000055,LINETHICK8;

IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLOR0000DD,LINETHICK5;

IF(DIFF>=REF(DIFF,1),2,DRAWNULL),COLOR0000FF,LINETHICK2;}

绿灯:IF(DIFF<REF(DIFF,1),2,DRAWNULL),COLOR00FF00,LINETHICK7;

{IF(DIFF<=REF(DIFF,1),2,DRAWNULL),COLOR00BB00,LINETHICK6;

IF(DIFF<=REF(DIFF,1),2,DRAWNULL),COLOR00DD00,LINETHICK4;

IF(DIFF<=REF(DIFF,1),2,DRAWNULL),COLOR00FF00,LINETHICK2;}

//{红球进,有ZIG}

DRAWICON(CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1)),2,34);

//{绿球出,有ZIG}

DRAWICON(CROSS(REF(ZIG(3,10),1),ZIG(3,10)),2,35);

VAR1:=LLV(LOW,10);

VAR2:=HHV(HIGH,25);

趋势线:EMA((CLOSE-VAR1)/(VAR2-VAR1)*4,9),coloryellow;

IF(趋势线>REF(趋势线,1),趋势线,DRAWNULL),COLORRED;

IF(趋势线=REF(趋势线,1),趋势线,DRAWNULL),coloryellow;

IF(趋势线<REF(趋势线,1),趋势线,DRAWNULL),colorligreen;

短底:IF(TROUGHBARS(2,5,1)=1 AND HIGH>LOW+0,1.5,0.9),colorlired;

大顶:IF(PEAKBARS(1,6,1)<1,2.6,3.2),colorgreen;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约