九毛八公式指标
以下语句想标识出最近的未回补的缺口,希望从缺口产生那天起(精准定位在这一天),从缺口上下沿分别向右发射两条射线(如图1),但由于涉及循环语句,怎么也做不出来这种效果,只能用HORILINE勉强表达(如图2),但缺口产生前会有多余水平线,看看哪位高人能帮忙修改,谢谢了! 复制内容到剪贴板 代码: {普通向下缺口} STICKLINE(REF(L,1)>H,REF(L,1),H,7.3,1),COLORGREEN,LAYER0; {向下未补跳空缺口} D:=0; WHILE DISPSTATUS=2 AND D公式模块:
{普通向下缺口}
STICKLINE(REF(L,1)>H,REF(L,1),H,7.3,1),COLORGREEN,LAYER0; {向下未补跳空缺口} D:=0; F:=0; WHILE DISPSTATUS=2 AND D<BArslAST(DISPSTATUS=1) DO IF REF(H,D)<REF(L,D+1) AND HHV(H,D+1)<REF(L,D+1) THEN BEGIN DOWN:=D; F:=1; D:=BARSLAST(DISPSTATUS=1); END ELSE D:=D+1; STICKLINE(F,REF(L,DOWN+1),REF(L,DOWN+1),(DOWN+1)*20,0),ColorC0C0C0,ALIGN1,LAYER7; STICKLINE(F,HHV(H,DOWN+1),HHV(H,DOWN+1),(DOWN+1)*20,0),ColorC0C0C0,ALIGN1,LAYER7; DRAWTEXT(DISPSTATUS=2,HHV(H,DOWN+1),NUMTOSTRN(HHV(H,DOWN+1),2)+'-'+NUMTOSTRN(REF(L,DOWN+1),2)+' '),ALIGN2,COLORGREEN,VALIGN0;