在线检测未来函数

通达信斋主MACD通道主图指标公式

来源:Internet,编辑:股旁网,2011-07-16

DIF:=EMA(CLOSE,60)-EMA(CLOSE,130);
DEA:=EMA(DIF,45);
MACD:=(DIF-DEA)*2,COLORSTICK;
{MACD}
RC:=DYNAINFO(3)*1.1;
DK:=MACD*2;
STICKLINE(DK<0 AND DK<REF(DK,1),DK+RC,RC,0.05,1),COLORLIBLUE;
STICKLINE(DK<0 AND DK>REF(DK,1),DK+RC,RC,0.05,1),COLORWHITE;
STICKLINE(DK>REF(DK,1) AND DK>0,DK+RC,RC,0.05,1),COLORRED;
STICKLINE(DK<REF(DK,1) AND DK>0,DK+RC,RC,0.05,1),COLOR00FF00;
VAR4S:=(2*CLOSE+HIGH+LOW)/4;
成本区:EMA(VAR4S,90)*0.995,,COLORYELLOW,POINTDOT{CIRCLEDOT};
GJZ:=(C+H+L+O)/4;
阻Z:=L+(GJZ-L)+(C-L);
支Z:=L+(C-GJZ);
NN:=100;
高点:=CONST(HHV(H,NN));
低点:=CONST(LLV(L,NN));
明日阻力:=L+(GJZ-L)+(C-L);
明日支撑:=L+(C-GJZ);
明日阻力2:=L+2*(GJZ-L)+(C-L);
明日支撑2:=L+(C-GJZ)-(GJZ-L);
今日阻力:=CONST(REF(明日阻力 , 1)),NODRAW;
今日支撑:=CONST(REF(明日支撑 , 1)),NODRAW;
今日阻力2:=CONST(REF(明日阻力2 , 1)),NODRAW;
今日支撑2:=CONST(REF(明日支撑2 , 1)),NODRAW;
STICKLINE(ISLASTBAR,今日阻力,今日阻力2,20,0),COLORGRAY;
STICKLINE(ISLASTBAR,今日支撑,今日支撑2,20,0),COLORGRAY;
MA60:=MA(CLOSE,60),COLORCYAN,LINETHICK2;
MA120:=MA(CLOSE,120),COLORCYAN,LINETHICK2;
LC:=REF(CLOSE,1);
VAR28Z:=SMA(MAX(CLOSE-LC,0),5.5,1)/SMA(ABS(CLOSE-LC),6,1)*100;
VARA00:=((AMOUNT)/(VOL))/(100);
VARAB00:=((3)*(HIGH)+LOW+OPEN+(2)*(CLOSE))/(7);
VARAC00:=((SUM(AMOUNT,7))/(VARA00))/(100);
VARD0:=DMA(VARAB00,(VOL)/(VARAC00));
VARDE0:=((CLOSE-VARD0)/(VARD0))*(100);
VARDE0F:=((CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)))*(100);
VARDE0JF:=MA(VARDE0,20)+STD(VARDE0,20);
BIAS18:=((CLOSE-MA(CLOSE,18))/(MA(CLOSE,18)))*(100);
AA:=SMA(VARDE0F,3,1);
SS:=(REF(BIAS18,1)>=5) AND CROSS(VARDE0JF,VARDE0) AND (AA>79);
中轨:=MA(CLOSE,34)NODRAW;
上轨:=中轨*1.0618,CIRCLEDOT,COLORFF6600;
下轨:=中轨*0.89,CIRCLEDOT,COLOR6C6CFF;
顶轨:=中轨*1.191,COLORGREEN;
底轨:=中轨*0.809,COLORYELLOW;
DRAWBAND(中轨,RGB(250,150,0),REF(中轨,2),RGB(00,50,200));
DRAWBAND(顶轨,RGB(200,50,51),REF(顶轨*1.005,1),RGB(0,160,100));
DRAWBAND(底轨,RGB(200,50,51),REF(底轨*0.995,1),RGB(0,160,100));
DRAWBAND(上轨,RGB(60,60,0),上轨*1.005,RGB(50,100,60));
DRAWBAND(下轨,RGB(50,100,60),下轨*0.995,RGB(60,60,0));
VA1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
VA2:=REF(VA1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA3:=REF(VA2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA4:=REF(VA3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA5:=REF(VA4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA6:=REF(VA5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA7:=REF(VA6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA8:=REF(VA7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA9:=REF(VA8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAA:=REF(VA9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VAB:=REF(VAA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAC:=REF(VAB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(VA1 OR VA2 OR VA3 OR VA4 OR VA5 OR VA6 OR VA7 OR VA8 OR VA9 OR VAA OR VAB OR VAC,CLOSE,REF(CLOSE,1),3,0),COLORRED;
VAD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
VAE:=REF(VAD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VAF:=REF(VAE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA10:=REF(VAF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA11:=REF(VA10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA12:=REF(VA11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA13:=REF(VA12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA14:=REF(VA13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA15:=REF(VA14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA16:=REF(VA15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
VA17:=REF(VA16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
VA18:=REF(VA17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(VAD OR VAE OR VAF OR VA10 OR VA11 OR VA12 OR VA13 OR VA14 OR VA15 OR VA16 OR VA17 OR VA18,CLOSE,REF(CLOSE,1),3,0),COLORLIBLUE;
VA19:=REF(VAD OR VAE OR VAF OR VA10 OR VA11 OR VA12 OR VA13 OR VA14 OR VA15 OR VA16 OR VA17 OR VA18,1) AND VA1;
STICKLINE(VA19,REF(CLOSE,1),REF(CLOSE,2),3.4,0),COLORYELLOW;
VA1A:=REF(VA1 OR VA2 OR VA3 OR VA4 OR VA5 OR VA6 OR VA7 OR VA8 OR VA9 OR VAA OR VAB OR VAC,1) AND VAD;
STICKLINE(VA1A,REF(CLOSE,1),REF(CLOSE,2),3.4,0),COLORBLUE;
AA1:=3*SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1)-2*SMA(SMA((C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100,3,1),3,1);
加仓:=IF(CROSS(AA1,REF(AA1+0.01,1)) AND LLV(AA1,2)=LLV(AA1,8) AND BETWEEN(AA1,20,60),1,0);
波段底:=(3)*(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1)) -
(2)*(SMA(SMA(((CLOSE - LLV(LOW,27))/(HHV(HIGH,27) - LLV(LOW,27)))*(100),5,1),3,1));
A:=(3*C+L+O+H)/6;
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(X,13);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
江恩线144: EMA(CLOSE,144),COLORRED,LINETHICK2,POINTDOT;
日:=50;昨前:=3;
高1:=REF(HHV(H,10),昨前);
高2:=REF(HHV(H,日),昨前);
低:=REF(LLV(L,10),昨前);
低1:=REF(LLV(L,日),昨前);
十日压:REFDATE(高1,DATE),COLORGREEN,LINETHICK1,POINTDOT;
DRAWTEXT(ISLASTBAR,十日压,'10 K线内压力点位'),COLORGREEN;
五十日压:REFDATE(高2,DATE),COLORCYAN,LINETHICK1,POINTDOT;
DRAWTEXT(ISLASTBAR,五十日压,'50 K线内压力点位'),COLORCYAN;
十日支撑:REFDATE(低,DATE),LINETHICK1,COLORYELLOW,POINTDOT ;
DRAWTEXT(ISLASTBAR,十日支撑,'10 K线内支撑点位'),COLORYELLOW;
五十日支撑:REFDATE(低1,DATE),COLORRED,LINETHICK1,POINTDOT;
DRAWTEXT(ISLASTBAR,五十日支撑,'50 K线内支撑点位'),COLORRED;
VAR5:=IF(YEAR=2002 AND MONTH=6 AND DAY=28,1,0);
VAR6:=IF(YEAR=2002 AND MONTH=3 AND DAY=21,1,0);
VAR7:=IF(YEAR=2001 AND MONTH=12 AND DAY=5,1,0);
VAR8:=IF(YEAR=2001 AND MONTH=6 AND DAY=14,1,0);
VAR9:=IF(YEAR=2001 AND MONTH=1 AND DAY=11,1,0);
VARA:=IF(YEAR=2000 AND MONTH=11 AND DAY=23,1,0);
VARB:=IF(YEAR=2000 AND MONTH=8 AND DAY=22,1,0);
VARC:=IF(YEAR=2000 AND MONTH=4 AND DAY=21,1,0);
VARD:=IF(YEAR=1999 AND MONTH=6 AND DAY=30,1,0);
VARE:=IF(YEAR=1999 AND MONTH=4 AND DAY=9,1,0);
VARF:=IF(YEAR=1998 AND MONTH=11 AND DAY=17,1,0);
VAR10:=IF(YEAR=1998 AND MONTH=6 AND DAY=4,1,0);
VAR11:=IF(YEAR=1997 AND MONTH=5 AND DAY=12,1,0);
VAR12:=IF(YEAR=1996 AND MONTH=12 AND DAY=11,1,0);
VAR13:=IF(YEAR=1994 AND MONTH=9 AND DAY=13,1,0);
VAR14:=IF(YEAR=1993 AND MONTH=2 AND DAY=16,1,0);
VAR15:=IF(YEAR=1992 AND MONTH=5 AND DAY=26,1,0);
VAR16:=IF(YEAR=2003 AND MONTH=3 AND DAY=4,1,0);
VAR17:=IF(YEAR=2003 AND MONTH=4 AND DAY=16,1,0);
VAR18:=(CROSS(100,"KDJ.J"(9,3,3)) OR CROSS("KDJ.K"(9,3,3),"KDJ.J"(9,3,3))) AND "KDJ.D"(9,3,3)>75;
VAR19:=IF(YEAR>1990 AND YEAR<2003,0,1);
VAR1A:=IF(YEAR=2003 AND MONTH=1 AND DAY=3,1,0);
VAR1B:=IF(YEAR=2002 AND MONTH=6 AND DAY=6,1,0);
VAR1C:=IF(YEAR=2002 AND MONTH=1 AND DAY=29,1,0);
VAR1D:=IF(YEAR=2001 AND MONTH=10 AND DAY=22,1,0);
VAR1E:=IF(YEAR=2001 AND MONTH=2 AND DAY=22,1,0);
VAR1F:=IF(YEAR=2000 AND MONTH=9 AND DAY=26,1,0);
VAR20:=IF(YEAR=1999 AND MONTH=12 AND DAY=28,1,0);
VAR21:=IF(YEAR=1999 AND MONTH=5 AND DAY=17,1,0);
VAR22:=IF(YEAR=1999 AND MONTH=2 AND DAY=9,1,0);
VAR23:=IF(YEAR=1998 AND MONTH=8 AND DAY=18,1,0);
VAR24:=IF(YEAR=1998 AND MONTH=3 AND DAY=26,1,0);
VAR25:=IF(YEAR=1997 AND MONTH=2 AND DAY=20,1,0);
VAR26:=IF(YEAR=1994 AND MONTH=7 AND DAY=29,1,0);
VAR27:=IF(YEAR=2000 AND MONTH=5 AND DAY=15,1,0);
VAR28:=IF(YEAR=1996 AND MONTH=1 AND DAY=19,1,0);
VAR29:=IF(YEAR=1992 AND MONTH=11 AND DAY=20,1,0);
VAR2A:=IF(YEAR=2003 AND MONTH=3 AND DAY=26,1,0);
VAR2B:=IF(YEAR=2003 AND MONTH=5 AND DAY=13 AND CLOSE>200,1,0);
VAR2C:=MA(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),5)*VAR19;
VAR2D:=5;
VAR2E:=CROSS(VAR2C,VAR2D);
VAR2F:=VAR1A OR VAR1B OR VAR1C OR VAR1D OR VAR1E OR VAR1F OR VAR20 OR VAR21 OR VAR22 OR VAR23 OR VAR24 OR VAR25 OR VAR26 OR VAR27 OR VAR28 OR VAR29 OR VAR2A OR VAR2B OR VAR2E;
VAR30:=(VAR18 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC OR VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17){ AND CLOSE>200};
VAR24Z:=EMA(AMOUNT/VOL/100,5);
VAR25Z:=EMA(AMOUNT/VOL/100,13);
VAR26Z:=VAR24Z-VAR25Z;
VAR1Z:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR2Z:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));
VAR3Z:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));
DRAWTEXT(CROSS(VAR2Z,MA(VAR3Z,6)) AND
CROSS(IF(1000*VAR26Z/VAR24Z>0,1000*VAR26Z/
VAR24Z,0)*0.19+1.9,IF((HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*120>100,100,
(HHV(HIGH,13)-CLOSE)/(HHV(HIGH,13)-LLV(LOW,13))*120)*0.07),(LOW*0.984),'↖强牛股出现 '),COLORWHITE;
SS1:=CROSS(波段底,3);
SS2:=FILTER(买=1,5);
B1:=EMA((2*CLOSE+HIGH+LOW)/4,5);
A1:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)>REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),B1,DRAWNULL),COLOR0000FF;
A2:IF(EMA((2*CLOSE+HIGH+LOW)/4,6)<REF(EMA((2*CLOSE+HIGH+LOW)/4,6),1),B1,DRAWNULL),COLOR00FF00;
B2:=EMA((2*CLOSE+HIGH+LOW)/4,13);
A3:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)>REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),B2,DRAWNULL),COLOR0000FF;
A4:IF(EMA((2*CLOSE+HIGH+LOW)/4,10)<REF(EMA((2*CLOSE+HIGH+LOW)/4,13),1),B2,DRAWNULL),LINETHICK2,COLOR00FF00;
B3:=REF(EMA((LOW+CLOSE+OPEN)/3,25),1);
A5:IF(EMA((LOW+CLOSE+OPEN)/3,28)>REF(EMA((LOW+CLOSE+OPEN)/3,28),1),B3,DRAWNULL),LINETHICK3,COLOR0000FF;
A6:IF(EMA((LOW+CLOSE+OPEN)/3,28)<REF(EMA((LOW+CLOSE+OPEN)/3,28),1),B3,DRAWNULL),LINETHICK3,COLOR00FF00;
B4:=(EMA(LOW,125)+EMA((CLOSE+LOW)/2,125))/2;
A7:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2>REF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2,1),B4,DRAWNULL),COLOR0000FF;
A8:IF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2<REF((EMA(LOW,125)+EMA((CLOSE+LOW)/2,250))/2,1),B4,DRAWNULL),COLOR00FF00;
LCZ:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LCZ),0),3,1) / SMA(ABS((CLOSE - LCZ)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
AAZ:=CLOSE>REF(CLOSE,1) AND REF(CLOSE,1)>REF(CLOSE,2) AND REF(CLOSE,1)<REF(CLOSE,3) AND IF(REF(CLOSE,3)<REF(CLOSE,4),1,IF(REF(CLOSE,4)<REF(CLOSE,5),REF(CLOSE,1)<REF(CLOSE,4) OR (REF(CLOSE,2)<REF(CLOSE,4) AND REF(CLOSE,3)>=REF(CLOSE,5)),IF(REF(CLOSE,5)<REF(CLOSE,6),1,REF(CLOSE,6)<REF(CLOSE,7))));
BBZ:=CLOSE<REF(CLOSE,1) AND REF(CLOSE,1)<REF(CLOSE,2) AND REF(CLOSE,1)>REF(CLOSE,3) AND IF(REF(CLOSE,3)>REF(CLOSE,4),1,IF(REF(CLOSE,4)>REF(CLOSE,5),REF(CLOSE,1)>REF(CLOSE,4) OR (REF(CLOSE,2)>REF(CLOSE,4) AND REF(CLOSE,3)<=REF(CLOSE,5)),IF(REF(CLOSE,5)>REF(CLOSE,6),1,REF(CLOSE,6)>REF(CLOSE,7))));
DRAWTEXT(AAZ AND CLOSE>REF(OPEN,2),L*0.98,'★+三平底'),COLORYELLOW;
DRAWTEXT(BBZ AND CLOSE<REF(CLOSE,2),L*1.01,'★-三平顶'),COLORGREEN;
DRAWTEXT(CROSS(FF,MA15),L*0.99,'底背离'),COLORA6E500;
DRAWTEXT(CROSS(88,RSI),L*1.012,'顶背离'),COLOR1880FF;
DRAWTEXT(CROSS(84,RSI) AND CROSS(76,VAR28Z),H*1.01,'卖出'),LINETHICK4,COLORGREEN;
{DRAWICON(VAR2F,LOW-LOW*1/100,1);}
{www.gUPang.com 股旁网_最新股票指标公式}
DRAWICON(VAR2F AND CLOSE>江恩线144,LOW,1);
DRAWICON(VAR30,HIGH,2);
DRAWTEXT(VAR2F AND CLOSE<江恩线144,LOW,'秘密买点!'), COLORYELLOW;
DRAWTEXT(VAR2F AND CLOSE>江恩线144,LOW,'强势买点!'), COLORRED;
DRAWTEXT(VAR30,HIGH,'秘密抛点'),COLOR00FF00;
STICKLINE(SS2 AND SS1,L*0.96,L*0.98,2,0),COLORYELLOW;
DRAWTEXT(SS2 AND SS1,L*0.96,'底买合一'),COLORYELLOW;
DRAWTEXT(FILTER(买=1,5),LOW-0.03,'买入'),COLORRED;
DRAWTEXT(CROSS(波段底,3),L*0.97,'底');
DRAWTEXT(CROSS(MA60,MA120),MA60*0.99,'↑60金叉120牛势'),COLORYELLOW;
DRAWTEXT(CROSS(MA120,MA60),MA60*0.99,'↓120死叉60熊势'),COLORWHITE;

通达信斋主MACD通道主图指标公式

 

相关文章