[MT4指标]BBR指标
主图指标 具体看图示
直接指示趋势的方向
mt4指标类型:趋势指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| BBR.mq4 |
//| Bollinger Bands Breakout Reversal with RSI confirmation |
//+------------------------------------------------------------------+
#property copyright "Copyright @ 2011, downspin"
#property link "[email protected]"
#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Green
#property indicator_color2 Red
#property indicator_color3 DarkSlateGray
extern int corner=0,
x_dist=3,
y_dist=10;
double up,
down;
int init(){
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW); SetIndexArrow(0, 233); SetIndexBuffer(0,up);
SetIndexStyle(1,DRAW_ARROW); SetIndexArrow(1, 234); SetIndexBuffer(1,down);
return(0);
}
int deinit(){
ObjectDelete("rsi");
ObjectDelete("bb");
return(0);
}
int start(){
double rsi0,rsi1,rsi2,bbu0,bbu1,bbl0,bbl1;
color rsicol=indicator_color3,
bbcol=indicator_color3;
for(int i=Bars;i>=0;i--){
rsi0=iRSI(Symbol(),0,7,5,i);
rsi1=iRSI(Symbol(),0,7,5,i+1);
rsi2=iRSI(Symbol(),0,7,5,i+2);
bbu0=iBands(Symbol(),0,20,2,1,0,1,i);
bbu1=iBands(Symbol(),0,20,2,1,0,1,i+1);
bbl0=iBands(Symbol(),0,20,2,1,0,2,i);
bbl1=iBands(Symbol(),0,20,2,1,0,2,i+1);
if((Low[i+1]rsi1){
up=Low-5*Point;
}
if((High[i+1]>bbu1||High>bbu0)&&(rsi1>80||rsi2>80)&&rsi080||rsi1>80||rsi2>80) rsicol=Orange;
if((rsi1<20||rsi2<20)&&rsi0>rsi1) rsicol=Green;
if((rsi1>80||rsi2>80)&&rsi0bbu0||High[i+1]>bbu1) bbcol=Red;
if(LowBBR.jpg