//+------------------------------------------------------------------+ //| Gann_HiLo_Activator.mq4 | //| Q'rob | //| qrob@inbox.ru | //+------------------------------------------------------------------+ #property copyright "Q'rob" #property link "qrob@inbox.ru" //---- #property indicator_buffers 1 #property indicator_color1 Gainsboro extern int Lb=3; double ssl[],Hld,Hlv; #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexBuffer(0,ssl); SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- for(int i=Bars-Lb;i>=0;i--) { if(Close[i]>iMA(Symbol(),0,Lb,0,MODE_SMA,PRICE_HIGH,i+1)) Hld=1; else { if(Close[i]