飞狐多功能主图指标公式
2020/10/4 18:25:08
aa:=DATAPERIOD;
n1:=if(aa=7,13,if(aa=6,5,if(aa=2,10,0)));//在不同周期均线参数取值:周线n1=13 ,日线n1=5 ,5分鈡线n1=10
n2:=if(aa=7,30,if(aa=6,10,if(aa=2,60,0)));
n3:=if(aa=7,0,if(aa=6,30,if(aa=2,0,0)));
n4:=if(aa=7,0,if(aa=6,60,if(aa=2,0,0)));
//如不喜欢不同周期均线参数n取不同的值,可将上面删除并自定义参数n
m1:ma(c,n1);
m2:ma(c,n2);
m3:ma(c,n3);
m4:ma(c,n4);
//上面是均线,下面是增加的显示
sj:=datacount-sysparam(1);
drawnumber(barpos+4=sysparam(1),l,sj,0),align5,COLORgreen;//交易日
aj:=DATEDIFF(date,CURRENTDATE);drawnumber(sysparam(1)=barpos,l,aj,0),shift1,align5,COLORYELLOW;//自然日
涨跌:(DYNAINFO(7)-C)/C*100,COLORYELLOW,LINETHICK0;
DRAWTEXT(sysparam(2)=BARPOS,c,' '+BLKNAME),COLORccffcc,ALIGN4;//板块
交易天:BARSCOUNT(c),LINETHICK0;
bb:=ref(date,BARSCOUNT(c)-1);
SS:=if(bb>1000000,bb+1000000,bb);
DRAWTEXT(sysparam(2)=BARPOS,c,' 上市日'),COLORGREEN,ALIGN5;
drawnumber(sysparam(2)=barpos,l,SS,0),shift13,align5,COLORYELLOW;
看股 吧公式 www.kangu ba.com
其它股票公式列表