收口布林 大波段操作公式 通达信主图指标 源码 贴图

2019-08-07 09:37:00来源:本站整理浏览:505

收口布林 大波段操作公式 通达信主图指标 源码 贴图

收口布林 大波段操作公式 通达信主图指标 源码 贴图

收口布林 大波段操作公式 通达信主图指标 源码 贴图

收口布林 大波段操作公式 通达信主图指标 源码 贴图


{蓝灰底}
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线>=卖线,HHV(H,60),LLV(L,60),5,0),COLOR000045;
STICKLINE(买线<卖线,HHV(H,60),LLV(L,60),5,0),COLOR004500;
HHH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;
LLY:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
D90H:=EMA(HHH,90),COLORRED,LINETHICK1;
D90L:=EMA(LLY,90),COLORRED,LINETHICK1;
DGH:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;DDL:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;D90C:=D90H-D90L;D90D:=D90H+D90C*2,COLORRED,LINETHICK1;D90T:=D90L-D90C*2,COLORRED,LINETHICK1;G0:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),LINETHICK1,COLORWHITE;D0:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK1,COLORWHITE;DTD:=D0>=D90T AND G0>=D90D;KTD:=G0<=D90D AND D0<=D90T;ZDD:=D0>=D90T AND G0<=D90D;BDD0:=(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3+XMA(XMA(H,60),60),LINETHICK2,COLORGREEN;BDT0:=XMA(XMA(L,60),60)-(XMA(XMA(H,60),60)-XMA(XMA(L,60),60))*3,LINETHICK2,COLORGREEN;STICKLINE(DTD=1,G0,D0,5,0),COLOR000066;STICKLINE(KTD=1,G0,D0,5,0),COLOR003300;STICKLINE(ZDD=1,G0,D0,5,0),COLOR555555;
ZK1:(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),COLORAAAAAA, NODRAW;
ZD1:XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,COLORAAAAAA, NODRAW;
白色点多定位1:=L<ZD1 AND H>ZD1;
白色点空定位1:=H>ZK1 AND L<ZK1;
STICKLINE(白色点多定位1=1,L,ZD1,3,0),COLORWHITE;
STICKLINE(白色点空定位1=1,H,ZK1,3,0),COLORWHITE;
白色点多定位2:=H<ZD1;
白色点空定位2:=L>ZK1;
STICKLINE(白色点多定位2=1,L,H,0.0,0),COLORWHITE;
STICKLINE(白色点多定位2=1,C,O,3,0),COLORWHITE;
STICKLINE(白色点空定位2=1,L,H,0.0,0),COLORWHITE;
STICKLINE(白色点空定位2=1,C,O,3,0),COLORWHITE;
多头多定位:=CROSS(ZD1,L) AND DTD=1;
多头平定位:=CROSS(H,ZK1) AND DTD=1 AND ZDD=0;
空头空定位:=CROSS(H,ZK1) AND KTD=1;
空头平定位:=CROSS(ZD1,L) AND KTD=1 AND ZDD=0;
震荡多定位:=CROSS(ZD1,L) AND ZDD=1;
震荡空定位:=CROSS(H,ZK1) AND ZDD=1;
DRAWICON(空头平定位=1,L,3);
DRAWICON(多头平定位=1,H,4);
DRAWICON(多头多定位=1 OR 震荡多定位=1,L,3);
DRAWICON(空头空定位=1 OR 震荡空定位=1,H,4);
MID8:=(3*CLOSE+LOW+OPEN+HIGH)/6;
判断1线:(20*MID8+19*REF(MID8,1)+18*REF(MID8,2)+17*REF(MID8,3)+16*REF(MID8,4)+15*REF(MID8,5)+14*REF(MID8,6)+13*REF(MID8,7)+12*REF(MID8,8)+11*REF(MID8,9)+10*REF(MID8,10)+9*REF(MID8,11)+8*REF(MID8,12)+7*REF(MID8,13)+6*REF(MID8,14)+5*REF(MID8,15)+4*REF(MID8,16)+3*REF(MID8,17)+2*REF(MID8,18)+REF(MID8,20))/210,COLORYELLOW;
判断2线:MA(判断1线,6);
DRAWBAND(判断1线,RGB(255,0,0),判断2线,RGB(0,180,0));
{WWW.GPXIAZAI.COM}
N9:=120;
KP:=BARSLAST(CURRBARSCOUNT=N9);
GD:=CONST(IF(ISLASTBAR=1,HHV(H,KP),0));{高点}
DDS:=CONST(IF(ISLASTBAR=1,LLV(L,KP),0));{低点}
KJ:=GD-DDS;{高低点差值=分区高度}
DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/12,' 【风险区】--高抛避险'),COLOR555555;
DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/3.5,' 【警示区】--逢高减仓'),COLOR555555;
DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/2.23,' 【突破区】--主力拉升'),COLOR555555;
DRAWTEXT(CURRBARSCOUNT=N9/2-58,GD-KJ/1.82,' 【拉升区】--强势畜锐'),COLOR555555;
DRAWTEXT(CURRBARSCOUNT=N9/2-58,DDS+KJ/3.5,' 【反弹中轨】--低买高休'),COLOR555555;
DRAWTEXT(CURRBARSCOUNT=N9/2-58,DDS+KJ/10,' 【低吸区】--大胆买入'),COLOR555555;

{大波段操作公式源码}
VAR3F:=(2*CLOSE+HIGH+LOW)/4;
VAR4F:=LLV(LOW,34);
VAR5S:=HHV(HIGH,34);
DIFF:EMA((VAR3F-VAR4F)/(VAR5S-VAR4F)*100,13), NODRAW;
DEAF:EMA(0.667*REF(DIFF,1)+0.333*DIFF,2), NODRAW;
DRAWTEXT(CROSS(DIFF,DEAF) AND DIFF<22,DDS+KJ/15,'谷'),COLOR006600;
DRAWTEXT(CROSS(DIFF,30) AND DEAF<DIFF,DDS+KJ/3.5,'初'),COLOR888888;
DRAWTEXT(CROSS(DIFF,65) AND DEAF<DIFF,GD-KJ/1.7,'中'),COLOR888888;
DRAWTEXT(CROSS(DIFF,75) AND DEAF<DIFF,GD-KJ/2,'高'),COLOR009999;
DRAWTEXT(CROSS(DEAF,DIFF) AND DEAF>75,GD-KJ/4.5,'峰'),COLOR006600;

AAA7:=STRCAT('换手率:',CON2STR(DYNAINFO(37)*100,2));
AAA8:=STRCAT('成交金额:',CON2STR(DYNAINFO(7)/100000000,2)),'(%)';
DRAWTEXT_FIX(1,0.868,0.01,0,AAA7),COLORYELLOW;
DRAWTEXT_FIX(1,0.928,0.01,0,AAA8),COLORYELLOW;

AAF:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,30))/MA(CLOSE,30);
长期趋势线:=DMA((2*CLOSE+LOW+HIGH)/4,AAF);
CCF:=(CLOSE/长期趋势线);
MA1F:=MA(CCF*(2*CLOSE+HIGH+LOW)/4,3);
MAAA:=((MA1F-长期趋势线)/长期趋势线)/3;
TMP:=MA1F-MAAA*MA1F;
长期趋势上升:IF(TMP>长期趋势线 ,长期趋势线,DRAWNULL),LINETHICK2,COLOR880066;

DRAWKLINE(HIGH,OPEN,LOW,CLOSE);

{N=0 1000 30}
{主图}
T1U:=FINDLOWBARS(L,0,NM,1);
T5:=BARSLAST(CURRBARSCOUNT=CONST(T1U)+1);
D1D:REF(L,T5),COLOR00AA00,LINETHICK1;

T1:=CONST(LLVBARS(LOW,10));
T1HIGH:=CONST(REF(HIGH,T1));
CCC:=CONST(CURRBARSCOUNT);
T2G:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T1 AND HIGH>T1HIGH));
T2HIGH:=CONST(REF(HIGH,T2G));
T3:=CONST(BARSLAST(CURRBARSCOUNT>CCC+T2G AND HIGH>T2HIGH));
T3HIGH:=CONST(REF(HIGH,T3));
猎击:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK2,COLOR555555;
DRAWTEXT(ISLASTBAR, T3HIGH, '---------------猎击')LINETHICK1,COLOR555555;

半分位:=(O+C)/2;
昨半分位:=REF(半分位,1);
STICKLINE(ISLASTBAR,昨半分位,昨半分位,10,0)COLORAAAA00;
H分:=(H+L)/2;
昨H分:=REF(H分,1);
STICKLINE(ISLASTBAR,昨H分,昨H分,10,0)COLOR996600;

前20内高:=HHV(C,20);
昨前高:CONST(REF(前20内高,2)),COLORAAAAAA,POINTDOT;

JLH:=REF(V,3)>=MA(V,3)*0.8;
BP:=L>REF(O,3)*1.01 AND REF(L,1)>REF(O,3)*1.01 AND REF(L,2)>=REF(O,3)*1.01;
BJ:=REF(C,3)>REF(C,4) AND REF(C,3)>REF(O,3);
AB:=BJ AND JLH AND BP;
TH:=BARSLAST(AB);
LLL:=IF(TH=1 OR TH=2 OR TH=3,L,9999);
LTH:=BARSLAST(LLL=LLV(LLL,TH));
VAR1L:=CONST(LTH)<100 AND LTH>0;
VAR2L:=CONST(REF(L,LTH))=CONST(L);
XGH:=VAR1L AND VAR2L AND ISLASTBAR;
DRAWICON(XGH,L*0.98,1);
DRAWLINE(CURRBARSCOUNT=CONST(LTH)+1,L,ISLASTBAR,REF(L,LTH),0),COLOR00CCCC,DOTLINE;


N1E:=10;N2E:=10;DISP:=2;
KV:=IF(PERIOD=5,1,{日}
IF(PERIOD=6,1,{周}
IF(PERIOD=7,1,{月}
IF(PERIOD=8,1,{多分钟}
IF(PERIOD=9,1,{多日}
IF(PERIOD=10,1,{季}
IF(PERIOD=11,2,{年}
IF(PERIOD=4,1,{60F}
IF(PERIOD=3,1,{30F}
IF(PERIOD=2,1,{15F}
IF(PERIOD=1,1{5F},1{1F})))))))))))/10;
P1:=PEAK(1,KV*N1E,1);
P2:=PEAK(1,KV*N1E,2);
WP1:=PEAKBARS(1,KV*N1E,1);
WP2:=PEAKBARS(1,KV*N1E,2);
T1E:=TROUGH(2,KV*N2E,1);
T2G1:=TROUGH(2,KV*N2E,2);
WT1:=TROUGHBARS(2,KV*N2E,1);
WT2:=TROUGHBARS(2,KV*N2E,2);
TJ1:=P1>T1E AND P2>T2G1 ;
ZD:=MAX(T1E,T2G1);
ZG:=MIN(P1,P2);
LL:=MIN(T1E,T2G1);
HH:=MAX(P1,P2);
TJ2:=FILTER(ZG>ZD,2);
TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2));
TJ4:=TJ1&&TJ2&&NOT(TJ3);
TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1)));
TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1));
TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7);
ZSD:=IF(TJ8,ZD,DRAWNULL);
ZSG:=IF(TJ8,ZG,DRAWNULL);
ZSH:=IF(TJ8,HH,DRAWNULL);
ZSL:=IF(TJ8,LL,DRAWNULL);
STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA;
STICKLINE(TJ8,ZSD,ZSG,IF(DISP=1,3,0),1),COLORMAGENTA;
DRAWTEXT(DISP=2,ZSH,'中枢'),COLORWHITE;
趋势高:PLOYLINE(DISP=3,ZIG(1,KV*N1E)),COLORLIBLUE;
趋势低:PLOYLINE(DISP=3,ZIG(2,KV*N2E)),COLORLIBLUE;
局部低点预选A:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4);
局部低点预选B:=BACKSET(局部低点预选A=0 AND REF(局部低点预选A,1)=1,2);
局部低点预选C:=IF(局部低点预选B=1 AND REF(局部低点预选B,1)=0,-1,0);
局部高点预选A:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4);
局部高点预选B:=BACKSET(局部高点预选A=0 AND REF(局部高点预选A,1)=1,2);
局部高点预选C:=IF(局部高点预选B=1 AND REF(局部高点预选B,1)=0,1,0);
缺口判断:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0));
距前高天:=BARSLAST(局部高点预选C=1);
距前低天:=BARSLAST(局部低点预选C=-1);
小值周期:=LOWRANGE(L);
大值周期:=TOPRANGE(H);
低保留AA:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留AB:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR LLV(L,距前低天+2)<REF(LLV(L,距前低天+1),1)),-1,0);
低保留S:=IF((低保留AA=-1 OR 低保留AB=-1) AND L<REF(H,距前高天+1),-1,0);
预判:=IF((距前低天<4 AND HHV(缺口判断,距前低天)!=1) OR REF(低保留S,距前低天)=0,1,0);
判断:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND 预判=1 AND 大值周期>REF(小值周期,距前低天+1) AND 大值周期>REF(小值周期,距前低天) AND 大值周期>REF(大值周期,距前高天),1,0);
高保留A:=IF(局部高点预选C=1 AND REF(距前低天,1)>REF(距前高天,1) AND HHV(H,距前低天+1)>REF(HHV(H,距前低天+1),1),1,0);
高保留B:=IF(局部高点预选C=1 AND REF(距前低天,1)<=REF(距前高天,1) AND REF(低保留S,距前低天)=-1 AND (距前低天>=4 OR HHV(缺口判断,距前低天)=1),1,0);
高保留:=IF((高保留A=1 OR 高保留B=1 OR 判断=1) AND H>REF(L,距前低天+1),1,0);
预判A:=IF((距前高天<4 AND HHV(缺口判断,距前高天)!=1) OR REF(高保留,距前高天)=0,1,0);
判断A:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND 预判A=1 AND 小值周期>REF(大值周期,距前高天+1) AND 小值周期>REF(大值周期,距前高天) AND 小值周期>REF(小值周期,距前低天),-1,0);
低保留A:=IF(局部低点预选C=-1 AND REF(距前高天,1)>REF(距前低天,1) AND LLV(L,距前高天+1)<REF(LLV(L,距前高天+1),1),-1,0);
低保留B:=IF(局部低点预选C=-1 AND REF(距前高天,1)<=REF(距前低天,1) AND (距前高天>=4 OR LLV(缺口判断,距前高天)=-1 OR 判断A=-1),-1,0);
低保留:=IF((低保留A=-1 OR 低保留B=-1) AND L<REF(H,距前高天+1),-1,0);
距前高天A:=BARSLAST(高保留=1);
距前低天A:=BARSLAST(低保留=-1);
预判X:=IF((距前低天A<4 AND HHV(缺口判断,距前低天A)!=1) OR REF(低保留,距前低天A)=0,1,0);
判断X:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND 预判X=1 AND 大值周期>REF(小值周期,距前低天A+1) AND 大值周期>REF(小值周期,距前低天A) AND 大值周期>REF(大值周期,距前高天A),1,0);
高保留XA:=IF(局部高点预选C=1 AND REF(距前低天A,1)>REF(距前高天A,1) AND HHV(H,距前低天A+1)>REF(HHV(H,距前低天A+1),1),1,0);
高保留XB:=IF(局部高点预选C=1 AND REF(距前低天A,1)<=REF(距前高天A,1) AND REF(低保留,距前低天A)=-1 AND (距前低天A>=4 OR HHV(缺口判断,距前低天A)=1),1,0);
高保留X:=IF((高保留XA=1 OR 高保留XB=1 OR 判断X=1) AND H>REF(L,距前低天A+1),1,0);
预判XA:=IF((距前高天A<4 AND HHV(缺口判断,距前高天A)!=1) OR REF(高保留XA,距前高天A)=0,1,0);
判断XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND 预判XA=1 AND 小值周期>REF(大值周期,距前高天A+1) AND 小值周期>REF(大值周期,距前高天A) AND 小值周期>REF(小值周期,距前低天A),-1,0);
低保留XA:=IF(局部低点预选C=-1 AND REF(距前高天A,1)>REF(距前低天A,1) AND LLV(L,距前高天A+1)<REF(LLV(L,距前高天A+1),1),-1,0);
低保留XB:=IF(局部低点预选C=-1 AND REF(距前高天A,1)<=REF(距前低天A,1) AND (距前高天A>=4 OR LLV(缺口判断,距前高天A)=-1 OR 判断XA=-1),-1,0);
低保留X:=IF((低保留XA=-1 OR 低保留XB=-1) AND L<REF(H,距前高天A+1),-1,0);
距前高天YA:=BARSLAST(高保留X=1);
距前低天YA:=BARSLAST(低保留X=-1);
预判YX:=IF((距前低天YA<4 AND HHV(缺口判断,距前低天YA)!=1) OR REF(低保留X,距前低天YA)=0,1,0);
判断YX:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND 预判YX=1 AND 大值周期>REF(小值周期,距前低天YA+1) AND 大值周期>REF(小值周期,距前低天YA) AND 大值周期>REF(大值周期,距前高天YA),1,0);
高保留YXA:=IF(局部高点预选C=1 AND REF(距前低天YA,1)>REF(距前高天YA,1) AND HHV(H,距前低天YA+1)>REF(HHV(H,距前低天YA+1),1),1,0);
高保留YXB:=IF(局部高点预选C=1 AND REF(距前低天YA,1)<=REF(距前高天YA,1) AND REF(低保留X,距前低天YA)=-1 AND (距前低天YA>=4 OR HHV(缺口判断,距前低天YA)=1),1,0);
高保留YX:=IF((高保留YXA=1 OR 高保留YXB=1 OR 判断YX=1) AND H>REF(L,距前低天YA+1),1,0);
预判YXA:=IF((距前高天YA<4 AND HHV(缺口判断,距前高天YA)!=1) OR REF(高保留YXA,距前高天YA)=0,1,0);
判断YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND 预判YXA=1 AND 小值周期>REF(大值周期,距前高天YA+1) AND 小值周期>REF(大值周期,距前高天YA) AND 小值周期>REF(小值周期,距前低天YA),-1,0);
低保留YXA:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)>REF(距前低天YA,1) AND LLV(L,距前高天YA+1)<REF(LLV(L,距前高天YA+1),1),-1,0);
低保留YXB:=IF(局部低点预选C=-1 AND REF(距前高天YA,1)<=REF(距前低天YA,1) AND (距前高天YA>=4 OR LLV(缺口判断,距前高天YA)=-1 OR 判断YXA=-1),-1,0);
低保留YX:=IF((低保留YXA=-1 OR 低保留YXB=-1) AND L<REF(H,距前高天YA+1),-1,0);
AAAD:=IF(高保留YX=1 AND 低保留YX=-1 AND H>REF(H,REF(距前高天YA,1)+2),1,IF(高保留YX=1 AND 低保留YX=-1 AND L<REF(L,REF(距前低天YA,1)+2),-1,0));
极点保留:=IF(AAAD=0,高保留YX+低保留YX,AAAD);
局部极点:IF(极点保留=-1,L,IF(极点保留=1,H,DRAWNULL)) CIRCLEDOT COLOR0000AA,LINETHICK4;

G:=MA(C,5);D:=MA(C,10);
HH8:=REF(H,5)=HHV(H,11);
LL8:=REF(L,5)=LLV(L,11);
FG01:=BACKSET(HH8,6)>BACKSET(HH8,5) ;
FD01:=BACKSET(LL8,6)>BACKSET(LL8,5) ;
FG02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND G>D,FG01,
IF(BARSLAST(FD01)>BARSLAST(FG01),FG01,0));
FD02:=IF(BARSLAST(FG01)=BARSLAST(FD01) AND D>G,FD01,
IF(BARSLAST(FG01)>BARSLAST(FD01),FD01,0));
FG0:=FG02 AND H=HHV(H,BARSLAST(FD02));
FD0:=FD02 AND L=LLV(L,BARSLAST(FG02));
GP:IF(FG0,H,DRAWNULL),CIRCLEDOT,COLORCYAN;
DP:IF(FD0,L,DRAWNULL),CIRCLEDOT,COLORCYAN;
GQ:=L>REF(H,1) AND DAY!=REF(DAY,1);
DQ:=H<REF(L,1) AND DAY!=REF(DAY,1);
GQL:=REF(L,BARSLAST(GQ));
DQH:=REF(H,BARSLAST(DQ));
FGH:=REF(H,BARSLAST(FG0));
FGL:=REF(L,BARSLAST(FG0));
FGH1:=REF(H,BARSLAST(FG0)+1);
FGL1:=REF(L,BARSLAST(FG0)+1);
FGH2:=REF(H,BARSLAST(FG0)+2);
FGL2:=REF(L,BARSLAST(FG0)+2);
FDH:=REF(H,BARSLAST(FD0));
FDL:=REF(L,BARSLAST(FD0));
FDH1:=REF(H,BARSLAST(FD0)+1);
FDL1:=REF(L,BARSLAST(FD0)+1);
FDH2:=REF(H,BARSLAST(FD0)+2);
FDL2:=REF(L,BARSLAST(FD0)+2);
FGZH:=IF(FGL<=FGL1,FGH2,FGH1);
FGZL:=IF(FGH1<FGL,FGL,IF(FGL<=FGL1,FGL2,FGL1));
FDZH:=IF(FDL1>FDH,FDH,IF(FDH>=FDH1,FDH2,FDH1));
FDZL:=IF(FDH>=FDH1,FDL2,FDL1);
FG1:=FGH>FDZH AND FG0;
FD1:=FDL<FGZL AND FD0;
FG:=FG1 AND FGH>FDH AND FGL>FDL AND FGL1>FDL;
FD:=FD1 AND FDL<FGL AND FDH<FGH AND FDH1<FGH;
BH0:=(H<=REF(H,1) AND L>=REF(L,1)) OR (H>=REF(H,1) AND L<=REF(L,1));
BHG:=COUNT(BH0,BARSLAST(FD0));
BHD:=COUNT(BH0,BARSLAST(FG0));
BGQ:=COUNT(GQ,BARSLAST(FD0));
BDQ:=COUNT(DQ,BARSLAST(FG0));
BK0:=IF(BHG>0,BHG+2+老笔,IF(BHD,BHD+2+老笔,3));
BK:=IF(BGQ,BK0-BGQ,IF(BDQ,BK0-BDQ,BK0));
G1X:=(FG AND BARSLAST(FD)>BK);
D1X:=(FD AND BARSLAST(FG)>BK);
GPB:IF(G1X,H,DRAWNULL),CIRCLEDOT,COLOR008800,LINETHICK1;
DPB:IF(D1X,L,DRAWNULL),CIRCLEDOT,COLOR008800,LINETHICK1;

AQ1:=REF(V,1);AQ2:=DVOL;AQ3:=AQ2/AQ1;
LNX:=AQ3-REF(AQ3,1);
E1:=REF(C,1);E2:=DCLOSE;E3:=(E2-E1)/E1*100;
QMX:=E3-REF(E3,1);
XGG:=CROSS(LNX,500) AND CROSS(QMX,10);
DRAWTEXT(XGG=1,L*0.98,'◇'),COLORCBCBC0;


{波浪}
PL5:=IF(PERIOD>=7,ZIG(3,1),IF(PERIOD=3,ZIG(1,2),ZIG(1,2)));
{S说明: 如果周月以上的选5%转向,如果日线选3%转向,如果日线以下周期选2%转向 }
PL10:=IF(PERIOD>=7,ZIG(3,30),IF(PERIOD=3,ZIG(1,10),ZIG(1,10)));
{S说明: 如果周月以上的选10%转向,如果日线选5%转向,如果日线以下周期选4%转向 }
PL20:=IF(PERIOD>=7,ZIG(1,10),IF(PERIOD=3,ZIG(1,30),ZIG(1,20)));
{S说明: 如果周月以上的选15%转向,如果日线选8%转向,如果日线以下周期选7%转向 }
EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3);
EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);
EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3);
EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);
EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3);
EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);
走强1:=BARSLAST(PL5<REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10<REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20<REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,L*1.02,'(A)'),COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'(B)'),COLORFFFF00;
DRAWTEXT(EN2 AND ZTJZ5=1,L*1.02,'(C)'),COLORFFFF00;


MID20:MA(CLOSE,20),COLOR888888,LINETHICK1;
KMA:MA(CLOSE,1),POINTDOT;
MID22:MA(CLOSE,22),COLORCBCBC0,LINETHICK1;
UPPER:MID22+2*STD(CLOSE,20),COLOR00BBBB,LINETHICK1;
LOWER:MID22-2*STD(CLOSE,20),COLORAA00BB,LINETHICK1;
{STICKLINE(CLOSE,HIGH,LOW,0.1,1),COLOR0000FF;
STICKLINE(CLOSE,CLOSE,CLOSE,4,1),COLOR0000FF;}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
DD:=SMA(K,3,1);
DRAWICON(CROSS(C,MID22) AND CROSS(K,DD),L-0.05,1);{共振信号为1号图标,显示红脸};


A1A:=MA(C,5);
A2A:=MA(C,15);
A3A:=MA(C,30);
A4A:=CROSS(A1A,A2A);
A5A:=CROSS(A2A,A3A);
A6A:=CROSS(A1A,A3A);
FD11:=A1A>=MA(C,120) AND A2A>=MA(C,120);
Q6:=ATAN((MA(C,120)/REF(MA(C,120),1)-1)*100)*57.3;
Q7:=ATAN((MA(C,250)/REF(MA(C,250),1)-1)*100)*57.3;
麻花:A6A AND COUNT(A4A,3)>=1 AND COUNT(A5A,3)>=1 AND FD11 AND Q6>0 AND Q7>0,NODRAW;
DRAWTEXT(麻花,MID22,'麻花'),COLORYELLOW;
中轨:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
上轨:=中轨+3*STD(中轨,13);
下轨:=中轨-3*STD(中轨,13);
收口大小:=(上轨-中轨)/中轨*100;
XD:=上轨>=REF(上轨,1) AND 下轨>=REF(下轨,1);
XE:=FILTER(XD=1 AND EXIST(收口大小<2.1,2) AND C>=REF(C,1)*0.981,7);
XF:=XD=1 AND EXIST(收口大小<2.1,2) AND C>=REF(C,1)*0.981;
XF2:=EXIST(XD=1,3) AND 收口大小<2 AND C>=中轨 AND C>=REF(C,1)*0.981;
收口:XF OR XF2,NODRAW;
DRAWTEXT(收口,LOWER,'I');
P:CROSS(收口,0.1) AND REF(C,1)<=MID22 AND REF(C,2)<=MID22,NODRAW;
DRAWTEXT(P,MID22,'I'),LINETHICK2;
Q:CROSS(收口,0.1) AND CROSS(MID22*1.001,REF(L,1)),NODRAW;
DRAWTEXT(Q,UPPER,'I');

{钱袋指标}
VAR113:=HHV(HIGH,60);
VAR114:=LLV(LOW,30);
VAR115:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR116:=(VAR113+VAR114+VAR115)/3;
VAR117:=EMA(VAR116,5);
K01:=EMA(VAR117,5)*2, COLORFF00FF;
D01:=EMA(K01,5), COLORWHITE;
J01:=K01*3-D01*2, COLORYELLOW;
ENTERLONG:=CROSS(K01,D01);
EXITLONG:=CROSS(D01,K01);
B01:=(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)),L*0.98,1))*D01*2/3;
B02:=IF(TROUGHBARS(3,15,1)=1 AND HIGH>LOW+0.01,20,0);
必买:=(B01 AND B02);
DRAWICON(必买,L*0.98,38);


VAR2X:=TROUGHBARS(3,15,1)<10;
VAR3X:=PEAKBARS(3,15,1)<10;
VAR4X:=IF(VAR2X=1,50,0);
底部:=IF(VAR4X=50,10,0);
多头能量:=0;
买入J:=IF(底部=10 AND REF(底部,1)=10 AND REF(底部,2)=0,50,0);
{买入延迟线:底部,LINETHICK1 ,COLOR00CCFF;}
DRAWTEXT(买入J=50,L*0.98,'●'),COLORWHITE;
{WWW.GPXIAZAI.COM}

HJ_1A:=CLOSE>REF(CLOSE,4);

HJ_2A:=BARSLASTCOUNT(HJ_1A);

HJ_3A:=HJ_2A=9;

HJ_4A:=HJ_2A=13;

HJ_5A:=HJ_2A=18;

HJ_6A:=ISLASTBAR AND BETWEEN(HJ_2A,1,8);

HJ_7A:=ISLASTBAR AND BETWEEN(HJ_2A,10,12);

HJ_8A:=ISLASTBAR AND BETWEEN(HJ_2A,14,17);

HJ_9A:=(BACKSET(HJ_4A>0,13) OR BACKSET(HJ_3A>0,9) OR BACKSET(HJ_5A>0,18) OR BACKSET(HJ_6A>0,HJ_2A) OR BACKSET(HJ_7A>0,HJ_2A) OR BACKSET(HJ_8A>0,HJ_2A))*HJ_2A;

DRAWTEXT(HJ_9A>0 AND HJ_9A<18,HIGH*1.01,VAR2STR(HJ_9A,0)),COLOR555555;

DRAWTEXT(HJ_9A>0 AND (HJ_2A=9 OR HJ_2A=13 OR HJ_2A=18),HIGH*1.01,VAR2STR(HJ_9A,0)),COLOR009900;

HJ_10A:=CLOSE<REF(CLOSE,4);

HJ_11A:=BARSLASTCOUNT(HJ_10A);

HJ_12A:=HJ_11A=9;

HJ_13A:=HJ_11A=13;

HJ_14A:=HJ_11A=18;

HJ_15A:=ISLASTBAR AND BETWEEN(HJ_11A,1,8);

HJ_16A:=ISLASTBAR AND BETWEEN(HJ_11A,10,12);

HJ_17A:=ISLASTBAR AND BETWEEN(HJ_11A,14,17);

HJ_18A:=(BACKSET(HJ_12A>0,9) OR BACKSET(HJ_13A>0,13) OR BACKSET(HJ_14A>0,18) OR BACKSET(HJ_15A>0,HJ_11A) OR BACKSET(HJ_16A>0,HJ_11A) OR BACKSET(HJ_17A>0,HJ_11A))*HJ_11A;

DRAWTEXT(HJ_18A>0 AND HJ_18A<18,LOW*0.99,VAR2STR(HJ_18A,0)),COLOR555555;

DRAWTEXT(HJ_18A>0 AND (HJ_11A=9 OR HJ_11A=13 OR HJ_11A=18),LOW*0.99,VAR2STR(HJ_18A,0)),COLOR990099;

操:=MA(C,5);
分界:HHV(操,13),LINETHICK1,COLORAAAAAA,DOTLINE;


 

股票公式栏目导航

精品指标推荐

最新热门

本类随机推荐

相关公式