通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
通达信趋势开始指标公式
Var1:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
Var2:=SMA(SMA(Var1,3,1),3,1);
Var3:=EMA(Var2,5);
BB: Var3;
无敌: 3*Var2-2*Var3;
STICKLINE(CROSS(无敌,Var2) AND 无敌21,Var2-5,Var2+15,8,0),colorred;
STICKLINE(CROSS(Var2,无敌) AND 无敌55,Var2-5,Var2+15,8,0),coloryellow;
DRAWTEXT(CROSS(无敌,Var2) AND 无敌21,Var2-3,'进'),colorred;
DRAWTEXT(CROSS(Var2,无敌) AND 无敌55,Var2+15,'出'),coloryellow;
个股上线:=EMA(EMA(CLOSE,30),7);
大盘上线:=EMA(EMA(INDEXC,49),7);
个股趋势:CLOSE/个股上线*100,coloryellow,linethick2;
个股风险:EMA(个股趋势,20),colorred;
大盘趋势:INDEXC/大盘上线*100,colorff00ff,linethick2;
大盘风险:EMA(大盘趋势,27),color00ff00;
VAR1:=INDEXC;
VAR2:=REF(VAR1,18);
VAR3:=MA(VAR2,18);
个股趋势强度:C/MA(REF(C,18),18)*100,COLOR0BFFFF,LINETHICK2;
个股风险:MA(FORCAST(个股趋势强度,20),6),colorred;
大盘趋势强度:VAR1/VAR3*100,COLORF4E202,LINETHICK2;
大盘风险:MA(FORCAST(大盘趋势强度,20),6),colorgreen;
N1=13;N2=55;N3=65;M=5;
MA$1:MA(CLOSE, N1);
MA$2:MA(CLOSE, N2);
MA$3:MA(CLOSE, N3);
CG:=MA((LOW+HIGH+CLOSE*2)/4,n1);
FHH:=HHV(CG,M);
FH1:=HHV(CG,3);
FH2:=HHV(CG,2);
FLL:=LLV(CG,M);
FL1:=LLV(CG,3);
FL2:=LLV(CG,2);
STICKLINE(MA$1=FLL ,MA$1,FLL,7,1),color0000AA;
STICKLINE(MA$1=FHH,MA$1,FHH,7,1),color008800;
PARTLINE(FH1,FH1REF(FH1,1),RGB(255,0,0),FH1REF(FH1,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(FH2,FH2REF(FH2,1),RGB(255,0,0),FH2REF(FH2,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(FHH,FHHREF(FHH,1),RGB(255,0,0),FHHREF(FHH,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(FL1,FL1REF(FL1,1),RGB(255,0,0),FL1REF(FL1,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(FL2,FL2REF(FL2,1),RGB(255,0,0),FL2REF(FL2,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(FLL,FLLREF(FLL,1),RGB(255,0,0),FLLREF(FLL,1),RGB(0,255,0)),LINETHICK1;
PARTLINE(CG,CGREF(CG,1),RGB(255,0,0),CGREF(CG,1),RGB(0,255,0)),LINETHICK1;
//XA:FORCAST(CLOSE,N1);
//PARTLINE(XA,XAREF(XA,1),RGB(255,0,0),XAREF(XA,1),RGB(0,255,0)),LINETHICK1;STICKLINE((OPEN = CLOSE),HIGH,LOW,0,0),colorcyan;STICKLINE((OPEN = CLOSE),OPEN,CLOSE,8,0),colorcyan;
STICKLINE((OPEN = CLOSE),HIGH,LOW,0,0),colorcyan;
STICKLINE((OPEN = CLOSE),OPEN,CLOSE,8,0),colorcyan;
STICKLINE((OPEN CLOSE),HIGH,LOW,0,0),colorred;
STICKLINE((OPEN CLOSE),OPEN,CLOSE,6,1),colorred,LINETHICK3;
STICKLINE((OPEN CLOSE),OPEN,CLOSE,6,0),coloryellow;
通达信趋势跟庄公式指标
N=9;M=6;G=3;
VarC:=(2*CLOSE+HIGH+LOW)/4;
VarD:=LLV(LOW,N);
VarE:=HHV(HIGH,M);
VarF:=EMA((VarC-VarD)/(VarE-VarD)*100,13);
Var10:=EMA(0.667*REF(VarF,1)+0.333*VarF,2);
STICKLINE(VarFVar10,100,0,1,0),color909090;
STICKLINE(C0,50,49.5,15,0),colorred;
STICKLINE(C0,80,79.5,15,0),colorwhite;
STICKLINE(C0,20,19.5,15,0),color00ff00;
VAR1:=(C-REF(C,1))/REF(C,1);
VAR2:=(INDEXC-REF(INDEXC,1))/REF(INDEXC,1);
个股:=EMA(SUM(VAR1,20),5);
大盘:=EMA(SUM(VAR2,20),5);
领涨:=(个股-大盘)=0;
Var3:=(C-LLV(L,13))/(HHV(H,13)-LLV(L,13))*100;
Var4:=SMA(Var3,34,1);
Var5:=SMA(Var4,13,1);
中线趋势:=3*Var4-2*Var5;
中线趋势升:=(中线趋势-REF(中线趋势,1))=0;
均五升:=(MA(C,13)-REF(MA(C,13),1))=0;
均十升:=(MA(C,34)-REF(MA(C,34),1))=0;
强势:=IF(均五升 AND 均十升 AND 中线趋势升 AND 领涨,4,0),colorff99ff;
VAR6:=(2*C+H+L)/4;
VAR7:=LLV(L,n);
VAR8:=HHV(H,n);
操作:=EMA((VAR6-VAR7)/(VAR8-VAR7)*100,5);
趋势:=EMA(0.618*REF(操作,1)+0.382*操作,3);
v1:=IF(操作=趋势,操作,趋势);
PARTLINE(v1,v1REF(v1,1),RGB(255,0,0),v1 V2:IF(趋势-操作,趋势,操作);
AA:=V2;
PARTLINE(AA,AAREF(AA,1),RGB(255,0,0),AA BB:=HHV(AA,G);
PARTLINE(BB,BBREF(BB,1),RGB(255,0,0),BB EE:=IF(AA PARTLINE(EE,EEREF(EE,1),RGB(255,0,0),EE STICKLINE(操作趋势 AND 操作=REF(操作,1),操作+5,趋势-1,3.7,0),colorred,linethick2;
STICKLINE(强势=4,操作+6,趋势-1,7,0),colorff99ff;
STICKLINE(操作=趋势 AND 均五升 AND 均十升 AND 中线趋势升,趋势-3,趋势-7,8,0),color64A0E6;
绿色: sma(close,2,1),colorgreen,linethick2;
var4:=(low+high+close)/3;
操作: ma(var4,5),linethick2,colorwhite;
拉升:hhv(操作,13),colorred,linethick1;
压力:hhv(操作,60),colorred;
买卖:llv(操作,13),linethick1,color00ff00;
底部支撑: llv(low,60)*1.02,color00ccff;
顶部: hhv(high,60)*0.98,colorffffcc;
stickline(操作ref(操作,1),操作,操作+0.018,5,0),coloryellow,linethick4;
stickline(拉升ref(拉升,1),拉升,拉升+0.018,5,0),coloryellow,linethick2;
stickline(拉升=ref(拉升,1),拉升,拉升,1,1),colorred;
stickline(买卖=ref(买卖,1),买卖,买卖,1,1),colorred;
stickline(买卖ref(买卖,1),买卖,买卖+0.028,4,1),colorf00ff0,linethick2;
stickline(顶部=ref(顶部,1),顶部,顶部,7,1),colorred;
stickline(压力=ref(压力,1),压力,压力,7,1),colorred;
stickline(底部支撑=ref(底部支撑,1),底部支撑,底部支撑,1,1),colorred;
{drawgbk(date900101,strip(rgb(0,150,130),rgb(0,0,0),0));}
买线:=ema(c,2);
卖线:=ema(slope(c,21)*20+c,42);
bu:=cross(买线,卖线);
sel:=cross(卖线,买线);
drawtext(bu,low,'b买'),colorred,linethick3;
drawtext(bu,low,' ̄'),color208fff,linethick3;
drawtext(sel,high,' ̄'),colorffff00,linethick3;
drawtext(sel,high,'s卖'),colormagenta,linethick3;
stickline(买线=卖线,low,high,0.1,1),colorred;
stickline(买线=卖线,close,open,8,1),colorred;
stickline(买线卖线,close,open,8,0),color00ff00;
stickline(买线卖线,low,high,0.1,1),color00ff00;
stickline(cross(买线,卖线) or cross(卖线,买线),open,close,6,0),colorffff00
评论(0)