九毛八公式指标
有请老师将下面的大智慧分时指标改为通达信分时使用,条件主要是在分时上显示 【净流入金额、总成交金额】。先谢谢了!!! {净流入} ssa:=if(c>ref(c,1),AMOUNT,0); ssb:=if(c0,0,sum(ssa,0)/100000000,1,1),Color0000B2; stickline(净流入>0,0,-sum(ssb,0)/100000000,1,1),Color007A00; stickline(净流入<0,0,sum(ssa,0)/100000000,1,1),Color0000B2; stickline(净流入<0,0,-sum(ssb,0)/100000000,1,1),Color007A00; 0,DOTLINE,ColorFF0000; DRAWTEXTABS(50,10,' ▲ 淨流入金额 : '+NUMTOSTRN(净流入 ,2)+'亿元'),ColorFFC000,linethick4; DRAWTEXTABS(50,50,' ▲ 总成交金额 : '+NUMTOSTRN(总额 ,2)+'亿元'),ColorFFC000,linethick4; 公式模块:
{净流入}
SSA:=IF(C>REF(C,1),AMOUNT,0); SSB:=IF(C<REF(C,1),AMOUNT,0); 净流入:(SUM(SSA,0)-SUM(SSB,0))/100000000,COLOR00FFFF,LINETHICK1;{亿元} 总额:=SUM(AMOUNT,0)/100000000; 流入比:=(净流入)/总额*100; STICKLINE(净流入>0,0,SUM(SSA,0)/100000000,1,1),COLOR0000B2; STICKLINE(净流入>0,0,-SUM(SSB,0)/100000000,1,1),COLOR007A00; STICKLINE(净流入<0,0,SUM(SSA,0)/100000000,1,1),COLOR0000B2; STICKLINE(净流入<0,0,-SUM(SSB,0)/100000000,1,1),COLOR007A00; 0,DOTLINE,COLORFF0000; 文字1:=STRCAT(STRCAT('▲ 淨流入金额 : ',CON2STR(净流入,2)),'亿元'); 文字2:=STRCAT(STRCAT('▲ 总成交金额 : ',CON2STR(总额,2)),'亿元'); DRAWTEXT(BARSCOUNT(C)=3,CONST(HHV(净流入,0))/1.5,文字1),COLORFFC000,LINETHICK4; DRAWTEXT(BARSCOUNT(C)=3,CONST(LLV(净流入,0))/1.5,文字2),COLORFFC000,LINETHICK4;