Timescales

#1
Hello,

I need to work with the same indicator and the same 5-minute chart in two different time scales, in 5 and 15 minutes.
I changed the indicator to 15 minutes but not good graphics. Can you help me? Thanks,
Greetings.

_SECTION_BEGIN("Aggressive");

SetBarsRequired(1000000, 1000000);
SetChartOptions(2,chartShowArrows|chartShowDates);
SetTradeDelays(0,0,0,0);

period = Param("Period", 13, 1, 240, 1);
mult = Param("Multiplier", 1.7, 1, 240, 0.1);
showPrice = ParamToggle("Show Price","No|yes",0);
showArrows = ParamToggle("Show Arrows","No|yes",1);
showRibbon = ParamToggle("Show Ribbon","No|yes",1);
TimeFrameSet ( in1Minute * 15);
f=ATR(period);

VS[0] = Close[0];
trend[0] = 0;
HighC[0]=0;
Lowc[0]=0;


for( i = period+1; i < BarCount; i++ )
{

vs = vs[i-1];
trend = trend[i-1];
highC = HighC[i-1];
lowc = lowc[i-1];

if ((trend>=0) && ( C <VS ))
{
trend =-1;
HighC = C;
lowc = C;
}

if ((trend<=0) && (C >VS))
{
trend=1;
HighC = C;
lowc = C;
}

if (trend==-1)
{
if (C<lowc) lowc = C;
VS= lowc+ (mult*f);
}


if (trend==1)
{
if (C>HighC) HighC = C;
VS= HighC-(mult*f);
}

}


Buy=Cross(Trend,0);
Sell=Cross(0, Trend);
Short = Sell;
Cover = Buy;
TimeFrameRestore ();
VS15 = TimeFrameExpand (Vs, in1Minute * 15);
if (ShowPrice) //Plot(Close,"Close",colorBlack,styleCandle);
Plot(VS15, "Vol Stop",IIf(trend==1,10,11 ),styleThick);
Plot (100, "", IIf(trend==1,colorPaleGreen,colorPink ), styleArea + styleOwnScale, 0, 1);