Cannot Get Value from iCustom Function

 
Hi Coders,

I want to get value of ex4 indicator from iCustom.
I am not new to coding and i have used iCustom a lot.
But needed to change string input variable in iCustom brfore today.

I have attached the Indicator.
And this is the code I am using : 

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   for(int i=0; i<10; i++)
   {
    Alert(Get_PTS_Magic_Entries_Value(i,5001));
   }
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//|Get PTS Magic Entries Values                                      |
//+------------------------------------------------------------------+
double Get_PTS_Magic_Entries_Value(int Buffer_Number, int Shift)
{
 return(iCustom(NULL,15,"PTS_Trend_WithMagicEntries_Fixed.ex4","====== default: candles_5K ======","candles_50K",Buffer_Number,Shift));
}


I have created a loop for all buffer values to avoid mistakes
But If I want value on 5000 th Candle then I am getting it.

But On 5001, Indicators string input must be changed to increase the number of candle calculations

But Can't do it.

Can Someone Please Help me?
Reason: