TimeFrame in indicators?

 
How timeframe parameter works in indicators?

I wrote this indicator, but it does not shows the same for ADX in 5MIN window with timeframe 15MIN as ADX in 15MIN window

int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- check for possible errors
if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
//---- main loop
for(int i=limit-1; i>=0; i--)
{

ExtMapBuffer1[i]=iADX(NULL,ADXTimeFrame,ADXPeriod,PRICE_CLOSE,MODE_MAIN,i);

}
//---- done
return(0);
}
Reason: