//+------------------------------------------------------------------+ //| äâà1.mq4 | //| Copyright © 2009, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2009, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 White #property indicator_color2 Blue //---- input parameters extern int P = 14; extern int n1 = 14; extern int n2 = 14; extern int CountBars=3500; //---- buffers double val1[]; double val2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_ARROW, EMPTY); SetIndexArrow(0,108); SetIndexBuffer(0,val1); SetIndexEmptyValue(0,0.0); SetIndexStyle(1,DRAW_ARROW, EMPTY); SetIndexArrow(1,108); SetIndexBuffer(1,val2); SetIndexEmptyValue(1,0.0); //---- return(0); } //+------------------------------------------------------------------+ //| AltrTrend_Signal_v2_2 | //+------------------------------------------------------------------+ int start() { double F_u_EUR,F_u_GBP,F_d_EUR,F_d_GBP; int limit; int counted_bars=IndicatorCounted(); //---- last counted bar will be recounted if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; for(int i=0; i0&&F_u_GBP>0) { val1[i]=High[i]+35*Point; } if (0>F_d_EUR&&0>F_d_GBP) { val2[i]=Low[i]-35*Point; } } return(0); } //+------------------------------------------------------------------+