通达信添加了内容涨幅量尺B源码

 2023-07-28 21:27:38    通达信指标网  

{涨幅量尺 B}   

{设参数 ZZ(,3,10,5)}   

最低:=TROUGHBARS(L,ZZ,1);   

低价:=REF(L,BARSLAST(最低=0));   

低价_:DRAWLINE(最低=0,L,ISLASTBAR,低价,0),COLORFFFF00;   

FU:=C-低价_;   

到当前幅度:FU/低价_*100,NODRAW;   

DRAWTEXT(ISLASTBAR, C, '← -到当前幅度%'),COLOR00EFFF;   

DRAWTEXT(ISLASTBAR,低价_,'低价'),COLORFFFF00;   

_5%:DRAWLINE(最低=0,L*1.05,ISLASTBAR,低价*1.05,0),COLOR999999;   

_8%:DRAWLINE(最低=0,L*1.08,ISLASTBAR,低价*1.08,0),COLOR999999;   

_13%:DRAWLINE(最低=0,L*1.13,ISLASTBAR,低价*1.13,0),COLOR999999;   

_18%:DRAWLINE(最低=0,L*1.18,ISLASTBAR,低价*1.18,0),COLOR999999;   

_25%:DRAWLINE(最低=0,L*1.25,ISLASTBAR,低价*1.25,0),COLOR999999;   

DRAWTEXT(ISLASTBAR,_5%,'5%'),COLOR208FFF;   

DRAWTEXT(ISLASTBAR,_8%,'8%'),COLOR208FFF;   

DRAWTEXT(ISLASTBAR,_13%,'13%'),COLOR208FFF;   

DRAWTEXT(ISLASTBAR,_18%,'18%'),COLOR208FFF;   

DRAWTEXT(ISLASTBAR,_25%,'25%'),COLOR208FFF;   

JJJ:=IF(DYNAINFO(8)>0.01,0.01*DYNAINFO(10)/DYNAINFO(8),DYNAINFO(3));   

DDD:=(DYNAINFO(5)<0.01 || DYNAINFO(6)<0.01);   

JJJT:=IF(DDD,1,(JJJ<(DYNAINFO(5)+0.01) && JJJ>(DYNAINFO(6)-0.01)));   

CYC1:IF(JJJT,0.01*EXPMA(AMOUNT,5)/EXPMA(VOL,5),EMA((HIGH+LOW+CLOSE)/3,5)),COLORFFFFFF;   

CYC2:IF(JJJT,0.01*EXPMA(AMOUNT,13)/EXPMA(VOL,13),EMA((HIGH+LOW+CLOSE)/3,13)),COLOR00FFFF;   

CYC3:IF(JJJT,0.01*EXPMA(AMOUNT,34)/EXPMA(VOL,34),EMA((HIGH+LOW+CLOSE)/3,34)),COLORFFAAFF,LINETHICK2;   

IF(CYC3>REF(CYC3,1),CYC3,DRAWNULL),LINETHICK2,COLORFFBBFF;   

IF(CYC3<REF(CYC3,1),CYC3,DRAWNULL),LINETHICK2,COLOR00FF00;   

DRAWTEXT(ISLASTBAR AND CYC3>REF(CYC3,1),CYC3,' ↑成本'),COLORFFAAFF;   

DRAWTEXT(ISLASTBAR AND CYC3<REF(CYC3,1),CYC3,' ↓成本'),COLOR00FF00;   

DRAWTEXT(ISLASTBAR AND CYC1>REF(CYC1,1),CYC1,' ↑5'),COLORFFAAFF;   

DRAWTEXT(ISLASTBAR AND CYC1<REF(CYC1,1),CYC1,' ↓5'),COLOR00FF00;   

DRAWTEXT(ISLASTBAR AND CYC2>REF(CYC2,1),CYC2,' ↑13'),COLORFFAAFF;   

DRAWTEXT(ISLASTBAR AND CYC2<REF(CYC2,1),CYC2,' ↓13'),COLOR00FF00;  

  •  标签:  

原文链接:https://www.tdxzb.com/?id=1517

本文版权:如无特别标注,本站文章均为原创。

相关文章

服务热线

18020657357

微信客服

微信客服