当前位置: 网站首页 > 股票软件公式 > 通达信公式 > 文章 当前位置: 通达信公式 > 文章

通达信源码:获利卖出 [二]+重生之光+起爆MACD主升浪正式版

点击: 次    来源:顶尖财经    作者:股市狙击 - 小 + 大

获利卖出 [二]:

VAR1:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));

VAR2:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VAR3:=SUM(VAR1,5);
VAR4:=SUM(VAR2,5);
VAR5:=IF(VAR3>VAR4,(VAR3-VAR4)/VAR3,IF(VAR3=VAR4,0,(VAR3-VAR4)/VAR4));
VAR6:=MA(VAR5,5);
VAR8:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
VAR9:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VARA:=SUM(VAR8,3);
VARB:=SUM(VAR9,3);
VARC:=IF(VARA>VARB,(VARA-VARB)/VARA,IF(VARA=VARB,0,(VARA-VARB)/VARB));
VARD:=MA(VARC,3);
风险指数: BARSLAST(EMA(CLOSE,5)<REF(EMA(CLOSE,5),1)),  COLORGREEN;
VARE:=HHV(CLOSE,2);
VARF:=BARSLAST(VARE<REF(VARE,2));
VAR10:=IF(VARF>=1,LLV(VARE,VARF),LOW);
VAR11:=VAR10+VAR10*VARF*0.5/100;
VAR12:=IF(VAR11<REF(VAR11,1),MA(LOW,3),VAR11);
VAR13:=VAR10+VAR10*(VARF-1)*1.618/100;
控盘:= COUNT(EMA(CLOSE,5)>REF(EMA(CLOSE,5),1),5),COLORYELLOW;
VAR14:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
VAR15:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VAR16:=SUM(VAR8,3);
VAR17:=SUM(VAR9,3);
VAR18:=IF(VARA>VARB,(VARA-VARB)/VARA,IF(VARA=VARB,0,(VARA-VARB)/VARB));
VAR19:=MA(VARC,3);
买入或持股:= (控盘>0,风险指数,0,2,0),  COLORRED;
STICKLINE(控盘>0,风险指数,0,2,0),  COLORRED;
VAR1A:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
VAR1B:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VAR1C:=SUM(VAR8,3);
VAR1D:=SUM(VAR9,3);
VAR1E:=IF(VARA>VARB,(VARA-VARB)/VARA,IF(VARA=VARB,0,(VARA-VARB)/VARB));
VAR1F:=MA(VARC,3);
获利卖出:= (控盘>0,风险指数,控盘,2,1),  COLORGREEN;
STICKLINE(控盘>0,风险指数,控盘,2,1),  COLORF0F000;
VAR20:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
VAR21:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VAR22:=SUM(VAR8,3);
VAR23:=SUM(VAR9,3);
VAR24:=IF(VARA>VARB,(VARA-VARB)/VARA,IF(VARA=VARB,0,(VARA-VARB)/VARB));
VAR25:=MA(VARC,3);
观望: STICKLINE(控盘=0 AND 风险指数=0,0,1,4,1),  COLORBLUE;
VAR26:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
VAR27:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VAR28:=SUM(VAR8,3);
VAR29:=SUM(VAR9,3);
VAR2A:=IF(VARA>VARB,(VARA-VARB)/VARA,IF(VARA=VARB,0,(VARA-VARB)/VARB));
VAR2B:=MA(VARC,3);
植被:= (控盘<风险指数,风险指数,控盘,1,0),  COLOR00FF00;
STICKLINE(控盘<风险指数,风险指数,控盘,1,0),  COLOR00FF00;
VAR2C:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
VAR2D:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VAR2E:=SUM(VAR8,3);
VAR2F:=SUM(VAR9,3);
VAR30:=IF(VARA>VARB,(VARA-VARB)/VARA,IF(VARA=VARB,0,(VARA-VARB)/VARB));
VAR31:=MA(VARC,3);
VAR32:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*10;
K:= SMA(SMA(VAR32,2,1),2,1),COLOR00FF00 , ;
D:= SMA(SMA(SMA(VAR32,2,1),2,1),3,1),  COLORYELLOW;
J:= (3*SMA(SMA(VAR32,2,1),2,1)-2*SMA(SMA(SMA(VAR32,2,1),2,1),3,1)),  COLORF00FF0;
VAR33:=IF(OPEN<=REF(OPEN,1),0,MAX(HIGH-OPEN,OPEN-REF(OPEN,1)));
VAR34:=IF(OPEN>=REF(OPEN,1),0,MAX(OPEN-LOW,OPEN-REF(OPEN,1)));
VAR35:=SUM(VAR8,3);
VAR36:=SUM(VAR9,3);
VAR37:=IF(VARA>VARB,(VARA-VARB)/VARA,IF(VARA=VARB,0,(VARA-VARB)/VARB));
VAR38:=MA(VARC,3);
STICKLINE(REF(控盘,1)=0 AND 控盘>0,0,-1,2,0),  COLORRED;




重生之光:

涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(O,1)),1,0);

STICKLINE(涨停,O,C,1,0),COLORYELLOW;
ZDF:=(C-REF(C,1))/REF(C,1)*100;
STICKLINE(ZDF<-9.9,O,C,1,0),COLORBLUE;
{民间操手专用经典主图均线指标2}
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);
B:IF(买1>0 OR 买2>0,LOW*0.99,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;
S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREEN;
VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));
VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));
F:IF(CROSS(VAR200,MA(VAR300,5)),LOW * 0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLORFF00FF;
DRAWTEXT(CROSS(S,卖1),S,'←逃'),COLORWHITE,LINETHICK1;
DRAWTEXT(CROSS(B,买1),B,'←准备'),COLORRED,LINETHICK1;
{价:}
{JC1:=(REF(C,3)+REF(C,5)+REF(C,7)+REF(C,8)+REF(C,13)+REF(C,21))/6;
参考价1:SMA(JC1,5,1),CIRCLEDOT,COLORGREEN;
IF(C>=参考价1,参考价1,DRAWNULL),CIRCLEDOT,COLOR0000FF;}
PH:=TROUGHBARS(2,5,1);
LL:=HHV(H,PH);
TJ1:=LL=HIGH AND LL<REF(LL,1);{//=1}
TS:=SUMBARS(TJ1,2);
TJ:=PEAKBARS(2,5,1)=1 AND TS>=PH;
DRAWICON(TJ,HIGH*1.01+0.02,2);
警告灯:IF(TJ,HIGH*1.008,DRAWNULL),CROSSDOT,LINETHICK2,COLORCYAN;
PL:=BARSLAST(TJ);
支撑:IF(BARSLAST(TJ1),
REF(LOW,BARSLAST(TJ1)),DRAWNULL),COLOREA91B5;
压力:IF(BARSLAST(TJ),REF(HIGH,PL),DRAWNULL),COLORYELLOW;
TJ_2:=LOW>REF(REF(LOW,TS),PL);
DRAWTEXT(ISLASTBAR,压力,'压力'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,支撑,'支撑'),COLOREA91B5;
HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
QY:=BACKSET(AA,HIGHN+1);
CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
DRAWICON(CC,H*1.02,2);
DDD:=BARSLAST(CC);
GDTS:=IF(CC,CURRBARSCOUNT,0);
DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
DINGBU1:=REF(DINGBU,DDD+1);
GDCS1:=CONST(DINGBUTS);
DINGBUTS1:=REF(DINGBUTS,DDD+1);
GDCS2:=CONST(DINGBUTS1);
DINGBU2:=REF(DINGBU1,DDD+1);
MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK2;
DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT;
DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT;
AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
QY1:=BACKSET(AA1,LOWN+1);
CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
DRAWICON(CC1,L*0.98,1);
DD1:=BARSLAST(CC1);
DDTS:=IF(CC1,CURRBARSCOUNT,0);
YDB:=IF(DD1,REF(L,DD1),L);
DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
DDCS1:=CONST(DDTS1);
ZDB:=REF(YDB,DD1+1);
DDTS2:=REF(DDTS1,DD1+1);
DDCS2:=CONST(DDTS2);
低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK2;
 
ZGSTAR:=(高点压力+低点支撑)/2;
ZGEND:=CONST((高点压力+低点支撑)/2);
STARDAY:=IF(DDCS2<GDCS2,DDCS2,GDCS2);
中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),COLORFF55BB,LINETHICK2;




起爆MACD主升浪正式版(顶尖财经 股票学院: www.58188.com):

{起爆MACD主升浪}
 
N1:=9;N2:=5;
MTM:=C-REF(C,1);
主力:100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);
空方:MA(主力,N2);
DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*400;
DEA:=EMA(DIFF,9),COLORFFFF00;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
AR:=SUM(HIGH-OPEN,26)/SUM(OPEN-LOW,26)*100;
VARB:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;
VARC:=SMA(MAX(CLOSE-LC,0),13,1)/SMA(ABS(CLOSE-LC),13,1)*100;
VARD:=BARSCOUNT(CLOSE);
控盘:100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);
STICKLINE(控盘<0,控盘,0,3,0),COLORFFAA00;
STICKLINE(控盘>REF(控盘,3) AND 控盘>0,控盘,0,3,0),COLORRED;
STICKLINE(控盘<REF(控盘,3) AND 控盘>0,控盘,0,3,0),COLOR008800;
BT2:=CROSS(主力,空方) AND 主力<-10;
买:IF((CROSS(主力,空方) AND 主力<-10),1,0),LINETHICK1,COLORC87800;
资金:EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3),COLORYELLOW,LINETHICK1;
启动:65,COLOR00FF00;
爆发:80,COLORLIMAGENTA,LINETHICK1;
 

上一篇:通达信源码:猎取主升浪+多线MACD

下一篇:通达信源码:四线抓牛主图+极品MACD+波段多均上行介入