趋势主图
{买卖带状线}
VAR1:=(C+H+O+L)/4;
N1:=(1,100,20);
M:=(1,100,32);
P1:=(1,100,80);
P2:=(1,100,100);
卖出:XMA(VAR1,N1)*(1+P1/1000),COLORGREEN,DOTLINE,LINETHICK1;
买入:XMA(VAR1,M)*(1-P2/1000),COLORRED,DOTLINE,LINETHICK1;
DRAWBAND(卖出,RGB(0,80,60),买入,RGB(0,0,0));
{K线}
DRAWKLINE(H,O,L,C);
STICKLINE(C<O,H,L,0,0),COLORFF9900;
STICKLINE(C<O,O,C,3,1),COLORFF9900;
止:EMA(COST(81),10) COLORYELLOW,DOTLINE;
损:IF(EMA((CLOSE+HIGH+LOW)/3,5)<=止,止,DRAWNULL),COLORWHITE,LINETHICK1;
{牛熊:EMA(COST(27),120),COLORLIGRAY,CIRCLEDOT;}
生:EMA(CLOSE,20)COLORMAGENTA;
死:IF(EMA((CLOSE+HIGH+LOW)/3,5)<=生,生,DRAWNULL),COLORLIGREEN,LINETHICK1;
多:EMA(CLOSE,55),COLORLIRED;{www.fxjgsw.com}
空:IF(EMA((CLOSE+HIGH+LOW)/3,5)<=多,多,DRAWNULL),COLORCYAN,LINETHICK1;
{底部趋势线}
HH:=(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;
LL:=(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(HH,90),COLORRED,LINETHICK1;
D90L:=EMA(LL,90),COLORRED,LINETHICK1;
牛:(D90H+D90L)/2,COLORRED,LINETHICK2;
D1:=EMA(牛,10),COLORWHITE,LINETHICK1;
D2:=EMA(D1,10),COLORWHITE,LINETHICK1;
熊:IF(EMA((CLOSE+HIGH+LOW)/3,5)<=牛,牛,DRAWNULL),COLORLICYAN,LINETHICK2;
{黄金分割}
N:=144;
{www.fxjgsw.com}
VAR111:=LLV(LOW,N);
VAR22:=HHV(HIGH,N);
VAR33:=VAR22-VAR111;
低:VAR111,COLORA67D3D,LINETHICK1;
高:VAR22,COLOR99CC32,LINETHICK1;
{大底-洋红柱状线}
STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,MAX(卖出,MAX(OPEN,CLOSE)),2,0),COLORGREEN;
STICKLINE(卖出>MIN(C,O) AND 卖出<MAX(C,O),卖出,MAX(OPEN,CLOSE),2,0),COLORGREEN;
STICKLINE(卖出>LOW AND 卖出<HIGH,卖出,HIGH,0,0),COLORGREEN;
STICKLINE(卖出<LOW,OPEN,CLOSE,2,0),COLORGREEN;
STICKLINE(卖出<LOW,HIGH,LOW,0,0),COLORGREEN;
STICKLINE(买入>LOW AND 买入<HIGH,买入,MIN(MIN(OPEN,CLOSE),买入),2,0),COLORMAGENTA;
STICKLINE(买入>MIN(C,O) AND 买入<MAX(C,O),买入,MIN(OPEN,CLOSE),2,0),COLORMAGENTA;
STICKLINE(买入>LOW AND 买入<HIGH,买入,LOW,0,0),COLORMAGENTA;
STICKLINE(买入>HIGH,OPEN,CLOSE,2,0),COLORMAGENTA;
STICKLINE(买入>HIGH,HIGH,LOW,0,0),COLORMAGENTA;
G0:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))+XMA(XMA(H,25),25);
D0:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25));
DTD:=(D0+G0)/2>=(D90H+D90L)/2;
{压力支撑线}
VAR01:=BACKSET(REF(HIGH,2)=HHV(HIGH,5),3);
VAR02:=CROSS(VAR01,0.9);
VAR03:=BACKSET(REF(LOW,2)=LLV(LOW,5),3);
VAR04:=CROSS(VAR03,0.9);
压力:= REF(HIGH,BARSLAST(VAR02)), POINTDOT,COLOREA91B5;
STICKLINE(CLOSE,REF(HIGH,BARSLAST(VAR02)),REF(HIGH,BARSLAST(VAR02)),2,1),COLOREA91B5,LINETHICK3;
支撑:= REF(LOW,BARSLAST(VAR04)), POINTDOT,COLOR00B4FF;
STICKLINE(CLOSE,REF(LOW,BARSLAST(VAR04)),REF(LOW,BARSLAST(VAR04)),2,1),COLOR00B4FF,LINETHICK3;
下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
{机构·趋势}
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,'买'),COLORWHITE;
DRAWTEXT(卖1>0,HIGH*1.02,'卖'),COLORGREEN;
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
A4:=SMA(A3,3,1);
A5:=SMA(A4,3,1);
A6:=3*A4-2*A5;
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));
DIF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIF,9);
AAA1:=(DIF-DEA)*2*60;
起爆:=CROSS(AAA1-REF(AAA1,1),15),COLORRED,LINETHICK2;
STICKLINE(起爆,OPEN,CLOSE,2,0),COLORYELLOW;
ZB:=EMA(EMA(VAR3,5),5)*3, COLORSTICK;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:=EMA(VAR7,5)*2, , COLORFF00FF;
D:=EMA(K,5), , COLORWHITE;
J:=K*3-D*2, ,COLORYELLOW;
VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) AND J>10;
HS:=VOL/CAPITAL*100, , COLORGREEN;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'机构进场'),LINETHICK1,COLORFF00FF;
{涨停不破}
ZDT:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDT>9.8,O,C,1,0),COLORRED;
STICKLINE(ZDT<-9.8,O,C,1,0),COLORBLUE;
涨停:=ZDT>9.8;
不破价:=REF(L,BARSLAST(涨停));
LS0:=BARSLAST(涨停);
LS11:=IF(1,LS0=1,涨停);
LS21:=IF(1,LLV(L,1)>REF(L,1),1);
涨停不破:=LS11 AND LS21;
STICKLINE(涨停不破,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破,不破价-不破价*0.02,'1'),COLORGREEN;
LS12:=IF(2,LS0=2,涨停);
LS22:=IF(2,LLV(L,2)>REF(L,2),1);
涨停不破2:=LS12 AND LS22;
STICKLINE(涨停不破2,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破2,不破价-不破价*0.02,'2'),COLORGREEN;
LS13:=IF(3,LS0=3,涨停);
LS23:=IF(3,LLV(L,3)>REF(L,3),1);
涨停不破3:=LS13 AND LS23;
STICKLINE(涨停不破3,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破3,不破价-不破价*0.02,'3'),COLORGREEN;
LS14:=IF(4,LS0=4,涨停);
LS24:=IF(4,LLV(L,4)>REF(L,4),1);
涨停不破4:=LS14 AND LS24;
STICKLINE(涨停不破4,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破4,不破价-不破价*0.02,'4'),COLORGREEN;
LS15:=IF(5,LS0=5,涨停);
LS25:=IF(5,LLV(L,5)>REF(L,5),1);
涨停不破5:=LS15 AND LS25;
STICKLINE(涨停不破5,不破价-不破价*0.002,不破价,4,0),COLORRED;
DRAWTEXT(涨停不破5,不破价-不破价*0.02,'5'),COLORGREEN;
LS16:=IF(6,LS0=6,涨停);
LS26:=IF(6,LLV(L,6)>REF(L,6),1);
|