源码
tt:=BARSCOUNT(C);
zz:=SUM(AMOUNT,tt)/SUM(VOL*100,tt);
zz1:=BETWEEN(C/zz,1.05,0.95);
均线:=IF(zz1=0,MA(C,TT),zz);
上轨:均线 + AVEDEV(C,tt)*2,Color0000FF;
下轨:均线 - AVEDEV(C,tt)*2,Color00FF00;
{开盘后前45分钟高点提示}
k1:=HHV(C,0);
t1:=BARSLAST(OPENMINUTES(TIME)<=45);
高点线:REF(k1,t1),LINEDOT,ColorCACA00;
DRAWICON(OPENMINUTES(TIME)>45 and CROSS(CLOSE,高点线+0.001),高点线,4);
DRAWTEXTEX(1,1,20,20,'★分时布林上轨线价格:'+NUMTOSTR(上轨,2)+'元'),Color0000FF;
DRAWTEXTEX(1,1,20,90,'★分时布林下轨线价格:'+NUMTOSTR(下轨,2)+'元'),Color00FF00;
DRAWTEXTEX(1,1,20,160,'★开盘45分钟高点价格:'+NUMTOSTR(高点线,2)+'元'),ColorCACA00;
{坐标设置计算共用数据}
rc:=DYNAINFO( 3);
q:=DATACOUNT;
hh:=DYNAINFO(5);
LL:=DYNAINFO(6);
f:=MAX(hh-rc,rc-LL);
ff:=f/rc*100;
{对应大盘线}
q1h:=IF(ff<1,0.9898*rc,rc-f*1.02);
q1l:=IF(ff<1,0.9798*rc,rc-2*f*1.016);
R:=INDEXC;
Rh:=hhv(r,0);
RL:=LLv(r,0);
Rb:=(q1h-q1l)/(RH[q]-RL[q]);
Ry:=(q1h+q1l-rb*(RH[q]+RL[q]))/2;
大盘线:r*rb+ry,Colorcc99ff;
DRAWTEXT(ISLASTBAR,大盘线,'大盘线'),COLORWHITE;