//+------------------------------------------------------------------+ //| ZigzagSymbol.mq4 | //| Copyright © 2010, Vladimir Hlystov | //| cmillion@narod.ru | //+------------------------------------------------------------------+ #property copyright "Copyright © 2010, Vladimir Hlystov" #property link "http://cmillion.narod.ru" //+------------------------------------------------------------------+ #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Red //---- input parameters extern string SymboL= "USDCHF";//USDCAD extern int Zigzag_Depth = 12; extern int Zigzag_Deviation= 5; extern int Zigzag_Backstep = 3; //---- buffers double Buffer[]; int pUsr; //+------------------------------------------------------------------+ int init() { IndicatorBuffers(1); SetIndexStyle(0,DRAW_SECTION); SetIndexBuffer(0,Buffer); SetIndexEmptyValue(0,0.0); return(0); } //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); if(counted_bars>0) counted_bars--; int limit=Bars-counted_bars; for(int i=0; i