//+--------------------------------------------------------------------+ //| HLBolinger.mq4 | //| Copyright © 2008, Sugeng Pudjiono & Associate | //| http://www.payroll-kita.com/ | //+--------------------------------------------------------------------+ #property copyright "Copyright © 2008, Sugeng Pudjiono & Associate" #property link "http://www.payroll-kita.com/" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LightBlue #property indicator_color2 LightBlue extern double TPeriod=24,TStd=2,BPeriod=24,BStd=2; //---- indicator buffers double TBuffer[]; double BBuffer[]; int limit; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexShift(0,0); SetIndexDrawBegin(0,0); SetIndexBuffer(0,TBuffer); SetIndexStyle(0,DRAW_LINE,0,1); SetIndexLabel(0,"Top"); SetIndexShift(1,0); SetIndexDrawBegin(1,0); SetIndexBuffer(1,BBuffer); SetIndexStyle(1,DRAW_LINE,0,1); SetIndexLabel(1,"Bottom"); return(0); } int deinit() { GlobalVariablesDeleteAll(); return(0); } //+----------------------+ //| H/L Bollinger Bands | //+----------------------+ int start() { int counted_bars=IndicatorCounted(); limit=Bars-counted_bars; if(counted_bars>0) limit++; for(int i=limit; i>-1; i--) { TBuffer[i]=iBands(NULL,0,TPeriod,TStd,0,PRICE_HIGH,MODE_UPPER,i); BBuffer[i]=iBands(NULL,0,BPeriod,BStd,0,PRICE_LOW ,MODE_LOWER,i); } return(0); }
Sample
Analysis
Market Information Used:
Indicator Curves created:
Implements a curve of type DRAW_LINE
Indicators Used:
Bollinger bands indicator
Custom Indicators Used:
Order Management characteristics:
Other Features: