## 【通达信】引用公式的建立步骤

2017-12-07
 `1.第一个公式建立在普通技术指标分类里;2.第二个是选股公式,建立在条件选股分类里.`一：建立公式名称“引用”源码：ZH:REF(H,1);ZL:REF(L,1);二 ：主图公式名称：分时五线谱源码："引用.ZH#DAY" ..."引用.ZL#DAY" ...举例1:一：建立公式名称“引用”源码：ZH:REF(H,1);ZL:REF(L,1);二 ：主图公式名称：分时五线谱源码："引用.ZH#DAY",COLOR0000FF;"引用.ZL#DAY",COLOR00FF00;现价:C,LINETHICK2,COLORFFFF00;均价:SUM(C*V,BARSCOUNT(C))/SUM(V,BARSCOUNT(C)),COLOR00FFE1;DRAWICON(CROSS(现价,引用.ZH#DAY),现价,13);RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1;JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1;MA1:=REF(C,JY);MA2:=REF(MA1,JY);MA3:=REF(MA2,JY);MA4:=REF(MA3,JY);MA5:=REF(MA4,JY);MA6:=REF(MA5,JY);MA7:=REF(MA6,JY);MA8:=REF(MA7,JY);MA9:=REF(MA8,JY);CK:REFDATE((C+MA1+MA2+MA3+MA4+MA5+MA6+MA7+MA8+MA9)/10,DATE),COLORAC59FF,CIRCLEDOT;DRAWTEXT(ISLASTBAR,CK,' 参考线'),COLOR0000FF;DRAWTEXT(ISLASTBAR,引用.ZH#DAY-0.001,' 昨高'),COLOR0000FF;DRAWTEXT(ISLASTBAR,引用.ZL#DAY+0.001,' 昨低'),COLOR00FF00;举例2:YY0yyo:INDEXO,colorred,linethick2;yyh:INDEXH,coloryellow,linethick2;yyl:INDEXL,colorblue,linethick2;yyc:INDEXC,colorgreen,linethick2;{横盘30分，N,30,1,240;P,10,1,240}（这个公式分析周期是1分钟）a1:=(hhv(h,n)-llv(l,n))/ma(c,n)

n and a2>3,n,a2);a5:=1.5*abs((hhv(INDEXh,a4)-llv(INDEXl,a4))/"yyo.yyo#day">abs((hhv(h,a4)-llv(l,a4))/"yyo.yyo#day"a6:=COUNT(v>1,a4)>a4/5;a7:=("yyo.yyo#day"-llv(l,a4))/"yyo.yyo#day"<("yyo.yyo#day"-llv(INDEXl,a4))/"yyo.yyo#day";a8:=v>ref(hhv(v,a2),1) and c>ref("yyo.yyh#day",1);aa1:=ref(a1,1) and a3 and a5 and a6;aa:= aa1;b1:=COUNT(v>1,a4)<3;b2:=(hhv(h,a2)-llv(l,a2))/"yyo.yyh#day"<0.002;bb:=b1 and b2;强于大盘:=C/REF(C,1)>INDEXC/REF(INDEXC,1);横盘30分:强于大盘 and (aa or bb) and dynainfo(7)>=dynainfo(11);

0条评论

×

¥.00

• 全站无广告

• 全屏阅读

• 全站电子书免费读

• VIP专属标识