N:=24;P:=2;
MID:MA(c,N);
UPPER:MID + P*std(c,N);
LOWER:MID - P*STD(c,N);
dRAWTEXTAbs( 200, 0,'上轨红色代表布林张口,绿色表收口;中轨红表示趋势向上,绿表趋势向下');
DRAWTEXTABS(5,5,' '),linethick1,COLOR00EEff;
if (c>o or(c=o and c>ref(c,1))) then
begin
STICKLINE(CLOSE,high,low,0.1,1),colorred;
STICKLINE(CLOSE,open,close,4,1),colorred;
end
if (c<o or(c=o and c<ref(c,1))) then
begin
STICKLINE(CLOSE,high,low,0.1,1),coloraaee00;
STICKLINE(CLOSE,open,close,4,0),coloraaee00;
end;
上下轨比值:upper/lower,linethick0;
PARTLINE(upper,上下轨比值>ref(上下轨比值,1),rgb(255,0,0),上下轨比值<ref(上下轨比值,1),rgb(0,255,0));
PARTLINE(mid,mid>ref(mid,1),rgb(255,0,0),mid<ref(mid,1),rgb(0,255,0));