Multiple Timeframe ROC optimize buy-sell signals

Hi Guys,
I want to optimize a multiple timeframe ROC and put buy-sell signals on the chart but i cant put buy-sell arrows on chart.. What am i doing wrong? Anyone can help? Code optimize the sub-timeframe as 5xminutes and ROC value..
Here is the code..

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));


n = Optimize("n",56,1,100,1); // ROC value

TimeFrameSet(time * in5Minute );
Rocco= ROC(C,n);

Roccom = TimeFrameExpand(Rocco, time * in5Minute, expandFirst);

Buy1= Ref(Rocco,-1) > 0;
sell1= Ref(Rocco,-1) < 0;

Buy = buy1;
Sell = sell1;

Short = Sell;
Cover = Buy;

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Plot( Roccom, "ROC in minutes", colorRed );

// plot arrows
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );

Similar threads