invalid integer number as parameter 1 for TimeToNumber function

 
I am doing a backtest run of my EA together with my indicator,
the indicator alone runs properly,
however, when i call the custom indicator function in the EA and backtest it
an error occur for my indicator: "invalid integer number as parameter 1 for TimeToNumber function"
the following is the only structure in both my indicator and EA which the code TimeToStr is used
datetime ExactTime = StrToTime(TimeToStr(Date, TIME_DATE) + " " + BOTime
Thanks a lot
lmyyyks
 
What is Date what is BOTime. What are the parameters of the indicator and what are you passing in the Icustom.
 
WHRoeder:
What is Date what is BOTime. What are the parameters of the indicator and what are you passing in the Icustom.

Date is a datetime variable and BOTime is a string variable,

i use this to calculate the expiry date of pending orders, the value returned is correct.

These are the ext variables from the indicator, I made this indicator based on the panca-eagle breakout indicator.
i copied them all to the EA.

extern int    NumberOfDays       = 50;     
extern string BoxEnd             = "09:00:00";    
extern string BoxBegin           = "06:30:00"; 
extern int    BreakOut_Offset    = 10; 
extern color  HLColor            = LightGreen; 
extern color  BreakOutColor      = DarkViolet;
And below is the iCustom function call
high = NormalizeDouble(iCustom(Symbol(), Period(), "lmyyyks",  NumberOfDays, BoxEnd, BoxBegin, BreakOut_Offset,
HLColor, BreakOutColor, 0,1), Digits);

low = NormalizeDouble(iCustom(Symbol(), Period(), "lmyyyks",   NumberOfDays, BoxEnd, BoxBegin, BreakOut_Offset,
HLColor, BreakOutColor, 1,1), Digits);
 
Date is a datetime variable and BOTime is a string variable,
But what do they contain.