通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
超牛指标公式源码
N1:=6;N:=90;
DX:=(C+H+L+O)/4;
短线:((MA(DX,1)+MA(DX,3)+MA(DX,5))/3),LINETHICK2,COLORFFFFFF;
FG:MA(DX,17)+ABS(MA(DX,17)-REF(MA(DX,17),1));
FS:MA(DX,17)+MA(DX,17)-REF(MA(DX,17),1);
搏杀线:=IF(MA(DX,17)FS,FS,MA(DX,17));
FILLRGN(FG,搏杀线,搏杀线FG,RGB(100,250,10));
FILLRGN(搏杀线,FS,搏杀线FS,RGB(100,250,10));
MTM:=C-REF(C,1);
ZLGJ:=100*EMA(EMA(MTM,N1),N1)/EMA(EMA(ABS(MTM),N1),N1);
买1:=IF(LLV(ZLGJ,2)=LLV(ZLGJ,7) AND COUNT(ZLGJ0,2) AND CROSS(ZLGJ,MA(ZLGJ,2)),1,0);
卖1:=IF(HHV(ZLGJ,2)=HHV(ZLGJ,7) AND COUNT(ZLGJ50,2) AND CROSS(MA(ZLGJ,2),ZLGJ),1,0);
DRAWTEXT(FILTER(买1=1,5),LOW-0.03,买),colorred;
STICKLINE(FILTER(买1=1,5),HIGH,LOW,0,1),colorred,LINETHICK3;
DRAWTEXT(FILTER(卖1=1,1),HIGH*1.02,'卖'),COLOR00FF00;
STICKLINE(FILTER(卖1=1,1),HIGH,LOW,0,1),COLOR00FF00,LINETHICK3;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
BDGD:=HHV(J,2)=HHV(J,8) AND J80;
卖2:=IF(CROSS(REF(J-0.01,1),J) AND REF(BDGD,1),1,0);
STICKLINE(卖2 AND 卖11,HIGH,LOW,2,1),coloryellow,LINETHICK3;
STICKLINE(卖2 AND 卖11,OPEN,CLOSE,4,1),coloryellow,LINETHICK3;
牛市数值=0;
RSV=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
a=SMA(RSV,3,1);
b=SMA(a,3,1);
e=3*a-2*b;
生死线:MA(CLOSE,n);
IF(a0) a=0;
IF(a100) a=100;
IF(b0) b=0;
IF(b100) b=100;
IF(e0) e=0;
IF(e100) e=100;
IsNowBuy:=FALSE;
sBUY:=CLOSE1.2*LLV(LOW,7) AND CLOSEMA(CLOSE,5) AND a50 AND CROSS(MA(CLOSE,5),MA(CLOSE,10)); //买入信号
IF(sBUY==1) 牛市数值=1;
DRAWICON (sBUY,LOW,buy);
//判断现在是否买入状态
IF(sBuy==TRUE OR IsNowBuy[1]==TRUE)
IsNowBuy:=TRUE;
//
keep=BARSLAST(sBuy == TRUE); //买入多少天了
win5=0;win10=0;win15=0;win20=0;Lose3=0;
CanSell:=CROSS(MA(CLOSE,10),MA(CLOSE,5));
IF(IsNowBuy==TRUE)
{
IF(keep 1)
{
pCost = MONEY[keep-1]/VOL[keep-1];
//5%止盈
IF(win5[1] != 1 AND HIGH/PCost1.05 )
{
win5=1;
DRAWICON(1,HIGH,master_sell2, 5%止盈);
牛市数值=2;
//IsNowBuy=FALSE;
}
ELSE
{
win5=win5[1];
}
//10%止盈
IF(win10[1] != 1 AND HIGH/PCost1.1 )
{
win10=1;
DRAWICON(1,HIGH,master_sell4, 10%止盈);
牛市数值=3;
//IsNowBuy=FALSE;
}
ELSE
{
win10=win10[1];
}
//15%止盈
IF(win15[1] != 1 AND HIGH/PCost1.15 )
{
win15=1;
DRAWICON(1,HIGH,master_sell5, 15%止盈);
牛市数值=4;
//IsNowBuy=FALSE;
}
ELSE
{
win15=win15[1];
}
//5%止损
IF(Lose3[1] != 1 AND (pCost-CLOSE)/PCost0.05)
{
Lose3=1;
DRAWICON(1,HIGH,master_sell3, 5%止损);
牛市数值=5;
IsNowBuy=FALSE;
}
ELSE
{
Lose3=Lose3[1];
}
//卖出
IF(CanSell==TRUE)
{
DRAWICON(1,HIGH,master_sell1, 均线卖出);
牛市数值=6;
IsNowBuy=FALSE;
}
}
}
RETURN(牛市数值);
HZ:HHV((H+L)/2,120);
AA:=(2*C+H+L)/4;
//Var1:=IF(DATE=10301201,0,1);
Var2:=EMA(SLOPE(CLOSE,21)*20+CLOSE,55);
Var3:=EMA(CLOSE,3);
Var4:=(2*CLOSE+LOW+HIGH)/4;
Var5:=Var2-Var3;
VAR6:=CLOSE*VOL;
VAR7:=EMA((EMA(VAR6,3)/EMA(VOL,3)+EMA(VAR6,6)/EMA(VOL,6)+EMA(VAR6,12)/EMA(VOL,12)+EMA(VAR6,24)/EMA(VOL,24))/4,13);
VAR8:=EMA(CLOSE,9);
VAR9:=(CLOSE+OPEN)/2;
VAR11:=MA(CLOSE,3);
VAR12:=MA(CLOSE,2*3);
VAR13:=MA(CLOSE,3*3);
VAR14:=MA(CLOSE,4*3);
VAR15:=MA((VAR11+VAR12+VAR13+VAR14)/4,5);
上轨1:EMA(VAR8*1.14,5),colorgreen,LINETHICK1;
上轨2:=VAR15*1.08,colorwhite,LINETHICK1;
操作线:MA(AA,5),colormagenta,LINETHICK2;
风险线:=MA(CLOSE,13);
黄线:(EMA(VAR9,3)+EMA(VAR9,6)+EMA(VAR9,12)+EMA(VAR9,24))/4,coloryellow,linethick3;
精品1:=EMA(EMA(EMA(CLOSE,2),2),2);
精品2:(MA(精品1,13) * 0.999),colorwhite,linethick2;
道2:=6*HHV(精品2,3)-5*精品2;
PARTLINE(精品2,精品2=道2,colorred,精品2道2,colorwhite),LINETHICK3;
青线:EMA(Var4,45)*1.15,colorcyan,linethick2;
绿线:EMA(Var4,55),colorgreen,linethick3;
牛股:=CROSS((100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8))),99);
攻:=REF(C,REF(HHVBARS(V,21),0));
进攻:=MA(CLOSE,1);
指挥:=V1*REF(V,1) AND (C/REF(C,1)-1)*1009.5 AND 进攻=攻;
DK:=EMA((CLOSE-MA((2*CLOSE+HIGH+LOW)/4,30))/MA((2*CLOSE+HIGH+LOW)/4,30)*100,3),colorwhite;
组合1:=牛股 AND 指挥 AND (CROSS(DK,5) OR CROSS(DK,10));
基础0:=DKREF(DK,1) AND REF(DK,1)REF(DK,2) AND REF(DK,2)REF(DK,3);
基础1:=绿线REF(绿线,1) AND REF(绿线,1)REF(绿线,2) AND REF(绿线,2)REF(绿线,3);
基础2:=精品2REF(精品2,1) AND REF(精品2,1)REF(精品2,2) AND REF(精品2,2)REF(精品2,3);
基础3:=黄线REF(黄线,1) AND REF(黄线,1)REF(黄线,2) AND REF(黄线,2)REF(黄线,3);
基础4:=操作线REF(操作线,1) AND REF(操作线,1)REF(操作线,2) AND REF(操作线,2)REF(操作线,3);
三角1:=基础0 AND CROSS(DK,0);
三角2:=基础0 AND CROSS(DK,5);
三角3:=基础0 AND CROSS(DK,10);
买1:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(黄线,绿线);
买2:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(精品2,绿线);
买3:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(C,青线);
买4:=基础1 AND 基础2 AND 基础3 AND 基础4 AND CROSS(黄线,青线);
DRAWICON(组合1,L*0.99,1),ALIGN1;
DRAWTEXT(三角1,L*0.96,'▲'),ALIGN0,PXDN20,colorwhite;
DRAWTEXT(三角2,L*0.96,'▲'),ALIGN0,PXDN20,colormagenta;
DRAWTEXT(三角3,L*0.96,'▲'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买1 OR 买2 OR 买3 OR 买4,H*1.07,'买'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买1,H*1.04,'1'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买2,H*1.04,'2'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买3,H*1.04,'3'),ALIGN0,PXDN20,coloryellow;
DRAWTEXT(买4,H*1.04,'4'),ALIGN0,PXDN20,coloryellow;
超级大牛指标源码
DIFF:EMA(CLOSE,6)-EMA(CLOSE,16),ColorFFFF26;
DEA:EMA(DIFF,5),Color8A15FF;
MACD:=2*(DIFF-DEA);
对DIFF :0-(EMA(CLOSE,6) – EMA(CLOSE,16));
对DEA :0-(EMA(DIFF,5));
对称 : 0-(2*(DIFF-DEA)),STICK,ColorFF6060,LINETHICK1;
{D1:EMA(C,16)-EMA(C,6),Color26FF26;
E2:EMA(D1,5),ColorFF1EFF;};
STICKLINE(MACD=0,MACD,0,4,1),COLORF00FF0;
STICKLINE(MACD0,MACD,0,4,1),colorwhite;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,10,0 ),Color00C4C4;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,6.3,0 ),Color00EAEA;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,2.2,0 ),Color0BFFFF;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,1.65,0 ),Color46FFFF;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,8 ,0 ),Color0000BB;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,6.3 ,0 ),Color0000F0;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,2.2,0 ),Color1111FF;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,1.65 ,0 ),Color3535FF;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,10,0 ),Color9B009B;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,6.3 ,0 ),ColorCA00CA;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,2.2,0 ),ColorF000F0;
STICKLINE(MACDREF(MACD,1)AND MACD0,0,MACD,1.65,0 ),ColorFF28FF;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,8,0 ),Color00AA00;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,6.3 ,0 ),Color00CE00;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,2.2,0 ),Color00F700;
STICKLINE(MACD=REF(MACD,1)AND MACD0,0,MACD,1.65 ,0 ),Color2DFF2D;
低位金叉:=CROSS(DIFF,DEA) AND DIFF-0.1;
STICKLINE(低位金叉,0,-0.18,10,0),ColorE8E8E8;
STICKLINE(低位金叉,0,-0.18,4,0),ColorF2F2F2;
STICKLINE(低位金叉,0,-0.18,2,0),ColorFFFFFF;
DRAWTEXT(低位金叉,-0.2,' 金叉'),ColorFFFFFF;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,-0.18,10,0),Color0042CC;
STICKLINE(二次金叉,0,-0.18,8,0),Color004FF2;
STICKLINE(二次金叉,0,-0.18,8,0),Color3375FF;
DRAWTEXT(二次金叉,-0.2,' 金叉二'),Color3375FF;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)CLOSE AND DIFFREF(DIFF,A1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.13,10,0),ColorCECE00;
STICKLINE(底背离,0,0.13,4,0),ColorFFFF00;
STICKLINE(底背离,0,0.13,2,0),ColorFFFF44;
DRAWLINE(A1=0,DEA,底背离,DEA,0),ColorFFFFFF,linethick1;
DRAWTEXT(底背离,0.3,' 底背离'),ColorFFFF26;
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)CLOSE AND REF(DIFF,A2+1)DIFF AND CROSS(DEA,DIFF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),colorgreen,linethick1;
XG:=REF(CLOSE,2)/REF(OPEN,2)0.95 AND REF(OPEN,1)=REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)0.05 AND CLOSE/OPEN1.05 AND CLOSEREF(HIGH,2) OR REF(CLOSE,3)/REF(OPEN,3)0.96 AND REF(OPEN,2)REF(CLOSE,3) AND ABS(REF(OPEN,2)-REF(CLOSE,2))/REF(CLOSE,2)0.04 AND CLOSE/OPEN1.02 AND CLOSEREF(OPEN,3) OR REF(CLOSE,2)/REF(OPEN,2)0.96 AND REF(OPEN,1)REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)0.07 AND CLOSE/OPEN1.04 AND CLOSEREF(OPEN,2) OR REF(CLOSE,2)/REF(OPEN,2)0.97 AND REF(OPEN,1)REF(CLOSE,2) AND REF(CLOSE,1)REF(OPEN,2) AND CLOSE/OPEN1.07 AND CLOSEREF(OPEN,2) OR REF(CLOSE,2)/REF(OPEN,2)0.97 AND REF(OPEN,1)REF(CLOSE,2) AND REF(CLOSE,1)REF(OPEN,2) AND CLOSE/OPEN1.07 AND CLOSEREF(OPEN,2) OR REF(CLOSE,2)/REF(OPEN,2)0.98 AND REF(OPEN,1)REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)0.06 AND CLOSE/OPEN1.06 AND CLOSEREF(HIGH,2) OR REF(CLOSE,2)/REF(OPEN,2)0.95 AND REF(OPEN,1)REF(CLOSE,2) AND ABS(REF(HIGH,1)-REF(CLOSE,1))/REF(CLOSE,1)0.04 AND CLOSE/OPEN1.02 AND CLOSEREF(HIGH,2) OR REF(CLOSE,2)/REF(OPEN,2)0.96 AND REF(OPEN,1)REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)0.05 AND CLOSE/OPEN1.03 AND CLOSEREF(OPEN,2) OR REF(CLOSE,2)/REF(OPEN,2)0.96 AND REF(OPEN,1)REF(CLOSE,2) AND ABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)0.05 AND CLOSE/OPEN1.03 AND CLOSEREF(OPEN,2) OR REF(CLOSE,2)/REF(OPEN,2)0.95 AND REF(OPEN,1)=REF(CLOSE,2) AND ABS(REF(CLOSE,1)-REF(CLOSE,2))/REF(CLOSE,2)0.06 AND CLOSE/OPEN1.02 AND CLOSEREF(OPEN,2);
评论(0)