//+------------------------------------------------------------------+ //| ProjectName | //| Copyright 2012, CompanyName | //| http://www.companyname.net | //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_buffers 8 #property indicator_level1 1 #property indicator_color1 White #property indicator_color2 Red #property indicator_color3 Teal #property indicator_color4 Yellow #property indicator_color5 Blue #property indicator_color6 Gold #property indicator_color7 Lime #property indicator_color8 Green extern int per=24; extern int calc=48; extern int cross=1; double aud[]; double cad[]; double chf[]; double eur[]; double gbp[]; double jpy[]; double nzd[]; double usd[]; static string sy[28]= { "AUDCAD","AUDCHF","EURAUD","GBPAUD","AUDJPY","AUDNZD","AUDUSD", "CADCHF","EURCAD","GBPCAD","CADJPY","NZDCAD","USDCAD","EURCHF", "GBPCHF","CHFJPY","NZDCHF","USDCHF","EURGBP","EURJPY","EURNZD", "EURUSD","GBPJPY","GBPNZD","GBPUSD","NZDJPY","USDJPY","NZDUSD" }; double Ma[][28]; double Cross[][8]; bool warning=false; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int init() { IndicatorDigits(8); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,aud); SetIndexStyle(1,DRAW_LINE); SetIndexBuffer(1,cad); SetIndexStyle(2,DRAW_LINE); SetIndexBuffer(2,chf); SetIndexStyle(3,DRAW_LINE); SetIndexBuffer(3,eur); SetIndexStyle(4,DRAW_LINE); SetIndexBuffer(4,gbp); SetIndexStyle(5,DRAW_LINE); SetIndexBuffer(5,jpy); SetIndexStyle(6,DRAW_LINE); SetIndexBuffer(6,nzd); SetIndexStyle(7,DRAW_LINE); SetIndexBuffer(7,usd); SetIndexLabel(0,"AUD"); SetIndexLabel(1,"CAD"); SetIndexLabel(2,"CHF"); SetIndexLabel(3,"EUR"); SetIndexLabel(4,"GBP"); SetIndexLabel(5,"JPY"); SetIndexLabel(6,"NZD"); SetIndexLabel(7,"USD"); IndicatorShortName("Index("+(string)per+","+(string)calc+","+(string)cross+")"); int element_count1=ArrayResize(Ma, MathMax(calc+1,cross+1)); int element_count2=ArrayResize(Cross, MathMax(calc+1,cross+1)); return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { for(int i=0; i