以下是通达信13日线主图指标公式源码和截图
通达信13日线主图指标公式源码:
EMA13:EMA(C,13),COLOR0000FF,LINETHICK2;EMA34:EMA(C,34),COLORYELLOW;EMA55:EMA(C,55),COLORFF00FF;EMA120:EMA(C,120),COLORFFCC66;
GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5));GR2:=EMA13 EMA34ANDEMA34 EMA55ANDEMA13 REF(EMA13,1);GR3:=COUNT("BIAS.BIAS2"(6,13,24) 10ANDH=HHV(H,GR1),GR1);GR4:=H=HHV(H,GR1);GR5:="MACD.MACD"(12,26,9) REF("MACD.MACD"(12,26,9),1);GR7:=GR2ANDGR3ANDGR4ANDGR5;DRAWTEXT(GR7,H+0.13,'*'),COLOR00FF00;DRAWICON(CROSS(C,EMA13),L-0.08,1);DRAWICON(CROSS(EMA13,C),H+0.08,2);IF(C EMA13,EMA13,DRAWNULL),COLORGREEN,LINETHICK2;
N:=10;
st:=(CLOSE/OPEN+1)*100;
ZF:=(C/REF(C,1)+1)*100;
SX1:=ST 3ANDST=HHV(ST,5);
SX2:=ZF 3ANDZF=HHV(ZF,5);
SX3:=ZF =9ANDCLOSE=HIGH;
S:=IF(SX1ORSX2ORSX3,1,0),COLOR0000FF;
DYSJ:=WEEkdAY;
监测:=IF(DYSJ =13ANDCOUNT(C REF(L,DYSJ),DYSJ) =DYSJ+1,DYSJ,0),COLOR00FFFF;
关注:=IF(DYSJ =5ANDCOUNT(H REF(H,DYSJ),5) =5,REF(H,DYSJ),REF(H,DYSJ)),COLOR00FFFF;
监测②:IF(关注=REF(L,DYSJ),REF(L,DYSJ),REF(L,DYSJ)),COLORFFFFFF;
STICKLINE(监测,监测②,监测②,3,0),COLOR00FFFF;
BF1:=LOW 关注*1.01ANDCOUNT(LOW 关注*1.01,监测)=1;
BF2:=LOW 关注ANDCOUNT(LOW 关注,监测)=1;
BF:=IF(BF1ORBF2,1,0),COLOR00FF00;
{以下设置主图显示方式}
支撑:STICKLINE(监测,关注,关注,6,0),COLORFF00FF;
STICKLINE(C 0,关注,关注,5,-1),COLORFFFFFF;
STICKLINE(C 0,监测②,关注,5,-1),COLORCYAN;
{阳}
STICKLINE(CLOSE =OPEN,C,O,4.7,0),COLOR000033;
STICKLINE(CLOSE =OPEN,C,O,3.9,0),COLOR000055;
STICKLINE(CLOSE =OPEN,C,O,3,0),COLOR000077;
STICKLINE(CLOSE =OPEN,C,O,2.1,0),COLOR000099;
STICKLINE(CLOSE =OPEN,C,O,1,0),COLOR0000DD;
{阳线上下影}
STICKLINE(CLOSE =OPEN,L,H,0,0),COLORRED;
{阴K线}
STICKLINE(CLOSE OPEN,C,O,4.7,0),COLOR003300;
STICKLINE(CLOSE OPEN,C,O,3.9,0),COLOR005500;
STICKLINE(CLOSE OPEN,C,O,3,0),COLOR007700;
STICKLINE(CLOSE OPEN,C,O,2.1,0),COLOR009900;
STICKLINE(CLOSE OPEN,C,O,1,0),COLOR00DD00;
{阴线上下影}
STICKLINE(CLOSE OPEN,L,H,0,0),COLOR00EC00;
HHJSJDA:=(2.97*CLOSE+OPEN+LOW+HIGH)/6;
HHJSJDB:(20*HHJSJDA+19*REF(HHJSJDA,1)+18*REF(HHJSJDA,2)+17*REF(HHJSJDA,3)+16*REF(HHJSJDA,4)+15*REF(HHJSJDA,5)+14*REF(HHJSJDA,6)
+13*REF(HHJSJDA,7)+12*REF(HHJSJDA,8)+11*REF(HHJSJDA,9)+10*REF(HHJSJDA,10)+9*REF(HHJSJDA,11)+8*REF(HHJSJDA,12)
+7*REF(HHJSJDA,13)+6*REF(HHJSJDA,14)+5*REF(HHJSJDA,15)+4*REF(HHJSJDA,16)+3*REF(HHJSJDA,17)+2*REF(HHJSJDA,18)+
REF(HHJSJDA,20))/210,COLORYELLOW;
HHJSJDC:ma(HHJSJDB,5),COLORWHITE;
DRAWBAND(MA(HHJSJDB,1),RGB(96,50,96),MA(HHJSJDB,5),RGB(15,96,96));
【箱顶】:PEAK(HIGH,N,1)*0.98;
【箱底】:TROUGH(LOW,N,1)*1.02;
【箱高】:100*(【箱顶】-【箱底】)/【箱底】,NODRAW;
{135战法}
YY1:=C MA(C,11)ANDOPEN MA(C,11);{一阳三线}
YY3:=C MA(C,33)ANDOPEN MA(C,33);
YY5:=C MA(C,55)ANDOPEN MA(C,55);
DRAWTEXT(YY1ANDYY5ANDYY3,LOW-0.1,'一阳三线'),COLORRED;
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)ANDCOUNT(A8 0,2)ANDcrOSS(A8,MA(A8,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.05,'进'),COLORYELLOW;
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;
XU:PEAK(C,IF(PERIOD 5,5,10),1)*0.999,COLORFFCC99,LINETHICK1;{箱顶}
XD:TROUGH(C,IF(PERIOD 5,5,10),1)*0.998,COLORFF99CC,LINETHICK1;{箱底}
XH:=(XU-XD)/XD*100;
XDU:=IF(EMA(EMA(EMA(C,2),2),2) REF(EMA(EMA(EMA(C,2),2),2),1),XD,XU);
XR:=(C-XDU)/XDU*100;
XTB:=XD!=REF(XD,2) XD=REF(XD,1);
XTS:=XU!=REF(XU,2) XU=REF(XU,1);
DRAWICON(XTB,MIN(XD,L)*0.991,1);
DRAWTEXT(XTB,MIN(XD,L)*0.995,'升点!满仓'),COLOR0000DD;
DRAWICON(XTS,MAX(XU,H)*1.006,2);
DRAWTEXT(XTS,MIN(XU,H)*1.008,'跌点!清仓')COLOR00DD00;
上升段:DRAWLINE(XTB,MIN(LLV(L,1),XD),XTS,MAX(HHV(H,1),XU),0)
COLOR000099,LINETHICK2;{XTBL}
下跌段:DRAWLINE(XTS,MAX(HHV(H,1),XU),XTB,MIN(LLV(L,1),XD),0)
COLOR009900,LINETHICK2;{XTSL};
MA3:=MA(C,3);
YTSL:=(3*C+L+O+H)/6;
辰星线:(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF(YTSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL,8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7*REF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF(YTSL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211,COLORFFFF00;
牵牛线:MA(C,26),COLOR669933;
等待:IF(MA3 =辰星线,牵牛线,DRAWNULL),COLORGREEN,LINETHICK2;
中轨:=MA(C,26);
上轨:=中轨+STD(C,20);
下轨:=中轨-STD(C,20);
上极限:(中轨+2*STD(C,20)),COLORFF937F,LINETHICK2;
下极限:(中轨-2*STD(C,20)),COLORWHITE,LINETHICK2;
急速超跌:=(C-MA(C,34))/MA(C,34)*100
VAR1:=(C REF(C,1)ANDC REF(C,2));
VAR2:=(REF(VAR1,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR3:=(REF(VAR2,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR4:=(REF(VAR3,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR5:=(REF(VAR4,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR6:=(REF(VAR5,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR7:=(REF(VAR6,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR8:=(REF(VAR7,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR9:=(REF(VAR8,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARA:=(REF(VAR9,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARB:=(REF(VARA,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARC:=(REF(VARB,1)ANDC =REF(C,1)ANDC =REF(C,2));
持股:IF(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVARAORVARBORVARC,辰星线,DRAWNULL),COLORRED,POINTDOT,LINETHICK5;
VARD:=(C REF(C,1)ANDC REF(C,2));
VARE:=(REF(VARD,1)ANDC =REF(C,1)ANDC =REF(C,2));
VARF:=(REF(VARE,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR10:=(REF(VARF,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR11:=(REF(VAR10,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR12:=(REF(VAR11,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR13:=(REF(VAR12,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR14:=(REF(VAR13,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR15:=(REF(VAR14,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR16:=(REF(VAR15,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR17:=(REF(VAR16,1)ANDC =REF(C,1)ANDC =REF(C,2));
VAR18:=(REF(VAR17,1)ANDC =REF(C,1)ANDC =REF(C,2));
持币:IF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,辰星线,DRAWNULL),COLORLIGRAY,POINTDOT,LINETHICK5;
VAR19:=((REF(VARDORVAREORVARFORVAR10ORVAR11ORVAR12ORVAR13ORVAR14ORVAR15ORVAR16ORVAR17ORVAR18,1))ANDVAR1);
VAR1A:=((REF(VAR1ORVAR2ORVAR3ORVAR4ORVAR5ORVAR6ORVAR7ORVAR8ORVAR9ORVARAORVARBORVARC,1))ANDVARD);
DRAWTEXT(VAR19,L,'←短买'),COLOR33FFCC;
DRAWTEXT(VAR1A,H+0.1,'←离场'),COLORFF99FF;
通达信13日线主图指标公式截图