//+------------------------------------------------------------------+ //| Tick Chart + Weighted.mq4 | //| Copyright © 2005, MetaQuotes Software Corp. © 2010, J.Arent. | //| http://www.metaquotes.net/, http://www.fxtools.info | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 Red #property indicator_color2 Cornsilk #property indicator_color3 Blue #property indicator_color4 Gray extern int period=2000; extern int width=50; //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; double ExtMapBuffer4[]; int tik,t; double buf[],buf2[],buf3[],MaxB,MinB=1000; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_SECTION); SetIndexBuffer(0,ExtMapBuffer1); SetIndexStyle(1,DRAW_NONE); SetIndexBuffer(1,ExtMapBuffer2); SetIndexStyle(2,DRAW_SECTION); SetIndexBuffer(2,ExtMapBuffer3); SetIndexStyle(3,DRAW_SECTION,EMPTY,2); SetIndexBuffer(3,ExtMapBuffer4); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i,b; //---- t++; b=period; ArrayResize(buf,b); ArrayResize(buf2,b); ArrayResize(buf3,b); if(tik==0) { for(i=0;i0;i--) { buf[i]=buf[i-1]; if(MaxBbuf[i])MinB=buf[i]; buf2[i]=buf2[i-1]; if(MaxBbuf2[i])MinB=buf2[i]; buf3[i]=buf3[i-1]; if(MaxBbuf3[i])MinB=buf3[i]; } buf[0]=Bid; buf2[0]=Ask; buf3[i]=(High[0]+Low[0]+Close[0]+Close[0])/4; for(i=0;i