Help with a simple iCustom

 
Hi, I have an indicator called NonLagMA_v3.mq4 and I want to reference to it from another indicator. the standard syntax seems to be: //iCustom(NULL, 0, "SampleInd",13,1,0) or //iCustom(NULL,TimeFrame,"NonLagMA",MAAppliedPrice,MAPeriod,0,y); but when I put iCustom(ccy,tf,"NonLagMA_v3",0,8,0) it doesn't work. Any suggestions what the correct syntax would be for this custom indicator? Thanks Here's the original code of the custom indicator: /+------------------------------------------------------------------+ //| NonLagMA_v3.mq4 | //| Copyright © 2006, TrendLaboratory | //| http://finance.groups.yahoo.com/group/TrendLaboratory | //| E-mail: igorad2003@yahoo.co.uk | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, TrendLaboratory" #property link "http://finance.groups.yahoo.com/group/TrendLaboratory" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Orange #property indicator_width1 2 //---- input parameters extern int Price = 0; extern int Length = 8; extern int Displace = 0; double Cycle = 4; //---- indicator buffers double MABuffer[]; double price[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { int ft=0; string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,MABuffer); SetIndexBuffer(1,price); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)); //---- name for DataWindow and indicator subwindow label short_name="NonLagMA("+Length+")"; IndicatorShortName(short_name); SetIndexLabel(0,"NLMA"); //---- SetIndexShift(0,Displace); SetIndexDrawBegin(0,Length*Cycle+Length); //---- return(0); } //+------------------------------------------------------------------+ //| NonLagMA_v3 | //+------------------------------------------------------------------+ int start() { int i,shift, counted_bars=IndicatorCounted(),limit; double alfa, beta, t, Sum, Weight, step,g; double pi = 3.1415926535; double Coeff = 3*pi; int Phase = Length-1; double Len = Length*Cycle + Phase; if ( counted_bars > 0 ) limit=Bars-counted_bars; if ( counted_bars =0;shift--) { Weight=0; Sum=0; t=0; for (i=0;i 0) MABuffer[shift] = Sum/Weight; } return(0); }
Reason: