通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
RSV:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))-0.5;
K0:=SMA(RSV,3,1);
K:=K0;
D:=SMA(K0,2,1);
J1:=(3*K0-2*D);
J2:=MA(J1,2);
MAV:=(2*C+H+L)/4;
VAR1:=LLV(LOW,21);
VAR2:=HHV(HIGH,21);
SK:=EMA((MAV-VAR1)/(VAR2-VAR1)-0.5,8);
SD:=EMA(0.667*REF(SK,1)+0.333*SK,1);
SJ:=3*SK-2*SD;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
:=(DIF-DEA)*2;
信号:CROSS(SK,DEA)ANDMA(C,18) =REF(MA(C,18),1)ANDSK =REF(SK,1);
M1:=14;
M2:=56;
ma3:MA(C,3);
EXP1:EMA(CLOSE,M1);
EXP2:EMA(CLOSE,M2);
N1:=C
N2:=C EXP1;
N3:=BArslAstCOUNT(N1) =5ANDBARSLASTCOUNT(N2) =5ANDEXP1 EXP2ANDMA3 REF(MA3,1);
STICKLINE(N3,EXP1+(MA3-EXP1)/2,EXP1,1,0),COLORYELLOW;
IF(MA3 =EXP1ANDEXP1 EXP2ANDMA3 REF(MA3,1),EXP1,DRAWNULL),COLORRED,LINETHICK3;
DRAWICON(crOSS(EXP1,EXP2),EXP2,1);
EXP1:=expma(C,18);
EXP2:=EXPma(C,30);
XG:REF(crOSS(EXP1,EXP2),5) amp; amp;BETWEEN(EXP1/REF(EXP1,5),0.99,1.01) amp; amp;
BETWEEN(EXP2/REF(EXP2,5),0.99,1.01);
AEXP12:expma(CLOSE,12)COLORBLUE,LINETHICK1;
AEXP21:EXPma(CLOSE,21)COLORGREEN,LINETHICK2;
AEXP50:EXPMA(CLOSE,50)COLORGREEN,LINETHICK2;
IF(AEXP12 (REFV(AEXP12,1)),AEXP12,DRAWNULL),COLORRED,LINETHICK1;
IF(AEXP21 (REFV(AEXP21,1)),AEXP21,DRAWNULL),COLORMAGENTA,LINETHICK2;
A1:=EMA(C,14),COLORA2A200,LINETHICK1;
A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;
DRAWTEXT_FIX(1,0,0.07,0, 【所属】 ),COLORWHITE;
DRAWTEXT_FIX(1,0.07,0.07,0,DYBLOCK),COLOR0080FF;{地域}
DRAWTEXT_FIX(1,0.122,0.07,0,GNBLOCK),COLORCFB53B;{概念}
DRAWTEXT_FIX(1,0,0.19,0, 【莸利比例】 ),COLORWHITE;
DRAWNUMBER_FIX(1,0.09,0.19,0,CONst(WINNER(C)*100)),COLORYELLOW;
DRAWTEXT_FIX(1,0.073,0,0,HYBLOCK),COLORRED;{行业}
{DRAWTEXT_FIX(1,0.124,0,0,FGBLOCK),COLORYELLOW;}{风格}
SAT:=IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100 100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100);
DRAWTEXT_FIX(1,0,0.31,0, 【饱和度】 )COLORWHITE;
DRAWNUMBER_FIX(1,0.1,0.31,0,CONST(SAT)),COLORYELLOW;
:REF(EMA(C,14),1),NODRAW;
距离:(C-突破)/突破*100,NODRAW;
出击:IF(A1X =0,REF(EMA(C,14),BArslAST(crOSS(A1X,0))+1),DRAWNULL),COLORB000B0,LINETHICK1;
休假:IF(A1X 0,REF(EMA(C,14),BARSLAST(CROSS(0,A1X))+1),DRAWNULL),COLORFFFF00,LINETHICK1;
涨幅:IF(A1X =0,(C-出击)/出击*100,DRAWNULL)NODRAW;
跌幅:IF(A1X 0,(C-休假)/休假*100,DRAWNULL)NODRAW;
TT:=240/FROMOPEN;比:=TT;AY2:=EMA(CLOSE,12)-EMA(CLOSE,26);
AZ2:=EMA(AY2,9);LT2:=(AY2-AZ2);
L211:=IF(LT2,LLV(L,21),DRAWNULL),COLOR217158,CIRCLEDOT;
ZGD:=HHV(H,80)*0.99;ZGD2:=CONST(ZGD);ZDD:=LLV(L211,80);ZDD2:=CONST(ZDD);
YYA4:=MA(CLOSE,20);YYA5:=(CLOSE MA(CLOSE,5));YYA6:=(MA(CLOSE,5) MA(CLOSE,10));
YYA7:=(CLOSE MA(CLOSE,10));YYA8:=(MA(CLOSE,5) MA(CLOSE,20));
YYA9:=(CLOSE MA(CLOSE,20));YYA10:=REF(YYA4,1);YYA11:=(YYA4 YYA10);
YYAVX:=(((((IF(YYA5,10,(0-10))+IF(YYA6,10,(0-10)))+IF(YYA7,10,(0-10)))+IF(YYA8,10,(0-10)))+IF(YYA9,10,(0-10)))+IF(YYA11,10,(0-10)));
DSLX:=(CLOSE/INDEXC);DSLX1:=MA(DSLX,5);DSLX2:=MA(DSLX,10);
YYV1:=MA(,5);YYV2:=MA(VOL,10);J1:=CONST(IF(YYAVX 0,200,100));
J2:=CONST(IF(YYAVX 0,00,100));J3:=CONST(IF(YYAVX 0,100,100));
ZGD3:=ZGD2;ZDD3:=ZDD2;ZGD4:=ZGD2;
STICKLINE(CROSS(A1X,0),C,O,2,0),COLOR00FFFF;
STICKLINE(CROSS(0,A1X),C,O,2,0),COLOR606000;
情况1:=CONST(IF(((CROSS(YYAVX,1)AND(YYV1 =YYV2))AND(DSLX =DSLX1)),1,0)),NODRAW;
情况2:=CONST(IF(((CROSS(YYAVX,1)AND(YYV1 YYV2))AND(DSLX =DSLX1)),1,0));
情况3:=CONST(IF(((CROSS(YYAVX,1)AND(YYV1 YYV2))AND(DSLX DSLX1)),1,0));
情况4:=CONST(IF(((CROSS(YYAVX,1)AND(YYV1 =YYV2))AND(DSLX DSLX1)),1,0));
情况5:=CONST(IF(((CROSS(1,YYAVX)AND(YYV1 =YYV2))AND(DSLX =DSLX1)),1,0));
情况6:=CONST(IF(((CROSS(1,YYAVX)AND(YYV1 YYV2))AND(DSLX =DSLX1)),1,0));
情况7:=CONST(IF(((CROSS(1,YYAVX)AND(YYV1 =YYV2))AND(DSLX DSLX1)),1,0));
情况8:=CONST(IF(((CROSS(1,YYAVX)AND(YYV1 YYV2))AND(DSLX DSLX1)),1,0));
情况9:=CONST(IF(((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2))AND(DSLX =DSLX1)),1,0));
情况10:=CONST(IF(((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2))AND(DSLX =DSLX1)),1,0));
情况11:=CONST(IF(((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2))AND(DSLX DSLX1)),1,0)),NODRAW;
情况12:=CONST(IF(((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2))AND(DSLX DSLX1)),1,0));
情况13:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2))AND(DSLX =DSLX1)),1,0));
情况14:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2))AND(DSLX =DSLX1)),1,0));
情况15:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2))AND(DSLX DSLX1)),1,0));
情况16:=CONST(IF(((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2))AND(DSLX DSLX1)),1,0));
1:=CONST(IF((CROSS(YYAVX,1)AND(YYV1 =YYV2)),1,0));
大盘2:=CONST(IF((CROSS(YYAVX,1)AND(YYV1 YYV2)),1,0));
大盘3:=CONST(IF((CROSS(1,YYAVX)AND(YYV1 =YYV2)),1,0));
大盘4:=CONST(IF((CROSS(1,YYAVX)AND(YYV1 YYV2)),1,0));
大盘5:=CONST(IF((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2)),1,0));
大盘6:=CONST(IF((((YYAVX =1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2)),1,0));
大盘7:=CONST(IF((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 =YYV2)),1,0));
大盘8:=CONST(IF((((YYAVX 1)AND(REF(YYAVX,1) 0))AND(YYV1 YYV2)),1,0));
mfi:=(HIGH-LOW)*1000000/(VOL*比);
绿灯:=MFI =REF(MFI,1)ANDVOL*比 =REF(VOL,1);
MMM1:=CONST(绿灯);
衰退:=MFI REF(MFI,1)ANDVOL*比 REF(VOL,1);
MMM2:=CONST(衰退);
伪装:=MFI =REF(MFI,1)ANDVOL*比 REF(VOL,1);
MMM3:=CONST(伪装);
蛰伏:=MFI REF(MFI,1)ANDVOL*比 =REF(VOL,1);
MMM4:=CONST(蛰伏);
WJ:=(H+L+C)/3;V1:=IF(H=L,1,H-MAX(O,C));V2:=IF(H=L,1,MAX(C,O)-WJ);
V3:=IF(H=L,1,MIN(O,C)-L);V4:=IF(H=L,1,WJ-MIN(C,O));V5:=VOL/IF(H=L,4,H-L);
V6:=(V1*V5);V7:=(V2*V5);V8:=(V3*V5);V9:=(V4*V5);
买盘1:=DYNAINFO(23)*比;卖盘1:=DYNAINFO(22)*比;
买盘2:=IF(ISLASTBARANDC 300,(V9+V8)*TT,(V9+V8));
卖盘2:=IF(ISLASTBARANDC 300,(V6+V7)*TT,(V6+V7));
买盘:=IF(ISLASTBARANDPERIOD=5ANDC 300,买盘1,买盘2);
卖盘:=IF(ISLASTBARANDPERIOD=5ANDC 300,卖盘1,卖盘2);
{差:=买盘-卖盘;}
量大:=(卖盘+买盘)/REF(VOL,1)
MMM5:=CONST(量大);
量缩:=REF(VOL,1)/(卖盘+买盘)
MMM6:=CONST(量缩);
卖量大:=(卖盘-买盘)/买盘
MMM7:=CONST(卖量大);
买量大:=(买盘-卖盘)/卖盘
MMM8:=CONST(买量大);
TS1:=IF(情况1=1,0.06+0.06,0.06);TS2:=IF(情况2=1,TS1+0.06,TS1);
TS3:=IF(情况3=1,TS2+0.06,TS2);TS4:=IF(情况4=1,TS3+0.06,TS3);
TS5:=IF(情况5=1,TS4+0.06,TS4);TS6:=IF(情况6=1,TS5+0.06,TS5);
TS7:=IF(情况7=1,TS6+0.06,TS6);TS8:=IF(情况8=1,TS7+0.06,TS7);
TS9:=IF(情况9=1,TS8+0.06,TS8);TS10:=IF(情况10=1,TS9+0.06,TS9);
TS11:=IF(情况11=1,TS10+0.06,TS10);TS12:=IF(情况12=1,TS11+0.06,TS11);
TS13:=IF(情况13=1,TS12+0.06,TS12);TS14:=IF(情况14=1,TS13+0.06,TS13);
TS15:=IF(情况15=1,TS14+0.06,TS14);TS16:=IF(情况16=1,TS15+0.06,TS15);
TS17:=IF(大盘1=1,TS16+0.06,TS16);TS18:=IF(大盘2=1,TS17+0.06,TS17);
TS19:=IF(大盘3=1,TS18+0.06,TS18);TS20:=IF(大盘4=1,TS19+0.06,TS19);
TS21:=IF(大盘5=1,TS20+0.06,TS20);TS22:=IF(大盘6=1,TS21+0.06,TS21);
TS23:=IF(大盘7=1,TS22+0.06,TS22);TS24:=IF(大盘8=1,TS23+0.06,TS23);
TS25:=IF(MMM1=1,TS24+0.06,TS24);
TS26:=IF(MMM2=1,TS25+0.06,TS25);
TS27:=IF(MMM3=1,TS26+0.06,TS26);
TS28:=IF(MMM4=1,TS27+0.06,TS27);
TS29:=IF(MMM5=1,TS28+0.03,TS28);
TS30:=IF(MMM6=1,TS29+0.03,TS29);
TS31:=IF(MMM7=1,TS30+0.03,TS30);
TS32:=IF(MMM8=1,TS31+0.03,TS31);
DRAWTEXT_FIX(MMM5,0,0.42,0, ★今天比昨天的放大一倍以上。 ),COLORGREEN;
DRAWTEXT_FIX(MMM6,0,0.42,0, ★今天比昨天的成交量缩量一半以上。 ),COLORYELLOW;
DRAWTEXT_FIX(MMM7,0,0.48,0, ☆该股今天卖出量大于买入量40%以上。 ),COLORGREEN;
DRAWTEXT_FIX(MMM8,0,0.48,0, ☆该股今天买入量大于卖出量40%以上。 ),COLORYELLOW;
公式解读:
三买入时机
1,股价一直处于多头行情之中,运行于系统之上,攻击线上穿操盘线,持续向上。
2,macd也金叉做多向上,均量线也金叉向上(此时的量放能大并非真正的出货)。
3,次日跳空抵开,但仍开于操盘线之上,说明主力仍然以做多为主,当股价站稳操盘线,放量拉升,突破攻击线时,做多行情确立。
编写条件:
股价连续8天在4日均线下,今日站上4日均线的选股公式
编写方法:
XG:REF(C,1) REF(MA(C,4),1)ANDREF(C,2) REF(MA(C,4),2)ANDREF(C,3) REF(MA(C,4),3)ANDREF(C,4) REF(MA(C,4),4)ANDREF(C,5) REF(MA(C,4),5)ANDREF(C,6) REF(MA(C,4),6)ANDREF(C,7) REF(MA(C,4),7)ANDREF(C,8) REF(MA(C,4),8)ANDCLOSE MA(C,4)