把大智慧《涨跌幅度》修改为飞狐使用的
2020/2/18 19:02:25
公式编写说明:
{涨跌幅度}X:=BARSLAST(DISPSTATUS=1)+1;AH1:hhv(h,X),COLOR0077FF,DOTLINE,LINETHICK0;AL2:llv(l,X),COLORFF9900,DOTLINE,LINETHICK0;HLZ:(AH1+AL2)/2,COLOR00FFFF,DOTLINE,LINETHICK0;下跌:LAST(AH1>H),PRECIS0 ,LINETHICK0;上涨:LAST(Al2<L),PRECIS0 ,LINETHICK0;DRAWTEXT(DISPSTATUS=2,AH1,'----【'+NUMTOSTRN(AH1,2)+'元:跌'+NUMTOSTRN((C-AH1)/AH1*100,1)+'%.'+NUMTOSTRN(下跌,0)+'天】---- '),ALIGN1,Color00FFFF,linethick1,LAYER0;DRAWTEXT(DISPSTATUS=2,Al2,'----【'+NUMTOSTRN(AL2,2)+'元:涨'+NUMTOSTRN((C-AL2)/AL2*100,1)+'%.'+NUMTOSTRN(上涨,0)+'天】---- '),ALIGN1,VALIGN2,Color00ffFF,linethick1,LAYER0;
公式源码回答:
X:=BARSLAST(SYSPARAM(2)=BARPOS)+1;
AH1:hhv(h,X),COLOR0077FF,LINEDOT,LINETHICK0;
AL2:llv(l,X),COLORFF9900,LINEDOT,LINETHICK0;
HLZ:(AH1+AL2)/2,COLOR00FFFF,LINEDOT,LINETHICK0;
下跌:BARSLAST(H>=AH1),PRECISION0 ,LINETHICK0;
上涨:BARSLAST(L<=Al2),PRECISION0 ,LINETHICK0;
DRAWTEXT(BARSTATUS=2,AH1,'----【'+NUMTOSTR(AH1,2)+'元 跌:'+
NUMTOSTR(C/AH1*100-100,1)+'%.'+NUMTOSTR(下跌,0)+'天】---- '),COLORYELLOW,align2;
DRAWTEXT(BARSTATUS=2,AL2,'----【'+NUMTOSTR(AL2,2)+'元 涨:'+
NUMTOSTR(C/AL2*100-100,1)+'%.'+NUMTOSTR(上涨,0)+'天】---- '),COLORYELLOW,align2;
投股 票网 www.tou18. cn
股市公式下载推荐