//+------------------------------------------------------------------+ //| Complex.mq4 | //| SemSemFX@rambler.ru | //| | //+------------------------------------------------------------------+ #property copyright "SemSemFX@rambler.ru" #property link "" #property indicator_separate_window #property indicator_buffers 5 #property indicator_color1 Green #property indicator_color2 Navy #property indicator_color3 Red #property indicator_color4 White #property indicator_color5 Maroon //---- buffers double USD[]; double EUR[]; double GBP[]; double CHF[]; double JPY[]; extern int per1=14; extern int D=3; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorShortName("USD:Green; EUR:Blue; GBP:Red; CHF:White; JPY:Brown"); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,USD); SetIndexLabel(0, "USD"); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,EUR); SetIndexLabel(1, "EUR"); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,GBP); SetIndexLabel(2, "GBP"); SetIndexStyle(3,DRAW_LINE); SetIndexBuffer(3,CHF); SetIndexLabel(3, "CHF"); SetIndexStyle(4,DRAW_LINE); SetIndexBuffer(4,JPY); SetIndexLabel(4, "JPY"); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); //---- проверка на возможные ошибки if(counted_bars<0) return(-1); //---- последний посчитанный бар будет пересчитан if(counted_bars>0) counted_bars-=10; limit=Bars-counted_bars; //---- основной цикл int Price=6; int Mode=3; //int per1=13; //int per2=5; for(int i=0; i