1、【通达信】箱体买卖(箱顶、箱底、中线、魔鬼)-指标公式源码N:3,30,10【箱顶】:PEAK(CLOSE,N,1)*0.98;【箱底】:TROUGH(CLOSE,N,1)*1.02;【箱高】:100*(【箱顶】-【箱底】)/【箱底】,NODRAW;【中线】:(【箱顶】+【箱底】)/2;DRAWBAND(【中线】,RGB(255,234,154),【箱底】,RGB(255,234,154);DRAWBAND(【中线】,RGB(109,187,129),【箱顶】,RGB(109,187,129);DRAWKLINE(HIGH,OPEN,LOW,CLOSE);N1:=7;LC:=REF(CLOSE
2、,1);X:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100,COLORYELLOW,LINETHICK1;魔鬼:=DRAWLINE(X=HHV(X,N1),X,X=HHV(X,N1),X,XREF(1,X);JRS1:=DRAWICON(TJ1 AND TJ2,X,1);JRS2:=DRAWICON(TJ0 AND TJ3,X,2);DRAWICON(FILTER(JRS10,1),L*0.97,1); DRAWICON(FILTER(JRS20,1),H*1.02,2);【通达信】箱体买卖(箱顶、箱底、中线、魔鬼)-指标公式效果图(文档来源:若水财经社区)