//+------------------------------------------------------------------+ //| three_color.mq4 | //| Generated by EX4 Decompile Service | //| http://ex4mq4.com | //+------------------------------------------------------------------+ #property copyright "ex4mq4.com - EX4 Decompile Service" #property link "http://ex4mq4.com" #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Red #property indicator_color2 Green #property indicator_color3 Blue //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer(2,ExtMapBuffer3); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i,j,shift; static int width=1; //---- for(i=0; i0 && j<10) { ExtMapBuffer2[shift]=EMPTY_VALUE; ExtMapBuffer3[shift]=EMPTY_VALUE; } } } //---- for(i=10; i0 && j<10) { ExtMapBuffer1[shift]=EMPTY_VALUE; ExtMapBuffer3[shift]=EMPTY_VALUE; } } } //---- for(i=20; i0 && j<10) { ExtMapBuffer1[shift]=EMPTY_VALUE; ExtMapBuffer2[shift]=EMPTY_VALUE; } } } //---- if(width>10) width=1; else width++; SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,width); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,width); SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,width); //---- return(0); } //+------------------------------------------------------------------+