//+------------------------------------------------------------------+ //| KG Average HLCC.mq4 | //| Copyright © 2008, MetaQuotes Software Corp. | //+------------------------------------------------------------------+ #property copyright "Copyright © 2008, Goen" #property link "http://www.forexindo.com/forum/showthread.php?t=95" #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Aqua #property indicator_color2 Magenta #property indicator_color3 Lime //---- buffers double AverageMonth[]; double AverageWeek[]; double AverageDay[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexStyle(0,DRAW_LINE,0,2); SetIndexBuffer(0,AverageMonth); SetIndexLabel(0,"Average Month"); SetIndexStyle(1,DRAW_LINE,0,2); SetIndexBuffer(1,AverageWeek); SetIndexLabel(1,"Average Week"); SetIndexStyle(2,DRAW_LINE,0,2); SetIndexBuffer(2,AverageDay); SetIndexLabel(2,"Average Day"); IndicatorShortName("KG Average HLCC,"); } //---- //return(0); //+------------------------------------------------------------------+ //| MTF Moving Average | //+------------------------------------------------------------------+ int start() { datetime TimeArray[]; int i,shift,limit,y=0,counted_bars=IndicatorCounted(); ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),43200); limit=Bars-counted_bars+43200/Period(); for(i=0,y=0;i