通达信公式源码概况:
指标类别:通达信公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
警戒:(1-3/100)*MA(CLOSE,20)LINETHICK2;
TAI:MA(CLOSE,20),POINTDOT;
趋势:MA(CLOSE,5)LINETHICK2;
条件1:=警戒 =REF(警戒,1);
条件2:=趋势-0.03 REF(趋势,1);
条件3:=趋势 =警戒ANDLLVBARS(L,21) 5;
条件4:=REF(L,1) =警戒ORREF(L,2) =警戒ORREF(L,3) =警戒;
条件5:=CROSS(趋势,警戒)ANDREF(警戒 趋势,2);
条件6:=条件1AND(REF(CROSS(REF(OPEN,1),警戒),1)ORREF(CROSS(REF(CLOSE,1),警戒),1)ORREF(CROSS(REF(L,1),警戒),1));
DRAWTEXT(FILTER(条件4AND条件3AND条件2AND条件1OR条件5OR条件6,3),警戒, ★ )COLORBLUE;
共除权:=COUNT(SPLITDATA(0),0);上除权:=SPLITBARS(1);本除权:=BARSLAST(IF(SPLITDATA(0)=1,SPLITDATA(0)+1,0));
比例:SPLIT(1),LINETHICK;红股:SPLITDATA(1),LINETHICK;配股:SPLITDATA(2),LINETHICK;
配价:SPLITDATA(3),LINETHICK;红利:SPLITDATA(4),LINETHICK;p:=SYSPARAM(1);
J0:=(HIGH+LOW)/2;QJ:=WMA(J0,3);J1:=IF(CLOSE QJ,,0);J2:=IF(CLOSE QJ,VOL,0);
RV:=(qj-LLV(qj,144))/(HHV(qj,144)-LLV(qj,144))*100;统计:SUM(J1-J2,5),LINETHICK;
差:EMA(统计,10)-EMA(统计,34),COLORFFFFFF;趋势:EMA(差,5),COLOR00FFFF;
结:2*(差-趋势),COLORSTICK;GZ:=cross(差,趋势);GG:=cross(趋势,差);KZ:=cross(RV,5);
复权价:=C*(1+比例+红股+配股)+红利+(配价*配股);
KD:=if(CAPITAL 1,cross(90,RV),cross(99,RV));
DRAWICON(KZ,差,4);DRAWICON(KD,趋势,5);
DRAWICON(GZ,差,10);DRAWICON(GG,趋势,11);
DRAWTEXT(GZandKZ,差, 底 ),PXDN60,COLORYELLOW;
DRAWTEXT(GGandKD,趋势, 顶共振 ),PXUP60,COLOR00FF00;
VERTLINE(GZandKZ),COLORYELLOW,LINEDOT;
VERTLINE(GGandKD),COLOR00FF00,LINEDOT;
ww:= +NUMTOSTR(红股[p],0)+ 股派: +NUMTOSTR(红利[p],2)+ 元转配: +NUMTOSTR(配股[p],2)+ 股配股价: +NUMTOSTR(配价[p],2)+ 元
sj:=CURRENTTIME;rq:=DATE=CURRENTDATEandDYNAINFO(8);
开盘时间:=IF(sj 93000andsj =113000,TIMETOT0(sj)-34200,IF(sj 130000andsj =150000,TIMETOT0(sj)-39600,TIMETOT0(150000)-39600))/60*rq,PRECISION2;
DRAWTEXTEX(c,1,360,0, 当前交易时间: +NUMTOSTR(开盘时间[p],2)+ 秒 ),COLOREE8899;
DRAWTEXTEX(c,1,10,0, 上市至今除权: +NUMTOSTR(共除权,0)+ 次 ),COLOREE8899;
DRAWTEXTEX(c,1,10,150, 上次除权距今: +NUMTOSTR(上除权,0)+ 天 ),COLOREE8899;
DRAWTEXTEX(c,1,10,300, 本次除权距今: +NUMTOSTR(本除权,0)+ 天 ),COLOREE8899;
DRAWTEXTEX(c,1,10,960, 分配方案10送: +ww),COLOREE8899;
DRAWTEXTEX(c,1,710,0, 当前复权价格: +NUMTOSTR(复权价[p],2)+ 元 ),COLOREE8899;
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;
DKX:=100-90*(HHV(HIGH,20)-(2*C+L)/3)/(HHV(HIGH,20)-LLV(LOW,20));
X:=100-MA(100*(HHV(HIGH,6)-CLOSE)/(HHV(HIGH,6)-LLV(LOW,6)),28);
PARTLINE(DKX,DKX X,RGB(255,0,0),DKX X,RGB(0,255,0)),LINETHICK2;
分界线:50;
公式解读:
公式解读:
编写条件:
10、20、30日粘合,数值相差不超过0.1元的公式。
编写方法:
ma10:=MA(C,10);
MA20:=MA(C,20);
MA30:=MA(C,30);
XG:MAX(MAX(MA10,MA20),MA30)-MIN(MIN(MA10,MA20),MA30)