#property copyright "jax1000, dd$" #property link "http://www.invest74.ru/index.php?topic=355.msg2065;topicseen#msg2065" #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 Lime #property indicator_color2 RoyalBlue #property indicator_color3 Red #property indicator_color4 Gainsboro #property indicator_color5 Yellow //---- buffers double USD[]; double EUR[]; double GBP[]; double CHF[]; double JPY[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorShortName("USD:Зеленый; EUR:Синий; GBP:Красный;"); 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); } //+------------------------------------------------------------------+ //| Custom 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,per2; //к примеру, евробакс изменился на n%, фунтобакс изменился на k%, еврофунт изменился на d%. //А дальше берем какой-нибудь коэффицент R (любое целое число. например 0 ), и делаем расчет. //Евро=R+n+d; Фунт=R+k-d; Бакс=R-n-k. Не забываем, что n,d,k, могут быть отрицательны, //если евробакс упал, фунтобакс упал, еврофунт упал. for(int i=1; i