[MT4指标]布林附图指标
布林附图指标 针对有此类需要的人设计的
附图指标
mt4指标类型:震荡指标
是否能用在mt4手机版上:否
是否含有未来函数:无
//+------------------------------------------------------------------+
//| BBflat.mq4 |
//| by Raff |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Aqua
#property indicator_style1 2
#property indicator_color2 Red
#property indicator_color3 Red
#property indicator_color4 Blue
extern int period=9;
extern int shift=0;
extern int method=0;
extern int price=0;
extern double deviation=1.5;
//---- buffers
double ExtMapBuffer1;
double ExtMapBuffer2;
double ExtMapBuffer3;
double ExtMapBuffer4;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int limit, counted_bars=IndicatorCounted();
double ima, std;
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; iBBflat.jpg