文华财经期货布林带boll多空变色买卖点主图指标公式源码:
MID:=MA(CLOSE,26);//求N个周期的收盘价均线,称为布林通道中轨
TMP2:=STD(CLOSE,26);//求M个周期内的收盘价的标准差
TOP:=MID+2*TMP2;//布林通道上轨
BOTTOM:=MID-2*TMP2;//布林通道下轨
DRAWCOLORLINE(C>MID,MID,COLORRED,COLORBLUE),LINETHICK2;
DRAWCOLORLINE(TOP>REF(TOP,1),TOP,COLORMAGENTA,COLORLIGHTGREEN),LINETHICK2;
DRAWCOLORLINE(BOTTOM>REF(BOTTOM,1),BOTTOM,COLORMAGENTA,COLORLIGHTGREEN),LINETHICK2;
买:CROSS(C>MID&&TOP>REF(TOP,1)&&BOTTOM<REF(BOTTOM,1),0.5),WORD(0,’买’),VALIGN0,COLORRED,FONTSIZE16;
卖:CROSS(C<MID&&TOP>REF(TOP,1)&&BOTTOM<REF(BOTTOM,1),0.5),WORD(1,’卖’),COLORLIGHTGREEN,FONTSIZE16;
买,SOUND(‘F’);
卖,SOUND(‘F’);
DRAWHORIZONTALLINE(买||卖,IF(买,L,NULL),COLORRED),LINETHICK4;
DRAWHORIZONTALLINE(买||卖,IF(卖,H,NULL),COLORLIGHTGREEN),LINETHICK4;