通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信量价攻击指标公式
DRAWGBKLAST(C>0,STRIP(RGB(10,160,0),RGB(25,15,0),70));
MAA:=MA(CLOSE,5);
A:=AMOUNT/(100*vol);【5】:MA(A,5),linethick0,color00FFFF;
加权移平均:=wma(【5】,5);
jnyy:=dma(c,vol/capital);
個z:=EMA(jnyy,3);
十z:=EMA(jnyy,5);
百z:=EMA(jnyy,7);
千z:=EMA(jnyy,9);
万z:=EMA(jnyy,11);
PARTLINE(個z,個z<REF(個z,1)),DOTLINE,COLORFFAA11,linethick1;
PARTLINE(十z,十z<REF(十z,1)),DOTLINE,COLORFFBB22,linethick1;
PARTLINE(百z,百z<REF(百z,1)),DOTLINE,COLORFFCC33,linethick1;
PARTLINE(千z,千z<REF(千z,1)),DOTLINE,COLORFFDD44,linethick1;
PARTLINE(万z,万z<REF(万z,1)),DOTLINE,COLORFFEE55,linethick1;
PARTLINE(個z,個z>REF(個z,1)),DOTLINE,COLORff00ff,linethick1;
PARTLINE(十z,十z>REF(十z,1)),DOTLINE,COLORff99ff,linethick1;
PARTLINE(百z,百z>REF(百z,1)),DOTLINE,COLORff88ff,linethick1;
PARTLINE(千z,千z>REF(千z,1)),DOTLINE,COLORff77ff,linethick1;
PARTLINE(万z,万z>REF(万z,1)),DOTLINE,COLORff66ff,linethick1;
個:=EMA(MAA,2);十:=EMA(MAA,4);百:=EMA(MAA,6);千:=EMA(MAA,8);万:=EMA(MAA,10);
PARTLINE(個,個<REF(個,1)),DOTLINE,COLOR00AA00,linethick1;
PARTLINE(十,十<REF(十,1)),DOTLINE,COLOR00BB00,linethick1;
PARTLINE(百,百<REF(百,1)),DOTLINE,COLOR00CC00,linethick1;
PARTLINE(千,千<REF(千,1)),DOTLINE,COLOR00DD00,linethick1;
PARTLINE(万,万<REF(万,1)),DOTLINE,COLOR00EE00,linethick1;
PARTLINE(個,個>REF(個,1)),DOTLINE,COLOR0000AA,linethick1;
PARTLINE(十,十>REF(十,1)),DOTLINE,COLOR0000BB,linethick1;
PARTLINE(百,百>REF(百,1)),DOTLINE,COLOR0000CC,linethick1;
PARTLINE(千,千>REF(千,1)),DOTLINE,COLOR0000DD,linethick1;
PARTLINE(万,万>REF(万,1)),DOTLINE,COLOR0000EE,linethick1;
{阳线上下影}STICKLINE(CLOSE>=OPEN,C,H,0,0),color0000ff;
STICKLINE(CLOSE>=OPEN,O,L,0,0),color0000ff;
STICKLINE((CLOSE>OPEN),OPEN,CLOSE,8,0),color0000FF;
STICKLINE((CLOSE>OPEN),OPEN,CLOSE,6,0),color0099FF;
STICKLINE((CLOSE>OPEN),OPEN,CLOSE,4,0),color00CCFF;
STICKLINE((CLOSE>OPEN),OPEN,CLOSE,2,0),color00FFFF;
{阴线上下影}STICKLINE(CLOSE<OPEN,O,H,0,0),ColorFFFF66;
STICKLINE(CLOSE<OPEN,C,L,0,0),ColorFFFF66;
STICKLINE((CLOSE<=OPEN),CLOSE,OPEN,8,0),colorCC0033;
STICKLINE((CLOSE<=OPEN),CLOSE,OPEN,6,0),colorFF9966;
STICKLINE((CLOSE<=OPEN),CLOSE,OPEN,4,0),colorFFCC66;
STICKLINE((CLOSE<=OPEN),CLOSE,OPEN,2,0),colorFFFF66;
N:=20;
JJ:=(((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N)))*100);
A98:=98,COLORGRAY;
DRAWBAND(JJ,RGB(168,18,38),75,RGB(10,100,200));
DRAWBAND(JJ,RGB(168,18,38),25,RGB(10,100,200));
STICKLINE(C>0,75,25,10,0),COLOR404050;
DRAWICON(CROSS(JJ,A98),JJ,25);
A95:95,COLORGRAY;
A75:75,COLORGRAY;
A50:50,COLORGRAY;
A25:25,COLORGRAY;
A5:5,COLORGRAY;
J:(((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N)))*100),COLORWHITE;
BT2:=CROSS(J,A50)ANDCROSS(J,A75);
DRAWTEXT(BT2,50,'预测'),COLORFF00FF;
DRAWRECTREL(490,1,510,800,RGB(0,75,200));
DRAWRECTREL(490,1,510,800,RGB(0,250,50));
DRAWRECTREL(490,800-((CONST(J)/100*800)),510,800,RGB(175,50,0));
DRAWTEXT_FIX(1,0.400,0.03,0,STRCAT(STRCAT('K线攻击度',CON2STR(J,2)),'%')),COLORYELLOW;
上涨趋势:IF(BT2,J,DRAWNULL),COLORRED,LINETHICK2;
r0:=((IF(ISNULL(ZDMR[-1]),0,ZDMR)+IF(ISNULL(BDMR[-1]),0,BDMR))-(IF(ISNULL(ZDMC[-1]),0,ZDMC)+IF(ISNULL(BDMC[-1]),0,BDMC)))/SHGZG*100;
r0-(ABS(REF(r0,1))+ABS(REF(r0,2))+ABS(REF(r0,3))+ABS(REF(r0,4))+ABS(REF(r0,5))/2)>0AND
CLOSE>MA(CLOSE,20)ANDCLOSE>MA(CLOSE,5);
MA1:MA(CLOSE,5);
MA2:MA(CLOSE,10);
MA3:MA(CLOSE,20);
MA4:MA(CLOSE,30);
MA5:MA(CLOSE,60);
MA40:=MA(CLOSE,40);
A:=BARSLAST(CROSS(MA1,MA2));
B:=BARSLAST(CROSS(MA1,MA3));
CC:=BARSLAST(CROSS(MA2,MA3));
D:=A>BANDb>CCANDCC=0;
DRAWTEXT(D,MA3,'月价托');
E:=BARSLAST(CROSS(MA3,MA40));
F:=BARSLAST(CROSS(MA3,MA5));
G:=BARSLAST(CROSS(MA40,MA5));
Y:=E>FANDF>GANDG=0;
DRAWTEXT(Y,MA5,'季价托');
J:=BARSLAST(CROSS(MA1,MA2));
K:=BARSLAST(CROSS(MA1,MA5));
M:=BARSLAST(CROSS(MA2,MA5));
N:=J>KANDK>MANDM=0;
DRAWTEXT(N,MA5,'长短价托');
OO:=BARSLAST(CROSS(MA2,MA1));
P:=BARSLAST(CROSS(MA3,MA1));
Q:=BARSLAST(CROSS(MA3,MA2));
R:=OO>PANDP>QANDQ=0;
DRAWTEXT(R,MA3,'月价压');
SS:=BARSLAST(CROSS(MA40,MA3));
TT:=BARSLAST(CROSS(MA5,MA3));
UU:=BARSLAST(CROSS(MA5,MA40));
VV:=SS>TTANDTT>UUANDUU=0;
DRAWTEXT(VV,MA5,'季价压');
WW:=BARSLAST(CROSS(MA2,MA1));
XX:=BARSLAST(CROSS(MA5,MA1));
YY:=BARSLAST(CROSS(MA5,MA2));
ZZ:=WW>XXANDXX>YYANDYY=0;
DRAWTEXT(ZZ,MA5,'长短价压');
量托,压指标放到(成交量副图中):
MA1:MA(VOL,M1);
MA2:MA(VOL,M2);
MA3:MA(VOL,M3);
MA40:=MA(VOL,40);
MA5:=MA(VOL,60);
A:=BARSLAST(CROSS(MA1,MA2));
B:=BARSLAST(CROSS(MA1,MA3));
CC:=BARSLAST(CROSS(MA2,MA3));
D:=A>BANDb>CCANDCC=0;
DRAWTEXT(D,MA3,'月量托');
E:=BARSLAST(CROSS(MA3,MA40));
F:=BARSLAST(CROSS(MA3,MA5));
G:=BARSLAST(CROSS(MA40,MA5));
Y:=E>FANDF>GANDG=0;
DRAWTEXT(Y,MA5,'季量托');
OO:=BARSLAST(CROSS(MA2,MA1));
P:=BARSLAST(CROSS(MA3,MA1));
Q:=BARSLAST(CROSS(MA3,MA2));
R:=OO>PANDP>QANDQ=0;
DRAWTEXT(R,MA3,'月量压');
SS:=BARSLAST(CROSS(MA40,MA3));
TT:=BARSLAST(CROSS(MA5,MA3));
UU:=BARSLAST(CROSS(MA5,MA40));
VV:=SS>TTANDTT>UUANDUU=0;
DRAWTEXT(VV,MA5,'季量压');
[源码注释]通达信公式动态翻译结果
AA1赋值:收盘价/1日前的收盘价>1.08
输出XG:统计5日中满足AA1的天数=1 AND AA1
每日通达信公式解答:
编写条件:
上影线在1.5%以上的选股公式
编写方法:
G:H-maX(O,C)>REF(C,1)*0.015;
评论(0)