编写要求:
{波段涨跌幅-主图} ZL:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3); F11:=ZIG(3,15); FXx:=IF((F11> REF(F11,1)),5,105); 转向:=CROSS(ZL,FXx); 高点:=CROSS(fxx,ZL); VERTLINE(转向,1),color00009f; VERTLINE(高点,1),color009f00; DRAWICON(转向,LOW,1),ALIGN1,VALIGN0; DRAWICON(高点,H,2),ALIGN1,VALIGN0; TS:=BARSLAST(转向); 波段涨幅:=(C-ref(L,TS+1))/ref(L,TS+1)*100; DRAWTEXTREL(750,30,'波段涨幅:'+INTPART(波段涨幅)+'%'),COLOR0000ff,LINETHICK3; GD:=BARSLAST(高点); 波段跌幅:=(C-ref(H,GD+1))/ref(H,GD+1)*100; DRAWTEXTREL(750,100,'波段跌幅:'+INTPART(波段跌幅)+'%'),COLOR00ff00,LINETHICK3; 波段涨跌幅公式码源,请改为通达信的,谢谢
解答:
?ZL:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);
F11:=ZIG(3,15);
FXX:=IF((F11> REF(F11,1)),5,105);
转向:=CROSS(ZL,FXX);
高点:=CROSS(FXX,ZL);
AA:=REFDATE(HHV(H,0),DATE);
BB:=REFDATE(LLV(L,0),DATE);
STICKLINE(转向,AA,BB,0,0),COLOR00009F;
STICKLINE(转向,L-1,H+1,0,0),COLORYELLOW;
STICKLINE(高点,AA,BB,0,0),COLOR009F00;
STICKLINE(高点,L-1,H+1,0,0),COLORYELLOW;
DRAWICON(转向,LOW,5);
DRAWICON(高点,H,6);
TS:=BARSLAST(转向);
波段涨幅:=(C-REF(L,TS+1))/REF(L,TS+1)*100;
GD:=BARSLAST(高点);
波段跌幅:=(C-REF(H,GD+1))/REF(H,GD+1)*100;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.01,0.01,0,'波段涨幅:'),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.1,0.01,0,'%'),COLOR0000FF;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.06,0.01,0,波段涨幅),COLOR0000FF;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.01,0.05,0,'波段跌幅:'),COLOR00FF00;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.1,0.05,0,'%'),COLOR00FF00;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.06,0.05,0,波段跌幅),COLOR00FF00;
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!