Merry christmas to all folks .. Syntax errors are {,), or comma kind of error. There're four brackets ({) properly within function .. It shows error in below line. return TimeFrameExpand(meme,tf,expandPoint);
Done ! No Error .. But, It doesn't print range .. !! Code: SetBarsRequired( -2, -2 ); Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); global i; function tf_ma(e,d) { for (i=e; i<d; i++) { tf = i * in1Minute; TimeframeSet(tf); meme = MA(C, 15); TimeframeRestore(); } return TimeFrameExpand(meme,tf,expandPoint); } m = tf_ma(1,9); for( b = 0; b < BarCount; b++ ) { //PlotText(" " , b, L[ b ], colorRed, colorDefault, -12 ); if(m[b]) PlotText(" "+(i), b, L[b]-1-(i), colorCustom1); }
Code: SetBarsRequired( -2, -2 ); Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); function tf_ma(e,d) { global i; for (i=e; i<d; i++) { tf = i * in1Minute; TimeframeSet(tf); meme =MA(C, 15); TimeframeRestore(); } m = TimeFrameExpand(meme,tf,expandPoint); for( b = 0; b < BarCount; b++ ) { //PlotText(" " , b, L[ b ], colorRed, colorDefault, -12 ); if(m[b]) PlotText(" "+(i), b, L[b]-1-(i), colorCustom1); } return; } tt = tf_ma(1,7); // if(tt[b]) PlotText(" "+(i), b, L[b]-1-(i), colorCustom1); ?? It seems like, User defined function can't print range on chart ..