股票的公式有哪些?通达信终极优化买卖主图公式源码
2016-6-6 15:46:49 股票入门 http://rumen.southmoney.com
股票的公式有哪些?通达信终极优化买卖主图公式源码 附:通达信龙飞指标公式 南方财富网小编为您提供
【通达信终极优化买卖主图公式源码】
WRAP: break-word; WHITE-SPACE: normal; TEXT-TRANSFORM: none; WORD-SPACING: 0px; COLOR: rgb(51,51,51); PADDING-BOTTOM: 0px; PADDING-TOP: 0px; FONT: 14px/24px 宋体, arial, sans-serif, 'DejaVu Sans', 'Lucida Grande', Tahoma, 'Hiragino Sans GB', STHeiti, SimSun, sans-serif; PADDING-LEFT: 0px; MARGIN: 0px; WIDOWS: 1; LETTER-SPACING: normal; PADDING-RIGHT: 0px; TEXT-INDENT: 0px; -webkit-text-stroke-width: 0px">获利%:WINNER(CLOSE)*100,NODRAW,COLORWHITE; {此句为计算获利盘比例,不需要可以不要}
N:=5;M:=13;
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));
V5:=MA((LOW+HIGH+CLOSE)/3,5);
支撑:REFDATE(V2,DATE),POINTDOT,LINETHICK3,COLORCC66FF;
阻力:REFDATE(V3,DATE),POINTDOT,LINETHICK3,COLORGREEN;
MA1:=MEMA(CLOSE,5);
MA2:=ATAN((MA1/REF(MA1,1)-1)*100)*180/3.1416;
MA3:=IF(MA2>0,MA2,MA2);
MA5:MA(CLOSE,N),COLOR888899;
MA13:MA(CLOSE,M),COLORFF9900,LINETHICK2;
VAR1:=CLOSE=HHV(C,4) AND (REF(C,1)>=REF(C,2) OR REF(C,1)>=REF(C,3)) OR REF(C,1)=HHV(C,4) AND CLOSE>=REF(C,2) OR REF(C,2)=HHV(C,4) AND REF(C,3)=LLV(C,4) AND C>=REF(C,1) OR REF(C,3)=HHV(C,4) AND C>=REF(C,1) AND C>=REF(C,2);
VAR2:=CLOSE=HHV(C,4) AND REF(C,1)=LLV(C,4);
VAR3:=CLOSE=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2);
VAR4:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
VAR5:=REF(C,1)=HHV(C,4) AND C<REF(C,2) OR (REF(C,2)=HHV(C,4) AND REF(C,1)>REF(C,3) OR REF(C,3)=HHV(C,4) AND REF(C,1)>REF(C,2)) AND REF(C,2)>=REF(C,4) AND C<REF(C,1);
VAR6:=V5>REF(V5,1) AND REF(V5,1)<REF(V5,2);
VAR7:=LOW<HHV(V5,13) AND HIGH>HHV(V5,13) AND CLOSE>REF(C,1) AND CLOSE>OPEN;
VAR8:=VAR7 AND COUNT(VAR6,2);
VAR9:=100*EMA(EMA(C-REF(C,1),6),6)/EMA(EMA(ABS(C-REF(C,1)),6),6);
VAR10:=EMA(MA(C,13),13);
VAR11:=FILTER((LLV(VAR9,2)=LLV(VAR9,7) AND COUNT(VAR9<0,2) AND CROSS(VAR9,MA(VAR9,2)))=1,5);
VAR12:=FILTER((HHV(VAR9,2)=HHV(VAR9,7) AND COUNT(VAR9>50,2) AND CROSS(MA(VAR9,2),VAR9))=1,1);
VAR13:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;
VAR14:=FILTER(((CROSS(VAR13,0) OR CROSS(C,VAR10)) AND VAR11)=1,3);
VAR15:=MA(C,18)>=REF(MA(C,18),3) AND CROSS(C,MA(C,18));
VAR16:=VAR8 AND NOT(REF(VAR8,1));
强攻:IF(MA3>REF(MA3,1) AND MA3>=0,MA13,DRAWNULL),COLORYELLOW,LINETHICK2;
回调:IF(MA3<REF(MA3,1) AND MA3>0,MA13,DRAWNULL),COLORGREEN,LINETHICK2;
{KDJ}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
金叉:=CROSS(J,D);
死叉:=CROSS(D,J);
买1:=(VAR14 OR VAR15) AND VAR11;
买2:=(VAR14 OR VAR15) AND VAR4;
买3:=(VAR14 OR VAR15) AND VAR2;
买4:=(VAR2 AND VAR11) OR (VAR4 AND VAR11);
买5:=(金叉 AND VAR4) OR (金叉 AND VAR2) OR (金叉 AND VAR11);
{涨停}
STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF;
{跌停}
STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,4,-1),COLORGREEN;
{蓝}
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,3,0),COLORFF7700;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.2,0),COLORFF9900;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB00;
STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.5,0),COLORCYAN;
{红}
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
{绿}
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,3,0),COLOR009900;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,2.2,0),COLOR00BB00;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,1.5,0),COLOR00DD00;
STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00;
{灰}
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,3,0),COLOR999999;
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB;
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,1.5,0),COLORDDDDDD;
STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF;
STICKLINE(金叉,OPEN,CLOSE,0.5,0),COLORYELLOW;
STICKLINE(死叉,OPEN,CLOSE,0.5,0),COLOR000099;
DRAWICON(VAR16,LOW-0.02,7);
DRAWICON(买1 OR 买2 OR 买3 OR 买4 OR 买5,LOW-0.01,1);
DRAWICON(死叉 OR VAR12 OR CROSS(40,VAR9),HIGH+0.01,2);
附:【通达信龙飞指标公式】
{龙飞}
N:=1000;M:=50;
高:=CONST(REF(HHV(H,N),M));
低:=CONST(REF(LLV(L,N),M));
色彩峰:=高-低;
STICKLINE(色彩峰>0,低,低+色彩峰*1.05,10,0),COLORFF0000;
STICKLINE(色彩峰>0,低,低+色彩峰*0.9,10,0),COLORFF1111;
STICKLINE(色彩峰>0,低,低+色彩峰*0.85,10,0),COLORFF2222;
STICKLINE(色彩峰>0,低,低+色彩峰*0.8,10,0),COLORFF3333;
STICKLINE(色彩峰>0,低,低+色彩峰*0.75,10,0),COLORFF4444;
STICKLINE(色彩峰>0,低,低+色彩峰*0.7,10,0),COLORFF5555;
STICKLINE(色彩峰>0,低,低+色彩峰*0.65,10,0),COLORFF6666;
STICKLINE(色彩峰>0,低,低+色彩峰*0.6,10,0),COLORFF7777;
STICKLINE(色彩峰>0,低,低+色彩峰*0.55,10,0),COLORFF8888;
STICKLINE(色彩峰>0,低,低+色彩峰*0.5,10,0),COLORFF9999;
STICKLINE(色彩峰>0,低,低+色彩峰*0.45,10,0),COLORFFAAAA;
STICKLINE(色彩峰>0,低,低+色彩峰*0.4,10,0),COLORFFBBBB;
STICKLINE(色彩峰>0,低,低+色彩峰*0.35,10,0),COLORFFCCCC;
STICKLINE(色彩峰>0,低,低+色彩峰*0.3,10,0),COLORFFDDDD;
STICKLINE(色彩峰>0,低,低+色彩峰*0.25,10,0),COLORFFEEEE;
A:=(HHV(HIGH,26)+LLV(LOW,26))/2;
B:=(HHV(HIGH,9)+LLV(LOW,9))/2;
DL:=CLOSE; FN:=26;
先行上限:=REF((A+B)/2,26),POINTDOT,LINETHICK0,COLORCCCCCC;
先行下限:=REF((HHV(HIGH,52)+LLV(LOW,52))/2,26),POINTDOT,LINETHICK0,COLORCCCCCC;
龙A:=EMA(CLOSE,48),COLORFF00FF;
龙B:=MA(CLOSE,8),COLOR00FF00;
龙收盘价:=MA(CLOSE,8),COLORFFFFFF;
STICKLINE((龙A>MA(CLOSE,8)),龙A,MA(CLOSE,8),48,1),COLOR008000;
STICKLINE((龙A<MA(CLOSE,8)),龙A,MA(CLOSE,8),48,1),COLOR0000FF;
STICKLINE(C>0,先行上限,先行下限,1,0),COLOR999999;
STICKLINE(C>=O,C,O,4,0),COLORRED;
STICKLINE(C>=O,C,O,2,0),COLORB0B0FF;
STICKLINE(C>=O,H,L,0,0),COLORYELLOW;
STICKLINE(C<=O,C,O,4,0),COLORFF2020;
STICKLINE(C<=O,C,O,1,0),COLORCYAN;
STICKLINE(C<=O,H,L,0,0),COLORCYAN;
H1:=高-(高-低)*0.191;
H2:=高-(高-低)*0.382;
H3:=高-(高-低)*0.5;
H4:=高-(高-低)*0.618;
H5:=高-(高-低)*0.809;
顶点:REFDATE(高,DATE),COLORWHITE;
一:REFDATE(H1,DATE),COLORYELLOW;
二:REFDATE(H2,DATE),COLORMAGENTA;
三:REFDATE(H3,DATE),COLORBLUE;
四:REFDATE(H4,DATE),COLORRED;
五:REFDATE(H5,DATE),COLORGREEN;
低点:REFDATE(低,DATE),COLORRED;
更多股票公式相关资讯请关注南方财富网
股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。