經(jīng)過本人整理組合該指標(biāo),希望能給你帶來收益。
公式源碼:
{壓力支撐紅綠燈 主圖}
{進 出}
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;
{支撐 壓力 藍(lán)柱出 }
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;
準(zhǔn)備區(qū):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,'反轉(zhuǎn)'),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;
聯(lián)系客服