Hello sandeeppanja,
your code is wrong, to draw an RSI from an higher TF (15m) into an lower TF (5m) chart you have to expand your arrays. Please see this sample without Gaps:
// RSI 2x Timeframe > Chart TF for example in1Minute ( := Lower ), result: RSI in5Minute and RSI in15Minute ( := Higher )
n = Param( "RSI(n)", 14, 2, 144 );
// in5Minute --------------------------------------------------------------------------------------
TimeFrameSet( in5Minute );
rsi5 = RSI( n );
TimeFrameRestore();
Plot( TimeFrameExpand( rsi5, in5Minute, expandFirst), "RSI-5m", colorWhite, styleLine, 0, 0, 0, 0, 2 );
// in15Minute --------------------------------------------------------------------------------------
TimeFrameSet( in15Minute );
rsi15 = RSI( n );
TimeFrameRestore();
Plot( TimeFrameExpand( rsi15, in15Minute, expandFirst), "RSI-15m", colorCustom12, styleLine, 0, 0, 0, 0, 2 );
// ------------------------------------------------------------------------------------------------
Plot( 30, "", colorBrightGreen, styleLine | styleNoLabel, 0, 0, 0, -1, 1 );
Plot( 50, "", colorLightGrey, styleLine | styleNoLabel, 0, 0, 0, -1, 1 );
Plot( 70, "", colorRed, styleLine | styleNoLabel, 0, 0, 0, -1, 1 );
Best regards,
Peter