#property copyright "Copyright 2013, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Green #property indicator_width1 1 double Bottoms[]; int init() { IndicatorBuffers(1); SetIndexStyle(0,DRAW_SECTION); SetIndexBuffer(0,Bottoms); SetIndexEmptyValue(0,0.0); IndicatorShortName("zz to show bottoms"); return(0); } int deinit() { return(0); } int start() { int counted_bars=IndicatorCounted(); int limit=0; limit = Bars-counted_bars; for(int shift=limit-1;shift>=0;shift--) { Bottoms[shift]=iCustom (NULL,0,"ZigZag", 12,5,3, 1, shift); if(Bottoms[shift]>0.1) Bottoms[shift]=Bottoms[shift]; } return(0); }