以下是通达信DDX+DDE+DDY指标公式源码
通达信DDX+DDE+DDY指标公式源码:
T1:=C;T2:=O;T3:=H;
次1:=C*2-MA(REF(C,2),2);
次2:=REF(C,1)*2-MA(REF(C,3),3);
次3:=C-((H-L)/2)*2;
E1:(次1-T3)/T3*100,COLORLIRED;
E2:(L-次3)/次3*100,COLORRED;
E3:=(次1-REF(O,1))/O*100;
E4:=(C-REF(次2,1))/次2*100;
E5:(O-次3)/次3*100,COLORYELLOW;Z1:E5+E1;
E6:=(次1-REF(次1,1))/次1*100;STICKLINE(E1>0,E1,0,3,0),COLORRED;
E7:=(L-REF(次2,1))/次2*100,COLORLICYAN;
E8:(H-REF(次3,1))/次3*100,COLORBROWN;
E9:=(次1-次2)/次2*100,COLORRED;
E0:=(E2+E8)/2,LINETHICK2;
Q1:=T1>REF(T1,1)&&E1>REF(E1,1)&&E2<REF(E2,1)&&E4>REF(E4,1)&&E7>REF(E7,1)&&E8>REF(E8,1);
Q2:=T1<REF(T1,1)&&E1<0&&E1<REF(E1,1)&&E2>REF(E2,1)&&E4<REF(E4,1)&&E7<REF(E7,1)&&E8<REF(E8,1);
STICKLINE(E6>(E5*2.5)&&Q1,E8,0,1.2,0),COLORMAGENTA;
STICKLINE(crOSS(E5,Z1),E5,0,1.8,0),COLORGREEN;
DRAWTEXT(Q1,0,’涨’),COLORRED;
DRAWTEXT(Q2,0,’跌’)COLORGREEN;
A1:=E1<REF(E1,1)&&E2>REF(E2,1)&&E3>REF(E3,1)&&E4>REF(E4,1)&&E5>REF(E5,1)&&E6>REF(E6,1)&&E7>REF(E7,1)&&E8>REF(E8,1);
A2:=E1<REF(E1,1)&&E2>REF(E2,1)&&E3<REF(E3,1)&&E4<REF(E4,1)&&E5<REF(E5,1)&&E6<REF(E6,1)&&E7<REF(E7,1)&&E8<REF(E8,1);
DRAWICON(A2,0,2);
DRAWICON(A1,0,12);
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
A1:(EMA(VAR1,3)+EMA(VAR1,6)+EMA(VAR1,12)+EMA(VAR1,24))/4;
A2:EMA(A1,2);
A3:EMA(A2,2);
A4:EMA(A3,2);
A5:EMA(A4,2);
A6:EMA(A5,2);
A7:EMA(A6,2);
A8:EMA(VAR1,2.78)*1.028;
A9:MA(OPEN,3.2)*1.028;
安全线:EMA(CLOSE,55),colorgreen,POINTDOT,LINETHICK4;
{
V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
V2:=(1-7/100)*(DMA(CLOSE,V1));
V3:=(1+7/100)*(DMA(CLOSE,V1));
撑价:REFDATE(V2,DATE),POINTDOT,LINETHICK3,COLORCDCDCD;
阻价:REFDATE(V3,DATE),POINTDOT,LINETHICK3,coloryellow;}
阻力:PEAK(CLOSE,10,1)*0.98,colorwhite;
支撑:TROUGH(CLOSE,10,1)*1.02,coloryellow;
WW1:=FILTER(O<REF(L,1)ANDC>OANDvol>REF(V,1),13);
JH:=SMA(MAX(C-REF(C,1),0),6,1)/SMA(ABS(C-REF(C,1)),6,1)*100;
SZ:=FILTER(CROSS(JH,35),13);
SX:=FILTER(CROSS(JH,30),7);
SQ:=FILTER(CROSS(71,JH),74);
SD:=FILTER(CROSS(80,JH),74);
AA:=IF(CAPITAL<1,SZ,SX);
BB:=IF(CAPITAL<1,SQ,SD);
CC:=REF(HHV(CLOSE,120),1);DD:=REF(LLV(CLOSE,120),1);
WW:=((100*(CLOSE-DD))/(CC-DD));EE:=AMOUNT;
FF:=(EMA(EE,5)/REF(EMA(EE,5),5));
霸占:=FILTER(((((((FF>=2))AND(WW<35)))AND(BARSCOUNT(CLOSE)>30))OR(((((FF>=2))AND(WW<100)))AND(BARSCOUNT(CLOSE)<50))),90);
STICKLINE(C>REF(C,1),C,O,3.2,0),COLOR0000AA;
STICKLINE(C>REF(C,1),C,O,2.7,0),COLOR0000DD;
STICKLINE(C>REF(C,1),C,O,2.1,0),COLOR0022FF;
STICKLINE(C>REF(C,1),C,O,1.5,0),COLOR0066FF;
STICKLINE(C>REF(C,1),C,O,0.9,0),COLOR0099FF;
{STICKLINE(C>REF(C,1),C,O,0.3,0),COLOR00DDFF;}
STICKLINE(C<REF(C,1),C,O,3.2,0),COLOR990000;
STICKLINE(C<REF(C,1),C,O,2.7,0),COLORCC0000;
STICKLINE(C<REF(C,1),C,O,2.1,0),COLORFF4400;
STICKLINE(C<REF(C,1),C,O,1.5,0),COLORFF8800;
STICKLINE(C<REF(C,1),C,O,0.9,0),COLORFFCC00;
{STICKLINE(C<REF(C,1),C,O,0.3,0),COLORFFDD00;}
STICKLINE(C=REF(C,1),C,O,3.2,0),COLOR555555;
STICKLINE(C=REF(C,1),C,O,2.7,0),COLOR777777;
STICKLINE(C=REF(C,1),C,O,2.1,0),COLOR999999;
STICKLINE(C=REF(C,1),C,O,1.5,0),COLORBBBBBB;
STICKLINE(C=REF(C,1),C,O,0.9,0),COLORDDDDDD;
{STICKLINE(C=REF(C,1),C,O,0.3,0),COLORFFFFFF;}
STICKLINE(霸占,C,O,3,2),COLOR000055;
STICKLINE(霸占,C,O,2.7,0),COLOR000077;
STICKLINE(霸占,C,O,2.1,0),COLOR000099;
STICKLINE(霸占,C,O,1.5,0),COLOR0000BB;
STICKLINE(霸占,C,O,0.9,0),COLOR0000DD;
{STICKLINE(霸占,C,O,0.3,0),COLOR0000FF;}
STICKLINE(WW1,CLOSE,OPEN,3.2,0),COLORBB00FF;
STICKLINE(WW1,CLOSE,OPEN,2.7,0),COLORFF33FF;
STICKLINE(WW1,CLOSE,OPEN,2.1,0),COLORFF66FF;
STICKLINE(WW1,CLOSE,OPEN,1.5,0),COLORFF99FF;
STICKLINE(WW1,CLOSE,OPEN,0.9,0),COLORFFBBFF;
{STICKLINE(WW1,CLOSE,OPEN,0.3,0),COLORFFDDFF;}
STICKLINE(AA,CLOSE,OPEN,3.2,0),COLOR0088FF;
STICKLINE(AA,CLOSE,OPEN,2.7,0),COLOR00AAFF;
STICKLINE(AA,CLOSE,OPEN,2.1,0),COLOR00CCFF;
STICKLINE(AA,CLOSE,OPEN,1.5,0),COLOR22FFFF;
STICKLINE(AA,CLOSE,OPEN,0.9,0),COLOR66FFFF;
{STICKLINE(AA,CLOSE,OPEN,0.3,0),COLOR99FFFF;}
STICKLINE(BB,CLOSE,OPEN,3.2,0),COLOR005500;
STICKLINE(BB,CLOSE,OPEN,2.7,0),COLOR007700;
STICKLINE(BB,CLOSE,OPEN,2.1,0),COLOR009900;
STICKLINE(BB,CLOSE,OPEN,1.5,0),COLOR00BB00;
STICKLINE(BB,CLOSE,OPEN,0.9,0),COLOR00DD00;
{STICKLINE(BB,CLOSE,OPEN,0.3,0),COLOR00FF00;};
涨停:=IF((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(涨停,OPEN,CLOSE,1.5,0),coloryellow;
跌停:=IF((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),1,0);
STICKLINE(跌停,OPEN,CLOSE,1.5,0),colorwhite;
N:=10;
AA:=vol/((HIGH-LOW)*2-Abs(CLOSE-OPEN));
买量:=IF(CLOSE>OPEN,AA*(HIGH-LOW),IF(CLOSE<OPEN,AA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),LINETHICK0;
卖量:=IF(CLOSE>OPEN,0-AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-AA*(HIGH-LOW),0-VOL/2)),LINETHICK0,COLORCYAN;
大单动向:(买量+卖量)*10000/FINANCE(7),COLOR00FFFF,NODRAW;
stICKLINE(大单动向<0,0,大单动向,2,0),COLORCYAN;
STICKLINE(大单动向<0,0,大单动向,2,0),COLORCYAN;
STICKLINE(大单动向<0,0,大单动向,2,0),COLORCYAN;
STICKLINE(大单动向<0,0,大单动向,0.5,0),COLORCYAN;
STICKLINE(大单动向>0,0,大单动向,2,0),COLORRED;
STICKLINE(大单动向>0,0,大单动向,1,0),COLORRED;
STICKLINE(大单动向>0,0,大单动向,1.5,0),COLORRED;
STICKLINE(大单动向>0,0,大单动向,0.5,0),COLORRED;
ma1:MA(大单动向,N)COLORYELLOW;
{DDY}
AA:=IF(BETWEEN(C,REF(C,1),H),VOL,0);
BB:=IF(BETWEEN(C,REF(C,1),L),VOL,0);
CC:=IF(AAANDBB,0,VOL/3);
DDY:3*(AA-(BB+CC))/IF(CAPITAL<1,SUM(INDEXV,71),CAPITAL),LINETHICK0;
STICKLINE(DDY>0,0,DDY,3,0),COLOR0022CC;
STICKLINE(DDY<0,0,DDY,3,0),COLORFFFF00;
DDY1:EMA(DDY,60)*60,COLOR00FFFF;
DDY2:MA(DDY1,5),COLORFF00FF;
DDY3:MA(DDY1,10),COLOR00FF00;
预警:DDY>0ANDCROSS(DDY1,DDY3)AND(CLOSE/REF(CLOSE,1)-1)
*100>3,LINETHICK0;
DRAWTEXT(预警,0.5,’★’),LINETHICK3,COLOR00FFFF;
{DRAWTEXT(C>0,0,’涨跌动因’),COLORFFFFFF;}
涨跌动因:0.5,POINTDOT,COLORBLUE;
通达信DDX+DDE+DDY指标公式截图
评论(0)